Temp/Humidity sensor autodiscovery
Posted: Thursday 14 April 2022 9:23
I am trying to prototype a humidity/temperature (just starting with a temperature) sensor on the mosquito_pub commandline using autodiscovery and am having some problems understanding the nomenclature. I did this:
which showed this in the log:
At this point should I expect to see a new device in the device list with an ID of 123456? I do not see that in the device list
I tried to send an update to it
and domoticz said:
I have looked through a lot of stuff to find out how to form the autodiscover message and have not really gotten a concrete example/answer. Please help.
Code: Select all
mosquitto_pub -r -h beeboxslim -p 1883 -t "homeassistant/sensor/123456/config" -m '{"name": "goveeGarden", "stat_t": "domoticz/sensor/123456/state", "unit_of_meas":"C", "uniq_id": "123456"}'
Code: Select all
mqtt-autodisc: discovered 123456/goveeGarden {unique_id: 123456}
I tried to send an update to it
Code: Select all
mosquitto_pub -r -h beeboxslim -p 1883 -t "domoticz/in" -m '{"command":"udevice", "idx":123456, "nvalue":0, "svalue":"20"}'
Code: Select all
2022-04-14 00:19:20.739 Error: mqtt-sensors: unknown idx received! (idx 123456)