Question mark on sitemap item switch button

Platform: Openhab 3 on ubuntu 20.04 on raspberry pi 4

Hello,

Recently noticed a question mark on few items on sitemap on mobile phone openhab app. Any pointers?

Switching on off is working but seems that another on off trigger does not update the question mark item state on the app.

See release notes for 3.5.2 beta:

Thanks @sihui
So it’s a feature?
“Display a question mark on switches with ‘null’ state by @mueller-ma

From the settings it looks like the state of this item could be either ON or OFF only. Any way to check how it’s catching ‘null’ state?



On mqtt explorer also shown as ON OFF:

Cmd:

Stat:

Yes.

Check your events.log for null (not NULL) states. Probably a rule doing bad calculations or trying to get persistence values which don’t exist.

Edit:

It’s strange that there a switches in the “on” position with a question mark. Do the question marks disappear when you manually refresh the page by pulling down?

Indeed in event log I do find some state changes from null. In openhab log it’s complaining about a rule. I will check this.

2023-05-26 20:35:20.197 [WARN ] [le.handler.ItemStateConditionHandler] - Item 'SonoffRFR303_SonoffRFR303' needed for rule '39345f1baf' is missing. Condition '3' will not work.
2023-05-26 20:38:00.064 [WARN ] [le.handler.ItemStateConditionHandler] - Item 'SonoffRFR303_SonoffRFR303' needed for rule '39345f1baf' is missing. Condition '3' will not work.
2023-05-26 20:53:57.066 [WARN ] [le.handler.ItemStateConditionHandler] - Item 'SonoffRFR303_SonoffRFR303' needed for rule '39345f1baf' is missing. Condition '3' will not work.
ubuntu@artemis1:/var/log/openhab$ cat events.log | grep -i rf | grep 03 | grep -i null
2023-05-26 20:36:45.069 [INFO ] [openhab.event.ItemStateChangedEvent ] - Item 'KitchenSonoffRFR303_SonoffRFR303' changed from NULL to OFF
2023-05-26 20:38:21.265 [INFO ] [openhab.event.ItemStateChangedEvent ] - Item 'KitchenSonoffRFR303_SonoffRFR303' changed from NULL to OFF
2023-05-26 20:54:45.743 [INFO ] [openhab.event.ItemStateChangedEvent ] - Item 'KitchenSonoffRFR303_SonoffRFR303' changed from NULL to OFF
ubuntu@artemis1:/var/log/openhab$

No it stays the same on few items. This occured around 2 weeks ago, before it was fine.
And the behavior for these items is different when on off is triggered elsewhere, the app does not get updated.
E.g when checking on app and PC browser running openhab ui:
App turn On - PC browser state turns On
PC browser turn On - No effect on app

Can you check the log of the server when you press this switch in the browser and the app?

From APP:

==> events.log <==
2023-05-27 11:34:35.035 [INFO ] [openhab.event.ItemCommandEvent      ] - Item 'KitchenSonoffRFR303' received command ON
2023-05-27 11:34:35.039 [INFO ] [openhab.event.ItemCommandEvent      ] - Item 'KitchenSonoffRFR303_SonoffRFR303' received command ON
2023-05-27 11:34:35.040 [INFO ] [penhab.event.ItemStatePredictedEvent] - Item 'KitchenSonoffRFR303_SonoffRFR303' predicted to become ON
2023-05-27 11:34:35.043 [INFO ] [openhab.event.ItemStateChangedEvent ] - Item 'KitchenSonoffRFR303_SonoffRFR303' changed from OFF to ON
2023-05-27 11:34:41.153 [INFO ] [openhab.event.ItemCommandEvent      ] - Item 'KitchenSonoffRFR303' received command OFF
2023-05-27 11:34:41.155 [INFO ] [openhab.event.ItemCommandEvent      ] - Item 'KitchenSonoffRFR303_SonoffRFR303' received command OFF
2023-05-27 11:34:41.156 [INFO ] [penhab.event.ItemStatePredictedEvent] - Item 'KitchenSonoffRFR303_SonoffRFR303' predicted to become OFF
2023-05-27 11:34:41.158 [INFO ] [openhab.event.ItemStateChangedEvent ] - Item 'KitchenSonoffRFR303_SonoffRFR303' changed from ON to OFF

From Browser:

2023-05-27 11:35:41.273 [INFO ] [openhab.event.ItemCommandEvent      ] - Item 'KitchenSonoffRFR303_SonoffRFR303' received command ON
2023-05-27 11:35:41.274 [INFO ] [penhab.event.ItemStatePredictedEvent] - Item 'KitchenSonoffRFR303_SonoffRFR303' predicted to become ON
2023-05-27 11:35:41.277 [INFO ] [openhab.event.ItemStateChangedEvent ] - Item 'KitchenSonoffRFR303_SonoffRFR303' changed from OFF to ON
2023-05-27 11:35:45.502 [INFO ] [openhab.event.ItemCommandEvent      ] - Item 'KitchenSonoffRFR303_SonoffRFR303' received command OFF
2023-05-27 11:35:45.504 [INFO ] [penhab.event.ItemStatePredictedEvent] - Item 'KitchenSonoffRFR303_SonoffRFR303' predicted to become OFF
2023-05-27 11:35:45.507 [INFO ] [openhab.event.ItemStateChangedEvent ] - Item 'KitchenSonoffRFR303_SonoffRFR303' changed from ON to OFF

From the app the Items KitchenSonoffRFR303 and KitchenSonoffRFR303_SonoffRFR303 are changed, from browser only one of them.

Can you post a snippet of your sitemap?

Please see snap below