homieiot / homie-esp8266

💡 ESP8266 framework for Homie, a lightweight MQTT convention for the IoT
http://homieiot.github.io/homie-esp8266
MIT License
1.36k stars 308 forks source link

OTA Config updates - mqtt message stripping chars #405

Closed psyciknz closed 4 years ago

psyciknz commented 7 years ago

As per: http://marvinroger.github.io/homie-esp8266/develop/others/ota-configuration-updates/#ota-entities-projects

I'm trying ot play with updating the config file. It seems to imply I send a json string to <topic>/<device>/$implmentation/config

So in my case (since I've changed the topic to sensors/d1mini): mosquitto_pub -t sensors/d1mini/mqtt-test/$implementation/config -m <json data>

But when I subscrive to sensors/d1mini/# I see the message come in as: sensors/d1mini/mqtt-test//config

Am I missing something, or it this functionality still being developed?

elescondite commented 7 years ago

Put the topic in quotes and all will be well (the shell is seeing $implementation as an empty variable)

mosquitto_pub -t 'sensors/d1mini/mqtt-test/$implementation/config/set' -m <json data>

Note that I added "/set" at the end as well

psyciknz commented 7 years ago

Actually I did work it out, and it's single quotes not double, else it was ignored.

So I made it do something, but then it immediately fries the board 9gets a WDT reset and locks up.

psyciknz commented 6 years ago

So been playing again, managing to set a json file to the config/set, and after a second I see the configt message get an update, but it doesn't seem to get a new value (I'm just trying to update the name with: mosquitto_pub -t 'sensors/d1mini/mqtt-test/$implementation/config/set' -m '{ "name": "Andoni Sensor" }'

It does cause the device to reboot it seems (which is probably what the sub on /config is picking up.

timpur commented 6 years ago

still having these issues ?

stritti commented 4 years ago

Closing because of no response for long time.