jvmahon / Homebridge-HomeSeer4

Homebridge Plugin for HomeSeer 3 and 4
28 stars 8 forks source link

onValue/offValue always On #146

Closed AlanSmithe closed 3 years ago

AlanSmithe commented 3 years ago

Hi I noticed that If I make a custom on/off value the switching through the Home app works as intended however if I switch a device off in HS4 the Homekit device stays on.

            {
                "type": "Switch",
                "name": "Test",
                "ref": 541,
                "onValue": 111,
                "offValue": 112
            }

[5/20/2021, 1:16:05 PM] [HomeSeer] HomeSeer device: 541: new value 111, had old value 112 [5/20/2021, 1:16:07 PM] [HomeSeer] HomeSeer device: 541: new value 112, had old value 111 [5/20/2021, 1:16:10 PM] [HomeSeer] HomeSeer device: 541: new value 111, had old value 112

jvmahon commented 3 years ago

Sorry, no idea what is going wrong here. This should work.

AlanSmithe commented 3 years ago

Do you know what I could do to fix it? I uninstalled the plugin and reinstalled it but that didn't work. If I turn on the device in HomeSeer I see the Homebridge Accessories turn on. But when I turn it off the Homebridge Accessories stays on.

jvmahon commented 3 years ago

Please show me the "Status Graphics" page for the device.

AlanSmithe commented 3 years ago

Thank you for your time. I've uploaded the image to imgur. One of the classic view and one of the new hs4 view. https://i.imgur.com/Nj0bs9f.png?2 https://i.imgur.com/5kyL1RU.png

Really appreciate it

jvmahon commented 3 years ago

Upgrade to version 1.0.19 I found a bug - the code always assumed a value of 0 for off. It now uses 0 or the value you set. So 0 can still never be "On" (technically, I probably should have removed that and allowed 0 to be "On", but I didn't have time to fully debug that and make sure it didn't cause other problems) I guess you were the first one to ever use a non-zero "off" value since I hadn't seen this before!

AlanSmithe commented 3 years ago

That’s great. I use another plugin in homeseer for my KNX devices and it uses -11001 for off and -11002 for on. That’s how I noticed it. Thanks a lot for solving it.

jvmahon commented 3 years ago

I never tested with negative numbers. Let me know if there's a problem.

AlanSmithe commented 3 years ago

Everything works like a charm. Thanks again for this great plugin