giejay / domoticz-gbridge-plugin

Domoticz plugin for the Kappelt gBridge
16 stars 4 forks source link

Open close mapped wrong #8

Closed christoferjh closed 5 years ago

christoferjh commented 5 years ago

Open close not sending correct switch command.

State: 100 should send command On

Log for door (open close) lock:

gBridge/uXXX/127/openclose/set, state: 100

2019-03-15 08:02:20.256 Status: User: Admin initiated a switch command (127/FrontLock/Off)

gBridge/uXXX/127/openclose/set, state: 0

2019-03-15 08:03:29.173 Status: User: Admin initiated a switch command (127/FrontLock/Off)

christoferjh commented 5 years ago

def handleMqttMessage(self, device, data, action, domoticz_port): if data == '1': command = 'On' else: command = 'Off'

Is it really that easy?

christoferjh commented 5 years ago

To invert would fix my problem

def handleMqttMessage(self, device, data, action, domoticz_port): if data == '0': command = 'Off' else: command = 'On'

giejay commented 5 years ago

I just made the change in develop. Can you try if this works for you? Thanks for the report!

christoferjh commented 5 years ago

Works great! Thanks!