aficustree / homebridge-alarmdecoder-platform

Homebridge plugin for the AlarmDecoder interface for Honeywell and DSC Alarm Systems. Exposes the security system and all zones (via Contact Sensors and Motion Sensors) to Apple's Homekit. Control your alarm through Siri.
Apache License 2.0
18 stars 11 forks source link

Parse Error: Expected HTTP/ #31

Open maxmuller opened 3 years ago

maxmuller commented 3 years ago

I had AlarmDecoder working perfectly with my HOOBS 3 setup. Then my Pi died so I got a new HOOBS running newer software, specifically Homebridge 1.3.4 and Node 14.17.6. Now I am getting the following error when starting Homebridge. This is the same setup and config I was using before.

9/11/2021, 6:48:56 PMAlarm System BridgeLoaded plugin 'homebridge-alarmdecoder-platform' 9/11/2021, 6:48:57 PMAlarm System BridgeLoading 1 platforms... 9/11/2021, 6:48:57 PMAlarm System BridgeAlarm SystemAlarm System Configuring Accessory from Cache 9/11/2021, 6:48:57 PMAlarm System BridgeAlarm Systemadding accessory Alarm System 9/11/2021, 6:48:57 PMAlarm System BridgeAlarm Systempanic Configuring Accessory from Cache 9/11/2021, 6:48:57 PMAlarm System BridgeAlarm Systemadding accessory panic 9/11/2021, 6:48:57 PMAlarm System BridgeAlarm Systemchime Configuring Accessory from Cache 9/11/2021, 6:48:57 PMAlarm System BridgeAlarm Systemadding accessory chime 9/11/2021, 6:48:57 PMAlarm System BridgeAlarm Systemaway Configuring Accessory from Cache 9/11/2021, 6:48:57 PMAlarm System BridgeAlarm Systemadding accessory away 9/11/2021, 6:48:57 PMAlarm System BridgeAlarm Systemstay Configuring Accessory from Cache 9/11/2021, 6:48:57 PMAlarm System BridgeAlarm Systemadding accessory stay 9/11/2021, 6:48:57 PMAlarm System BridgeAlarm SystemCached Accessories Loaded 9/11/2021, 6:48:57 PMAlarm System BridgeAlarm Systeminitalizing platform 9/11/2021, 6:48:57 PMAlarm System BridgeAlarm Systemfound security system from cache, skipping 9/11/2021, 6:48:57 PMAlarm System BridgeAlarm Systeminit zones 9/11/2021, 6:48:57 PMAlarm System BridgeAlarm Systemlistening on port 8888 9/11/2021, 6:48:57 PMAlarm System BridgeBridge is running on port 51836. 9/11/2021, 6:48:57 PMAlarm System BridgeAlarm SystemError: Parse Error: Expected HTTP/ 9/11/2021, 6:48:57 PMAlarm System BridgeAlarm Systemfound switch panic from cache, skipping 9/11/2021, 6:48:57 PMAlarm System BridgeAlarm Systemfound switch chime from cache, skipping 9/11/2021, 6:48:57 PMAlarm System BridgeAlarm Systemfound switch away from cache, skipping 9/11/2021, 6:48:57 PMAlarm System BridgeAlarm Systemfound switch stay from cache, skipping 9/11/2021, 6:48:57 PMAlarm System BridgeAlarm SystemError: Parse Error: Expected HTTP/ 9/11/2021, 6:47:21 PMAlarm System BridgeERROR[Alarm System Bridge 44B5@Alarm System@Alarm System@Security System Current State] characteristic was supplied illegal value: null! Home App will reject null for Apple defined characteristics 9/11/2021, 6:47:21 PMAlarm System BridgeERROR[Alarm System Bridge 44B5@Alarm System@Alarm System@Security System Target State] characteristic was supplied illegal value: null! Home App will reject null for Apple defined characteristics

Here is my config with some things *** out:

{ "platform": "alarmdecoder-platform", "name": "Alarm System", "port": "8888", "key": "***", "stateURL": "http://alarmdecoder.local:10000/api/v1/alarmdecoder", "zoneURL": "http://alarmdecoder.local:10000/api/v1/zones", "setURL": "http://alarmdecoder.local:10000/api/v1/alarmdecoder/send", "setPIN": "*", "panicKey": "", "useSwitches": [ "panic", "chime", "away", "stay" ], "DSCorHoneywell": "Honeywell", "chimeKey": "9" }

maxmuller commented 3 years ago

In doing a little more research it appears the newer version of Node is more strict on it’s HTTP parsing. This might be an issue with the Content-Length header from the AlarmDecoder box when sending notifications.