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?
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.
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.
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.