rnilssoncx / homebridge-pico

Expose Lutron Pico Remotes in Homebridge: https://github.com/nfarina/homebridge
MIT License
63 stars 6 forks source link

Expanded configuration documentation #1

Closed nbuk213 closed 4 years ago

nbuk213 commented 4 years ago

Would you be able to provide additional context around the example json. Getting context errors around server variables, platform setting also appears to be ignored.

rnilssoncx commented 4 years ago

Can you share your config.json (just blank out any private data)?

nbuk213 commented 4 years ago

Hey - really appreciate you taking the time and reaching back out, This plugin aims to solve what I feel is a glaring hole in Lutron's ecosystem. And as for me, while very much in the tech industry, developer languages and XML have never been my focus expertise.

Below is what my config looked like prior to installing the Pico plugin - (really excited to leverage single/double/long press) I tried to remove the pre-existing config and just copy/paste the template config and replace bridge config settings but even after doing that and saving the config - Homebridge failed to load and I had to re-install on my Raspberry Pi.

I was getting invalid config around server variables and the "silent" modifier was being ignored

{ "bridge": { "name": "Rasberry-Pi Bridge", "username": "XX:XX:XX:XX:XX:XX", "port": XXXXX, "pin": "XXX-XX-XXX" }, "accessories": [], "platforms": [ { "name": "HomeKit Bridge", "port": XXXX, "auth": "form", "theme": "dark-mode", "tempUnits": "f", "lang": "auto", "platform": "config" }, { "bridgeConnection": { "host": "XX.X.X.XXX" }, "accessories": [ { "name": "Media Keypad", "type": "PJ2-4B", "integrationID": 5 }, { "name": "Media Keypad", "type": "PJ2-2B", "integrationID": 8 }, { "name": "Bedside Keypad", "type": "PJ2-4B", "integrationID": 9 } ], "platform": "LutronCasetaPlatform" } ] }

The red callouts in the example - were also called out as invald (bridge was not as i used my info) Host and port were still invalid as well after placing the info in. [image: image.png]

Thanks!!!

On Mon, Jun 29, 2020 at 8:48 AM Robert Nilsson notifications@github.com wrote:

Can you share your config.json (just blank out any private data)?

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/rnilssoncx/homebridge-pico/issues/1#issuecomment-651133776, or unsubscribe https://github.com/notifications/unsubscribe-auth/AQDRAKKOTYDO7ITGM74XYLLRZCLT5ANCNFSM4OK4SYXQ .

rnilssoncx commented 4 years ago

You're having this issue because you're not following my configuration instructions. You're using the instructions for the plugin "LutronCasetaPlatform". This plugin is called "Pico". Instructions are here: https://github.com/rnilssoncx/homebridge-pico

nbuk213 commented 4 years ago

Apologies, should have been more explicit - I had attached my current plugin for reference but even when I deleted it out and copy/pasted the sample config file it came back invalid and crashed the homebridge service.

The below is a screenshot as it's the only way to show the errors, for "host" "port" "switches".

Hopefully this will give a better picture.

[image: image.png]

Editable copy: { "bridge": { "name": "Rasberry-Pi Bridge", "username": "XX:XX:XX:XX:XX:XX", "port": XXXXX, "pin": "XXX-XX-XXX" }, "accessories": [], "platforms": [ { "name": "HomeKit Bridge", "port": XXXX, "auth": "form", "theme": "dark-mode", "tempUnits": "f", "lang": "auto", "platform": "Pico", "quiet": false, "servers": [ "host": "XX.X.X.XXX", "port": 23, "switches": [ { "name": "Kitchen Pico", "pico": 22, "type": "simple" }, { "name": "Home Theater Pico", "pico": [ 11, 31 ], "type": "scene" } ]

    }
]

}

On Tue, Jun 30, 2020 at 2:35 PM Robert Nilsson notifications@github.com wrote:

You're having this issue because you're not following my configuration instructions. You're using the instructions for the plugin "LutronCasetaPlatform". This plugin is called "Pico". Instructions are here: https://github.com/rnilssoncx/homebridge-pico

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/rnilssoncx/homebridge-pico/issues/1#issuecomment-652000063, or unsubscribe https://github.com/notifications/unsubscribe-auth/AQDRAKPTJ4PIER6UQ663RNDRZI47JANCNFSM4OK4SYXQ .

nareshkkannan commented 4 years ago

Looks like a missing ] ? Like where you have the blank line (4th from end)?

rnilssoncx commented 4 years ago

The format was wrong for platforms. The platform for Pico is right now correct in what I put below.

{ "bridge": { "name": "Rasberry-Pi Bridge", "username": "XX:XX:XX:XX:XX:XX", "port": XXXXX, "pin": "XXX-XX-XXX" }, "accessories": [], "platforms": [ { "name": "HomeKit Bridge", "port": XXXX, "auth": "form", "theme": "dark-mode", "tempUnits": "f", "lang": "auto" }, { "platform": "Pico", "quiet": false, "servers": [ { "host": "XX.X.X.XXX", "port": 23, "switches": [ { "name": "Kitchen Pico", "pico": 22, "type": "simple" }, { "name": "Home Theater Pico", "pico": [ 11, 31 ], "type": "scene" } ] } ] } ] }

nbuk213 commented 4 years ago

I believe there are the correct number of brackets - I will completely wipe my homebridge and start anew, so everything is perfectly aligned and im only using your example- but given your own example shows the same red squiggly context errors same as mine this will still be an issue. I shared the screen grab to convey where the errors were located.


From: nareshkkannan notifications@github.com Sent: Thursday, July 2, 2020 12:00:57 PM To: rnilssoncx/homebridge-pico homebridge-pico@noreply.github.com Cc: nbuk213 nburk213@gmail.com; Author author@noreply.github.com Subject: Re: [rnilssoncx/homebridge-pico] Expanded configuration documentation (#1)

Looks like a missing ] ? Like where you have the blank line (4th from end)?

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/rnilssoncx/homebridge-pico/issues/1#issuecomment-653121141, or unsubscribe https://github.com/notifications/unsubscribe-auth/AQDRAKPF4EU54ZMXJSMULYTRZS4MTANCNFSM4OK4SYXQ .

nbuk213 commented 4 years ago

Just wanted to follow-up, this is a carbon copy of the example config on the github readme then posted within a new new homebridge instance. There are JSON compatibility issues out of the gate. Not sure how its working within your environment but something is amiss.

[image: image.png]

On Thu, Jul 2, 2020 at 2:04 PM Neil Burkinshaw nburk213@gmail.com wrote:

I believe there are the correct number of brackets - I will completely wipe my homebridge and start anew, so everything is perfectly aligned and im only using your example- but given your own example shows the same red squiggly context errors same as mine this will still be an issue. I shared the screen grab to convey where the errors were located.


From: nareshkkannan notifications@github.com Sent: Thursday, July 2, 2020 12:00:57 PM To: rnilssoncx/homebridge-pico homebridge-pico@noreply.github.com Cc: nbuk213 nburk213@gmail.com; Author author@noreply.github.com Subject: Re: [rnilssoncx/homebridge-pico] Expanded configuration documentation (#1)

Looks like a missing ] ? Like where you have the blank line (4th from end)?

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/rnilssoncx/homebridge-pico/issues/1#issuecomment-653121141, or unsubscribe https://github.com/notifications/unsubscribe-auth/AQDRAKPF4EU54ZMXJSMULYTRZS4MTANCNFSM4OK4SYXQ .

rnilssoncx commented 4 years ago

There is a problem with my sample - a missing set of braces.

The servers section is a list, but the example is missing ls the {} around the individual server entry. What I pasted above in this chat is correct. I’ll fix the doc later today.

nbuk213 commented 4 years ago

Awesome! Thank you for your time and assistance. Its a real game changer to have the Picos fully compatible with the rest of Lutron’s offerings


From: Robert Nilsson notifications@github.com Sent: Saturday, July 4, 2020 7:42:53 AM To: rnilssoncx/homebridge-pico homebridge-pico@noreply.github.com Cc: nbuk213 nburk213@gmail.com; Author author@noreply.github.com Subject: Re: [rnilssoncx/homebridge-pico] Expanded configuration documentation (#1)

There is a problem with my sample - a missing set of braces.

The servers section is a list, but the example is missing ls the {} around the individual server entry. What I pasted above in this chat is correct. I’ll fix the doc later today.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHubhttps://github.com/rnilssoncx/homebridge-pico/issues/1#issuecomment-653761406, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AQDRAKM7WCDB5J5AODLNXITRZ4PU3ANCNFSM4OK4SYXQ.

rnilssoncx commented 4 years ago

I've corrected the sample config. Let me know when you're up and running so we can close this out.

nbuk213 commented 4 years ago

the servers section is still invalid at same location according to jsonlint.com. And if there was an update to the example I can not say for certain if it was propagated. Github does not indicate whether the readme page has been updated like the repository.

I was able to make a change and get the JSON to validate a bit ago but while this now appears correct the system fails to initialize - Error logs at bottom.

Changes in green "servers": { "host": "11.1.1.111", "port": 23 },


location of JSON failure per JSONLint: "servers": [ "host": "11.1.1.111", "port": 23, "switches": [

Error: Parse error on line 21: ...rvers": [ "host": "11.1.1.111",
----------------------^ ----Expecting 'EOF', '}', ',', ']', got ':'


Error log on home bridge boot after validated JSON config - I would assume likely due to config not being in expected format

[Pico] Pico Plugin Loaded - Version 0.0.1 [7/4/2020, 3:19:10 PM] TypeError: config.servers is not iterable at new Pico (/usr/lib/node_modules/homebridge-pico/index.js:33:31) at /usr/lib/node_modules/homebridge/src/server.ts:397:40 at Array.forEach () at Server.loadPlatforms (/usr/lib/node_modules/homebridge/src/server.ts:374:27) at Server.start (/usr/lib/node_modules/homebridge/src/server.ts:153:29) at cli (/usr/lib/node_modules/homebridge/src/cli.ts:80:10) at Object. (/usr/lib/node_modules/homebridge/bin/homebridge:17:22) at Module._compile (internal/modules/cjs/loader.js:1133:30) at Object.Module._extensions..js (internal/modules/cjs/loader.js:1153:10) at Module.load (internal/modules/cjs/loader.js:977:32) [7/4/2020, 3:19:10 PM] Got SIGTERM, shutting down Homebridge...

On Sat, Jul 4, 2020 at 11:43 AM Robert Nilsson notifications@github.com wrote:

I've corrected the sample config. Let me know when you're up and running so we can close this out.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/rnilssoncx/homebridge-pico/issues/1#issuecomment-653787403, or unsubscribe https://github.com/notifications/unsubscribe-auth/AQDRAKNQ4E6NYQBGZT3OOALRZ5L3VANCNFSM4OK4SYXQ .

rnilssoncx commented 4 years ago

The section below is missing braces. I corrected this in the readme, earlier today.

"servers": [
                "host": "11.1.1.111",
                "port": 23,
                "switches": [

Should be:

"servers": [
        {
                "host": "11.1.1.111",
                "port": 23,
                "switches": [
                    ...
                ]
        }
]
nbuk213 commented 4 years ago

Alright, happy to report that it is working 100%. Love that you have the buttons populate in the correct order as well.

Thanks!

On Sat, Jul 4, 2020 at 4:45 PM Robert Nilsson notifications@github.com wrote:

The section below is missing braces. I corrected this in the readme, earlier today.

"servers": [ "host": "11.1.1.111", "port": 23, "switches": [

Should be:

"servers": [ { "host": "11.1.1.111", "port": 23, "switches": [ ... ] } ]

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/rnilssoncx/homebridge-pico/issues/1#issuecomment-653816002, or unsubscribe https://github.com/notifications/unsubscribe-auth/AQDRAKPMYB6KAUDFYWSUVYDRZ6PJBANCNFSM4OK4SYXQ .

rnilssoncx commented 4 years ago

Great news. I’ll close this out.