ztalbot2000 / homebridge-cmd4

CMD4 Plugin for Homebridge - Supports ~All Accessory Types & now all Characteristics too
Apache License 2.0
149 stars 13 forks source link

Maybe a bug in the Examples File: AnyDevice #113

Closed huddx01 closed 3 years ago

huddx01 commented 3 years ago

Describe The Bug:

State of a Security System is not written correctly when polling

To Reproduce:

I think it should be

     case "SecuritySystemTargetState":
         {
            writeData( device, characteristic, option );

            // Set to done
            writeData( device,"SecuritySystemCurrentState", option );

            break;
         }

instead of...

 case "SecuritySystemTargetState":
     {
        writeData( device, characteristic, option );

        // Set to done
        writeData( device,"SecuritySystemAlarmState", option );

        break;
     }
ztalbot2000 commented 3 years ago

Hi,

Thanks for your bug report. I'm trying to remember the details around this characteristic. You are probably correct, but the difference may be on what the device is. I'm trying to remember if there are two different devices that could use this characteristic and each one differently.

I'll have to get back to you.

Ttyl, John

On Sun, Sep 12, 2021 at 1:56 PM huddx01 @.***> wrote:

Assigned #113 https://github.com/ztalbot2000/homebridge-cmd4/issues/113 to @ztalbot2000 https://github.com/ztalbot2000.

— You are receiving this because you were assigned. Reply to this email directly, view it on GitHub https://github.com/ztalbot2000/homebridge-cmd4/issues/113#event-5289440708, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABSBCXZMZB5PLKBOU7MFITTUBTSTLANCNFSM5D4KLCYA .

huddx01 commented 3 years ago

Hi.

I have tried to implement a securitysystem “dummy” device… which responds correctly.

So I tried to choose the AnyDevice script, which gets/sets the corresponding values….

Thank you so far…

ztalbot2000 commented 3 years ago

Hi,

Sorry, I did not forget about you, but from the bug description I did not put it at the top of my list. I am working on the Schema portion for Cmd4 so that you don't need to edit the config.json manually. As you can imagine, it's highly involved. I'll stop and look at yours now.

Ttyl, John

On Wed, Sep 15, 2021 at 3:28 PM huddx01 @.***> wrote:

Hi.

I have tried to implement a securitysystem “dummy” device… which responds correctly.

So I tried to choose the AnyDevice script, which gets/sets the corresponding values….

Thank you so far…

— You are receiving this because you were mentioned.

Reply to this email directly, view it on GitHub https://github.com/ztalbot2000/homebridge-cmd4/issues/113#issuecomment-920315378, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABSBCXZJHAEU3OPOXDCCKI3UCDXUFANCNFSM5D4KLCYA .

ztalbot2000 commented 3 years ago

Hi I just released v5.1.1 fixing AnyDevice. I also created and tested the new example script SecuritySystem.js

The comments in the script has the config.json that I used as well. There is interesting information I also note in the script.The securitySystemTargetState does not align with the CurrentState. To ARM/DISARM you must run the script from the command line.

if you have further issues, just continue writing to this ticket, even though I will now close it.

take care, John