Hi - I have two M5Stick devices running OMG.
I publish identical commands to N_1 and N_2 and see the commands register in my MQTT viewer.
However, only one respects the persisted whitelist command.
They are both running the same compiled firmware.
Any thoughts?
Hi @alfista2600,
Which binary or custom environment of which version are you using?
Could you also post the BTtoMQTT output for both gateways?
Thanks for the reply.
it is a slightly modified 15.0 binary compiled with platformio, but both get the exact same binary via OTA upgrade script.
and I republish the white list…
mosquitto_pub -h 192.168.0.XXX -t "home/OMG_M5STICK_1/commands/MQTTtoBT/config" -m "{\"interval\":1000, \"ignoreWBlist\":False, \"save\":true, \"filterConnectable\":true, \"discovery\":False, \"lowpowermode\":0, \"interval\":1, \"white-list\":[devices]}" -r
mosquitto_pub -h 192.168.0.XXX -t "home/OMG_M5STICK_2/commands/MQTTtoBT/config" -m "{\"interval\":1000, \"ignoreWBlist\":False, \"save\":true, \"filterConnectable\":true, \"discovery\":False, \"lowpowermode\":0, \"interval\":1, \"white-list\":[devices]}" -r
Upgrades:
mosquitto_pub -t "home/OMG_M5STICK_1/commands/firmware_update" -m '{
"version": "custom",
"password": "OTAPASSWORD",
"url": "http://192.168.0.XXX:8080/static/omg/firmware.bin"}'
mosquitto_pub -t "home/OMG_M5STICK_2/commands/firmware_update" -m '{
"version": "custom",
"password": "OTAPASSWORD",
"url": "http://192.168.0.XXX:8080/static/omg/firmware.bin"}'
BTtoMQTT:
{"bleconnect":true,"interval":100,"adaptivescan":true,"intervalacts":55555,"intervalcnct":3600000,"onlysensors":false,"hasspresence":false,"presenceTopic":"presence/","presenceUseBeaconUuid":false,"minrssi":-100,"extDecoderEnable":false,"extDecoderTopic":"undecoded","filterConnectable":true,"pubadvdata":false,"pubBeaconUuidForTopic":false,"ignoreWBlist":false,"btqblck":3744,"btqsum":29971,"btqsnd":21960,"btqavg":1.3648}
{"bleconnect":true,"interval":100,"adaptivescan":true,"intervalacts":55555,"intervalcnct":3600000,"onlysensors":false,"hasspresence":false,"presenceTopic":"presence/","presenceUseBeaconUuid":false,"minrssi":-100,"extDecoderEnable":false,"extDecoderTopic":"undecoded","filterConnectable":true,"pubadvdata":false,"pubBeaconUuidForTopic":false,"ignoreWBlist":false,"btqblck":4722,"btqsum":13832,"btqsnd":9605,"btqavg":1.440083}
All looks fine, especially the retained flag of the MQTTtoBT/config
messages, and with "ignoreWBlist":False
.
Although I have to say that maybe you want to try to only publish the white-list in a message with the retain flag, as all the other settings only require to be sent once, without retain, as "save":true
does store them in the flash of the devices so that they get automatically reloaded from there after every restart, until specifically erased or the flash being completely erased. BUT the save does not store the white-list in flash memory, so it should have its own, sole white-list retained message on the broker.
See if that changes anything for your.
Otherwise, could it also be that your MQTT broker does not correctly store the retained messages?
While I like MQTT Explorer a lot, I do not know if and how it is possible to see retained messages for particular topics. (If anyone does know, please post it here
For cases like that I like using MQTTFX, which nicely shows all retained messages for any subscribed topic at the top of the messages list. Just to make sure your broker has correctly stored and retained the white-list command for both your gateways.
Thanks for the detailed reply.
I am not sure why I switched to Explorer as I used to use FX. Both are installed now.
I could see both messages properly retained.
I cleared out the saved options, and added a restart command after passing the whitelist.
Five minutes in, it appears to be working!
Appreciate the help. Happy Little Friday!
spoke too soon… I guess I’ll erase and re-flash…
How have you modified the environment. Do you possibly have any additional other module added to the BT one?