Hello,
Is it possible to connect to FHEM on the same server (raspberry pi) using my own software?
Maybe via PHP, python, javascript etc?
I would like to be able to set desired temperatures to my MAX! radiator thermostats and if possible read the temperatures as accurate (and quickly) as possible?
Do i need telnet or is there a better way to achieve this?
Hi,
you could achieve this via telnet, but it could be also done over http. I wrote a small set of scripts to be care about the csrf token.
https://github.com/heinz-otto/fhemcl
You could use any FHEM commandline syntax like set, get or {perl} commands and you will get the response.
For some programming languages there will be also a kind of API libs available.
Otto
Yes. Apart from the REST API (which is not very well documented, but some good ideas are given here: https://forum.fhem.de/index.php?topic=14491.0)
there is also a Python connector to FHEM.
https://pypi.org/project/fhem/
Regards
pah
Thank you, I will look after that, now I first have to solve some other problems :o (https://forum.fhem.de/index.php/topic,114896.0.html).
I'd recommend using mqtt for communication among FHEM and other applications. Standardized, simple, supported by fhem and you've got large variety of libs to choose from in your $favourite language ;)
I'm running a custom serial protocol (over RS485) for my switches in my house and using a custom piece of software attached to the serial interfaces translates commands coming from the switches to mqtt.
Always nice to get recommendations from FHEM newbies...
pah