FHEM Forum

FHEM => English Corner => Thema gestartet von: newb am 03 Januar 2020, 22:23:59

Titel: CustomReadings without polling interval
Beitrag von: newb am 03 Januar 2020, 22:23:59
Hi I've got a sensor which sends its readings with GET request:

xxx.xxx.xxx.xxx:8380/fhem?cmd=setreading device state xxxx

I've setup CustomReadings device in FHEM, but it polls for readings all the time and gives ERROR. I want this device to be passive and only take readings when the sensor sends the GET request. Is this possible?
Titel: Antw:CustomReadings without polling interval
Beitrag von: xenos1984 am 03 Januar 2020, 23:00:57
Why don't you use a dummy device instead of CustomReadings? The dummy does not poll and you can set its readings via telnet or HTTP / FHEMWEB.
Titel: Antw:CustomReadings without polling interval
Beitrag von: newb am 04 Januar 2020, 10:09:08
Yes, you are right :) It works well with dummy device. Although I'm considering setting it up as MQTT device as well, it seems to me passing the data via mqtt is quicker than GET request (with ssl enabled). Do you have any experience? The goal is to save as much battery as possible.
Titel: Antw:CustomReadings without polling interval
Beitrag von: rudolfkoenig am 04 Januar 2020, 11:39:09
Zitatit seems to me passing the data via mqtt is quicker than GET request (with ssl enabled). Do you have any experience?
That will heavily depend on the implementation of the client.
In theory MQTT is more efficient then HTTP for transmitting small amounts of data, but knowing FHEM internals you can build an HTTP solution which is equally efficient.
If you do not want to research a lot, go for MQTT.