Visonic Powermax and Powermaster Component

Hi, I can’t tell what is going wrong from that log file fragment and I get a lot more questions in my head than answers.

For example, the 2 lines starting “Request to Stop…” imply that the integration had not properly connected to the panel before calling the restart service. Also the “Checking HA Entity…” lines imply that it did not previously create any visonic sensors (but it did find a Visonic PGM Switch).
The line with “Connection Refused” implies that you have an incorrect IP address or port as the attempt to connect was refused by the TCP server (i.e. your USR-TCP232 device). But then I don’t know if it properly connected initially without looking at the startup sequence.

So, like I said, I have lots of questions…

I hope it is a similar issue to Loic_Mounier as there may be a common solution.

The only way I can look at this is for you to capture a full log file, from starting the integration, allow time for the integration to start up (10 to 15 minutes) and then make a call to the restart service. Upload to somewhere like pastebin and then put a link here please.
:slight_smile:

EDIT: I realised after posting that I no longer use “Checking HA Entity…” and so I then realised that you must be using an old version of the integration. So I have created a new release, including a HACS release. Please update your integration to the latest release and try again. If you get the same problems then upload a full log file.

I have just released 0.6.3.0 on to Github and also made it a HACS Formal Release.

I am still working towards submitting the integration into HA and have had this release running in my own production environment.

This release does not call pyvisonic as a pypi library. It became too problematic updating both repositories (Github and PyPi) and keeping them in syncwhile I did some restructuring.

That leads me on to … more restructuring has been done, particularly to bring it in line with HA core constants and the sensors are no longer polled.

There are further fixes to startup and restart.

Thanks a lot !
Reconnect service is working now, I have updated the Visonic integration with the one you have released earlier today, restart HA wait 10 minutes and reboot my router to simulate a broken connection, after the alarm panel connection was recovered flawlessly.

Happy New Year.

I loaded 0.6.3.0 on my Supervised version of HA (Debian 10 OS). Sensors are working, but I’m unable to arm the panel (PowerMaster-10). Apparently, a pin code is being rejected.

Here’s the log:

https://pastebin.com/TyfbkTzV

The attempts to arm the panel are at 01:20:00.

Thanks in advance.

Happy New Year to you too.

You seem to have “Arm without User Code” set to True in your configuration. The integration is therefore using “0000” as the pin code which is being rejected by your panel.
image
Edit your settings and try unticking “Arm without User Code” in the config. When in Standard Plus or Powerlink, it will then use the pin it retrieves from the EPROM instead.

Ugh.

I installed 0.6.3.0 and cleaned out the YAML configuration. I thought I might’ve missed some GUI options without doing that. In the process, I checked the ‘Arm without User Code’ thinking it was the option for suppressing the keypad pin entry to arm the panel. So, I’m adding this item to a long list (and getting longer) of things documenting how wrong I can be. It’s working now.

Hey Dave. Happy new year. Still really happy with the component and all working well.

I was wondering if there was any way to trigger the alarm when armed using the component? I have a few zigbee sensors in my setup now and wondered whether there is an event or something I could hit with an automation to trigger the alarm.

Hi, this was just asked a couple of weeks ago, look at this post.
The short answer is no, unless you add another device that pretends to be a wired sensor.

Hi Dave,

I’ve been using this component since 0.0.4 I think, never had any issues.
Since my last update (HACS update of the component as well as HA update to 2020.12.2 I do have some stability issues.

Sometimes in the middle of the day i hear the panel beeping (like what happens when i restart HA). On other times the component is simply not available anymore. Looking at the logs I almost always see the same:

2021-01-05 12:27:27 ERROR (MainThread) [custom_components.visonic.pyvisonic] ERROR Connection Lost : disconnected due to exception [Errno 104] Connection reset by peer
2021-01-05 12:27:32 ERROR (MainThread) [custom_components.visonic.pyvisonic]                         Calling Exception handler.
2021-01-05 12:27:34 ERROR (MainThread) [homeassistant.config_entries] Error unloading entry Alarm Panel for switch
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/config_entries.py", line 321, in async_unload
    result = await component.async_unload_entry(hass, self)  # type: ignore
  File "/usr/src/homeassistant/homeassistant/components/switch/__init__.py", line 78, in async_unload_entry
    return await hass.data[DOMAIN].async_unload_entry(entry)
  File "/usr/src/homeassistant/homeassistant/helpers/entity_component.py", line 172, in async_unload_entry
    raise ValueError("Config entry was never loaded!")
ValueError: Config entry was never loaded!
2021-01-05 12:27:40 WARNING (MainThread) [custom_components.visonic.client] Visonic Panel Request to callback handler when system not started

2021-01-05 13:15:29 ERROR (MainThread) [custom_components.visonic.pyvisonic] ERROR Connection Lost : disconnected due to exception [Errno 104] Connection reset by peer
2021-01-05 13:15:34 ERROR (MainThread) [custom_components.visonic.pyvisonic]                         Calling Exception handler.
2021-01-05 13:15:35 ERROR (MainThread) [homeassistant.config_entries] Error unloading entry Alarm Panel for switch
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/config_entries.py", line 321, in async_unload
    result = await component.async_unload_entry(hass, self)  # type: ignore
  File "/usr/src/homeassistant/homeassistant/components/switch/__init__.py", line 78, in async_unload_entry
    return await hass.data[DOMAIN].async_unload_entry(entry)
  File "/usr/src/homeassistant/homeassistant/helpers/entity_component.py", line 172, in async_unload_entry
    raise ValueError("Config entry was never loaded!")
ValueError: Config entry was never loaded!

2021-01-05 13:39:01 ERROR (MainThread) [custom_components.visonic.pyvisonic] ERROR Connection Lost : disconnected due to exception [Errno 104] Connection reset by peer
2021-01-05 13:39:06 ERROR (MainThread) [custom_components.visonic.pyvisonic]                         Calling Exception handler.
2021-01-05 13:39:07 ERROR (MainThread) [homeassistant.config_entries] Error unloading entry Alarm Panel for switch
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/config_entries.py", line 321, in async_unload
    result = await component.async_unload_entry(hass, self)  # type: ignore
  File "/usr/src/homeassistant/homeassistant/components/switch/__init__.py", line 78, in async_unload_entry
    return await hass.data[DOMAIN].async_unload_entry(entry)
  File "/usr/src/homeassistant/homeassistant/helpers/entity_component.py", line 172, in async_unload_entry
    raise ValueError("Config entry was never loaded!")
ValueError: Config entry was never loaded!

2021-01-05 23:55:32 ERROR (MainThread) [custom_components.visonic.pyvisonic] ERROR Connection Lost : disconnected due to exception [Errno 104] Connection reset by peer
2021-01-05 23:55:37 ERROR (MainThread) [custom_components.visonic.pyvisonic]                         Calling Exception handler.
2021-01-05 23:55:39 ERROR (MainThread) [homeassistant.config_entries] Error unloading entry Alarm Panel for switch
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/config_entries.py", line 321, in async_unload
    result = await component.async_unload_entry(hass, self)  # type: ignore
  File "/usr/src/homeassistant/homeassistant/components/switch/__init__.py", line 78, in async_unload_entry
    return await hass.data[DOMAIN].async_unload_entry(entry)
  File "/usr/src/homeassistant/homeassistant/helpers/entity_component.py", line 172, in async_unload_entry
    raise ValueError("Config entry was never loaded!")
ValueError: Config entry was never loaded!

Here you can see the errors are happening a few times a day. This does not alwas result in the component being unavailable.

I enabled some debugs now as described in the WIki, hope to get some more information there.

Btw after a reboot all seems stable for a while. The only warning I see at startup is:

2021-01-06 13:12:13 WARNING (MainThread) [custom_components.visonic.client] Visonic Panel Request to callback handler when system not started

any ideas?

Thank you so much. This update seems to have corrected my problem of loss of connection and also that of disarming without code despite the parameters.
It’s crazy.
Thanks again. I love you. Very good work.

Nothing I can think of, I’d need more info from debug log files to make any suggestions.
[Errno 104] Connection reset by peer means that the ethernet connection was interrupted (like your network router/switch rebooting for example) or it’s been disconnected at the other end. So no ideas at the moment.

Question, I run this component now for a few weeks without problems.
But I have now on my powermax an “warning low batt” for one of my sensors.
No problem off course, but I don’t get that warning in my visonic panel.

Is there an option to get the current status (warnings, errors, etc) also inside the visonic panel on my HS?

I had debugs running for a few days now, but the issue seems to be solved. No idea what caused it. I disabled the debugs and hope it stays stable. Maybe the ethernet to serial converter had some issues?

That’s OK, just keep an eye on it and report any issues here
:slight_smile:

All the sensors that I create have several attributes. One of the attributes is battery level as reported by the main panel. Click on the icon for 1 of your sensors and you get something like this

You should see battery level but note that it is either 100 or 0. The main panel only reports a battery state of working or low so I translate that in to HA as 100% or 0%. You should be able to create whatever you need in HA from this. While you have a sensor with a low battery take a look, if it isn’t then please upload a log file for me to take a look at
As an aside, I did consider making individual battery sensor entities in HA but it seemed a bit over the top.
Hope this helps.
:slight_smile:

Just chiming in to say the latest update has been ROCK SOLID!

Well done!

Hi Dave,

small question: I have the following situation, see pictures.

can you explain why our Powermax plus is not in powerlink mode?

Thanks in advance

Unfortunately I have one of the first Powermax pro’s that can not receive the battery information (level).

So I the only information I can get is that from the powermax status.
Other info that is also share from that point must be PSTN error’s, internal accu problem, akd message like that.

Just a quick aside first, are you aware that I no longer use the configuration.yaml settings? They are imported on first use but then it uses the integration within HA. I can’t tell if you have edited the options in the integration but I will assume that you haven’t.

As you have a Powermax+ you will need to manually enroll the panel, are you aware of this, it is here on the wiki. It’s good that you have force_autoenroll set to ‘no’, leave it like this.
Restart the integration (you do not need to restart HA to do this) and manually enroll on your panel within the first 5 to 10 minutes (it’s best when you see the mode goto Standard Plus). You should never have to do this again, only the first time.

For the card in the frontend

  • I don’t know why your “Panel Mode” is showing Unknown as it is in “Standard Plus” mode in the HA attributes (your 1st image). You have something wrong in the card setting to get the attribute.
  • Alarm Panel Siren Active in the frontend, I cannot see your Panel Siren Active attribute but this is a boolean and so should be False or True, again you have something wrong in the card settings.
  • visonic_trouble_status in the frontend, I can’t tell as I don’t have enough info, sorry

Let me know if I can be of further help, but I will probably need a debug log file for this
:slight_smile:

That’s good to know thankyou. I have no idea how many people use this integration but the number of problems that people report in this forum post is definitelly getting less :crazy_face: :+1:.