davesmeghead / visonic

Visonic Custom Component for integration with Home Assistant
Apache License 2.0
90 stars 20 forks source link

0.9.6.21 - Powermaster 30 stops responding every few days #141

Closed pbathuk closed 3 weeks ago

pbathuk commented 2 months ago

I use HACS and HAOS to power Home Assistant and have the Visonic Alarm installed. I have an ethernet setup, so pointing at something wired in to the console from HA, which I have setup for years now (I remember having back and forths with yourself about getting it all working when I first started.

Recently I have noticed that every few days The Visonic intergation stops responding and I need to reboot HA / Intergration to get it back up and running. After the last time I enabled all the logging following this guide and have downloaded my HA.log file but it is 77MB in size.

I have therefore had to carve it up - to enable it to be saved (sorry) home-assistant_2024-08-16T14-30-55.674Z - P1.log

home-assistant_2024-08-16T14-30-55.674Z - P2.log

home-assistant_2024-08-16T14-30-55.674Z - P3.log

home-assistant_2024-08-16T14-30-55.674Z - P4.log

FYI on a refresh of the intergration, all fine again and connected

pbathuk commented 2 months ago

So far I have tried: Wiping out the intergation, full reboot of HA and the ethernet dongle, then resetting back up - no change. Rebooting HA after setting it all up (config) - no change

FYI the ethernet dongle has a static IP on my Home router (TP Link AX72 incase that matters) and HA and it are all fully ethernet connected through a network switch.

bwillette commented 2 months ago

FWIW I've noticed issues lately with the latest HA version (2024.8.1) and my PowerMax+, the powerlink serial connection is losing link after a time, and requires a full reboot to reestablish. The trouble indicator on the alarm panel indicates 'PLnk COMM Lost' when this occurs, and it seems to be fairly random on how long it'll run fine until this happens. I've reverted the HACS version of the powerlink plugin to 0.8.5.2 (from version 0.9.6.21 previously) to see if that helped, but it hasn't been long enough to say for sure if it's made a difference.

I'm also noticing issues with my USB connected Zwave controller lately (starting around the same time I upgraded the main software), so I wonder if something in the main Homeassistant baseline is what's causing issues. It seems to run for awhile and then loss connectivity with the serial device, in a very similar fashion to the powerlink.

This is less of a 'me too', and more just informational in case it's helpful to anyone else.

bwillette commented 2 months ago

Ok, its been a few days since I reverted the plugin back to 0.8.5.2 and have still been using the latest version of HA (now 2024.8.2). I tracked down the issue with the Zwave controller, it was unrelated (I still had the old add-on installed and it was fighting with the native integration for control of the serial port, a timing issue that must have just been exposed with the latest software baselines).

I can now more confidently state that the latest Visonic plugin version was likely the cause of my occasional (once/twice per day) issues with the powerlink serial connectivity.

One thing I wonder, I was previously configured using YAML, and the new version caused me to re-configure via the GUI (nice addition by the way!), I wonder if something could be configured differently because of that? Previously my configuration was fairly minimal in the YAML, so I suspect I mostly was using defaults:

visonic: device: type: usb path: '/dev/ttyUSB0' motion_off: 120 language: 'EN' force_standard: 'no' sync_time: 'yes' allow_remote_arm: 'yes' allow_remote_disarm: 'yes' override_code: 'XXXX'

pbathuk commented 2 months ago

Good to know that an older version works. I'll revert for now as well until the bug is worked out

davesmeghead commented 2 months ago

Hi

Are you able to download a zipfile from Github and install the code manually? https://github.com/davesmeghead/visonic/tree/dev_b0

Click Green 'Code' and then Download Zip

I've just uploaded dev_B0 Release on Github, please give it a try

In the background I've been rewriting the low level interaction with the panel to centralise it and make it easier for me to understand and debug. I have better control of sending data to the panel now, it looked like there was a backlog of data to send and then eventually it would get send but that was causing some delays.

Thanks for your help Dave

pbathuk commented 2 months ago

I've just removed the current intergation & HACS install and downloaded the zip above and manually added to the custom_components area. Currently rebooting and will report back

davesmeghead commented 2 months ago

I've just uploaded a bug fix, try that one instead.

I'm in the process or a long reply in this other Issue so keep an eye out for it in the next few minutes https://github.com/davesmeghead/visonic/issues/139

pbathuk commented 2 months ago

Cool, on the new version. Just installed. waited till it was up and running and then rebooted (no sensors were showing straight away). It is now loaded with my 6 sensors (yeah small system), only difference is that it is sitting in "standard plus"

code_format: null
changed_by: Startup
code_arm_required: false
mode: Standard Plus
state: Disarmed
ready: true
tamper: false
memory: false
siren: false
bypass: false
alarm: None
trouble: General
lastevent: Startup/Startup
lasteventtime: 17/08/2024, 18:26:40
Protocol Version: 1.4.0.2
Panel Model: PowerMaster 30
Power Master: "Yes"
Watchdog Timeout (Total): 0
Watchdog Timeout (Past 24 Hours): 0
Download Timeout: 0
Download Retries: 0
Panel Problem Count: 0
Last Panel Problem Time: ""
Client Version: 0.9.7.2
Exception Count: 0
panel: 0
friendly_name: Visonic Alarm
supported_features: 15
davesmeghead commented 2 months ago

That's strange, I have a PM30 I use to test with and it gets to Powerlink Mode, any chance you can do a debug log file please? Dave

pbathuk commented 2 months ago

home-assistant_2024-08-17T17-36-11.951Z.log

pbathuk commented 2 months ago

attached above for you

pbathuk commented 2 months ago

noticed

This error originated from a custom integration.

Logger: custom_components.visonic.pyvisonic
Source: custom_components/visonic/pyvisonic.py:1685
integration: Visonic Intruder Alarm (documentation, issues)
First occurred: 18:27:17 (8 occurrences)
Last logged: 18:28:20

[_sendMsgENROLL] Warning: Trying to re enroll, already tried BB BB and still not successful

on the log windows in HA

pbathuk commented 2 months ago

one thing to note. my sensors appear to now show motion when I walk around.. which I've not seen in a long time 😄

davesmeghead commented 2 months ago

Hi, Good news about the sensors Have you changed the download code in your panel from the default value? It's got the EPROM and is trying to Enrol as Powerlink Mode. It has tried the 2 default PowerMaster values (AAAA and BBBB) but the panel is refusing to Enrol. That's why you see the warning. Lots of times as it keeps trying BBBB in the software at the moment. D

pbathuk commented 2 months ago

Nope not changed anything apart from the installer code. FYI I got powerlink last time (last version I used)

pbathuk commented 2 months ago

Maybe I need to reboot again?

davesmeghead commented 2 months ago

Worth a try please

pbathuk commented 2 months ago

nope same again sorry

davesmeghead commented 2 months ago

I can see you have a "General" Trouble indication on your panel and I'm wondering if that's the issue. Can you go to your panel, enter Installer Mode on the menu, and then exit Installer Mode, this does a soft reset on the panel and it refreshes itself. You won't lose any config. And then restart Home Assistant please.

pbathuk commented 2 months ago

Success

code_format: null
changed_by: Startup
code_arm_required: false
mode: Powerlink
state: Disarmed
ready: true
tamper: false
memory: false
siren: false
bypass: false
alarm: None
trouble: None
lastevent: Startup/Startup
lasteventtime: 17/08/2024, 19:02:44
Protocol Version: 1.4.0.2
Panel Model: PowerMaster 30
Power Master: "Yes"
Watchdog Timeout (Total): 0
Watchdog Timeout (Past 24 Hours): 0
Download Timeout: 0
Download Retries: 0
Panel Problem Count: 0
Last Panel Problem Time: ""
Client Version: 0.9.7.2
Exception Count: 0
panel: 0
friendly_name: Visonic Alarm
supported_features: 15
davesmeghead commented 2 months ago

That all looks normal now. Can you leave it like that and report back any problems over the next few days please ... or maybe hours or minutes, who knows :smiley: :grin:

pbathuk commented 2 months ago

Of course

bwillette commented 2 months ago

I've installed your latest code as well. I'll let you know if I still see disconnects this weekend. Thanks for all your hard work on this plugin!

bwillette commented 2 months ago

Just reporting status so far, no disconnects as of yet, so that's a good sign so far! System armed and disarmed successfully as well. Will report status again later tonight but this seems better.

pbathuk commented 2 months ago

So since having it on all seems ok, just checked the logs and

Logger: custom_components.visonic.pyvisonic
Source: custom_components/visonic/pyvisonic.py:1685
integration: Visonic Intruder Alarm (documentation, issues)
First occurred: 17 August 2024 at 19:03:21 (1 occurrences)
Last logged: 17 August 2024 at 19:03:21

[_sendMsgENROLL] Warning: Trying to re enroll, already tried BB BB and still not successful

But shortly after it was reported it moved to powerlink... So not sure if that was just a glitch on the panel.

It has been armed away from HA successful and working fine thus far. Cheers for all your efforts on this btw

davesmeghead commented 2 months ago

Ah yeah, ignore that Warning, it's supposed to be a debug log that accidentally got left as a warning so I could see it in my own Home Assistant when testing

I've just uploaded latest to Github, dev_B0 with these release notes Updated New Sequencer for EPROM Download and Enrol Updated triggering control of Motion/Camera Sensors (may not work if not in the UK as it uses UTC timezone and I've only tested here in the UK) All time sources/values have a timezone associated with them.

Give it a go please if you can Thanks Dave

pbathuk commented 2 months ago

Unfortunately it will be a couple of weeks before I can test, but if it's built of this version, seems pretty solid :)

davesmeghead commented 2 months ago

To anyone looking at this issue.... I've just uploaded a new dev_B0 Release on Github, please give it a try Dave

bwillette commented 1 month ago

Just a heads up that I just installed the latest dev_B0 and will report any issues!

davesmeghead commented 1 month ago

I've just released "0.9.7.9 - English Translation File, Logic Updates and Bug Fixes" to dev_B0, if you get the chance please give it a try.

bwillette commented 1 month ago

Thanks. Does this impact the fixes you did for addressing the original issues, or other items? When do you anticipate wrapping up another official release?

pbathuk commented 1 month ago

I've just released "0.9.7.9 - English Translation File, Logic Updates and Bug Fixes" to dev_B0, if you get the chance please give it a try.

Hi, I have just redownloaed the zip file now and installing.

FYI I did have one disconnection about a week ago, a reboot of HA did fix it, but thought I would let you know.

pbathuk commented 1 month ago

Update on this, everything seems to be working well on the latest beta version

bwillette commented 1 month ago

Same here, no issues. Do you think you'll be doing an official release soon?

davesmeghead commented 1 month ago

Hi, I've just released dev_B0 0.9.8.0 as per the main forum, please give it a try https://community.home-assistant.io/t/visonic-powermax-and-powermaster-integration/316702/538

I'm still working on a few things for other issues and I need to get a solution for them that also doesn't break it for this issue (if you see what I mean). So until I get a more stable development release that covers all current issues, for all panel types, I'll keep it as a dev_B0 release. So I'd still appreciate you trying these releases to make sure it's not broken for this issue, that's why I have kept this issue open.

Dave

bwillette commented 1 month ago

Got it, thanks for taking the time to clarify Dave, appreciate all your work to ensure this fix sticks, while evolving the capability. I appreciate the detail you provided in the writeup on the forum, it all makes sense. I've installed the latest version as requested and will keep you posted!

pbathuk commented 1 month ago

Hey, i've installed it and will report back. thanks for all the hard work on this btw :)

bwillette commented 1 month ago

So far, so good, no disconnects and things are working fine!

davesmeghead commented 1 month ago

ok good, thanks for keeping me updated

davesmeghead commented 3 weeks ago

I'll close this issue as I've just created a HACS Master release 0.9.9.3. Any further problems (with 0.9.9.3) I'd rather they were in new issues please.