Update Status on Web interface on multiple clients

Hi,

if I’ve a Swtich and turn it on from a web client, on another client that is on the same webpage, it is supposed to see the switch button turn on.
But this isnt’ happening, only the one that pushed the switch see the status change.

Is there anything special that need to be setup?

Thanks, BR

The short answer is, yes - all the OH interfaces should respond to events that occur, no matter how that event is triggered. If any item changes state all the UIs should reflect that change. This is the default behavior, you shouldn’t have to change configurations for this to work. If you do not see this behavior then there is something wrong.

There are some things you can check to start to troubleshoot this problem:

  1. Most important: check your logs when you change one of the switches. Are you sure that the item that is connected to that switch is changing state? Do you see any errors?
  2. Can you control any other items through the webpages that don’t appear to respond? Is this just a problem with this one item or has that webpage completely lost its connection to the server.

For more specific help, you’ll have to provide us with more specific informaiton. What version of OH are you usiung? What hardware is it installed on? Which UI (webpage) are you using, there are several options? What do the logs looks like?

1 Like

Thank you for your reply, looking at openhab-cli logs:

  1. seems that the user input for ON is correctly detected, then it’s sent to zigbee point (it turn physically ON), anyway if I open a new page with the same switch widget it’s shown as OFF:

==> /var/log/openhab/events.log <==
2021-10-20 09:37:15.816 [INFO ] [openhab.event.ItemStateChangedEvent ] - Item 'BV201010ZigBeeUSBdongle_Dataframesreceived' changed from 299 to 331
2021-10-20 09:37:15.817 [INFO ] [openhab.event.ItemStateChangedEvent ] - Item 'BV201010ZigBeeUSBdongle_Dataframessent' changed from 191 to 221
2021-10-20 09:37:15.819 [INFO ] [openhab.event.ItemStateChangedEvent ] - Item 'BV201010ZigBeeUSBdongle_ACKframessent' changed from 299 to 331
2021-10-20 09:37:45.814 [INFO ] [openhab.event.ItemStateChangedEvent ] - Item 'BV201010ZigBeeUSBdongle_Dataframesreceived' changed from 331 to 361
2021-10-20 09:37:45.822 [INFO ] [openhab.event.ItemStateChangedEvent ] - Item 'BV201010ZigBeeUSBdongle_Dataframessent' changed from 221 to 251
2021-10-20 09:37:45.825 [INFO ] [openhab.event.ItemStateChangedEvent ] - Item 'BV201010ZigBeeUSBdongle_ACKframessent' changed from 331 to 361
2021-10-20 09:38:15.821 [INFO ] [openhab.event.ItemStateChangedEvent ] - Item 'BV201010ZigBeeUSBdongle_Dataframesreceived' changed from 361 to 391
2021-10-20 09:38:15.823 [INFO ] [openhab.event.ItemStateChangedEvent ] - Item 'BV201010ZigBeeUSBdongle_Dataframessent' changed from 251 to 281
2021-10-20 09:38:15.823 [INFO ] [openhab.event.ItemStateChangedEvent ] - Item 'BV201010ZigBeeUSBdongle_ACKframessent' changed from 361 to 391
2021-10-20 09:38:21.546 [INFO ] [openhab.event.ItemCommandEvent      ] - Item 'LegrandLightswitchwithneutral_Switch' received command ON

==> /var/log/openhab/openhab.log <==
2021-10-20 09:38:21.564 [DEBUG] [ng.zigbee.handler.ZigBeeThingHandler] - 0004740000B5C716: Command for channel zigbee:device:01380FB1:0004740000b5c716:0004740000B5C716_1_switch --> ON [OnOffType]
2021-10-20 09:38:21.565 [DEBUG] [e.transaction.ZigBeeTransactionQueue] - 0004740000B5C716: Added transaction to queue, len=1, transaction=ZigBeeTransaction [ieeeAddress=0004740000B5C716 queueTime=0, state=WAITING, sendCnt=0, command=OnCommand [On/Off: 0000/0 -> 425D/1, cluster=0006, TID=--]]
2021-10-20 09:38:21.566 [DEBUG] [transaction.ZigBeeTransactionManager] - Transaction Manager: Send Next transaction. outstandingTransactions=0, outstandingQueues=1, sleepy=0/3
2021-10-20 09:38:21.566 [DEBUG] [transaction.ZigBeeTransactionManager] - 425D/1: Sending ZigBeeTransaction [ieeeAddress=0004740000B5C716 queueTime=1, state=WAITING, sendCnt=0, command=OnCommand [On/Off: 0000/0 -> 425D/1, cluster=0006, TID=2F]]
2021-10-20 09:38:21.567 [DEBUG] [transaction.ZigBeeTransactionManager] - transactionListenerAdded: 1 outstanding
2021-10-20 09:38:21.567 [DEBUG] [tsystems.zigbee.ZigBeeNetworkManager] - TX CMD: OnCommand [On/Off: 0000/0 -> 425D/1, cluster=0006, TID=2F]
2021-10-20 09:38:21.568 [DEBUG] [tsystems.zigbee.ZigBeeNetworkManager] - TX ZCL: ZclHeader [frameType=CLUSTER_SPECIFIC_COMMAND, manufacturerSpecific=false, direction=CLIENT_TO_SERVER, disableDefaultResponse=false, manufacturerCode=0, sequenceNumber=47, commandId=1]
2021-10-20 09:38:21.568 [DEBUG] [tsystems.zigbee.ZigBeeNetworkManager] - TX APS: ZigBeeApsFrame [sourceAddress=0000/1, destinationAddress=425D/1, profile=0104, cluster=0006, addressMode=DEVICE, radius=8, apsSecurity=false, ackRequest=true, apsCounter=2F, rssi=--, lqi=--, payload=01 2F 01]
2021-10-20 09:38:21.569 [DEBUG] [converter.ZigBeeBaseChannelConverter] - 0004740000B5C716: Channel zigbee:device:01380FB1:0004740000b5c716:0004740000B5C716_1_switch waiting for response to ON
2021-10-20 09:38:21.580 [DEBUG] [zigbee.dongle.ember.ZigBeeDongleEzsp] - RX EZSP: EzspSendUnicastResponse [networkId=0, status=EMBER_SUCCESS, sequence=1F]
2021-10-20 09:38:21.627 [DEBUG] [zigbee.dongle.ember.ZigBeeDongleEzsp] - RX EZSP: EzspMessageSentHandler [networkId=0, type=EMBER_OUTGOING_DIRECT, indexOrDestination=425D, apsFrame=EmberApsFrame [profileId=0104, clusterId=0006, sourceEndpoint=1, destinationEndpoint=1, options=[EMBER_APS_OPTION_ENABLE_ADDRESS_DISCOVERY, EMBER_APS_OPTION_RETRY, EMBER_APS_OPTION_ENABLE_ROUTE_DISCOVERY], groupId=0, sequence=1F], messageTag=2F, status=EMBER_SUCCESS, messageContents=]
2021-10-20 09:38:21.628 [DEBUG] [tsystems.zigbee.ZigBeeNetworkManager] - RX STA: msgTag=2F state=RX_ACK
2021-10-20 09:38:21.629 [DEBUG] [transaction.ZigBeeTransactionManager] - notifyTransactionProgress: TID=2F, state=RX_ACK, outstanding=1
2021-10-20 09:38:21.630 [DEBUG] [zigbee.transaction.ZigBeeTransaction] - Transaction state changed: nwk=425D, TID=2F, event=RX_ACK, state=ACKED
2021-10-20 09:38:21.650 [DEBUG] [zigbee.dongle.ember.ZigBeeDongleEzsp] - RX EZSP: EzspIncomingMessageHandler [networkId=0, type=EMBER_INCOMING_UNICAST, apsFrame=EmberApsFrame [profileId=0104, clusterId=0006, sourceEndpoint=1, destinationEndpoint=1, options=[EMBER_APS_OPTION_RETRY, EMBER_APS_OPTION_ENABLE_ROUTE_DISCOVERY], groupId=0, sequence=DC], lastHopLqi=99, lastHopRssi=-61, sender=425D, bindingIndex=255, addressIndex=255, messageContents=18 2F 0B 01 00]
2021-10-20 09:38:21.651 [DEBUG] [tsystems.zigbee.ZigBeeNetworkManager] - RX APS: ZigBeeApsFrame [sourceAddress=425D/1, destinationAddress=0000/1, profile=0104, cluster=0006, addressMode=DEVICE, radius=0, apsSecurity=false, ackRequest=false, apsCounter=DC, rssi=-61, lqi=63, payload=18 2F 0B 01 00]
2021-10-20 09:38:21.652 [DEBUG] [tsystems.zigbee.ZigBeeNetworkManager] - 0004740000B5C716: Node update. NWK Address=425D
2021-10-20 09:38:21.652 [DEBUG] [tsystems.zigbee.ZigBeeNetworkManager] - 0004740000B5C716: Node 425D is not updated
2021-10-20 09:38:21.653 [DEBUG] [tsystems.zigbee.ZigBeeNetworkManager] - RX ZCL: ZclHeader [frameType=ENTIRE_PROFILE_COMMAND, manufacturerSpecific=false, direction=SERVER_TO_CLIENT, disableDefaultResponse=true, manufacturerCode=0, sequenceNumber=47, commandId=11]
2021-10-20 09:38:21.654 [DEBUG] [tsystems.zigbee.ZigBeeNetworkManager] - RX CMD: DefaultResponse [On/Off: 425D/1 -> 0000/1, cluster=0006, TID=2F, commandIdentifier=1, statusCode=SUCCESS]
2021-10-20 09:38:21.654 [DEBUG] [transaction.ZigBeeTransactionManager] - notifyTransactionCommand: DefaultResponse [On/Off: 425D/1 -> 0000/1, cluster=0006, TID=2F, commandIdentifier=1, statusCode=SUCCESS] 
2021-10-20 09:38:21.656 [DEBUG] [converter.ZigBeeBaseChannelConverter] - 0004740000B5C716: Channel zigbee:device:01380FB1:0004740000b5c716:0004740000B5C716_1_switch received SUCCESS in response to ON
2021-10-20 09:38:21.656 [DEBUG] [transaction.ZigBeeTransactionManager] - Transaction complete: ZigBeeTransaction [ieeeAddress=0004740000B5C716 queueTime=90, state=COMPLETE, sendCnt=1, command=OnCommand [On/Off: 0000/0 -> 425D/1, cluster=0006, TID=2F]]
2021-10-20 09:38:21.656 [DEBUG] [transaction.ZigBeeTransactionManager] - transactionListenerRemoved: 0 outstanding
2021-10-20 09:38:21.658 [DEBUG] [e.transaction.ZigBeeTransactionQueue] - 0004740000B5C716: transactionComplete, state=COMPLETE, outstanding=0
2021-10-20 09:38:21.658 [DEBUG] [transaction.ZigBeeTransactionManager] - Transaction Manager: Send Next transaction. outstandingTransactions=0, outstandingQueues=0, sleepy=0/
  1. I’ve a shelly widget but this one seems to act correctly, this one on both web clients act syncend:

2021-10-20 09:42:39.700 [INFO ] [openhab.event.ItemCommandEvent      ] - Item 'Shelly1SHSW1_Potenza' received command ON
2021-10-20 09:42:39.713 [INFO ] [penhab.event.ItemStatePredictedEvent] - Item 'Shelly1SHSW1_Potenza' predicted to become ON
2021-10-20 09:42:39.720 [INFO ] [openhab.event.ItemStateChangedEvent ] - Item 'Shelly1SHSW1_Potenza' changed from OFF to ON

I’m using latest openhabian 32 bit image:

Version: 3.1.0 (Build)

User: openhab (Active Process 708)
User Groups: openhab tty dialout audio bluetooth gpio

###############################################################################
############### openhabian ##################################################
###############################################################################

Release = Raspbian GNU/Linux 10 (buster)

Kernel = Linux 5.10.63-v7l+

Platform = Raspberry Pi 4 Model B Rev 1.2

Uptime = 0 day(s). 0:10:55

CPU Usage = 0.25% avg over 4 cpu(s) (4 core(s) x 1 socket(s))

CPU Load = 1m: 0.03, 5m: 0.11, 15m: 0.12

Memory = Free: 3.16GB (83%), Used: 0.63GB (17%), Total: 3.79GB

Swap = Free: 0.53GB (100%), Used: 0.00GB (0%), Total: 0.53GB

Root = Free: 3.43GB (52%), Used: 3.13GB (48%), Total: 6.89GB

Updates = 0 apt updates available.

Sessions = 1 session(s)

Processes = 123 running processes of 32768 maximum processes

###############################################################################

                      _   _     _     ____   _               

___ ___ ___ ___ | | | | / \ | __ ) () ____ ___
/ _ \ / _ \ / _ \ / _ \ | |
| | / _ \ | _ \ | | / _ \ / _ \
| () | () | /| | | || _ | / ___ \ | |) )| || () || | | |
_
/| / _/|| |||| ||// _|/ || _|||| | |
|
| 3.1.0 - Release Build

Thanks, BR

Remember, we have no idea which Items you are talking about.

I’ll guess LegrandLightswitchwithneutral_Switch is one that misbehaves?

From the events.log snippet shown, it doesn’t change state after a command.
Compare with your Shelly1SHSW1_Potenza events.log, showing command-statechange sequence.

UI shows you Item states, it’s not that the UI that has missed the change, but there wasn’t a change.

I get the impression your misbehaving Item is using Zigbee binding?

Zigbee binding does have a quirk.
It tries to avoid polling devices, to avoid using up network bandwidth. To allow that, it tries to configure devices to autonomously send updates to openHAB.
But that can’t be done for every device, and then the binding should fallback to polling the device. Unfortunately this part doesn’t always work.

End result is that some devices become black holes - you can send them commands, but get no response. There is so far as I know no way for you to force polling.

This problem becomes visible to the openHAB user because Zigbee binding also suppresses autoupdate action on linked Items.
You can make it all apparently look better by forcing autoupdate enable on the linked Item. (in the Item’s properties)
This allows openHAB to internally predict the outcome of commands and change the Item state in response, ahead of any real device response (that in Zigbee case may be some time coming).

Thanks for all these informations, your guess are all right sorry for missing details.

I’ll look a the autoupdate Zigbee setting.

Thank you, BR

Hi,

I’v found an xml file of the bticino/Legrand Thing in:
/var/lib/openhab/zigbee/zigbee_coordinator_ember/macofdevice.xml

Inside there are many option that aren’t available in the openhab gui, but I cannot understand how to edit this.

I suppose that this one is to read the current status:

            <entry>
              <int>111</int>
              <ZclAttribute>
                <id>111</id>
                <name>Status Flags</name>
                <dataType>BITMAP_8_BIT</dataType>
                <mandatory>true</mandatory>
                <implemented>false</implemented>
                <readable>true</readable>
                <writable>false</writable>
                <reportable>true</reportable>
                <minimumReportingPeriod>0</minimumReportingPeriod>
                <maximumReportingPeriod>0</maximumReportingPeriod>
                <reportingTimeout>0</reportingTimeout>
              </ZclAttribute>
            </entry>

i.e. this would allow to chang speed:

           <entry>
              <int>20</int>
              <ZclAttribute>
                <id>20</id>
                <name>Velocity - Lift</name>
                <dataType>UNSIGNED_16_BIT_INTEGER</dataType>
                <mandatory>false</mandatory>
                <implemented>false</implemented>
                <readable>true</readable>
                <writable>true</writable>
                <reportable>true</reportable>
                <minimumReportingPeriod>0</minimumReportingPeriod>
                <maximumReportingPeriod>0</maximumReportingPeriod>
                <reportingTimeout>0</reportingTimeout>
              </ZclAttribute>
            </entry>

How can I set a value for this parameter and maybe allow to change it from the GUI?

Thanks, BR

This topic was automatically closed 41 days after the last reply. New replies are no longer allowed.