toddaustin07 / edge_envisalink

SmartThings Edge driver for DSC/Envisalink integrations
Apache License 2.0
19 stars 3 forks source link

Worked fine for 18 hours then stopped sending events to Smartthings #1

Closed meirion closed 2 years ago

meirion commented 2 years ago

Hi,

Thank you so much for the work on this edge driver. I was really excited that this was so easy to set up. I gave up on Alarmserver on a Pi many years ago.

I installed this on Mon 13th Dec evening. Set up my devices. Had some trouble with some not working, then read about the 15 second wait - so returned an un-set, then re-set the missing devices succesfully.

All was fine, was receiving motion and contact sensor events in smartthings app. Set up some automations to turn lights on motion etc.

The following day around 18hrs later at 15:37 all events stopped appearing.

Alarm + Envisalink side is fine - Logging into Eyzon App I can still see motion and contact events.

Any idea what could be going on? Many thanks.

Screenshot_20211215_083122_com samsung android oneconnect Screenshot_20211215_083142_com eyez_on ![Uploading Screenshot_20211215_083142_com.eyez_on.jpg…]()

toddaustin07 commented 2 years ago

Hello! Very sorry you're having problems. Unfortunately, as SmartThings Edge is still a beta-level platform, it's not always 100% reliable and some glitches like this can happen. It's hard for me to tell exactly what DID happen without logging output. For that you would need to install the SmartThings CLI. But if you don't want to get in to all that, what I would suggest is that you try rebooting your hub and seeing if that restores things. You can reboot it through the IDE tools. If that doesn't seem to help we'll have to get the CLI installed so we can do further diagnosing. It's quite easy, especially if you have a Windows PC.

meirion commented 2 years ago

Hi, thanks for the quick followup. I did install the CLI on my mac as that was part of your (comprehensive) install instructions.

What commands should I do regarding logging? Let me know and I'll get it done...

toddaustin07 commented 2 years ago

To start logging with the CLI, I'll assume you may not have run it yet for the first time, so this is the sequence to follow:

smartthings --version

If you get the version info displayed, that confirms it's executable. Then...

smartthings devices

As the first 'command', a browser window will be displayed where you will have to log in to your SmartThings account and authorize permissions to your data. This is only required the first time you run the CLI, and only occasionally thereafter. Once you complete the authorization, return to your command prompt window and you should see the CLI complete and all your SmartThings devices should be listed. If you get this far, you are golden. Now to run start the logger:

smartthings edge:drivers:logcat

You'll first be asked to enter the IP address of your hub. Then you'll get a list of drivers currently running on your hub. Select the number corresponding to 'Envisalink 2'.

Log output should then start being displayed. Capture a couple pages of what you are seeing and paste it back here. Surround it with triple back-quotes (```) so it the formatting is readable. Then we'll go from there.

meirion commented 2 years ago

thanks.

I opened my laptop and realised terminal was still running logcat from when I set up your edge driver, so the error was visible straight away:

listening for logs... done
BRMMEW-LMXFJHD2:Downloads $ ./smartthings edge:drivers:logcat 0daf0c4b-73e1-4a88-8af2-xxxx --hub-address=192.168.0.2
2021-12-15T21:04:02.813369558+00:00 TRACE Envisalink 2  Received event with handler Re-connect timer
2021-12-15T21:04:02.816523438+00:00 INFO Envisalink 2  Attempting to reconnect to EnvisaLink
2021-12-15T21:04:03.139487167+00:00 ERROR Envisalink 2  Could not connect to EnvisaLink:    connect failed (192.168.0.69:4025): Os { code: 111, kind: ConnectionRefused, message: "Connection refused" }
2021-12-15T21:04:03.164858517+00:00 WARN Envisalink 2  failed to cancel dropped timer, timer has leaked Invalid timer ID
2021-12-15T21:04:03.174164945+00:00 TRACE Envisalink 2  Received event with handler _resync

So some kind of issue connecting to Envisalink?

This is after power-cycling the hub, by the way.

EyezOn portal is still working OK with up to date sensor status.

meirion commented 2 years ago

🤦 Envisalink IP address has changed from .69 to .70!

toddaustin07 commented 2 years ago

Better configure it with a static IP 🙂 If it’s all working now, I’ll close out the issue.

toddaustin07 commented 2 years ago

Envisalink did not have a static IP address.