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

Issue loading module in homebridge in new install #6

Closed nebduj closed 4 years ago

nebduj commented 5 years ago

Homebridge Error Log: Load homebridge-alarmdecoder-platform.alarmdecoder-platform [11/13/2019, 10:46:44 PM] TypeError: Cannot read property 'port' of null at new AlarmdecoderPlatform (/usr/lib/node_modules/homebridge-alarmdecoder-platform/index.js:16:28) at Server._loadDynamicPlatforms (/usr/local/lib/node_modules/homebridge/lib/server.js:358:30) at Server.run (/usr/local/lib/node_modules/homebridge/lib/server.js:92:8) at module.exports (/usr/local/lib/node_modules/homebridge/lib/cli.js:59:10) at Object. (/usr/local/lib/node_modules/homebridge/bin/homebridge:17:22) at Module._compile (internal/modules/cjs/loader.js:689:30) at Object.Module._extensions..js (internal/modules/cjs/loader.js:700:10) at Module.load (internal/modules/cjs/loader.js:599:32) at tryModuleLoad (internal/modules/cjs/loader.js:538:12) at Function.Module._load (internal/modules/cjs/loader.js:530:3)

Entry in config.json { "platform" : "alarmdecoder-platform", "name" : "Alarm System", "port" : "8888", "key" : "3ZZHVUAAHV3A", "stateURL" : "http://alarmdecoder.local:2222/api/v1/alarmdecoder", "zoneURL" : "http://alarmdecoder.local:2222/api/v1/zones", "setURL" : "http://alarmdecoder.local:2222/api/v1/alarmdecoder/send", "setPIN" : "1245", "panicKey" : "", "useSwitches" : ["panic","chime","away","stay","night"], "DSCorHoneywell" : "Honeywell", "chimeKey":"9", } I believe the port in the URLs and ports are inconsistent, I just didn't change them from the example. I only changed the "IP" to the host hame.

nebduj commented 5 years ago

issue is present even without modifying config.json.

aficustree commented 5 years ago

the json isn't valid in the example, take out the last comma. I'll update the documentation

nebduj commented 5 years ago

Thanks. I feel silly for how much time I’ve spent trying to figure this out for a comma.

On Nov 15, 2019, at 9:48 PM, aficustree notifications@github.com wrote:

the json isn't valid in the example, take out the last comma. I'll update the documentation

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/aficustree/homebridge-alarmdecoder-platform/issues/6?email_source=notifications&email_token=ACYV34GJ43WU3UXDO554QF3QT5UPBA5CNFSM4JNFY5KKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEEHITZI#issuecomment-554600933, or unsubscribe https://github.com/notifications/unsubscribe-auth/ACYV34EQ57VOLYVLYTMRXDLQT5UPBANCNFSM4JNFY5KA.

aficustree commented 5 years ago

my bad. jsonlint every time :-)

nebduj commented 5 years ago

What’s the default port I should be using? I’m using your raspberry pi image and have a working app but I’m getting a connection refused now when starting homebridge

On Nov 15, 2019, at 10:10 PM, aficustree notifications@github.com wrote:

my bad. jsonlint every time :-)

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/aficustree/homebridge-alarmdecoder-platform/issues/6?email_source=notifications&email_token=ACYV34GWS44QXSRV44CQSZDQT5XB5A5CNFSM4JNFY5KKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEEHI6AY#issuecomment-554602243, or unsubscribe https://github.com/notifications/unsubscribe-auth/ACYV34CO64JTYIA5DPGMBFDQT5XB5ANCNFSM4JNFY5KA.

aficustree commented 5 years ago

the alarmdecoder app will need to send a notification to a URL and a port. Just make sure whatever you set in the app is the same as what you configure on the plugin and you should be fine

nebduj commented 5 years ago

The port field seems to be missing in the web UI

On Nov 15, 2019, at 10:42 PM, aficustree notifications@github.com wrote:

the alarmdecoder app will need to send a notification to a URL and a port. Just make sure whatever you set in the app is the same as what you configure on the plugin and you should be fine

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/aficustree/homebridge-alarmdecoder-platform/issues/6?email_source=notifications&email_token=ACYV34DTNKWUW6AQHI7NGATQT52Z3A5CNFSM4JNFY5KKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEEHJLLA#issuecomment-554603948, or unsubscribe https://github.com/notifications/unsubscribe-auth/ACYV34EDEGQKJH75U7FO23TQT52Z3ANCNFSM4JNFY5KA.

nebduj commented 5 years ago

I figured it out. I just appended the port the the IP address. 192.x.x.x:2222 I was looking for an input field.

On Nov 15, 2019, at 10:42 PM, aficustree notifications@github.com wrote:

the alarmdecoder app will need to send a notification to a URL and a port. Just make sure whatever you set in the app is the same as what you configure on the plugin and you should be fine

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/aficustree/homebridge-alarmdecoder-platform/issues/6?email_source=notifications&email_token=ACYV34DTNKWUW6AQHI7NGATQT52Z3A5CNFSM4JNFY5KKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEEHJLLA#issuecomment-554603948, or unsubscribe https://github.com/notifications/unsubscribe-auth/ACYV34EDEGQKJH75U7FO23TQT52Z3ANCNFSM4JNFY5KA.