New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Some states not published #34
Comments
Hi @tnowak maybe it's because all the states you mentioned using a unit (%). You can try if it is caused by this by emptying the "unit" attribute. |
Hi @mrbungle64 Thanks for the tip although I believe the unit is being only used after the value within ioBroker admin panel. But I discovered something new. I restarted MQTT-client instance serveral times and found such records in the log (its reverse, newest on top) Restart #1
Restart #2
So seems that publishing both ecovacs-deebot/0/consumable/# and ecovacs-deebot/0/info/battery |
I have already found that if I manually change value within ioBroker panel (for instance: remaining filter, from 92% to 90%) then the value gets published to MQTT instantly. But they don't get published upon MQTT-client adapter restart, despite setting publish - enabled ("changes only" is not checked). And as those values change very rarely, I would need to wait long tome to get them published for the first time.... Is this a bug? |
That is not a bug, mqtt-client should not send all states on restart, this could cause other issues. You can set the retain flag to true for this state so your MQTT Broker saves it's last value and will send it to connecting clients. For more see https://www.hivemq.com/blog/mqtt-essentials-part-8-retained-messages/ |
I have Retain flag set on all published values. But doesn't the retain flag go to MQTT with first publish command? Some values don't change much (think of brush lifespan, that changes veeeeery slowly in time). That brush lifespan value wont get published anytime soon and that's the problem. |
Yes you are right, for those values you may have to initially publish it once manually. You can re-enter it's value via ioBroker admin. An enhancement to the adapter would be to force a publish after enabling mqtt publishing for a state. |
Could adapter publish state once (kind of "initial publish") right after it has been configured to be published (on "save" button)? That would be even more convinient and no mass publish would occur on adapter restart |
This would definitely help me a lot! |
Note: I switched to the mqtt adapter without the -client, which has some feature like 'send all states on startup'. |
Hi,
I'm new to ioBroker and MQTT-client adapter but I'm ambitiously trying to use it with ecovacs-deebot adapter. Version 1.3.1 mostly works fine, but I can't figure out why some of Deebot states are not being published at MQTT broker at all.
I have enabled MQTT-client (main checkbox) and publish (all, not only changes) with retain flag on 11 objects:
These get published:
iobroker/ecovacs-deebot/0/info/deviceStatus
iobroker/ecovacs-deebot/0/info/cleanstatus
iobroker/ecovacs-deebot/0/info/chargestatus
iobroker/ecovacs-deebot/0/history/dateOfLastStartCharging
iobroker/ecovacs-deebot/0/history/dateOfLastStartCleaning
iobroker/ecovacs-deebot/0/history/timestampOfLastStartCharging
iobroker/ecovacs-deebot/0/history/timestampOfLastStartCleaning
Those don't get published at all:
iobroker/ecovacs-deebot/0/info/battery
iobroker/ecovacs-deebot/0/consumable/filter
iobroker/ecovacs-deebot/0/consumable/main_brush
iobroker/ecovacs-deebot/0/consumable/side_brush
Configuration is the same. Any idea why? How can I debug it?
Only this gets published:
The text was updated successfully, but these errors were encountered: