openhab / openhab-addons

Add-ons for openHAB
https://www.openhab.org/
Eclipse Public License 2.0
1.86k stars 3.58k forks source link

[homematic] variable from CCU2 not updating in panel after refresh command in OH2 console // referring to issue #2333 #2755

Closed lobocobra closed 6 years ago

lobocobra commented 6 years ago

Expected Behavior

I use latest stable openhab 2.1. In the panel of OH2 I have a dummy widget, which is supposed to display the current status of the content of the variable of the CCU2. According to issue #2333 I need to REFRESH the variable in the console and then it should work. The command I use in the console is: => smarthome:send CCu2GATEWAYEXTRAS_1_AutomowerStatus REFRESH => answer: "Command has been sent successfully."

Current Behavior

The Variable is updated in the Panel after restart of openhab or restart of the binding in the console. but not anymore after, even if I send the REFRESH command in the console of OH2. Example: => Content of the variable in CCU2: "11:04:12: Laden" => Content of the variable in Panel: "10:24:10 Laden" Instead of getting an updated value after the refresh command in the console of OH2, the variable in the panel remains unchanged, thus I can not use the variable. Also if I refresh the panel or go into edit mode and than back to run, the new value is not displayed. Also using another browser and accessing there the Panel shows the old value. INTERESTLINGLY, if I update the content of the variable inthe console like this.... "smarthome:send CCu2GATEWAYEXTRAS_1_AutomowerStatus test REFRESH" then the variable is updated in the CCU2 immediately and can also be seen in the panel after a manual refresh (push the refresh button in the panel top right). But when the variable is updated by the CCU2 again, then the Panel is not updated in the panel. ==> the only way to update the variable is to restart the binding from the console or to restart openhab and then the panel is updated automatically.

Tracelog as requested in the issue #2333

2017-09-29 11:39:32.782 [DEBUG] [ematic.handler.HomematicThingHandler] - Received command 'REFRESH' for channel 'homematic:GATEWAY-EXTRAS-EA30430B:ea30430b:GWE00000000:1#Automower_Status' 2017-09-29 11:39:32.784 [DEBUG] [ematic.handler.HomematicThingHandler] - Refreshing GWE00000000:1#Automower_Status 2017-09-29 11:39:32.786 [DEBUG] [ommunicator.AbstractHomematicGateway] - Handling virtual datapoint 'RELOAD_FROM_GATEWAY' on gateway with id 'ea30430b' 2017-09-29 11:39:32.787 [DEBUG] [ommunicator.AbstractHomematicGateway] - Triggering values reload for device 'GWE00000000' 2017-09-29 11:39:32.790 [DEBUG] [atic.type.HomematicTypeGeneratorImpl] - Generating ThingType for device 'GATEWAY-EXTRAS-EA30430B' with 21 datapoints 2017-09-29 11:39:32.790 [DEBUG] [ematic.handler.HomematicThingHandler] - Initializing thing 'homematic:GATEWAY-EXTRAS-EA30430B:ea30430b:GWE00000000' from gateway 'ea30430b' 2017-09-29 11:39:32.800 [DEBUG] [ematic.internal.misc.DelayedExecuter] - Delaying event for 2.0 seconds: 'GWE00000000:0#RELOAD_FROM_GATEWAY' 2017-09-29 11:39:34.803 [DEBUG] [ematic.internal.misc.DelayedExecuter] - Executing delayed event for 'GWE00000000:0#RELOAD_FROM_GATEWAY' 2017-09-29 11:39:38.871 [TRACE] [nal.communicator.client.BinRpcClient] - Client BinRpcRequest: listBidcosInterfaces()

2017-09-29 11:39:38.873 [TRACE] [al.communicator.client.SocketHandler] - Returning socket for port 2001 2017-09-29 11:39:38.891 [TRACE] [nal.communicator.client.BinRpcClient] - Client BinRpcResponse: [ { ADDRESS=MEQ1603723 CONNECTED=true DEFAULT=true DESCRIPTION= DUTY_CYCLE=0 FIRMWARE_VERSION=2.8.5 TYPE=CCU2 } { ADDRESS=NEQ1327998 CONNECTED=true DEFAULT=false DESCRIPTION= DUTY_CYCLE=0 FIRMWARE_VERSION=1.2.1 TYPE=HMLGW2 } ]

Possible Solution

Please point me the to solution, how I can have the latest value of a variable of the CCU2 in the PANEL of Openhab 2.1.

Steps to Reproduce (for Bugs)

1) go into OH2 panel, create a dummy widget entry and link it to a CCU2 variable 2) change the CCu2 variable in the CCU => PANEL is not updated 3) Go to Openhab console send following command: smarthome:send CCu2GATEWAYEXTRAS_1_AutomowerStatus REFRESH => PANEL is not updated also after a reload of the site 4) Restart the binding in the OH2 console with: stop org.openhab.binding.homematic start org.openhab.binding.homematic => the Pandel Widget is automatically updated in the Panel Widget after the restart of the binding. => update work as I would expect it after a refresh or even better after the CCU2 changed the variable

Context

I want to have the latest status of my automower displayed in the Panel. So I do see if the Automower is in the station (or once it works, how much battery it has). The variable contains if the automower is mowing or charging. Depending on this I want to send him a command, example if it is raining or I am watering the garden or my childeren go in the garden, I want the automower to return. I want then to use CCU2 variables also in Openhab scripts.

Your Environment

CCU2 with latest firmware 2.29.18 Latest Openhab2.1 stable version. Bindings with: HUE, Weather,Homematic, Astro,SamsungTV SONOS Binding Latest Broweser (differnt types) have all the same behaviour. OS Raspi 3 Release = Raspbian GNU/Linux 8 (jessie) Kernel = Linux 4.9.35-v7+ Platform = Raspberry Pi 3 Model B Rev 1.2

I hope you can fix this or point me to a solution.

lobocobra commented 6 years ago

Tracelog after start Tracelog Openhab2.txt

MHerbst commented 6 years ago

The problem has been solved with this PR https://github.com/openhab/openhab2-addons/pull/2419. To solve the problem you will have the use 2.2 snapshot build of this binding.

lobocobra commented 6 years ago

Thanks for the info. I will try it.

lobocobra commented 6 years ago

I can confirm that with OH 2.3 the update seems to work now. => issue can be closed

lobocobra commented 5 years ago

With the latest stable version I have the issue partially back. I deleted a script in the CCU2, added 2 new ones and I see now following behavior:

So it seems that the Extras bridge does update the content of variables, but does not update the list of scripts. => can we re-open the issue?