Closed boc-tothefuture closed 5 years ago
Hi @davidgraeff!
I can see that you have labeled the issue as a "bug", but I just want to confirm that the error is still present in the latest snapshot version of openHAB (openHAB 2.5.0 Build #1557).
Thank you SOOOO much for all the work you have done with MQTT and Homie, let's see if we can finally get a stable version of the binding (the integration with Homie is awesome, but we have to polish some details :wink: )
Best regards,
Aitor
Hi @boc-tothefuture!
What type of broker are you using? Mosquitto or the embedded mqtt broker (moquette)?
I have been doing some tests and it seems that I can not reproduce the issue when I use an external broker such as Mosquitto :confused: So perhaps the issue is related to #4774, where @cubistico discovered that the embedded broker doesn't store retained messages between reboots. @davidgraeff has already created a PR to update Moquette to the latest version (#5194) and he claims that that fixes the mentioned bug, so we will see if something changes when the PR is merged :+1:
Hi @bodiroga I am seeing this using Mosquitto.
Ummmm... this is really strange, I have tried with a Homie-ESP8266 device (NodeMCU V2) and a python script (using the homie-python library) and after rebooting the Eclipse IDE many times (I'm building openHAB from source) I'm unable to reproduce the issue with Mosquitto :man_facepalming: It's true that the units are lost
@boc-tothefuture, in the first message you have mention that you have tried with openHAB 2.5.0M1, but what about openHAB 2.5.0 SNAPSHOT? I don't know if you want to messed up with your openHAB installation, but if you test the issue with the latest snapshot version it would be awesome.
The homie channel is a read-only channel (a sensor state etc) and cannot be published to. The device should not go offline because of that though. Fixed in my recent mqtt migration pr.
@davidgraeff - What is odd is that the channel in question here should not be readonly. Here is the output from mosquitto_sub:
omie/nuvo/source5/displayline1/$name Source 5 Display Line 1
homie/nuvo/source5/displayline1/$settable true
homie/nuvo/source5/displayline1/$retained true
homie/nuvo/source5/displayline1/$datatype string
Does something default to read-only somehow?
As soon as no command topic is known the binding switches to readonly mode for a channel. The "$settable true" should prevent that.
I have increased the waiting timeout for a property to 2.5s. Maybe the property was not fast enough send by the broker (the former timeout was 200 milliseconds for all attributes).
Is this still present in latest snapshots?
@J-N-K now that we have an M2 build I will upgrade and test this weekend.
With 2.5M2 I am no longer seeing the error message. Although I am seeing the same behavior as before.
2019-08-17 18:09:07.469 [vent.ItemStateChangedEvent] - ChromecastStatusAlbum changed from UNDEF to Fire! The Very Best of The Pointer Sisters
2019-08-17 18:09:07.469 [vent.ItemStateChangedEvent] - ChromecastStatusArtist changed from UNDEF to The Pointer Sisters
2019-08-17 18:09:07.470 [vent.ItemStateChangedEvent] - ChromecastStatusTitle changed from UNDEF to Jump (For My Love)
2019-08-17 18:09:07.470 [ome.event.ItemCommandEvent] - Item 'Nuvo_Source_5_Display_Line_3' received command The Pointer Sisters
2019-08-17 18:09:07.472 [ome.event.ItemCommandEvent] - Item 'Nuvo_Source_5_Display_Line_2' received command Fire! The Very Best of The Pointer Sisters
2019-08-17 18:09:07.474 [ome.event.ItemCommandEvent] - Item 'Nuvo_Source_5_Display_Line_4' received command Jump (For My Love)
2019-08-17 18:09:07.476 [nt.ItemStatePredictedEvent] - Nuvo_Source_5_Display_Line_3 predicted to become The Pointer Sisters
2019-08-17 18:09:07.477 [nt.ItemStatePredictedEvent] - Nuvo_Source_5_Display_Line_2 predicted to become Fire! The Very Best of The Pointer Sisters
2019-08-17 18:09:07.478 [nt.ItemStatePredictedEvent] - Nuvo_Source_5_Display_Line_4 predicted to become Jump (For My Love)
2019-08-17 18:09:07.480 [vent.ItemStateChangedEvent] - Nuvo_Source_5_Display_Line_3 changed from Tracy Chapman to The Pointer Sisters
2019-08-17 18:09:07.480 [vent.ItemStateChangedEvent] - Nuvo_Source_5_Display_Line_2 changed from Tracy Chapman to Fire! The Very Best of The Pointer Sisters
2019-08-17 18:09:07.482 [vent.ItemStateChangedEvent] - Nuvo_Source_5_Display_Line_4 changed from Fast Car to Jump (For My Love)
2019-08-17 18:09:07.482 [vent.ItemStateChangedEvent] - Nuvo_Source_5_Display_Line_3 changed from The Pointer Sisters to Tracy Chapman
2019-08-17 18:09:07.482 [vent.ItemStateChangedEvent] - Nuvo_Source_5_Display_Line_2 changed from Fire! The Very Best of The Pointer Sisters to Tracy Chapman
2019-08-17 18:09:07.482 [vent.ItemStateChangedEvent] - Nuvo_Source_5_Display_Line_4 changed from Jump (For My Love) to Fast Car
Essentially:
A restart of openhab fixes it (for a while).
@J-N-K - Since I no longer get the error message, should I close this one and open new one?
Yes. Seems to be a different cause.
Encountering an issue in which a device configured with the homie convention goes offline eventually. I get notified after I try and send a message to it. I still see this issue in 2.5M1.
Here is the rule:
When that rule gets called, I get the following error in my openhab.log:
So the item is now null for some reason.
I see this in the event.log at the same time:
2019-01-07 06:39:47.893 [hingStatusInfoChangedEvent] - 'mqtt:homie300:mosquitto:nuvo' changed from ONLINE to OFFLINE (COMMUNICATION_ERROR): No connection or readOnly channel!
From what I can, there is only one location in the code that would have the “No connection or readOnly channel!” error. Which is here
it looks like that is only thrown if the connection is null or the channel is read only.