Giter Club home page Giter Club logo

Comments (6)

jpawlowski avatar jpawlowski commented on June 25, 2024 1

Actually it once was nc or telnet at the very beginning IIRC. However, the way fhem.pl handles i/o was not 100% compatible (i remember something about new lines and carriage return as well as general encoding / UTF-8). This is why this method uses the very own and official "API" that fhem.pl provides. You may even find some heated discussion about this from that time in the forum. The overall intention here is to minimize the varieties of potential issues and to "charm" fhem.pl as good as possible.

from fhem-docker.

sidey79 avatar sidey79 commented on June 25, 2024 1

We now have a timeout for fhem clientmode:

https://forum.fhem.de/index.php/topic,117250.0.html

But i think implementing #30 is also worth, because the script can also hang on othere lines for some time.

from fhem-docker.

jpawlowski avatar jpawlowski commented on June 25, 2024

I'd rather prefer this to be fixed in fhem.pl as timeout handling should be done where connectivity is handled. Other code relying on this connection method would also benefit from it.

That being said, it might be challenging to convince the fhem.pl maintainer to implement such change or even accept a pre-defined patch (based on experiences from the past). Good luck.

from fhem-docker.

sidey79 avatar sidey79 commented on June 25, 2024

I understand what you mean. May i have a chance.

What about using a more lightweight client to query fhem?

Calling fhem.pl every intervaltime seems a little bit wasty of ressources. I think a telnet or netcat command woud bei enough to get the response.

from fhem-docker.

sidey79 avatar sidey79 commented on June 25, 2024

I know these problems on the telnet api. Because it was so ugly i do all stuff via http / https requests on fhemweb.
This is much better to handle.

from fhem-docker.

jpawlowski avatar jpawlowski commented on June 25, 2024

Great! Thanks for taking the lead here. Let's continue discussing in PR #30 and consider this issue to be resolved for now.

from fhem-docker.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.