PatchworkBoy / homebridge-edomoticz

Domoticz Homebridge-Plugin
Other
118 stars 43 forks source link

Devices showing as dimmable when they are not really (and vice-versa) #12

Closed jem101 closed 8 years ago

jem101 commented 8 years ago

As requested

This device is a genuine dimmer and shows properly as such in Eve

{ "ActTime" : 1454957927, "ServerTime" : "2016-02-08 18:58:47", "Sunrise" : "07:27", "Sunset" : "16:59", "result" : [ { "AddjMulti" : 1.0, "AddjMulti2" : 1.0, "AddjValue" : 0.0, "AddjValue2" : 0.0, "BatteryLevel" : 255, "CustomImage" : 0, "Data" : "Off", "Description" : "", "Favorite" : 1, "HardwareID" : 2, "HardwareName" : "RFXCOM", "HardwareType" : "RFXCOM - RFXtrx433 USB 433.92MHz Transceiver", "HardwareTypeVal" : 1, "HaveDimmer" : true, "HaveGroupCmd" : true, "HaveTimeout" : false, "ID" : "004DDA2", "Image" : "Light", "IsSubDevice" : false, "LastUpdate" : "2016-02-08 17:46:14", "Level" : 100, "LevelInt" : 15, "MaxDimLevel" : 15, "Name" : "Ruby's Ceiling Light", "Notifications" : "false", "PlanID" : "8", "PlanIDs" : [ 8, 11 ], "Protected" : false, "ShowNotifications" : true, "SignalLevel" : 5, "Status" : "Off", "StrParam1" : "", "StrParam2" : "", "SubType" : "AC", "SwitchType" : "Dimmer", "SwitchTypeVal" : 7, "Timers" : "false", "Type" : "Lighting 2", "TypeImg" : "dimmer", "Unit" : 12, "Used" : 1, "UsedByCamera" : false, "XOffset" : "860", "YOffset" : "556", "idx" : "62" } ], "status" : "OK", "title" : "Devices" }

This device is a simple on/off outside light but also shows as a disable device in Eve

{ "ActTime" : 1454958005, "ServerTime" : "2016-02-08 19:00:05", "Sunrise" : "07:27", "Sunset" : "16:59", "result" : [ { "AddjMulti" : 1.0, "AddjMulti2" : 1.0, "AddjValue" : 0.0, "AddjValue2" : 0.0, "BatteryLevel" : 255, "CustomImage" : 125, "Data" : "On", "Description" : "", "Favorite" : 1, "HardwareID" : 2, "HardwareName" : "RFXCOM", "HardwareType" : "RFXCOM - RFXtrx433 USB 433.92MHz Transceiver", "HardwareTypeVal" : 1, "HaveDimmer" : true, "HaveGroupCmd" : true, "HaveTimeout" : false, "ID" : "0005B77", "Image" : "OutsideLantern", "IsSubDevice" : false, "LastUpdate" : "2016-02-08 16:59:00", "Level" : 0, "LevelInt" : 0, "MaxDimLevel" : 15, "Name" : "Outside Front Door", "Notifications" : "false", "PlanID" : "10", "PlanIDs" : [ 10, 11 ], "Protected" : false, "ShowNotifications" : true, "SignalLevel" : "-", "Status" : "On", "StrParam1" : "", "StrParam2" : "", "SubType" : "AC", "SwitchType" : "On/Off", "SwitchTypeVal" : 0, "Timers" : "true", "Type" : "Lighting 2", "TypeImg" : "lightbulb", "Unit" : 1, "Used" : 1, "UsedByCamera" : false, "XOffset" : "929", "YOffset" : "519", "idx" : "26" } ], "status" : "OK", "title" : "Devices" }

Finally this is a dimable device which shows as On/Off in Eve

{ "ActTime" : 1454958079, "ServerTime" : "2016-02-08 19:01:19", "Sunrise" : "07:27", "Sunset" : "16:59", "result" : [ { "AddjMulti" : 1.0, "AddjMulti2" : 1.0, "AddjValue" : 0.0, "AddjValue2" : 0.0, "BatteryLevel" : 255, "CustomImage" : 0, "Data" : "On", "Description" : "", "Favorite" : 1, "HardwareID" : 2, "HardwareName" : "RFXCOM", "HardwareType" : "RFXCOM - RFXtrx433 USB 433.92MHz Transceiver", "HardwareTypeVal" : 1, "HaveDimmer" : true, "HaveGroupCmd" : true, "HaveTimeout" : false, "ID" : "F298E1", "Image" : "Light", "IsSubDevice" : false, "LastUpdate" : "2016-02-06 13:50:45", "Level" : 100, "LevelInt" : 32, "MaxDimLevel" : 32, "Name" : "Scarlett's Ceiling Light", "Notifications" : "false", "PlanID" : "9", "PlanIDs" : [ 9, 11 ], "Protected" : false, "ShowNotifications" : true, "SignalLevel" : "-", "Status" : "On", "StrParam1" : "", "StrParam2" : "", "SubType" : "LightwaveRF", "SwitchType" : "Dimmer", "SwitchTypeVal" : 7, "Timers" : "false", "Type" : "Lighting 5", "TypeImg" : "dimmer", "Unit" : 16, "Used" : 1, "UsedByCamera" : false, "XOffset" : "155", "YOffset" : "193", "idx" : "188" } ], "status" : "OK", "title" : "Devices" }

Actually on investigation, I have a mixture of LightwaveRF devices (one dimmable) which are Lighting 5 and HomeEasy (Type AC Lighting 2) and all of these are showing as dimable devices whereas only one really is, whereas all the Lightwave devices show as just being On/Off.

PatchworkBoy commented 8 years ago

This device is a simple on/off outside light but also shows as a disable device in Eve

Yup - Domoticz is setting HaveDimmer: True for this one, so technically I shouldn’t attempt to override that - the issue should be resolved within Domoticz. I’m hazarding a guess Deejc will find similar if he queries some of his devices. That said, I too have switches and ping checkers with same issue, and I can find no way to sort it from within Domoticz.

I’m going to override it based on Switch Type On/Off for now and see if it causes any complaints elsewhere. The reason this issue has suddenly surfaced is purely because I’ve added dimmer support to start with - I was avoiding it for this very reason.

Finally this is a dimable device which shows as On/Off in Eve

Ah - Type: Lighting 5. Wasn’t aware there were that many Lighting types - I’ve only been checking against Lighting Types 1 & 2... that's Fixable!

ghost commented 8 years ago

here are 2 devices i have showing as dimmers in homebridge but as on/off in domo… also i notice that i am not able to associate the device to a lamp/swich/fan any more in Home.app or eve.

On/Off switch

{ "ActTime" : 1454964421, "ServerTime" : "2016-02-08 20:47:01", "Sunrise" : "07:29", "Sunset" : "17:00", "result" : [ { "AddjMulti" : 1.0, "AddjMulti2" : 1.0, "AddjValue" : 0.0, "AddjValue2" : 0.0, "BatteryLevel" : 255, "CustomImage" : 0, "Data" : "On, Level: 100 %", "Description" : "", "Favorite" : 0, "HardwareID" : 7, "HardwareName" : "RFXCom", "HardwareType" : "RFXCOM - RFXtrx433 USB 433.92MHz Transceiver", "HardwareTypeVal" : 1, "HaveDimmer" : true, "HaveGroupCmd" : true, "HaveTimeout" : false, "ID" : "00F6742", "Image" : "Light", "IsSubDevice" : false, "LastUpdate" : "2016-02-08 17:40:51", "Level" : 100, "LevelInt" : 15, "MaxDimLevel" : 15, "Name" : "Bug String", "Notifications" : "false", "PlanID" : "7", "PlanIDs" : [ 7, 11 ], "Protected" : false, "ShowNotifications" : true, "SignalLevel" : 4, "Status" : "On", "StrParam1" : "", "StrParam2" : "", "SubType" : "AC", "SwitchType" : "On/Off", "SwitchTypeVal" : 0, "Timers" : "false", "Type" : "Lighting 2", "TypeImg" : "lightbulb", "Unit" : 14, "Used" : 1, "UsedByCamera" : false, "XOffset" : "24", "YOffset" : "664", "idx" : "29" } ], "status" : "OK", "title" : "Devices" }

Switch type On/Off { "ActTime" : 1454964562, "ServerTime" : "2016-02-08 20:49:22", "Sunrise" : "07:29", "Sunset" : "17:00", "result" : [ { "AddjMulti" : 1.0, "AddjMulti2" : 1.0, "AddjValue" : 0.0, "AddjValue2" : 0.0, "BatteryLevel" : 255, "CustomImage" : 0, "Data" : "On", "Description" : "", "Favorite" : 0, "HardwareID" : 7, "HardwareName" : "RFXCom", "HardwareType" : "RFXCOM - RFXtrx433 USB 433.92MHz Transceiver", "HardwareTypeVal" : 1, "HaveDimmer" : true, "HaveGroupCmd" : true, "HaveTimeout" : false, "ID" : "00F6742", "Image" : "Light", "IsSubDevice" : false, "LastUpdate" : "2016-02-08 20:41:34", "Level" : 0, "LevelInt" : 0, "MaxDimLevel" : 15, "Name" : "Twinkle 1", "Notifications" : "false", "PlanID" : "5", "PlanIDs" : [ 5, 11 ], "Protected" : false, "ShowNotifications" : true, "SignalLevel" : "-", "Status" : "On", "StrParam1" : "", "StrParam2" : "", "SubType" : "AC", "SwitchType" : "On/Off", "SwitchTypeVal" : 0, "Timers" : "false", "Type" : "Lighting 2", "TypeImg" : "lightbulb", "Unit" : 1, "Used" : 1, "UsedByCamera" : false, "XOffset" : "261", "YOffset" : "703", "idx" : "30" } ], "status" : "OK", "title" : "Devices" }

PatchworkBoy commented 8 years ago

Hmm as previous - look at the JSON you’ve posted. Domoticz says both are dimmers - as both specify HaveDimmer: true even tho in Domoticz they show as On/Off. When it’s read from Domoticz’ JSON api, it’s clearly Domoticz saying they’re dimmers and that’s what’s throwing the plugin off. Nothing I can do about these I’m afraid!

jem101 commented 8 years ago

Yes you're right, so the issue is further 'upstream' then, if Domoticz itself is mis-identifying the device type (or at least not returning the right value in a json query) then we're stuck.

Personally for me it's not a big issue. I don't usually dim lights even when it's possible, I mostly just turn them off and on anyway. It's more of a slight annoyance than anything in else.

John

Sent from my iPad

On 8 Feb 2016, at 21:47, Marci notifications@github.com wrote:

Hmm as previous - look at the JSON you’ve posted. Domoticz says both are dimmers - as both specify HaveDimmer: true even tho in Domoticz they show as On/Off. When it’s read from Domoticz’ JSON api, it’s clearly Domoticz saying they’re dimmers and that’s what’s throwing the plugin off. Nothing I can do about these I’m afraid!

— Reply to this email directly or view it on GitHub.

jem101 commented 8 years ago

Which exactly matches my finding that devices of type Lighting 2, subtype AC (which is the Homeeasy UK) protocol always seem to be seen as dimmable (I currently have six of them- all but one are really just on/off), whereas my Lighting 5 (LightwaveRFare all on/off whereas one should be dimmable.

John

Sent from my iPad

On 8 Feb 2016, at 21:35, deejc-uk notifications@github.com wrote:

here are 2 devices i have showing as dimmers in homebridge but as on/off in domo… also i notice that i am not able to associate the device to a lamp/swich/fan any more in Home.app or eve.

On/Off switch

{ "ActTime" : 1454964421, "ServerTime" : "2016-02-08 20:47:01", "Sunrise" : "07:29", "Sunset" : "17:00", "result" : [ { "AddjMulti" : 1.0, "AddjMulti2" : 1.0, "AddjValue" : 0.0, "AddjValue2" : 0.0, "BatteryLevel" : 255, "CustomImage" : 0, "Data" : "On, Level: 100 %", "Description" : "", "Favorite" : 0, "HardwareID" : 7, "HardwareName" : "RFXCom", "HardwareType" : "RFXCOM - RFXtrx433 USB 433.92MHz Transceiver", "HardwareTypeVal" : 1, "HaveDimmer" : true, "HaveGroupCmd" : true, "HaveTimeout" : false, "ID" : "00F6742", "Image" : "Light", "IsSubDevice" : false, "LastUpdate" : "2016-02-08 17:40:51", "Level" : 100, "LevelInt" : 15, "MaxDimLevel" : 15, "Name" : "Bug String", "Notifications" : "false", "PlanID" : "7", "PlanIDs" : [ 7, 11 ], "Protected" : false, "ShowNotifications" : true, "SignalLevel" : 4, "Status" : "On", "StrParam1" : "", "StrParam2" : "", "SubType" : "AC", "SwitchType" : "On/Off", "SwitchTypeVal" : 0, "Timers" : "false", "Type" : "Lighting 2", "TypeImg" : "lightbulb", "Unit" : 14, "Used" : 1, "UsedByCamera" : false, "XOffset" : "24", "YOffset" : "664", "idx" : "29" } ], "status" : "OK", "title" : "Devices" }

Switch type On/Off { "ActTime" : 1454964562, "ServerTime" : "2016-02-08 20:49:22", "Sunrise" : "07:29", "Sunset" : "17:00", "result" : [ { "AddjMulti" : 1.0, "AddjMulti2" : 1.0, "AddjValue" : 0.0, "AddjValue2" : 0.0, "BatteryLevel" : 255, "CustomImage" : 0, "Data" : "On", "Description" : "", "Favorite" : 0, "HardwareID" : 7, "HardwareName" : "RFXCom", "HardwareType" : "RFXCOM - RFXtrx433 USB 433.92MHz Transceiver", "HardwareTypeVal" : 1, "HaveDimmer" : true, "HaveGroupCmd" : true, "HaveTimeout" : false, "ID" : "00F6742", "Image" : "Light", "IsSubDevice" : false, "LastUpdate" : "2016-02-08 20:41:34", "Level" : 0, "LevelInt" : 0, "MaxDimLevel" : 15, "Name" : "Twinkle 1", "Notifications" : "false", "PlanID" : "5", "PlanIDs" : [ 5, 11 ], "Protected" : false, "ShowNotifications" : true, "SignalLevel" : "-", "Status" : "On", "StrParam1" : "", "StrParam2" : "", "SubType" : "AC", "SwitchType" : "On/Off", "SwitchTypeVal" : 0, "Timers" : "false", "Type" : "Lighting 2", "TypeImg" : "lightbulb", "Unit" : 1, "Used" : 1, "UsedByCamera" : false, "XOffset" : "261", "YOffset" : "703", "idx" : "30" } ], "status" : "OK", "title" : "Devices" }

— Reply to this email directly or view it on GitHub.

PatchworkBoy commented 8 years ago

Ok... i think I can deal with these by adding some special-case additions to config.json... that way users can choose for themselves some subtypes etc where dimming is completely disabled. Have family duties tomorrow eve, so will be Weds or Thursday evening at a guess!

PatchworkBoy commented 8 years ago

Should all be fixed now via v0.1.11 - https://github.com/PatchworkBoy/homebridge-eDomoticz/commit/a782bea1fb38b7e8fd5d5a5085e37366e7f92516

Let me know...

PatchworkBoy commented 8 years ago

Fix confirmed via Domoticz forums

ghost commented 8 years ago

all good, thanks again