Open shaohme opened 1 month ago
Just to be sure what you experiencing: Does the device not transmit payloads? Or is it the problem that the transmitted status is set to "offline"?
Just to be sure what you experiencing: Does the device not transmit payloads?
I assume by 'payloads' you mean MQTT messages to the broker. If so, it does.
Or is it the problem that the transmitted status is set to "offline"?
Yes. It starts by setting the value 'online' but shortly after sets it to 'offline' and stays there, as show in the screenshot.
It starts by setting the value 'online' but shortly after sets it to 'offline' and stays there, as show in the screenshot.
I've tried to reproduce this, using this setting:
I get one "online" message, then nothing more - until I do a software reboot (yellow button on the bottom of config screen). I then get one "offline" message, and as soon as it boots one "online" message:
Following activation of the Reboot button:
Then, 2 seconds later - when it has rebooted:
I have not setup a "Client ID" in my MQTT config before. When I set it, and reboot the reader, the problem disappeared :face_with_diagonal_mouth:
I think each client has to "present itself" to the broker with an ID (that must not be the same as any other client). I guess that explains it!
If your setup now works as expected, I invite you to close this thread.
I think each client has to "present itself" to the broker with an ID (that must not be the same as any other client). I guess that explains it!
If your setup now works as expected, I invite you to close this thread.
I guess, but should AMS not inform the user of this? Either by recommending or demand a client id?
I guess, but should AMS not inform the user of this? Either by recommending or demand a client id?
That is actually a good idea! This field could be auto populated with Hostname as default value. I will update the Wiki now to remind that Client ID cannot be empty.
I mark this as an enhancement proposition for @gskjold to consider.
Making this field required when MQTT is enabled
Describe the bug The AMS reader appears offline immediately after appearing online when connecting to MQTT.
To Reproduce Steps to reproduce the behavior:
Expected behavior It should be kept in 'online' state as long as the device is running.
Screenshots
Hardware information:
Relevant firmware information: