Visonic Powermax and Powermaster Integration

Hello Dave,
It has been a while that I haven’t updated (because it was working perfectly) and I updated last week your code.
Now it seems that I cannot arm the panel anymore as I have the message:

Attempt to send a command message to the panel that has been denied, wrong pin code used

Here is the log:
https://pastebin.com/acdnL9PA

Normally I am in Powerlink mode and I have activated both option “Arm without User Code” and “Allow Panel Arm from Home Assistant”.
Looking at the debug logs, I have no clue why it is not working anymore.

I have the same Powermax panel as you.

Thanks a lot in advance,

This is a quick reply from my phone and it’s difficult to view your log file. I see that you have auto enroll turned off, please remove the integration and add it again, this time enabling auto enroll.
D

Hello,
I have set ‘force_autoenroll’: True.
This doesn’t seem to make a difference:

For info, I can desarm the alarm through Home Assistant, so this is just the arming which has an issue.

You have “arm_without_usercode” set to True, this means that the integration will use 0000 as the pin code when arming the panel and your panel rejects this (in the log file it’s line 2272).
Please untick this
image
You do not need to delete and reinstall, it is a setting that you can edit in the integration settings.

Indeed I removed the “Arm without User Code”, and use the override user code to set the correct user code. And now I can arm the system.
However I don’t remember that I ever needed to do that with previous versions ?
I though that the Powerlink mode could allow to arm the system without the need to know the user code ?

Thanks !

You shouldn’t need to set the override code in powerlink mode. If you had “Arm without User Code” set before and it worked, for some reason (according to your last log file) the panel doesn’t like it now.
D

Really strange. I haven’t changed anything in my Powermax panel since the initial setup almost 2 years ago.
And I haven’t changed anything in the custom integration as well.
Perhaps I should try to remove/add the Powerlink connection from the panel ?
In the end, should I use ‘force_autoenroll’ or not on my Powermax panel ? How can I know which is the correct setup (the wiki said that autoenroll doesn’t work for some Powermax panel) ?

Thanks !

You could but if it’s working then why change it :slight_smile:

It’s on the wiki in the table here although I admit that it could be much more obvious :slight_smile:
It’s also described in the last bullet on the wiki as this is what has to be done for panels that do not auto enroll.

  • Powermax+ and Powermax Pro users will need to manually enroll at the right point in time (usually within a few minutes of starting this integration). I believe that you do this by INSTALLER MODE → 7. ENROLL PWRLNK → 01: INSTALL. Most users with these 2 panel types only need to do this once, however a few users have found that they need to do this every time they restart the integration.

I also renamed it to “Auto Enroll Supported” as this describes it better i.e. does the panel support auto enroll and powermax+ and powermax pro panels do not. In fact if they are asked to auto enroll then all communication stops, that is why I need a user defined setting for this.

I have a Powermax Pro Type 2 (Rev B), so I thought that I was supposed to use force_autoenroll = No. That’s why I was confused that I need to use force_autoenroll = Yes.
It seems to work fine though, perhaps because it was previously enrolled.

Anyway I am just curious about the user code, that’s all. And if possible I’d prefer to avoid having the user code in multiple place (I am sure that I will forget to update the setting the day I will change the user code in the panel).

Thanks !

Hi Guys
quick thanks to Dave for creating this integration. I finally got round to installing the bits in my panel ( PowerMax UK Pro-Part2__4_52), and was amazed how easily it all came together.

One small question, I notice that the battery for all my sensors is at 100%, which I assume is just the sensors reporting that the batteries are good, and not the actual charge percentage, as some of them have been for more than a year.
Therefore I’m expecting that it will jump to something else once the sensors report a low battery.

also the panel reported that it lost comms with the ESP this morning in its trouble report. I cycled the power hoping to reboot the ESP, but that did not clear it. However restarting the integration did, again I assume this is expected, ie the integration does not automatically try to reconnect once it has lost comms ( or maybe I just did not wait long enough)

interested in what others are seeing
cheers
Oldbloke

The infomation that the panel sends for battery level is only a single bit per sensor that tells me “good” or “bad”. As Home Assistant uses battery levels as a percentage, all I can do is set it to 0% or 100%. So it will go from 100% to 0% when the battery needs replacing.

If there’s a connection dropout then the integration should detect it and try to reconnect. In your case this isn’t happening and the only way to help you is if you can save and upload a log file for me to look through. I assume that you’ve found the wiki and the info is on there. If you want me to look further in to this problem for you then save a log file like this on the wiki and upload to pastebin/dropbox and put a link in this thread.

Thanks Dave
for confirming what I suspected about the battery, will set up automation to notify me of low battery.
Will have a proper read of the wiki entries you highlighted to see if I can track something down myself first before I upload logs

cheers
Oldbloke

Hi.

The visonic integration seems to disconnect the panel after a few minutes runtime after a reboot.

image

I’ve tried the full restart procedure as described in the wiki which helped previously, but I’m unable to exit the “loop” that seems to occur now.

Below is a snippet of the logfile:

2021-09-09 13:25:36 DEBUG (MainThread) [custom_components.visonic.pyvisonic] [_validatePDU] Not valid packet, CRC failed, may be ongoing and not final 0A
2021-09-09 13:25:36 WARNING (MainThread) [custom_components.visonic.pyvisonic] [data receiver] Warning : Construction of incoming packet validation failed - Message = 0d 3f 00 00 80 ff 00 00 00 00 00 00 00 00 00 00 00 00 e8 03 55 01 aa 02 06 03 1f 01 00 00 01 ff ff ff 00 00 14 00 07 1e 58 02 01 00 00 00 00 00 01 40 03 00 01 02 14 00 58 02 05 00 00 00 00 00 00 ff ff ff ff ff ff ff 00 00 00 ff 00 00 00 00 00 00 00 00 00 00 00 00 ff ff ff ef 00 00 00 00 00 00 00 00 00 00 00 00 00 01 01 00 00 00 01 01 00 00 00 01 00 00 00 00 00 00 00 01 02 00 00 0f 00 00 00 00 00 c0 0a    checksum calcs 0XD0
2021-09-09 13:25:36 ERROR (MainThread) [custom_components.visonic.pyvisonic] ERROR Connection Lost : disconnected due to exception CRC errors
2021-09-09 13:25:41 ERROR (MainThread) [custom_components.visonic.pyvisonic]                         Calling Exception handler.
2021-09-09 13:25:41 DEBUG (MainThread) [custom_components.visonic.client] PyVisonic has caused an exception CRC errors
2021-09-09 13:25:41 DEBUG (MainThread) [custom_components.visonic.pyvisonic] [sendPdu] Suspended all operations, not sending PDU
2021-09-09 13:25:41 DEBUG (MainThread) [custom_components.visonic.client]  ........... terminating connection and setting up reconnection

Please see Dropbox logfile for full logfile.

Hoping someone (Dave?) can point me in the right direction to have my alarm and HomeAssistant talking to each other again :slight_smile:

Hi,

I’ve taken a look at the log file and the data from the panel is being corrupted, not very often but it is happening. I can’t tell if data to the panel is also being corrupted.

I notice that you’re using USB, are you certain that nothing else can manipulate the data from the panel using the same USB connection?

In the following, I know this is a lot of data to use as an example but it’s the best example in the log file. The same block of EPROM data is read multiple times as the integration tries to interact with the panel and keeps failing.
The first 2 rows of data are wrong and give a checksum error.
The 3rd row is the correct data (but other parts failed so it didn’t work overall), notice the correct data is 1 byte shorter.

0d 3f 00 00 80 ff 00 00 00 00 00 00 00 00 00 00 00 00 e8 03 55 01 aa 02 06 03 1f 01 00 00 01 ff ff ff 00 00 14 00 07 1e 58 02 01 00 00 00 00 00 01 40 03 00 01 02 14 00 58 02 05 00 00 00 00 00 00 ff bf ff ff ff ff ff 00 00 00 ff 00 00 00 00 00 00 00 00 00 00 00 00 ff ff ff ff 00 00 00 00 00 00 00 00 00 00 00 00 00 01 01 00 00 00 01 01 00 00 00 01 00 00 00 00 00 00 00 01 02 00 00 0f 00 00 00 00 00 c0 0a    checksum calcs 0X1
0d 3f 00 00 80 ff 00 00 00 00 00 00 00 00 00 00 00 00 e8 03 55 01 aa 02 06 03 1f 01 00 00 01 ff ff ff 00 00 14 00 07 1e 58 02 01 00 00 00 00 00 01 40 03 00 01 02 14 00 58 02 05 00 00 00 00 00 00 ff ff ff ff ff ff ff 00 00 00 ff 00 00 00 00 00 00 00 00 00 00 00 00 ff ff ff ef 00 00 00 00 00 00 00 00 00 00 00 00 00 01 01 00 00 00 01 01 00 00 00 01 00 00 00 00 00 00 00 01 02 00 00 0f 00 00 00 00 00 c0 0a    checksum calcs 0XD0
0d 3f 00 00 80 ff 00 00 00 00 00 00 00 00 00 00 00 00 e8 03 55 01 aa 02 06 03 1f 01 00 00 01 ff ff ff 00 00 14 00 07 1e 58 02 01 00 00 00 00 00 01 40 03 00 02 14 00 58 02 05 00 00 00 00 00 00 ff ff ff ff ff ff ff 00 00 00 ff 00 00 00 00 00 00 00 00 00 00 00 00 ff ff ff ff 00 00 00 00 00 00 00 00 00 00 00 00 00 01 01 00 00 00 01 01 00 00 00 01 00 00 00 00 00 00 00 01 02 00 00 0f 00 00 00 00 00 c0 0a 

Also, notice the differences in data for rows 1 and 2, they should both be the same as row 3. We’re getting extra data and data corruption.

Apart from this I don’t think that I can help. Maybe change the USB port you’re using. Is there anything that you can think of?
D

Thank you @davesmeghead.

Based on your feedback I moved the USB connection to an unpowered USB-hub, and for some strange reason that seems to work. I’ve had a stable connection since yesterday evening.

I’m wondering if this could be related to the serial adapter or perhaps the wires as it makes no sense to me that an unpowered USB-hub is working but the USB2/3 ports on the PI are not (the USB2 port used to). I will have to do some more testing later, but for now I’m happy with a working system.

I hope you’re not attempting to connect 3.3 volts to the panel. There should only be 3 wire connections: Rx, Tx, and Gnd.

Hi,

Just a quick query about bypassing zones.

If I bypass a zone using the frontend it does bypass it and I get the audible bypass notification on the panel itself when next arming the system, however if I understand the panel correctly the bypass only lasts until the system is disarmed and then resets the bypass, but my frontend remains showing the zone as being bypassed. Is this the correct behaviour or do I not fully understand what the bypass actually does?

Hi,
Well spotted, you’re correct, I’ve just tested it on mine and the status in HA doesn’t change. I’ve fixed it (I ask the panel for the bypass status after every arm/disarm command) and will upload a release in the next few days, I just need to test it a bit more. I also noticed on my panel that I can bypass a sensor using the panel menus but it doesn’t get updated in the HA frontend. It also doesn’t always send a panel update to the integration in HA, sometimes it did and sometimes it didn’t so I periodically ask the panel to send it’s bypass status.
D
:slight_smile:

New Release 0.6.12.0
After a couple of days on test and trying it a few times, I’ve released a bug fix to the bypass functionality.

For some panel types, any sensors that are bypassed when arming the panel are re-armed when the panel is disarmed. This was not represented properly in Home Assistant. Also, when sensors were bypassed using the panel menu, this was sometimes not represented in the Home Assistant frontend.

The integration asks the panel for the bypass status:

  • After the panel is armed or disarmed
  • Every 90 to 120 seconds (depending on what other interactions are happening with the panel)

:slight_smile:

2 Likes

Finally fixed constant disconnects

Since I installed the Visonic integration a few weeks ago it was showing disconnects approx twice every hour. I have a PowerMax Pro UK.
I spent ages chasing network issues, but it turned out to be logic voltage levels on the serial RX TX pins.
Picked up on the logs saying there was data corruption, though it would always sort itself out.
I noticed that the Wiki mentioned that the PowerMax uses 5V logic for its serial, as opposed to the Powermaster that uses 3.3V.
I use the Wemos D1 V2 as the serial interface powered by the 12V connector inside the Panel.
The Wemos like nearly all ESP8266 and ESP32 use 3.3V for its I/O pins.

I had some level converters lying around, so put one between the Wemos and the panel.
Lo and behold all disconnects are gone. The Wemos has both 3.3V and 5V outputs when powered via the onboard voltage regulator, so I used these for the level shifters low and high voltage inputs.

Hope this helps anyone else trying out the integration with a PowerMax panel.

Thanks to Dave once again for a great integration, and an excellent Wiki

Level Shifters from the big A

Cheers Oldbloke

1 Like