excaliburpartners / OmniLinkBridge

MQTT bridge, web service API, time sync, and logging for HAI/Leviton OmniPro II controllers
GNU General Public License v3.0
41 stars 24 forks source link

Does "unavailable" trigger an alarm and "AREA 1 Burglary unsafe"? #20

Closed eddyg closed 4 years ago

eddyg commented 4 years ago

First, let me just say a huge THANK YOU for OmniLinkBridge! Ever since I discovered its existence, it has opened up a world of new integrations with Home Assistant for a system that I previously thought was going to require a ton of custom coding to get working.


I am currently away from my residence, and yesterday, there was a power outage there. For some context, below is the sequence of events from the Home Assistant logbook (from newest to oldest). Starting at the bottom, you can see where the UPS kicked in, then the battery to run out so the system shutdown, then power returned and the HA server came back on:

When I checked the status this morning, the alarm-panel card was flashing and said Triggered and it appeared all the lights connected to the Omni were on (like what happens when the Omni triggers an alarm). But I have no way of knowing for sure since I wasn't there. I disarmed the system from HA, manually turned off all the lights, and then re-armed the system.

I'm particularly interested in why the system changed to "Triggered", and what "unsafe" and "safe" mean.

I'm thinking the network device that the Omni is plugged in to (which is different than where the HA server is connected) may have still been starting and thus not passing traffic, and that's why it seemed "unavailable"?

Thanks again for an amazing add-on! And my apologies if there's a better place to ask about this; I figured here might be a good starting point at least.

rwagoner commented 4 years ago

The Home Assistant statuses change to unavailable when the MQTT omnilink/status topic is offline. When OmniLinkBridge losses connection to the controller it will update this topic. Additionally the MQTT last will message is set, so if OmniLinkBridge is abruptly stopped the status will go to offline.

"Unsafe" and "safe" are Home Assistant MQTT device class states. They map to MQTT omnilink/zoneX/basic_state OFF or ON.

The Home Assistant alarm panel triggered state occurs when the OmniLink Area is in alarm state for burglary, auxiliary, or duress. This is independent of the unavailable status.

When OmniLinkBridge connects or reconnects to the controller it will publish to MQTT the current status for all zones, units, etc. The status changes at 3:52 are probably when OmniLinkBridge connected to the controller. The unknown part is why those statuses don't match what you thought the controller status was at the time. I've restarted OmniLinkBridge and Home Assistant in varying orders and haven't seen this issue.

If you have them please post the OmniLinkBridge logs for the above timeframe. Also, what OmniPro model and firmware are you using?

eddyg commented 4 years ago

Thanks for the quick reply!

Here's the logs. I didn't see anything that would indicate any alarms being triggered, etc. (Conveniently, it also shows the model/firmware.)

...
OmniLinkBridge.Modules.TimeSyncModule: 2020-11-01 04:02:00,041 WARN : Controller time 11/01/2020 04:01:50 out of sync by 10.041684 seconds
OmniLinkBridge.Modules.TimeSyncModule: 2020-11-01 04:02:00,066 DEBUG: Controller time has been successfully set
OmniLinkBridge.Modules.MQTTModule: 2020-11-01 20:11:57,396 DEBUG: Publishing controller offline
OmniLinkBridge.Modules.OmniLinkII: 2020-11-01 20:11:57,401 INFO : CONNECTION STATUS: Disconnecting
OmniLinkBridge.Modules.MQTTModule: 2020-11-01 20:11:57,403 DEBUG: Disconnected
OmniLinkBridge.Modules.OmniLinkII: 2020-11-01 20:11:57,421 INFO : CONNECTION STATUS: Disconnected
_fjh_WriteErrorLog(15)_: interrupted
OmniLinkBridge.CoreServer: 2020-11-01 20:11:57,438 DEBUG: Shutdown completed

OmniLinkBridge.CoreServer: 2020-11-02 03:49:13,662 DEBUG: Starting up server 1.1.8.0
OmniLinkBridge.Modules.OmniLinkII: 2020-11-02 03:49:14,426 INFO : CONNECTION STATUS: Connecting
OmniLinkBridge.Modules.OmniLinkII: 2020-11-02 03:49:14,566 INFO : CONTROLLER IS: Omni IIe (3.11A)
OmniLinkBridge.Modules.OmniLinkII: 2020-11-02 03:49:14,574 DEBUG: Retrieving named units
OmniLinkBridge.Modules.OmniLinkII: 2020-11-02 03:49:14,576 DEBUG: Waiting for system formats
OmniLinkBridge.Modules.OmniLinkII: 2020-11-02 03:49:14,603 DEBUG: Temperature format: Fahrenheit
OmniLinkBridge.Modules.OmniLinkII: 2020-11-02 03:49:15,042 DEBUG: Waiting for named units Area
OmniLinkBridge.Modules.OmniLinkII: 2020-11-02 03:49:15,074 DEBUG: Waiting for named units Zone
OmniLinkBridge.Modules.OmniLinkII: 2020-11-02 03:49:15,588 DEBUG: Waiting for named units Thermostat
OmniLinkBridge.Modules.OmniLinkII: 2020-11-02 03:49:15,613 DEBUG: Waiting for named units Unit
OmniLinkBridge.Modules.OmniLinkII: 2020-11-02 03:49:16,082 DEBUG: Waiting for named units Message
OmniLinkBridge.Modules.OmniLinkII: 2020-11-02 03:49:16,177 DEBUG: Waiting for named units Button
OmniLinkBridge.Modules.OmniLinkII: 2020-11-02 03:49:16,244 INFO : Unsolicited notifications enabled
OmniLinkBridge.Modules.MQTTModule: 2020-11-02 03:49:16,417 DEBUG: Connected
OmniLinkBridge.Modules.MQTTModule: 2020-11-02 03:49:16,431 DEBUG: Publishing areas
OmniLinkBridge.Modules.MQTTModule: 2020-11-02 03:49:16,833 DEBUG: Publishing zones
OmniLinkBridge.Modules.MQTTModule: 2020-11-02 03:49:16,860 DEBUG: Publishing units
OmniLinkBridge.Modules.MQTTModule: 2020-11-02 03:49:16,886 DEBUG: Publishing thermostats
OmniLinkBridge.Modules.MQTTModule: 2020-11-02 03:49:16,889 DEBUG: Publishing buttons
OmniLinkBridge.Modules.MQTTModule: 2020-11-02 03:49:16,929 DEBUG: Publishing messages
OmniLinkBridge.Modules.MQTTModule: 2020-11-02 03:49:16,933 DEBUG: Publishing controller online
OmniLinkBridge.Modules.OmniLinkII: 2020-11-02 03:49:50,342 WARN : CONNECTION STATUS: Retrying
OmniLinkBridge.Modules.OmniLinkII: 2020-11-02 03:49:55,352 WARN : CONNECTION STATUS: Retrying
OmniLinkBridge.Modules.OmniLinkII: 2020-11-02 03:50:02,353 WARN : CONNECTION STATUS: Retrying
OmniLinkBridge.Modules.OmniLinkII: 2020-11-02 03:50:11,353 WARN : CONNECTION STATUS: Retrying
OmniLinkBridge.Modules.OmniLinkII: 2020-11-02 03:50:22,354 WARN : CONNECTION STATUS: Retrying
OmniLinkBridge.Modules.OmniLinkII: 2020-11-02 03:50:35,356 WARN : CONNECTION STATUS: Retrying
OmniLinkBridge.Modules.OmniLinkII: 2020-11-02 03:50:50,358 WARN : CONNECTION STATUS: Retrying
OmniLinkBridge.Modules.OmniLinkII: 2020-11-02 03:51:05,359 WARN : CONNECTION STATUS: Retrying
OmniLinkBridge.Modules.OmniLinkII: 2020-11-02 03:51:20,361 WARN : CONNECTION STATUS: Retrying
OmniLinkBridge.Modules.OmniLinkII: 2020-11-02 03:51:35,364 ERROR: CONNECTION STATUS: No Reply
OmniLinkBridge.Modules.OmniLinkII: 2020-11-02 03:51:35,377 INFO : CONNECTION STATUS: Disconnected
OmniLinkBridge.Modules.MQTTModule: 2020-11-02 03:51:35,377 DEBUG: Publishing controller offline
_fjh_WriteErrorLog(15)_: interrupted
OmniLinkBridge.Modules.OmniLinkII: 2020-11-02 03:51:35,454 ERROR: CONNECTION STATUS: Interrupted Function Call
OmniLinkBridge.Modules.OmniLinkII: 2020-11-02 03:52:01,009 INFO : CONNECTION STATUS: Disconnected
OmniLinkBridge.Modules.MQTTModule: 2020-11-02 03:52:01,010 DEBUG: Publishing controller offline
OmniLinkBridge.Modules.OmniLinkII: 2020-11-02 03:52:01,010 ERROR: CONNECTION STATUS: Interrupted Function Call
OmniLinkBridge.Modules.OmniLinkII: 2020-11-02 03:52:55,440 INFO : CONNECTION STATUS: Connecting
OmniLinkBridge.Modules.TimeSyncModule: 2020-11-02 03:52:55,517 WARN : Controller time 11/02/2020 03:52:05 out of sync by 50.51651 seconds
OmniLinkBridge.Modules.OmniLinkII: 2020-11-02 03:52:55,553 INFO : CONTROLLER IS: Omni IIe (3.11A)
OmniLinkBridge.Modules.OmniLinkII: 2020-11-02 03:52:55,553 DEBUG: Retrieving named units
OmniLinkBridge.Modules.OmniLinkII: 2020-11-02 03:52:55,553 DEBUG: Waiting for system formats
OmniLinkBridge.Modules.TimeSyncModule: 2020-11-02 03:52:55,583 DEBUG: Controller time has been successfully set
OmniLinkBridge.Modules.OmniLinkII: 2020-11-02 03:52:55,607 DEBUG: Temperature format: Fahrenheit
OmniLinkBridge.Modules.OmniLinkII: 2020-11-02 03:52:55,608 DEBUG: Waiting for named units Area
OmniLinkBridge.Modules.OmniLinkII: 2020-11-02 03:52:55,630 DEBUG: Waiting for named units Zone
OmniLinkBridge.Modules.OmniLinkII: 2020-11-02 03:52:56,121 DEBUG: Waiting for named units Thermostat
OmniLinkBridge.Modules.OmniLinkII: 2020-11-02 03:52:56,144 DEBUG: Waiting for named units Unit
OmniLinkBridge.Modules.OmniLinkII: 2020-11-02 03:52:56,612 DEBUG: Waiting for named units Message
OmniLinkBridge.Modules.OmniLinkII: 2020-11-02 03:52:56,705 DEBUG: Waiting for named units Button
OmniLinkBridge.Modules.OmniLinkII: 2020-11-02 03:52:56,762 INFO : Unsolicited notifications enabled
OmniLinkBridge.Modules.MQTTModule: 2020-11-02 03:52:56,762 DEBUG: Publishing areas
OmniLinkBridge.Modules.MQTTModule: 2020-11-02 03:52:56,776 DEBUG: Publishing zones
OmniLinkBridge.Modules.MQTTModule: 2020-11-02 03:52:56,794 DEBUG: Publishing units
OmniLinkBridge.Modules.MQTTModule: 2020-11-02 03:52:56,816 DEBUG: Publishing thermostats
OmniLinkBridge.Modules.MQTTModule: 2020-11-02 03:52:56,820 DEBUG: Publishing buttons
OmniLinkBridge.Modules.MQTTModule: 2020-11-02 03:52:56,857 DEBUG: Publishing messages
OmniLinkBridge.Modules.MQTTModule: 2020-11-02 03:52:56,863 DEBUG: Publishing controller online
OmniLinkBridge.Modules.TimeSyncModule: 2020-11-02 04:53:00,042 WARN : Controller time 11/02/2020 04:52:04 out of sync by 56.042029 seconds
OmniLinkBridge.Modules.TimeSyncModule: 2020-11-02 04:53:00,072 DEBUG: Controller time has been successfully set
OmniLinkBridge.MQTT.MessageProcessor: 2020-11-02 07:12:41,410 DEBUG: Received: Type: area, Id: 1, Command: command, Value: DISARM
OmniLinkBridge.MQTT.MessageProcessor: 2020-11-02 07:12:41,411 DEBUG: SetArea: 1 to disarm
...

Thanks again for taking a look.

rwagoner commented 4 years ago

Unfortunately nothing obvious is standing out. When you get back please check the Omni event log and see if it shows the area burglary alarm. This can be done from the console by pressing 7 and entering your code or with the PC Access software.

I'm wondering if the Omni actually went into alarm as you mentioned all the lights were on. I don't see anything in the logs showing that OmniLinkBridge sent commands to turn those on. I'm thinking about adding additional debug logs to show the area state after connecting.

If you do have the PC Access software you might try updating the firmware. Version 3.14a and 3.16 both have improvements to TCP connection handling. I'm personally running version 3.15 on an OmniPro II.

eddyg commented 4 years ago

Hi Ryan.

You were right... the logs on the Omni indicate that something triggered the upstairs motion sensor—several times—while the power was out. 😮 Sounds like I have some other problem... 😞

I'll also go ahead and update the firmware. I didn't realized there were network improvements. It looks like PC Access is showing me 4.0b is the latest?

2   11/2 7:12 AM    ANY CODE DISARM
3   11/2 3:51 AM    SYSTEM RESET
4   11/2 3:51 AM    SYSTEM RESET
5   11/2 3:51 AM    SYSTEM RESET
6   11/2 3:51 AM    SYSTEM RESET
7   11/2 3:51 AM    SYSTEM RESET
8   11/2 3:51 AM    SYSTEM RESET
9   11/2 3:50 AM    SYSTEM RESET
10  11/2 3:50 AM    SYSTEM RESET
11  11/2 3:50 AM    SYSTEM RESET
12  11/2 3:50 AM    SYSTEM RESET
13  11/2 3:50 AM    SYSTEM RESET
14  11/2 3:50 AM    SYSTEM RESET
15  11/2 3:50 AM    SYSTEM RESET
16  11/2 3:50 AM    SYSTEM RESET
17  11/2 3:50 AM    SYSTEM RESET
18  11/2 3:50 AM    SYSTEM RESET
19  11/2 3:50 AM    SYSTEM RESET
20  11/2 3:50 AM    SYSTEM RESET
21  11/2 3:50 AM    SYSTEM RESET
22  11/2 3:50 AM    SYSTEM RESET
23  11/2 3:50 AM    SYSTEM RESET
24  11/2 3:50 AM    SYSTEM RESET
25  11/2 3:50 AM    SYSTEM RESET
26  11/2 3:50 AM    SYSTEM RESET
27  11/2 3:50 AM    SYSTEM RESET
28  11/2 3:50 AM    SYSTEM RESET
29  11/2 3:50 AM    SYSTEM RESET
30  11/2 3:50 AM    SYSTEM RESET
31  11/2 3:50 AM    SYSTEM RESET
32  11/2 3:50 AM    SYSTEM RESET
33  11/2 3:50 AM    SYSTEM RESET
34  11/2 3:49 AM    SYSTEM RESET
35  11/2 3:49 AM    SYSTEM RESET
36  11/2 3:49 AM    SYSTEM RESET
37  11/2 3:49 AM    SYSTEM RESET
38  11/2 3:49 AM    SYSTEM RESET
39  11/2 3:49 AM    SYSTEM RESET
40  11/2 3:49 AM    SYSTEM RESET
41  11/2 3:49 AM    SYSTEM RESET
42  11/2 3:49 AM    SYSTEM RESET
43  11/2 3:49 AM    SYSTEM RESET
44  11/2 3:49 AM    SYSTEM RESET
45  11/2 3:46 AM    AC POWER OFF TROUBLE CLEARED
46  11/2 12:31 AM   ANY ALARM RESET
47  11/2 12:25 AM   BURGLARY ALARM ACTIVATED
48  11/2 12:25 AM   Upper Motion TRIPPED
49  11/1 11:25 PM   ANY ALARM RESET
50  11/1 11:19 PM   BURGLARY ALARM ACTIVATED
51  11/1 11:19 PM   Upper Motion TRIPPED
52  11/1 8:37 PM    ANY ALARM RESET
53  11/1 8:31 PM    BURGLARY ALARM ACTIVATED
54  11/1 8:31 PM    Upper Motion TRIPPED
55  11/1 6:49 PM    AC POWER OFF TROUBLE

(No clue what's up with all the SYSTEM RESET entries...)

Thanks again for your time, and for OmniLinkBridge!