mvalla / openhab-addons

Add-ons for openHAB
Eclipse Public License 2.0
24 stars 16 forks source link

discoveryByActivation with Dimmer #81

Closed Gozilla01 closed 3 years ago

Gozilla01 commented 5 years ago

Problem: With discoveryByActivation = true During the discovery of a dimmer device, two new things are created in Inbox:

The bus_on_off_switch is incorrect

The bus_on_off_switch is created when the OWN *1*0*12## dimmer device is turned off.

2019-04-07 00:17:10.372 [INFO ] [org.openwebnet.OpenGatewayBus$a     ] - MON RECEIVED  <<<<<<<<<<< *1*1000#1*12##
2019-04-07 00:17:10.376 [DEBUG] [penwebnet.message.OpenMessageFactory] - ##openwebnet## COMMAND TRANSLATION, WHAT=ON
2019-04-07 00:17:10.380 [DEBUG] [bnet.handler.OpenWebNetBridgeHandler] - ==OWN==  ownId=1.12
2019-04-07 00:17:10.385 [DEBUG] [bnet.handler.OpenWebNetBridgeHandler] - ==OWN==  BridgeHandler.discoverByActivation() 
2019-04-07 00:17:10.387 [INFO ] [ery.OpenWebNetDeviceDiscoveryService] - ==OWN:DeviceDiscovery== newDiscoveryResult() WHERE=12, deviceType=SCS_ON_OFF_SWITCH
2019-04-07 00:17:10.393 [INFO ] [org.openwebnet.OpenGatewayBus$a     ] - MON RECEIVED  <<<<<<<<<<< *1*7*12##
==> /var/log/openhab2/events.log <==
2019-04-07 00:17:10.400 [home.event.InboxAddedEvent] - Discovery Result with UID 'openwebnet:bus_on_off_switch:mybridge:12' has been added.
==> /var/log/openhab2/openhab.log <==
2019-04-07 00:17:10.401 [INFO ] [g.discovery.internal.PersistentInbox] - Added new thing 'openwebnet:bus_on_off_switch:mybridge:12' to inbox.
2019-04-07 00:17:10.398 [DEBUG] [bnet.handler.OpenWebNetBridgeHandler] - ==OWN==  ownId=1.12
2019-04-07 00:17:10.408 [DEBUG] [bnet.handler.OpenWebNetBridgeHandler] - ==OWN==  BridgeHandler.discoverByActivation() 
2019-04-07 00:17:10.412 [INFO ] [ery.OpenWebNetDeviceDiscoveryService] - ==OWN:DeviceDiscovery== newDiscoveryResult() WHERE=12, deviceType=SCS_DIMMER_SWITCH
==> /var/log/openhab2/events.log <==
2019-04-07 00:17:10.422 [home.event.InboxAddedEvent] - Discovery Result with UID 'openwebnet:bus_dimmer:mybridge:12' has been added.
==> /var/log/openhab2/openhab.log <==
2019-04-07 00:17:10.423 [INFO ] [g.discovery.internal.PersistentInbox] - Added new thing 'openwebnet:bus_dimmer:mybridge:12' to inbox.
2019-04-07 00:17:13.251 [INFO ] [org.openwebnet.OpenGatewayBus$a     ] - MON RECEIVED  <<<<<<<<<<< *1*1000#0*12##
2019-04-07 00:17:13.254 [DEBUG] [penwebnet.message.OpenMessageFactory] - ##openwebnet## COMMAND TRANSLATION, WHAT=OFF
2019-04-07 00:17:13.258 [DEBUG] [bnet.handler.OpenWebNetBridgeHandler] - ==OWN==  ownId=1.12
2019-04-07 00:17:13.261 [DEBUG] [bnet.handler.OpenWebNetBridgeHandler] - ==OWN==  BridgeHandler.discoverByActivation() 
2019-04-07 00:17:13.264 [INFO ] [ery.OpenWebNetDeviceDiscoveryService] - ==OWN:DeviceDiscovery== newDiscoveryResult() WHERE=12, deviceType=SCS_ON_OFF_SWITCH
2019-04-07 00:17:13.289 [INFO ] [org.openwebnet.OpenGatewayBus$a     ] - MON RECEIVED  <<<<<<<<<<< *1*0*12##
2019-04-07 00:17:13.293 [DEBUG] [bnet.handler.OpenWebNetBridgeHandler] - ==OWN==  ownId=1.12
2019-04-07 00:17:13.298 [DEBUG] [bnet.handler.OpenWebNetBridgeHandler] - ==OWN==  BridgeHandler.discoverByActivation() 
2019-04-07 00:17:13.302 [INFO ] [ery.OpenWebNetDeviceDiscoveryService] - ==OWN:DeviceDiscovery== newDiscoveryResult() WHERE=12, deviceType=SCS_ON_OFF_SWITCH
2019-04-07 00:17:32.794 [INFO ] [org.openwebnet.OpenGatewayBus$a     ] - MON RECEIVED  <<<<<<<<<<< *#13**22*00*17*32*000*00*07*04*2019##
2019-04-07 00:17:32.797 [DEBUG] [org.openwebnet.OpenGatewayBus       ] - ##gw-openwebnet-BUS## handleManagementDimension not processed
2019-04-07 00:17:32.800 [DEBUG] [bnet.handler.OpenWebNetBridgeHandler] - ==OWN==  GatewayManagement WHAT = null
2019-04-07 00:17:37.067 [DEBUG] [org.openwebnet.bus.MyHomeConnection ] - ##gw-openwebnet-conn## socket is closed, cancelling previous keepalive timer: Timer-77
mvalla commented 4 years ago

if the dimmer is OFF, I cannot imagine a simple way to distinguish, using OWN commands, if it's a dimmer or a regular ON/OFF light. Any suggestion?

mvalla commented 3 years ago

Fixed this in the official openwebnet binding (3.0.x), by requesting light status after a discoveryByActivation is triggered