kuestess / homebridge-platform-insteonlocal

Homebridge platform plugin for local Insteon control
Other
77 stars 26 forks source link

Status Issues #23

Closed shereefalkady closed 5 years ago

shereefalkady commented 6 years ago

everything is working great from homekit.... but i have no event listeners and it is not polling- what could i have done wrong...

also why cant i turn the light on to 20% from off state it always has to go to 100% first...

kuestess commented 6 years ago

@shereefalkady Can you post your config and log from homebridge startup?

shereefalkady commented 6 years ago

HAPPY UPDATE!!! CHANGED TYPE FROM DIMMER TO LIGHTBULB -- NOW IT WORKS -- the listener still doesnt get the events but at least it polls it (i set it to poll every second - will let you know how that works)

shereefalkady commented 6 years ago

@kuestess so.... ofcourse it cant handle polling everything every second.... so its a shame - i have to be out of sync for 5 minutes on the devices that dont communicate with the event listener...

**the 2477S and 2453-222 are perfect though

kuestess commented 6 years ago

@shereefalkady A couple of suggestions - I would recommend that you set the keepAlive to 3600 (or delete from your config as it defaults to that) as the 2245 can only handle connections for so long before it stops responding. Resetting the connection every hour seems to solve that. Please make sure that you have installed the latest version - I don't see messages in the output above that I added in the latest versions that will make troubleshooting easier. I would recommend that you disable polling (set refresh to 0) as the eventListener provides much more real-time status updates. I suspect that with the number of devices you have a 60 second polling interval is generating so much Insteon traffic that the Hub misses alot of the events. Give that a try and see if it helps.

shereefalkady commented 6 years ago

@kuestess How do I make sure I have the latest version? I just installed it yesterday so I guess I should ...

It was not even polling when they were “dimmers” ... Now even when I have it polling every second the same devices always report to eventListener and the same devices never do ... I tried it with just one device - one dimmer only ... but it still didn’t report to event listener ... please remember the results are directly tied to the device model numbers... without exception ... event listener is definitely far better than polling ... however it doesn’t work for me with the dimmer switches ? You have tried them ? I guess it could be something with my electricity ?

I’m currently running at polling every 22 seconds - response is great and 22 second delay is temporarily acceptable ... I use to use the hub pro and response was great on all — it’s just, it wouldn’t register status after Alexa commands...

shereefalkady commented 6 years ago

Also are there any system prerequisites I need ?

And the memory leak issue ?

kuestess commented 6 years ago

@shereefalkady You can check the version you have installed by running npm ls homebridge-platform-insteonlocal. Version 0.3.9-2 is the latest. Installing via npm should install all required dependencies. Again, please disable polling (at least temporarily) as it will make troubleshooting easier. I have a lot of the same devices that you have and don't have issues with the event listener. Once you have the latest version installed, please run homebridge in debug mode (homebridge -D) and post the log, ideally with manual on/of toggles of one of the dimmers that doesn't appear to work. The warning that you got about eventemitter is just that, a warning, and won't prevent the plugin from running properly.

shereefalkady commented 6 years ago

@kuestess ....so.... when i check version this is what i get:

C:\Users\smart>npm ls homebridge-platform-insteonlocal C:\Users\smart `-- (empty)

kuestess commented 6 years ago

@shereefalkady Can you try changing your device IDs in your config to all caps rather than lower case letters?

shereefalkady commented 6 years ago

@kuestess !!! Wow !! Tried one - now it works —- will try the rest ...

I’ll come back with full feedback as I’ve been extensively testing it

shereefalkady commented 6 years ago

@kuestess Everything works perfectly now... except 1.turning on to X% from zero... 2.i cant seem to make scenes in homekit - takes tooooooooooo long to execute or Fails...

note: i have open/close modules on my window storm shutters - they work great through homebridge-platform-insteonlocal as "dimmers" (but i dont want them to group with my lights- and i want the right icons - any chance to reclassify them as blinds/shades on homebridge?)

shereefalkady commented 6 years ago

@kuestess ...wait....update.... one problem with status.... 1.if i set it from alexa - its fine... 2.if i hold down the insteon dimmer switch to desired setting, its fine 3.if i single tap the switch for it to go automatically to 100% it always registers as 1% on the app

shereefalkady commented 6 years ago

Status ALSO doesnt update when controlled from another insteon device... i.e. i have a switch on GF that turns on a module on the roof.... if i turn on the modules from the switch, the status does not update

so status issues are now only 1.when single clicked to 100% (turns on to 1%) 2.when controlled from another insteon device (does not register change)

kuestess commented 6 years ago

@shereefalkady Can you post a log of homebridge in debug mode (homebridge -D) capturing a manual on tap on one of your switches? I put a fix for the 1% in one of the recent updates so it should show correct status. Regarding keypad buttons, they are already supported as status for scene devices - see the readme and the example config for how to set up in your config. It doesn't support dimming now, but its on the roadmap. I can look into open/close module support as well (honestly didn't know that existed!). The bottleneck is definitely the Insteon Hub - it works, but they sometimes struggle with a lot of traffic. One thing that you might try is running homebridge and the plugin on the Hub Pro itself. Turns out, the Hub Pro is actually a Beagle board connected to an Insteon PLM. If you open up the Hub Pro you can boot the beagle board into linux, install homebridge and run the plugin on the hub itself. Its really responsive and quite fast. Instructions are in the readme near the bottom. Regarding donations, certainly not expected at all, but I added a donate button on the main github page if you'd like to donate.

shereefalkady commented 6 years ago

1.Regarding donations, certainly not expected at all, but I added a donate button on the main github page if you'd like to donate.

----DONE :-)

2.One thing that you might try is running homebridge and the plugin on the Hub Pro itself. Turns out, the Hub Pro is actually a Beagle board connected to an Insteon PLM. If you open up the Hub Pro you can boot the beagle board into linux, install homebridge and run the plugin on the hub itself. Its really responsive and quite fast. Instructions are in the readme near the bottom.

-----As a matter of fact my old setup was 5 Hub Pros and a 2245 hub.... after your plugin i cancelled all 5 hub pros... so... if i do flash my hub pros and do that.... i would need only the hub pro without the 2245? and if i run all 5 i can get amazingly fast response? i am very amateur when it comes to linux and flashing these boards... can i burn the boards?? you know they are not in stock now and are very dear to me.... would i be able to flash back? any chance i can request remote assistance?

3.I put a fix for the 1% in one of the recent updates so it should show correct status.

----could my homebridge be out of date - or anything else missing? i run the homebridge on windows by the way.... is that a problem? also automations sometimes work --- sometimes not... sometimes everything would crash - i would just hit ctrl x on the cmd and everything starts working again... (what does that tell me?)

  1. Regarding keypad buttons, they are already supported as status for scene devices - see the readme and the example config for how to set up in your config. It doesn't support dimming now, but its on the roadmap.

---- yes they are great with the on offs - but i have many instances where the keypad buttons are linked to dimmers - which would have been ok if the dimmer status updated with the button....

  1. I can look into open/close module support as well (honestly didn't know that existed!).

--- model 2444 - shutter/shade open close ... they are great.....

  1. last but not least... Can you post a log of homebridge in debug mode (homebridge -D) capturing a manual on tap on one of your switches? ---WILL DO
shereefalkady commented 6 years ago

quick urgent question, as i will try to try the hub pro now... so i set the hub pro config file to its own ip?

rasod commented 6 years ago

@shereefalkady yes the Hub Pro would be a completely separate homebridge install.

You will need to link the devices to the hub using the set button or the script I wrote here: https://github.com/kuestess/homebridge-platform-insteonlocal/issues/13#issuecomment-397778683 If the device is not linked to the hub you will not receive events from it. Also you will not get events if a device is controlled by another device - or at-least that is my experience.

Large scenes can still fail to run. This is because the hub can only execute one command at a time. If your scene contains many devices the commands will queue up and HomeKit can timeout. Turning a dimmer on executes two commands, one for power state and one for brightness level.

kuestess commented 6 years ago

Thanks @rasod! @shereefalkady Booting the SD card on the Hub Pro doesn't overwrite anything on the hub. You can remove the card and reboot and the Hub Pro will be just as before. To update status of devices in a scene, you can add groupMembers: to your scene config and populate the value with acomma-delimited list of Insteon IDs that are part of the group/scene. That will force the plugin to go out and get status for those devices. Many thanks for the donation!

shereefalkady commented 6 years ago

@rasod "Also you will not get events if a device is controlled by another device - or at-least that is my experience......" so if i want to use alexa as well i must use the 2245?

shereefalkady commented 6 years ago

i can set up several 2245s -- just have ot figure out howto get alexa on eseveral insteon accounts.... maybe create 5 different alexa accounts for each hub then have all accounts invite ONE primary alexa accountto have them all....

or is there a way to use alexa with the 2243 set up?

shereefalkady commented 6 years ago

@kuestess @rasod which debian image for the beagle board?

kuestess commented 6 years ago

@shereefalkady I used this image: http://debian.beagleboard.org/images/bone-debian-9.4-iot-armhf-2018-06-17-4gb.img.xz and used Etcher to write it to the card. You will still need the 2245 for Alexa control, or you might try this plugin: homebridge-alexa. I haven't used it, but it looks like it might do what you want.

rasod commented 6 years ago

@shereefalkady The HubPro is very responsive with most commands and status updates being instantaneous. However the main downside is, like I said, if a device is controlled via a different device (another linked device or Alexa for example) those events are not seen by the hub. So I have polling on some devices set to 5 minutes.

Also because of the queuing system the home-controller library uses you can get timeouts if you try to control/poll many devices at once. I have 28 devices and my "All Off" HomeKit Scene can sometimes fail. I haven't had a catch to see if there is a way to send the hub batch commands.

shereefalkady commented 6 years ago

@rasod yes when i had hub pro native i had to put no more than 12 devices per hub to get it to work perfectly and never give me the no response... what about that alexa plugin? that would work fine if what it does is give alexa control over the same device via homebridge

shereefalkady commented 6 years ago

@kuestess stuck on step 7.Enable the serial port by editing /boot/uEnv.txt

rasod commented 6 years ago

sudo nano /boot/uEnv.txt

screen shot 2018-09-09 at 3 53 59 pm

kuestess commented 6 years ago

@rasod have you tried creating the All Off scene in Insteon and triggering that way?

shereefalkady commented 6 years ago

@kuestess --- BY THE WAY!!! very good tip!!! i did electrocute myself - lol

shereefalkady commented 6 years ago

@kuestess @rasod i must have done something wrong... i cant ssh into the beagle anymore will try flashing it again ?? after i rebooted - powered down and powered back while pressing s2 - i now cant connect... what did i do wrong?

kuestess commented 6 years ago

@shereefalkady Did the IP address change on reboot? (unless you have it reserved)

shereefalkady commented 6 years ago

no it didnt i scanned notsure how long to press the s2 for? the LED lights up immediately

kuestess commented 6 years ago

Shouldn't have to hold S2 very long. Try rebooting again and re-image if that doesn't work.

shereefalkady commented 6 years ago

@kuestess tried rebooting it again - now it is not even registering on the network

shereefalkady commented 6 years ago

@kuestess wanna take a look through teamviewer?

kuestess commented 6 years ago

@shereefalkady I would try burning the SD card again. If its not grabbing an IP then it sounds like it isn't starting up. Give that a shot.

shereefalkady commented 6 years ago

yeah seems like theres something wrong with the sd card - my comp doesnt see it anymore

rasod commented 6 years ago

I had this happen to me a couple of times too. Couldn’t figure out why and to reimagine the SD.

shereefalkady commented 6 years ago

asking me to format it.... fat? fat32? ntfs?

kuestess commented 6 years ago

@shereefalkady Pick any, Etcher will essentially reformat when you burn it again.

shereefalkady commented 6 years ago

@rasod @kuestess --- same --- flashing again

shereefalkady commented 6 years ago

after i update the /boot/uEnv.txt and exit -- it doesnt come back

rasod commented 6 years ago

Send a screenshot of the uEnv file next time

shereefalkady commented 6 years ago

then i: exit - save - y- enter filename

power off - reboot

shereefalkady commented 6 years ago

screenshot 2018-09-10 00 20 12

@rasod @kuestess

kuestess commented 6 years ago

@shereefalkady That looks correct. Ctrl-x, y, then enter to save it.

shereefalkady commented 6 years ago

That’s exactly what I did - 4/5 times - never even registers on network after I do that and restart

shereefalkady commented 6 years ago

@kuestess @rasod FINALLY!!!! 12 hours later worked on the 12th attempt :-)

shereefalkady commented 6 years ago

@kuestess @rasod ------- interesting: same problem again... so i ran it again installed homebridge, installed the plugin, then i disconnected it to move it... and now i cant see it again =...<

shereefalkady commented 6 years ago

[9/10/2018, 12:03:06 PM] [Insteon Local Platform] Started Insteon Express server... events.js:160 throw er; // Unhandled 'error' event ^

Error: listen EADDRINUSE :::3000 at Object.exports._errnoException (util.js:1020:11) at exports._exceptionWithHostPort (util.js:1043:20) at Server._listen2 (net.js:1277:14) at listen (net.js:1313:10) at Server.listen (net.js:1409:5) at EventEmitter.listen (/usr/lib/node_modules/homebridge-platform-insteonlocal/node_modules/express/lib/application.js:618:24) at /usr/lib/node_modules/homebridge-platform-insteonlocal/index.js:363:10 at SerialPort. (/usr/lib/node_modules/homebridge-platform-insteonlocal/node_modules/home-controller/lib/Insteon/index.js:143:32) at emitNone (events.js:91:20) at SerialPort.emit (events.js:185:7)

rasod commented 6 years ago

Looks like you have multiple HomeBridges running at the same time on the same device.