nutechsoftware / alarmdecoder-smartthings

AlarmDecoder webapp support for the SmartThings home automation platform.
Apache License 2.0
25 stars 43 forks source link

Any way to detect night mode? #44

Closed dcmeglio closed 3 years ago

dcmeglio commented 4 years ago

Is there anyway to detect whether or not the alarm was armed in night mode vs. away/stay?

f34rdotcom commented 4 years ago

I have seen a patch and will be looking at merging for adding NIGHT and other modes. Stay tuned.

automatorCoder commented 4 years ago

I have to kludge it together in my automation system that parses the API URL:

http://alarmdecoder.local:5000/api/v1/alarmdecoder?apikey=YOURS

If panel_armed_stay is true and the message text is ARMED *INSTANT* then the panel is armed night mode.

IMHO, there should be a panel_armed_night flag

{ "last_message_received": "[00100001000010003A--],008,[f70600ff1008008c88020000000000],\"ARMED *INSTANT* \"", "panel_alarming": false, "panel_armed": false, "panel_armed_stay": true, "panel_battery_trouble": false, "panel_bypassed": {}, "panel_chime": false, "panel_entry_delay_off": true, "panel_exit": false, "panel_fire_detected": false, "panel_panicked": false, "panel_perimeter_only": false, "panel_powered": true, "panel_ready": false, "panel_relay_status": [], "panel_type": "ADEMCO", "panel_zones_faulted": [] }

f34rdotcom commented 4 years ago

NIGHT would be bit3(armed stay) on and bit16(perimeter only) off bit13(instant) on.

automatorCoder commented 4 years ago

Thanks. Any chance at getting a token set for this?

panel_armed_night

dcmeglio commented 4 years ago

@f34rdotcom is something like this doable?

dcmeglio commented 4 years ago

@automatorCoder am I correct you haven't figured out how to do this?

f34rdotcom commented 4 years ago

Ok let me go take a few and see. BBIAB.

f34rdotcom commented 4 years ago

panel_armed_night = ( panel_entry_delay_off == true && panel_armed_stay == true )

dcmeglio commented 4 years ago

Cool! I'm going to see if I can work that into the app so there are switches and events for it just like away/stay

dcmeglio commented 4 years ago

Is there an ADEMCO and DSC command I can use to set night mode? trying to build an arm_night()

f34rdotcom commented 4 years ago

According to my dsc keypad emulator code its a toggle pressing '*' when armed home mode only I presume.

/ interior arm/disarm fixme need to be dynamic / // on home screen when armed // "Press () for Interior Disarm " // "Press (*) for Interior Arm "

dcmeglio commented 4 years ago

any idea for ADEMCO? I Don't have a DSC to test with

dcmeglio commented 4 years ago

On my ademco whe I press the night arm the delay_off = false. However perimeter_only = true...

On Nov 17, 2019, at 8:47 PM, Sean Mathews notifications@github.com wrote:

 According to my dsc keypad emulator code its a toggle pressing '*' when armed home mode only I presume.

/ interior arm/disarm fixme need to be dynamic / // on home screen when armed // "Press () for Interior Disarm " // "Press (*) for Interior Arm "

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or unsubscribe.

f34rdotcom commented 4 years ago

Ok digging. This is complicated :( One of the many differences that causes pain. I guess in this case if DSC a button could be added to toggle interior as a nice panel specific feature.

f34rdotcom commented 4 years ago
f34rdotcom commented 4 years ago

According to my dsc keypad emulator code its a toggle pressing '*' when armed home mode only I presume.

/ interior arm/disarm fixme need to be dynamic _/ // on home screen when armed // "Press (_) for Interior Disarm " // "Press (*) for Interior Arm "

This was incorrect and referred to Night mode.

For ademco Night-Stay mode is CODE+33 For DSC Night-Stay is *1 and can only be turned on when the system is armed stay.

I made updates to the prior post to reflect this as well.

dcmeglio commented 4 years ago

Interesting. Then I guess for ademco my suspicion was correct that it will be stay+perimeter only? Looks like entry delay is enabled in night stay. I can’t find a good dsc manual to know what it does...

dcmeglio commented 4 years ago

@automatorCoder I'm not yet ready to submit this to be merged since I only have Hubitat so ST hasn't been tested at all. Any chance you have SmartThings? If so and you're already using the dev branch here, https://github.com/dcmeglio/alarmdecoder-smartthings/tree/dev has my first attempt at adding night mode support. It seems to be working for me.