Dilbert66 / esphome-dsckeybus

Esphome custom configuration for interfacing to a DSC POWERSERIES alarm system
187 stars 34 forks source link

Can't disarm panic alarm for partition 2 #3

Closed slipx06 closed 4 years ago

slipx06 commented 4 years ago

If I trigger the panic alarm in partition 1, either by calling esphome.alarm_alarm_trigger_panic or esphome.alarm_set_alarm_state and manually specifying the partition, state I can successfully disarm by using esphome.alarm_alarm_keypress and sending /1D(code). See logs below

Alarm triggered

[17:25:10][D][Debug22:236]: Partitions changed data: 00,00,00,00,81,11,00,00,05,00,81,11,00,C7,00 [17:25:10][D][text_sensor:015]: 'Partition 1 Msg ': Sending state '11: Alarm'

Keypress sent

[17:25:19][D][Debug:118]: Writing keys: /1D(code) [17:25:20][D][Debug22:236]: Partitions changed data: 07,00,00,00,81,11,00,00,27,00,81,11,00,C7,00

Alarm disarmed [17:25:21][D][Debug22:236]: Partitions changed data: 00,00,00,00,81,01,00,00,05,00,81,01,00,C7,00 [17:25:21][D][text_sensor:015]: 'Partition 1 Msg ': Sending state '01: Ready'

However if I trigger the same panic alarm for partition 2 using esphome.alarm_set_alarm_state, "Partition": "2", "State": "P", "code": "", the only way to turn off the alarm is at the keypad. If I send /2D(code) using esphome.alarm_alarm_keypress nothing happens.

17:28:53][D][Debug22:236]: Partitions changed data: 00,00,00,00,80,11,00,00,05,00,80,11,00,C7,00 [17:28:53][D][text_sensor:015]: 'Partition 1 Msg ': Sending state '11: Alarm' [17:28:56][D][Debug:118]: Writing keys: /2D(code) [17:29:01][D][Debug22:236]: Partitions changed data: 00,00,00,00,81,11,00,00,27,00,81,11,00,C7,04

The only partition 2 messages I can find in my logs are

17:50:47][D][Debug22:236]: Partitions changed data: 00,00,00,00,81,01,00,00,05,00,81,01,00,E7,00 [17:50:47][D][Debug22:236]: Partitions changed data: 01,00,00,00,81,01,00,00,05,00,81,01,00,E7,00 [17:50:47][D][text_sensor:015]: 'Partition 2 Msg ': Sending state 'E7: Input: 3 digits' [17:50:47][D][Debug22:236]: Partitions changed data: 02,00,00,00,81,01,00,00,05,00,81,01,00,E7,00 [17:50:47][D][Debug22:236]: Partitions changed data: 03,00,00,00,81,01,00,00,05,00,81,01,00,E7,00 [17:50:47][D][Debug22:236]: Partitions changed data: 04,00,00,00,81,01,00,00,05,00,81,01,00,E7,00 [17:50:47][D][Debug22:236]: Partitions changed data: 05,00,00,00,81,01,00,00,05,00,81,01,00,E7,00 [17:50:47][D][Debug22:236]: Partitions changed data: 06,00,00,00,81,01,00,00,05,00,81,01,00,E7,00 [17:50:47][D][Debug22:236]: Partitions changed data: 07,00,00,00,81,01,00,00,05,00,81,01,00,E7,00 [17:50:47][D][Debug22:236]: Partitions changed data: 00,00,00,00,81,01,00,00,05,00,81,01,00,C7,00 [17:50:47][D][Debug22:236]: Partitions changed data: 01,00,00,00,81,01,00,00,05,00,81,01,00,C7,00 [17:50:47][D][text_sensor:015]: 'Partition 2 Msg ': Sending state 'C7: Unknown'

Please can you test if this is unique to my panel or a problem

Dilbert66 commented 4 years ago

Try sending /2xxxx where xxxx is your access code for alarm keypress. No D.

Dilbert66 commented 4 years ago

The D command is only used for send alarm state . Are you saying setting partition 2, state D, code xxxx is not working in set alarm state?

slipx06 commented 4 years ago

Sending /2xxxx does not work nor does the setting state D. Sent a few times just to make sure

[18:35:45][D][Debug:118]: Writing keys: /2xxxx [18:35:45][D][Debug:118]: Writing keys: /2xxxx [18:35:45][D][Debug:118]: Writing keys: /2xxxx [18:35:46][D][Debug:118]: Writing keys: /2xxxx [18:35:47][D][Debug22:236]: Partitions changed data: 00,00,00,00,85,11,00,00,05,00,85,11,00,C7,00 [18:35:47][D][Debug22:236]: Partitions changed data: 01,00,00,00,85,11,00,00,05,00,85,11,00,C7,00 [18:35:47][D][Debug22:236]: Partitions changed data: 02,00,00,00,85,11,00,00,05,00,85,11,00,C7,00 [18:35:47][D][Debug22:236]: Partitions changed data: 03,00,00,00,85,11,00,00,05,00,85,11,00,C7,00

I've also tried just sending the (code) without specifying any partition and it doesnt work. If I enter the same code on the keypad the alarm is cancelled. This is only a problem for partition 2

Dilbert66 commented 4 years ago

That's a tricky one. Can't see what it is at the moment. Will do some tests to see what I can find.

Dilbert66 commented 4 years ago

I can't duplicate on my end since I don't use partition 2 as an active one. I just have some sensors on it and use it only for that. I did find an issue when trying to send a command to an inactive partition, the esp would lockup because it would block. I've added a wait timer to prevent that. I've also change some debug info which might catch what is going on in your end. I suspect the library is not setting the correct bits for partitions other than 1. I need to debug this further. Try out the debug version and post some logs when you get a chance.
It's great info that you are providing and helps in making this project better.

slipx06 commented 4 years ago

Thanks will give it a try. Is there any coding logic that prevents me from triggering a panic alarm for an already armed partition. What I'm trying to do is use one of my Zigbee sensors to trigger the alarm based on certain conditions. If the alarm is armed sending the panic command to the armed partition does nothing, but if send to an unused partition I can trigger it. The problem is I cant disarm it. I have not tried pushing my panic button while the alarm is armed, but I understood that the panic alarm takes priority and should sound. Will test tomorrow.

Dilbert66 commented 4 years ago

There is logic with the set alarm_state to only allow during not armed and not exit delay. This was how the original library had it but really there should be no check for it. There is no logic though for the alarm_keypress where you could just send a "p". I will also remove the check for an alarmed panel and you can test with set_alarm_status as well.

edit: ok, pushed new debug version with alarm check removed for fire/panic

Dilbert66 commented 4 years ago

Can you try also sending a "/2*2" command. This is the trouble status command. You can also try "/1*2" to compare. Use the keypress service.

slipx06 commented 4 years ago

Ok so I now I can successfully trigger the panic alarm using the esphome.alarm_alarm_trigger_panic service for an already armed partition. I think your last change may have introduced some timing issues as I now have to sometimes issue a command at least twice for it to work. This does not happen all the time but when it does the debug log seem to freeze for a few seconds and then continue again This happens when making esphome.alarmalarm* service calls and sending a keypress

Here is the output of sending "/2*2" or "/1*2"

[09:08:18][D][Debug:119]: Writing keys: /12 [09:08:18][D][Debug22:235]: Partition1 changed data: 00,00,00,80,9E,00,00,05,00,80,9E,00,C7,00 [09:08:18][D][Debug33:241]: Partition data 00: 9E,80,00,00 [09:08:18][D][text_sensor:015]: 'Partition 1 Msg ': Sending state '9E: Enter code' [09:08:18][D][text_sensor:015]: 'Partition 1 Status ': Sending state 'unavailable' [09:08:18][D][Debug33:241]: Partition data 01: C7,00,00,00 [09:08:18][D][Debug33:241]: Partition data 02: C7,00,00,00 [09:08:18][D][Debug33:241]: Partition data 03: C7,00,00,00 [09:08:18][D][Debug33:241]: Partition data 04: 00,00,00,00 [09:08:18][D][Debug33:241]: Partition data 05: 00,00,00,00 [09:08:18][D][Debug33:241]: Partition data 06: 00,00,00,00 [09:08:18][D][Debug33:241]: Partition data 07: 00,00,00,00 [09:08:19][D][Debug22:235]: Partition1 changed data: 00,00,00,80,A1,00,00,05,00,80,A1,00,C7,00 [09:08:19][D][Debug33:241]: Partition data 00: A1,80,00,00 [09:08:19][D][text_sensor:015]: 'Partition 1 Msg ': Sending state 'A1: Trouble menu' [09:08:19][D][Debug33:241]: Partition data 01: C7,00,00,00 [09:08:19][D][Debug33:241]: Partition data 02: C7,00,00,00 [09:08:19][D][Debug33:241]: Partition data 03: C7,00,00,00 [09:08:19][D][Debug33:241]: Partition data 04: 00,00,00,00 [09:08:19][D][Debug33:241]: Partition data 05: 00,00,00,00 [09:08:19][D][Debug33:241]: Partition data 06: 00,00,00,00 [09:08:19][D][Debug33:241]: Partition data 07: 00,00,00,00

[09:07:00][D][Debug:119]: Writing keys: /2*2 [09:07:02][D][Debug22:235]: Partition1 changed data: 00,00,00,81,01,00,00,A5,00,20,15,83,30,00 [09:07:02][D][Debug33:241]: Partition data 00: 01,81,00,00 [09:07:02][D][Debug33:241]: Partition data 01: C7,00,00,00 [09:07:02][D][Debug33:241]: Partition data 02: C7,00,00,00 [09:07:02][D][Debug33:241]: Partition data 03: C7,00,00,00 [09:07:02][D][Debug33:241]: Partition data 04: 00,00,00,00 [09:07:02][D][Debug33:241]: Partition data 05: 00,00,00,00 [09:07:02][D][Debug33:241]: Partition data 06: 00,00,00,00 [09:07:02][D][Debug33:241]: Partition data 07: 00,00,00,00

Here is an example of the same command being sent and the panel not responding

[09:10:21][D][Debug:119]: Writing keys: /1*2

<see 30 sec delay here>

[09:10:51][D][Debug22:235]: Partition1 changed data: 00,00,00,81,01,00,00,05,00,81,01,00,C7,00 [09:10:51][D][Debug33:241]: Partition data 00: 01,81,00,00 [09:10:51][D][text_sensor:015]: 'Partition 1 Msg ': Sending state '01: Ready' [09:10:51][D][text_sensor:015]: 'Partition 1 Status ': Sending state 'disarmed' [09:10:51][D][Debug33:241]: Partition data 01: C7,00,00,00 [09:10:51][D][Debug33:241]: Partition data 02: C7,00,00,00 [09:10:51][D][Debug33:241]: Partition data 03: C7,00,00,00 [09:10:51][D][Debug33:241]: Partition data 04: 00,00,00,00 [09:10:51][D][Debug33:241]: Partition data 05: 00,00,00,00 [09:10:51][D][Debug33:241]: Partition data 06: 00,00,00,00 [09:10:51][D][Debug33:241]: Partition data 07: 00,00,00,00

Still cant disarm partition 2 if i trigger a panic alarm. It's not really an issue anymore since I can now use partition 1. Logs below

[10:56:24][D][Debug33:241]: Partition data 00: 11,81,00,00 [10:56:24][D][text_sensor:015]: 'Partition 1 Msg ': Sending state '11: Alarm' [10:56:24][D][Debug33:241]: Partition data 01: C7,00,00,00 [10:56:24][D][Debug33:241]: Partition data 02: C7,00,00,00 [10:56:24][D][Debug33:241]: Partition data 03: C7,00,00,00 [10:56:24][D][Debug33:241]: Partition data 04: 00,00,00,00 [10:56:24][D][Debug33:241]: Partition data 05: 00,00,00,00 [10:56:24][D][Debug33:241]: Partition data 06: 00,00,00,00 [10:56:24][D][Debug33:241]: Partition data 07: 00,00,00,00 [10:56:36][D][Debug22:235]: Partition1 changed data: 00,00,00,81,11,00,00,05,00,81,11,00,E7,00 [10:56:36][D][Debug33:241]: Partition data 00: 11,81,00,00 [10:56:36][D][Debug33:241]: Partition data 01: E7,00,00,00 [10:56:36][D][text_sensor:015]: 'Partition 2 Msg ': Sending state 'E7: Input: 3 digits' [10:56:36][D][Debug33:241]: Partition data 02: C7,00,00,00 [10:56:36][D][Debug33:241]: Partition data 03: C7,00,00,00 [10:56:36][D][Debug33:241]: Partition data 04: 00,00,00,00 [10:56:36][D][Debug33:241]: Partition data 05: 00,00,00,00 [10:56:36][D][Debug33:241]: Partition data 06: 00,00,00,00 [10:56:36][D][Debug33:241]: Partition data 07: 00,00,00,00 [10:56:36][D][Debug22:235]: Partition1 changed data: 00,00,00,81,11,00,00,05,00,81,11,00,C7,00 [10:56:36][D][Debug33:241]: Partition data 00: 11,81,00,00 [10:56:36][D][Debug33:241]: Partition data 01: C7,00,00,00 [10:56:36][D][text_sensor:015]: 'Partition 2 Msg ': Sending state 'C7: Unknown' [10:56:36][D][Debug33:241]: Partition data 02: C7,00,00,00 [10:56:36][D][Debug33:241]: Partition data 03: C7,00,00,00 [10:56:36][D][Debug33:241]: Partition data 04: 00,00,00,00 [10:56:36][D][Debug33:241]: Partition data 05: 00,00,00,00 [10:56:36][D][Debug33:241]: Partition data 06: 00,00,00,00 [10:56:36][D][Debug33:241]: Partition data 07: 00,00,00,00 [10:57:00][D][Debug:119]: Writing keys: (code) [10:57:01][D][Debug:119]: Writing keys: (code) [10:57:04][D][Debug22:235]: Partition1 changed data: 00,00,00,81,11,00,00,27,00,81,11,00,C7,08

Dilbert66 commented 4 years ago

Something is not right with your partition 2. It shows c7 which means it's unavailable or not active which is why the command has no affect on it. Also the panic alarm you show, is on partition1 not 2 . (1st byte of the data is the status. 11 is partition alarm, c7 is unavailable. That E7 (input 3 digits). That I have no idea what that's about. You might want to check the setup for partition 2 so see why it differs from partition1.

Dilbert66 commented 4 years ago

As to the delay with the * commands. Yes, I will fix that.

slipx06 commented 4 years ago

I don't think my partition 2 is setup correctly as you say. I'm going to abandon that option now that I can trigger the Panic in partition 1 whilst armed.

Looks like I might need to enable those 05 status messages again. When I armed the alarm tonight the panel stayed in an "unavailable" state until I triggered a sensor.

Dilbert66 commented 4 years ago

Ok, I've pushed a new version to master that should address the issue with having to send commands twice. Also has the panic while armed changes.

Dilbert66 commented 4 years ago

That's strange though that it did not pick up your system being armed if it was already running since a 27 message would have been sent. Normally only need the 05 statuses if you boot your esp module while your system is armed so it will know about it.

Dilbert66 commented 4 years ago

You can enable the debug messages again on your system by setting this flag in the custom component in the master branch version.

DSCkeybus->debug=true;

slipx06 commented 4 years ago

Thanks for all your help. Running the new master. There must of been some other changes to the development libraries that cause some issues with my panel. I was running a version 1.2 sketch for many months without issues.

Trying to turn on debug

src/main.cpp: In lambda function:
src/main.cpp:405:18: error: 'class DSCkeybushome' has no member named 'debug'
       DSCkeybus->debug=true;
                  ^
*** [/data/alarm/.pioenvs/alarm/src/main.cpp.o] Error 1
Dilbert66 commented 4 years ago

whups. I had forgotten to push dscalarm.h. Redownload that one

slipx06 commented 4 years ago

First message on boot. At least debug is working

[22:47:42][D][api.connection:583]: Client 'Home Assistant 0.113.2 (192.168.1.103)' connected successfully! [22:47:45][D][Debug22:237]: Partition1 changed data: 00,00,01,8A,84,00,01,05,00,8A,84,00,C7,00 [22:47:45][D][Debug33:243]: Partition data 00: 84,8A,01,00 [22:47:45][D][text_sensor:015]: 'Partition 1 Msg ': Sending state '84: Unknown' [22:47:45][D][Debug33:243]: Partition data 01: C7,00,00,00 [22:47:45][D][Debug33:243]: Partition data 02: C7,00,00,00 [22:47:45][D][Debug33:243]: Partition data 03: C7,00,00,00 [22:47:45][D][Debug33:243]: Partition data 04: 00,00,00,00 [22:47:45][D][Debug33:243]: Partition data 05: 00,00,00,00 [22:47:45][D][Debug33:243]: Partition data 06: 00,00,00,00 [22:47:45][D][Debug33:243]: Partition data 07: 00,00,00,00

Dilbert66 commented 4 years ago

84 is not a known command. What state is your panel in right now? I can add it if we can guess what it is.

slipx06 commented 4 years ago

Booted up in armed_home. I have no idea what is causing all these changes. Strange data below since last boot

[22:47:45][D][Debug22:237]: Partition1 changed data: 00,00,01,8A,04,00,01,05,00,8A,04,00,C7,00 [22:47:45][D][Debug33:243]: Partition data 00: 04,8A,01,00 [22:47:45][D][text_sensor:015]: 'Partition 1 Msg ': Sending state '04: Armed stay'

[22:48:29][D][Debug22:237]: Partition1 changed data: 00,00,01,8A,84,00,01,05,00,8A,84,00,C7,00 [22:48:29][D][Debug33:243]: Partition data 00: 84,8A,01,00 [22:48:29][D][text_sensor:015]: 'Partition 1 Msg ': Sending state '84: Unknown'

[22:48:29][D][Debug22:237]: Partition1 changed data: 00,00,01,8A,04,00,01,05,00,8A,04,00,C7,00 [22:48:29][D][Debug33:243]: Partition data 00: 04,8A,01,00 [22:48:29][D][text_sensor:015]: 'Partition 1 Msg ': Sending state '04: Armed stay'

[22:57:53][D][Debug22:237]: Partition1 changed data: 00,00,01,8A,24,00,01,05,00,8A,24,00,C7,00 [22:57:53][D][Debug33:243]: Partition data 00: 24,8A,01,00 [22:57:53][D][text_sensor:015]: 'Partition 1 Msg ': Sending state '24: Unknown'

[22:57:53][D][Debug22:237]: Partition1 changed data: 00,00,01,8A,04,00,01,05,00,8A,04,00,C7,00 [22:57:53][D][Debug33:243]: Partition data 00: 04,8A,01,00 [22:57:53][D][text_sensor:015]: 'Partition 1 Msg ': Sending state '04: Armed stay'

[23:06:16][D][Debug22:237]: Partition1 changed data: 00,00,01,8A,44,00,01,05,00,8A,44,00,C7,00 [23:06:16][D][Debug33:243]: Partition data 00: 44,8A,01,00 [23:06:16][D][text_sensor:015]: 'Partition 1 Msg ': Sending state '44: Unknown'

[23:10:30][D][Debug22:237]: Partition1 changed data: 00,00,01,8A,0C,00,01,05,00,8A,0C,00,C7,00 [23:10:30][D][Debug33:243]: Partition data 00: 0C,8A,01,00 [23:10:30][D][text_sensor:015]: 'Partition 1 Msg ': Sending state '0C: Entry delay'

[23:11:14][D][Debug22:237]: Partition1 changed data: 00,00,01,8A,06,00,01,05,00,8A,06,00,C7,00 [23:11:14][D][Debug33:243]: Partition data 00: 06,8A,01,00 [23:11:14][D][text_sensor:015]: 'Partition 1 Msg ': Sending state '06: Unknown'

Dilbert66 commented 4 years ago

Well, that's an effect of the message code I added to capture the 05 messages. Since your system likes to send out various 05 messages out for no reason, it's showing those. You would not have seen those before even though they are always sent. It won't affect the operation as those are display only since the true status is the partition status and not the partition msg state. I will use an enable05messages flag to disable those as they don't mean anything in your case.

Dilbert66 commented 4 years ago

Ok, made the change on master. Changed files are dscalarm.yaml and dscalarm.h. New flag added which gets passed to the class.

slipx06 commented 4 years ago

That will help. I do have an example below where the state is changed to armed_night, but it should not have

[23:15:10][D][Debug22:237]: Partition1 changed data: 01,00,01,8A,05,01,00,05,00,8A,05,00,C7,00 [23:15:10][D][Debug33:243]: Partition data 00: 05,8A,01,00 [23:15:10][D][text_sensor:015]: 'Partition 1 Msg ': Sending state '05: Armed away' [23:15:10][D][text_sensor:015]: 'Partition 1 Status ': Sending state 'armed_night'

Trying the new master

Dilbert66 commented 4 years ago

That usually means it received a 0x16 or 0x06 message in the 27 command to indicate that it has been set to noentrydelay. The 05 command also gets those but if you have the enable05armstatus = false, it won't affect anthing. It's difficult to know unless we get more debug info as to what your panel is really doing. If your system is also sending bogus 27 commands , then that would create a whole new level of complexity.

Dilbert66 commented 4 years ago

I've pushed a new update to master that adds a few more fields in the debug lines . Removed a couple things. Let's see if that captures those night arm messsages and we can see what's going on.

slipx06 commented 4 years ago

Ok so things are looking better. I still get some intermittent "Unavailable" states being set. As seen below there were no sensors triggered to cause the panel not to be ready. Can we filter those out? The panel was is a disarmed state the entire time

[10:20:09][D][Debug22:241]: Partition 1 panel data: 05,00,81,81,00,C7,00 [10:20:09][D][Debug33:247]: Partition data 00: 81,81,00,00,00,00,00,00,00 [10:20:09][D][text_sensor:015]: 'Partition 1 Msg ': Sending state 'no_messages' [10:20:09][D][text_sensor:015]: 'Partition 1 Status ': Sending state 'unavailable' [10:20:09][D][Debug33:247]: Partition data 01: C7,00,00,00,00,00,00,00,00 [10:20:09][D][text_sensor:015]: 'Partition 2 Msg ': Sending state 'no_messages' [10:20:09][D][Debug33:247]: Partition data 02: C7,00,00,00,00,00,00,00,00 [10:20:09][D][Debug33:247]: Partition data 03: C7,00,00,00,00,00,00,00,00 [10:20:09][D][Debug33:247]: Partition data 04: 00,00,00,00,00,00,00,00,00 [10:20:09][D][Debug33:247]: Partition data 05: 00,00,00,00,00,00,00,00,00 [10:20:09][D][Debug33:247]: Partition data 06: 00,00,00,00,00,00,00,00,00 [10:20:09][D][Debug33:247]: Partition data 07: 00,00,00,00,00,00,00,00,00 [10:20:09][D][Debug22:241]: Partition 1 panel data: 05,00,81,01,00,C7,00 [10:20:09][D][Debug33:247]: Partition data 00: 01,81,00,00,00,00,00,00,00 [10:20:09][D][text_sensor:015]: 'Partition 1 Msg ': Sending state 'no_messages' [10:20:09][D][text_sensor:015]: 'Partition 1 Status ': Sending state 'disarmed' [10:20:09][D][Debug33:247]: Partition data 01: C7,00,00,00,00,00,00,00,00 [10:20:09][D][text_sensor:015]: 'Partition 2 Msg ': Sending state 'no_messages' [10:20:09][D][Debug33:247]: Partition data 02: C7,00,00,00,00,00,00,00,00 [10:20:10][D][Debug33:247]: Partition data 03: C7,00,00,00,00,00,00,00,00 [10:20:10][D][Debug33:247]: Partition data 04: 00,00,00,00,00,00,00,00,00 [10:20:10][D][Debug33:247]: Partition data 05: 00,00,00,00,00,00,00,00,00 [10:20:10][D][Debug33:247]: Partition data 06: 00,00,00,00,00,00,00,00,00 [10:20:10][D][Debug33:247]: Partition data 07: 00,00,00,00,00,00,00,00,00 [10:21:22][D][Debug22:241]: Partition 1 panel data: 05,00,81,81,00,C7,00 [10:21:22][D][Debug33:247]: Partition data 00: 81,81,00,00,00,00,00,00,00 [10:21:22][D][text_sensor:015]: 'Partition 1 Msg ': Sending state 'no_messages' [10:21:22][D][text_sensor:015]: 'Partition 1 Status ': Sending state 'unavailable' [10:21:22][D][Debug33:247]: Partition data 01: C7,00,00,00,00,00,00,00,00 [10:21:22][D][text_sensor:015]: 'Partition 2 Msg ': Sending state 'no_messages' [10:21:22][D][Debug33:247]: Partition data 02: C7,00,00,00,00,00,00,00,00 [10:21:22][D][Debug33:247]: Partition data 03: C7,00,00,00,00,00,00,00,00 [10:21:22][D][Debug33:247]: Partition data 04: 00,00,00,00,00,00,00,00,00 [10:21:22][D][Debug33:247]: Partition data 05: 00,00,00,00,00,00,00,00,00 [10:21:22][D][Debug33:247]: Partition data 06: 00,00,00,00,00,00,00,00,00 [10:21:22][D][Debug33:247]: Partition data 07: 00,00,00,00,00,00,00,00,00 [10:21:22][D][Debug22:241]: Partition 1 panel data: 05,00,81,01,00,C7,00 [10:21:22][D][Debug33:247]: Partition data 00: 01,81,00,00,00,00,00,00,00 [10:21:22][D][text_sensor:015]: 'Partition 1 Msg ': Sending state 'no_messages' [10:21:22][D][text_sensor:015]: 'Partition 1 Status ': Sending state 'disarmed' [10:21:22][D][Debug33:247]: Partition data 01: C7,00,00,00,00,00,00,00,00 [10:21:22][D][text_sensor:015]: 'Partition 2 Msg ': Sending state 'no_messages' [10:21:22][D][Debug33:247]: Partition data 02: C7,00,00,00,00,00,00,00,00 [10:21:22][D][Debug33:247]: Partition data 03: C7,00,00,00,00,00,00,00,00 [10:21:22][D][Debug33:247]: Partition data 04: 00,00,00,00,00,00,00,00,00 [10:21:22][D][Debug33:247]: Partition data 05: 00,00,00,00,00,00,00,00,00 [10:21:22][D][Debug33:247]: Partition data 06: 00,00,00,00,00,00,00,00,00 [10:21:22][D][Debug33:247]: Partition data 07: 00,00,00,00,00,00,00,00,00

Below is a true condition when a door is opened and the panel is not ready

[10:22:55][D][binary_sensor:036]: 'Garage Door': Sending state ON [10:22:56][D][Debug22:241]: Partition 1 panel data: 05,00,80,03,00,C7,00 [10:22:56][D][Debug33:247]: Partition data 00: 03,80,00,00,00,00,00,00,00 [10:22:56][D][text_sensor:015]: 'Partition 1 Msg ': Sending state 'no_messages' [10:22:56][D][text_sensor:015]: 'Partition 1 Status ': Sending state 'unavailable' [10:22:56][D][Debug33:247]: Partition data 01: C7,00,00,00,00,00,00,00,00 [10:22:56][D][text_sensor:015]: 'Partition 2 Msg ': Sending state 'no_messages' [10:22:56][D][Debug33:247]: Partition data 02: C7,00,00,00,00,00,00,00,00 [10:22:56][D][Debug33:247]: Partition data 03: C7,00,00,00,00,00,00,00,00 [10:22:56][D][Debug33:247]: Partition data 04: 00,00,00,00,00,00,00,00,00 [10:22:56][D][Debug33:247]: Partition data 05: 00,00,00,00,00,00,00,00,00 [10:22:56][D][Debug33:247]: Partition data 06: 00,00,00,00,00,00,00,00,00 [10:22:56][D][Debug33:247]: Partition data 07: 00,00,00,00,00,00,00,00,00

and then when the door is closed and the panel returns to a ready state

[10:25:40][D][binary_sensor:036]: 'Garage Door': Sending state OFF [10:25:40][D][Debug22:241]: Partition 1 panel data: 27,00,81,02,00,C7,00 [10:25:40][D][Debug33:247]: Partition data 00: 03,80,00,00,00,00,00,00,00 [10:25:40][D][text_sensor:015]: 'Partition 1 Msg ': Sending state 'no_messages' [10:25:40][D][Debug33:247]: Partition data 01: C7,00,00,00,00,00,00,00,00 [10:25:40][D][text_sensor:015]: 'Partition 2 Msg ': Sending state 'no_messages' [10:25:40][D][Debug33:247]: Partition data 02: C7,00,00,00,00,00,00,00,00 [10:25:40][D][Debug33:247]: Partition data 03: C7,00,00,00,00,00,00,00,00 [10:25:40][D][Debug33:247]: Partition data 04: 00,00,00,00,00,00,00,00,00 [10:25:40][D][Debug33:247]: Partition data 05: 00,00,00,00,00,00,00,00,00 [10:25:40][D][Debug33:247]: Partition data 06: 00,00,00,00,00,00,00,00,00 [10:25:40][D][Debug33:247]: Partition data 07: 00,00,00,00,00,00,00,00,00 [10:25:40][D][binary_sensor:036]: 'Dining Room': Sending state OFF [10:25:40][D][Debug22:241]: Partition 1 panel data: 05,00,81,01,00,C7,00 [10:25:40][D][Debug33:247]: Partition data 00: 01,81,00,00,00,00,00,00,00 [10:25:40][D][text_sensor:015]: 'Partition 1 Msg ': Sending state 'no_messages' [10:25:40][D][text_sensor:015]: 'Partition 1 Status ': Sending state 'disarmed'

slipx06 commented 4 years ago

Here are debug logs for the armed_night issue. The panel was armed_home

[11:32:05][D][text_sensor:015]: 'Partition 1 Msg ': Sending state 'no_messages' [11:32:05][D][text_sensor:015]: 'Partition 1 Status ': Sending state 'armed_night' [11:32:05][D][Debug33:247]: Partition data 01: C7,00,00,00,00,00,00,00,00 [11:32:05][D][text_sensor:015]: 'Partition 2 Msg ': Sending state 'no_messages' [11:32:05][D][Debug33:247]: Partition data 02: C7,00,00,00,00,00,00,00,00 [11:32:05][D][Debug33:247]: Partition data 03: C7,00,00,00,00,00,00,00,00 [11:32:05][D][Debug33:247]: Partition data 04: 00,00,00,00,00,00,00,00,00 [11:32:05][D][Debug33:247]: Partition data 05: 00,00,00,00,00,00,00,00,00 [11:32:05][D][Debug33:247]: Partition data 06: 00,00,00,00,00,00,00,00,00 [11:32:05][D][Debug33:247]: Partition data 07: 00,00,00,00,00,00,00,00,00 [11:32:05][D][Debug22:241]: Partition 1 panel data: 05,00,8A,04,00,C7,00 [11:32:05][D][Debug33:247]: Partition data 00: 04,8A,01,00,01,01,00,01,00 [11:32:05][D][text_sensor:015]: 'Partition 1 Msg ': Sending state 'no_messages' [11:32:05][D][text_sensor:015]: 'Partition 1 Status ': Sending state 'armed_night' [11:32:05][D][Debug33:247]: Partition data 01: C7,00,00,00,00,00,00,00,00 [11:32:05][D][text_sensor:015]: 'Partition 2 Msg ': Sending state 'no_messages' [11:32:05][D][Debug33:247]: Partition data 02: C7,00,00,00,00,00,00,00,00 [11:32:05][D][Debug33:247]: Partition data 03: C7,00,00,00,00,00,00,00,00 [11:32:05][D][Debug33:247]: Partition data 04: 00,00,00,00,00,00,00,00,00 [11:32:05][D][Debug33:247]: Partition data 05: 00,00,00,00,00,00,00,00,00 [11:32:05][D][Debug33:247]: Partition data 06: 00,00,00,00,00,00,00,00,00 [11:32:05][D][Debug33:247]: Partition data 07: 00,00,00,00,00,00,00,00,00 [11:32:12][D][Debug22:241]: Partition 1 panel data: 05,00,8A,06,00,C7,00

Seems to be stuck in this state for the last *60 minutes. Triggering a motion sensor has not updated the state to armed_home

[11:43:09][D][binary_sensor:036]: 'Study': Sending state ON [11:43:11][D][Debug22:241]: Partition 1 panel data: 27,00,8A,04,00,C7,00 [11:43:11][D][Debug33:247]: Partition data 00: 04,8A,01,00,01,01,00,00,00 [11:43:11][D][text_sensor:015]: 'Partition 1 Msg ': Sending state 'no_messages' [11:43:11][D][Debug33:247]: Partition data 01: C7,00,00,00,00,00,00,00,00 [11:43:11][D][text_sensor:015]: 'Partition 2 Msg ': Sending state 'no_messages' [11:43:11][D][Debug33:247]: Partition data 02: C7,00,00,00,00,00,00,00,00 [11:43:11][D][Debug33:247]: Partition data 03: C7,00,00,00,00,00,00,00,00 [11:43:11][D][Debug33:247]: Partition data 04: 00,00,00,00,00,00,00,00,00 [11:43:11][D][Debug33:247]: Partition data 05: 00,00,00,00,00,00,00,00,00 [11:43:11][D][Debug33:247]: Partition data 06: 00,00,00,00,00,00,00,00,00 [11:43:11][D][Debug33:247]: Partition data 07: 00,00,00,00,00,00,00,00,00 [11:43:11][D][binary_sensor:036]: 'Study': Sending state OFF [11:44:44][D][Debug22:241]: Partition 1 panel data: 05,00,8A,04,00,C7,00 [11:44:44][D][Debug33:247]: Partition data 00: 04,8A,01,00,01,01,00,00,00 [11:44:44][D][text_sensor:015]: 'Partition 1 Msg ': Sending state 'no_messages' [11:44:44][D][Debug33:247]: Partition data 01: C7,00,00,00,00,00,00,00,00 [11:44:44][D][text_sensor:015]: 'Partition 2 Msg ': Sending state 'no_messages' [11:44:44][D][Debug33:247]: Partition data 02: C7,00,00,00,00,00,00,00,00 [11:44:44][D][Debug33:247]: Partition data 03: C7,04,00,00,00,00,00,00,00 [11:44:44][D][Debug33:247]: Partition data 04: 00,00,00,00,00,00,00,00,00 [11:44:44][D][Debug33:247]: Partition data 05: 00,00,00,00,00,00,00,00,00 [11:44:44][D][Debug33:247]: Partition data 06: 00,00,00,00,00,00,00,00,00 [11:44:44][D][Debug33:247]: Partition data 07: 00,00,00,00,00,00,00,00,00

Dilbert66 commented 4 years ago

The no_messages issue was caused because with the removal of the messages with the flag, the initial init was still being done. Ive fixed that and the stuck status too I believe. Will push shortly.

Dilbert66 commented 4 years ago

Ok, changes pushed to master. Let's see if that corrects all issues.

slipx06 commented 4 years ago

Testing

Dilbert66 commented 4 years ago

I just realized I had left some test code for ac power logging. I'll remove that as it puts out a bogus message. Also added a change that will not process disabled or inactive partitions so you won't see those in the log now.

slipx06 commented 4 years ago

The new version wont compile

Compiling /data/alarm/.pioenvs/alarm/src/main.cpp.o
In file included from src/main.cpp:35:0:
src/dscAlarm.h: In member function 'virtual void DSCkeybushome::loop()':
src/dscAlarm.h:238:33: warning: the address of 'enable05Messages' will always evaluate as 'true' [-Waddress]
   if (dsc.keypadFireAlarm && && enable05Messages) partitionMsgChangeCallback(1,"Keypad Fire Alarm");
                                 ^
src/dscAlarm.h:238:33: error: label 'enable05Messages' used but not defined
Generating LD script /data/alarm/.pioenvs/alarm/ld/local.eagle.app.v6.common.ld
Compiling /data/alarm/.pioenvs/alarm/lib4d9/ESP8266WiFi/BearSSLHelpers.cpp.o
*** [/data/alarm/.pioenvs/alarm/src/main.cpp.o] Error 1
Dilbert66 commented 4 years ago

typo on my end. Good now

slipx06 commented 4 years ago

Looking good. Was testing with the alarm armed_home. Below is an example of an erroneous state change. In theory the panel should not be able to directly change state from armed_home to armed_away. Could this be noise on the keybus?

[14:38:48][D][Debug33:247]: Partition data 00: 04,8A,01,00,01,00,00,00,00 [14:40:43][D][Debug22:240]: Partition 1 panel data: 05,00,8A,05,00,C7,00 [14:40:43][D][Debug33:247]: Partition data 00: 05,8A,01,01,00,00,00,01,00 [14:40:43][D][text_sensor:015]: 'Partition 1 Status ': Sending state 'armed_away' [14:40:43][D][Debug22:240]: Partition 1 panel data: 05,00,8A,04,00,C7,00 [14:40:43][D][Debug33:247]: Partition data 00: 04,8A,01,00,01,00,00,01,00 [14:40:43][D][text_sensor:015]: 'Partition 1 Status ': Sending state 'armed_home' [14:40:48][D][Debug22:240]: Partition 1 panel data: 05,00,8A,04,00,C7,00 [14:40:48][D][Debug33:247]: Partition data 00: 04,8A,01,00,01,00,00,00,00 [14:40:48][D][Debug33:247]: Partition data 03: E7,00,00,00,00,00,00,00,00

BTW this is with enable05ArmStatus set to True. Will test now with it set to False

With this set I seem to get a lot more "unavailable"messages

[15:45:05][D][Debug22:240]: Partition 1 panel data: 05,00,81,41,00,C7,00 [15:45:05][D][Debug33:247]: Partition data 00: 41,81,00,00,00,00,00,00,00 [15:45:05][D][text_sensor:015]: 'Partition 1 Status ': Sending state 'unavailable' [15:45:05][D][Debug22:240]: Partition 1 panel data: 05,00,81,01,00,C7,00 [15:45:05][D][Debug33:247]: Partition data 00: 01,81,00,00,00,00,00,00,00 [15:45:05][D][text_sensor:015]: 'Partition 1 Status ': Sending state 'disarmed' [15:45:14][D][Debug22:240]: Partition 1 panel data: A5,00,20,15,A4,B0,00 [15:45:14][D][Debug33:247]: Partition data 00: 01,81,00,00,00,00,00,00,00 [15:45:18][D][Debug22:240]: Partition 1 panel data: 05,00,81,41,00,C7,00 [15:45:18][D][Debug33:247]: Partition data 00: 41,81,00,00,00,00,00,00,00 [15:45:18][D][text_sensor:015]: 'Partition 1 Status ': Sending state 'unavailable' [15:45:18][D][Debug22:240]: Partition 1 panel data: 05,00,81,01,00,C7,00 [15:45:18][D][Debug33:247]: Partition data 00: 01,81,00,00,00,00,00,00,00 [15:45:18][D][text_sensor:015]: 'Partition 1 Status ': Sending state 'disarmed'

Dilbert66 commented 4 years ago

Yes, running with enable05Armstatus will use the 05 command for arm statuses and in your case will cause all those switching states since your panel sends all the possible arm states on the 05 command instead of the actual one. In my case, it sends arm_away only (even when I set to arm home), so every panel has some odd behaviors looks like. Setting enable05armstatus to false stops responding to 05 status arm status changes and only uses the 27 command which is dependable but only sent when something changes (instead of the 05 which is sent periodically)

Dilbert66 commented 4 years ago

So the best approach in your case is to set both flags to false to prevent all those invalid messages and states. For my panel, I can use true. The main thing you will notice though is that with both flags set to false, your panel status will not update immediately to a known state on initial bootup until something is changed. Not a huge issue since normally you should not reboot your module too often.

slipx06 commented 4 years ago

Agreed. The only thing now is filtering out all these fake "unavailable" messages. Is there anything in the logs I posted to help with that

Dilbert66 commented 4 years ago

You should not get those unavalable messages with the flags set to false??? Oh i see your panel is sending a 41 unknown command... Wow., Yes, I can filter those

slipx06 commented 4 years ago

I have both flags set to false these are my logs

[16:01:05][D][Debug22:240]: Partition 1 panel data: 05,00,81,01,00,C7,00 [16:01:05][D][Debug33:247]: Partition data 00: 01,81,00,00,00,00,00,00,00 [16:01:06][D][Debug22:240]: Partition 1 panel data: 05,00,81,81,00,C7,00 [16:01:06][D][Debug33:247]: Partition data 00: 81,81,00,00,00,00,00,00,00 [16:01:06][D][text_sensor:015]: 'Partition 1 Status ': Sending state 'unavailable' [16:01:06][D][Debug22:240]: Partition 1 panel data: 05,00,81,01,00,C7,00 [16:01:06][D][Debug33:247]: Partition data 00: 01,81,00,00,00,00,00,00,00 [16:01:06][D][text_sensor:015]: 'Partition 1 Status ': Sending state 'disarmed' [16:02:02][D][Debug22:240]: Partition 1 panel data: 05,00,81,81,00,C7,00 [16:02:02][D][Debug33:247]: Partition data 00: 81,81,00,00,00,00,00,00,00 [16:02:02][D][text_sensor:015]: 'Partition 1 Status ': Sending state 'unavailable' [16:02:02][D][Debug22:240]: Partition 1 panel data: 05,00,81,01,00,C7,00 [16:02:02][D][Debug33:247]: Partition data 00: 01,81,00,00,00,00,00,00,00 [16:02:02][D][text_sensor:015]: 'Partition 1 Status ': Sending state 'disarmed'

Dilbert66 commented 4 years ago

And an 81. That 05 command on your panel is sure quirky. Ok I'll remove those with the flag as well.

Dilbert66 commented 4 years ago

Ok, pushed a new update that removes those statuses when enable05armstatus is false to prevent those bogus status. 41 and 81 are unknown statuses so the system just defaulted to sending unknown

slipx06 commented 4 years ago

Thank you. I think you finally tamed my panel. I'll monitor overnight but it seems all the erroneous messages are gone now.

slipx06 commented 4 years ago

Just did a quick test arming the panel and it sent an unavailable and disarmed message after pending before arming. Another one to filter?

[18:12:48][D][Debug33:247]: Partition data 00: 08,8B,00,00,00,00,00,00,01,00,01 [18:12:48][D][text_sensor:015]: 'Partition 1 Status ': Sending state 'pending' [18:13:21][D][Debug22:240]: Partition 1 panel data: 05,00,8B,08,00,CF,00 [18:13:21][D][Debug33:247]: Partition data 00: 08,8B,00,00,00,00,00,00,01,00,01 [18:13:21][D][Debug33:247]: Partition data 01: CF,00,00,00,00,00,00,00,00,00,00 [18:13:21][D][Debug22:240]: Partition 1 panel data: 05,00,8B,08,00,C7,00 [18:13:21][D][Debug33:247]: Partition data 00: 08,8B,00,00,00,00,00,00,01,00,01 [18:13:40][D][Debug22:240]: Partition 1 panel data: 05,00,8B,08,40,C7,00 [18:13:40][D][Debug33:247]: Partition data 00: 08,8B,00,00,00,00,01,00,01,00,01 [18:13:40][D][binary_sensor:036]: 'Fire Status': Sending state ON [18:13:41][D][Debug22:240]: Partition 1 panel data: 05,00,8B,08,00,C7,00 [18:13:41][D][Debug33:247]: Partition data 00: 08,8B,00,00,00,00,00,00,01,00,01 [18:13:41][D][binary_sensor:036]: 'Fire Status': Sending state OFF [18:13:53][D][Debug22:240]: Partition 1 panel data: A5,00,20,15,A6,C0,00 [18:13:53][D][Debug33:247]: Partition data 00: 08,8B,00,00,00,00,00,00,01,00,01 [18:14:09][D][Debug22:240]: Partition 1 panel data: 05,00,8B,08,00,C7,00 [18:14:09][D][Debug33:247]: Partition data 00: 08,8B,00,00,00,00,00,00,01,00,01 [18:14:09][D][Debug33:247]: Partition data 02: D7,00,00,00,00,00,00,00,00,00,00 [18:14:09][D][Debug22:240]: Partition 1 panel data: 05,00,8B,08,00,C7,00 [18:14:09][D][Debug33:247]: Partition data 00: 08,8B,00,00,00,00,00,00,01,00,01 [18:14:24][D][Debug22:240]: Partition 1 panel data: 05,00,8B,0C,00,C7,00 [18:14:24][D][Debug33:247]: Partition data 00: 0C,8B,00,00,00,00,00,00,01,01,00 [18:14:24][D][text_sensor:015]: 'Partition 1 Status ': Sending state 'unavailable' [18:14:24][D][Debug22:240]: Partition 1 panel data: 05,00,8B,08,00,C7,00 [18:14:24][D][Debug33:247]: Partition data 00: 08,8B,00,00,00,00,00,00,01,01,01 [18:14:24][D][text_sensor:015]: 'Partition 1 Status ': Sending state 'disarmed' [18:15:11][D][Debug22:240]: Partition 1 panel data: 27,00,8A,04,00,C7,00 [18:15:11][D][Debug33:247]: Partition data 00: 08,8B,01,00,01,00,00,01,00,01,00 [18:15:11][D][text_sensor:015]: 'Partition 1 Status ': Sending state 'armed_home' [18:15:12][D][Debug22:240]: Partition 1 panel data: 05,00,8A,04,00,C7,00 [18:15:12][D][Debug33:247]: Partition data 00: 04,8A,01,00,01,00,00,00,00,00,00

2nd test worked as expected

[18:18:56][D][text_sensor:015]: 'Partition 1 Status ': Sending state 'pending' [18:19:04][D][Debug22:240]: Partition 1 panel data: 05,00,8B,08,00,C7,00 [18:19:04][D][Debug33:247]: Partition data 00: 08,8B,00,00,00,00,00,00,01,00,01 [18:19:04][D][Debug22:240]: Partition 1 panel data: 05,00,8B,08,00,C7,00 [18:19:04][D][Debug33:247]: Partition data 00: 08,8B,00,00,00,00,00,00,01,00,01 [18:19:38][D][binary_sensor:036]: 'Trouble Status': Sending state ON [18:19:38][D][Debug22:240]: Partition 1 panel data: 05,00,8B,08,10,C7,00 [18:19:38][D][Debug33:247]: Partition data 00: 08,8B,00,00,00,00,00,00,01,00,01 [18:19:38][D][binary_sensor:036]: 'Trouble Status': Sending state OFF [18:19:38][D][Debug22:240]: Partition 1 panel data: 05,00,8B,08,00,C7,00 [18:19:38][D][Debug33:247]: Partition data 00: 08,8B,00,00,00,00,00,00,01,00,01 [18:20:04][D][Debug22:240]: Partition 1 panel data: 05,00,8B,88,00,C7,00 [18:20:04][D][Debug33:247]: Partition data 00: 88,8B,00,00,00,00,00,00,01,00,01 [18:20:05][D][Debug22:240]: Partition 1 panel data: 05,00,8B,08,00,C7,00 [18:20:05][D][Debug33:247]: Partition data 00: 08,8B,00,00,00,00,00,00,01,00,01 [18:20:38][D][Debug22:240]: Partition 1 panel data: 05,00,8B,08,00,C7,00 [18:20:38][D][Debug33:247]: Partition data 00: 08,8B,00,00,00,00,00,00,01,00,01 [18:20:38][D][Debug33:247]: Partition data 03: D7,00,00,00,00,00,00,00,00,00,00 [18:20:38][D][Debug22:240]: Partition 1 panel data: 05,00,8B,08,00,C7,00 [18:20:38][D][Debug33:247]: Partition data 00: 08,8B,00,00,00,00,00,00,01,00,01 [18:20:54][D][Debug22:240]: Partition 1 panel data: 05,00,8B,08,00,C7,00 [18:20:54][D][Debug33:247]: Partition data 00: 08,8B,00,00,00,00,00,00,01,00,01 [18:20:54][D][Debug33:247]: Partition data 02: E7,00,00,00,00,00,00,00,00,00,00 [18:20:54][D][Debug22:240]: Partition 1 panel data: 05,00,8B,08,00,C7,00 [18:20:54][D][Debug33:247]: Partition data 00: 08,8B,00,00,00,00,00,00,01,00,01 [18:21:15][D][Debug22:240]: Partition 1 panel data: 05,00,8B,08,00,C7,00 [18:21:15][D][Debug33:247]: Partition data 00: 08,8B,00,00,00,00,00,00,01,00,01 [18:21:15][D][Debug33:247]: Partition data 02: CF,00,00,00,00,00,00,00,00,00,00 [18:21:15][D][Debug22:240]: Partition 1 panel data: 05,00,8B,08,00,C7,00 [18:21:15][D][Debug33:247]: Partition data 00: 08,8B,00,00,00,00,00,00,01,00,01 [18:21:19][D][Debug22:240]: Partition 1 panel data: 27,00,8A,04,00,C7,00 [18:21:19][D][Debug33:247]: Partition data 00: 08,8B,01,00,01,00,00,01,00,01,00 [18:21:19][D][text_sensor:015]: 'Partition 1 Status ': Sending state 'armed_home'

Dilbert66 commented 4 years ago

Your system is sending a 0c (entry delay in progress) in between the pending wait for arming. Very strange. I'll try something. If the enable05armstatus flag is false, I will have it ignore ALL 05 messages instead of just the arming and unknown ones.
I've pushed the change in the "debug" branch for testing

[18:14:09][D][Debug22:240]: Partition 1 panel data: 05,00,8B,[08],00,C7,00 [18:14:09][D][Debug33:247]: Partition data 00: 08,8B,00,00,00,00,00,00,01,00,01 [18:14:24][D][Debug22:240]: Partition 1 panel data: 05,00,8B,[0C],00,C7,00

Dilbert66 commented 4 years ago

wait on this. It's not updating status correctly.

Dilbert66 commented 4 years ago

ok, pushed a fix. The issue is that the 05 cmd is used for most statuses but unfortunately, your panel sends out bogus ones at odd times. If there was a reliable way to identify a bogus message from a valid one i would do that. I supposed I could add logic that says if the previous status is such and such, ignore the current status. I will see how I can work with that. For now, I use the flag to disable certain known status updates that have issues.

Dilbert66 commented 4 years ago

I'm playing with the logic and seeing that the 05 command is necessary for capturing new states since the 27 command only shows the state the system was at the time prior to the trigger (door/alarm/etc) so we can't block all 05 messages. I will implement better logic to use rules to only apply certain states only if certain conditions match to filter out those bogus messages

Dilbert66 commented 4 years ago

I've created a new version in debug that removes the need for the enable flags. To test, set all the flags to true. As noted above, i've added some logic to prevent status changes on some bogus commands but I need to know if I got all the paths corrected. I'd rather do it this way as you would not lose the messages which are handy to have if you they can be made accurate. I was finding the flag approach could be problematic in some cases.

slipx06 commented 4 years ago

Thanks for all your effort on this. Will upload now and let it run over night

on startup, I'm getting armed_night instead of armed_home

image

[00:10:22][C][api:096]: Address: 192.168.1.112:6053 [00:10:24][D][api.connection:583]: Client 'Home Assistant 0.113.2 (192.168.1.103)' connected successfully! [00:10:25][D][Debug22:240]: Panel command data: 05,00,8A,04,08,C7,00 [00:10:25][D][Debug33:247]: Partition data 00: 04,8A,01,00,01,01,00,00,00,00,00 [00:10:25][D][Debug22:240]: Panel command data: 05,00,8A,04,00,C7,00 [00:10:25][D][Debug33:247]: Partition data 00: 04,8A,01,00,01,01,00,00,00,00,00 [00:10:28][D][Debug22:240]: Panel command data: 05,00,8A,04,00,D7,00 [00:10:28][D][Debug33:247]: Partition data 00: 04,8A,01,00,01,01,00,00,00,00,00 [00:10:28][D][Debug33:247]: Partition data 01: D7,00,00,00,00,00,00,01,00,01,00 [00:10:28][D][text_sensor:015]: 'Partition 2 Msg ': Sending state 'D7: Unknown' [00:10:28][D][text_sensor:015]: 'Partition 2 Status ': Sending state 'unavailable'

Dilbert66 commented 4 years ago

it's buggy. Dont use it. armed statuses are not updating correctly. Did not have a chance to fully test the arm/disarm statuses earlier. More work to be done obviously. Stick to the master version for now.

Edit: Well, it was not as buggy as I though. My front end was acting up. Tks for the logs. I'll check into the armed night issue.