Visonic Powermax and Powermaster Component

As you seem to have panel firmware version 19 then I believe that the baud rate should be set to 38400 as described on my wiki page here. Note that I have not personally verified this, this is information provided by other users.

If you have the Visonic Powerlink hardware module then you will need to remove it.

No need to restart the panel. Enter installer mode on the panel and then exit it, this does a “system reset” on the panel but you do not lose panel settings or sensors.

When using that USB cable, I would assume that the device that you connect the USB end would provide 5 volts, the panel is already providing 3.75 volts.
Therefore, DO NOT CONNECT THE RED CABLE. Only connect 3 wires for Gnd, Rx and Tx.
:slight_smile:

Thank you so much for the reply!

I have edit in windows so the USB baud rate is 38400 and also edit when i install the integration i took 38400 as baud rate is that right?

Also on the pins have i put like this:

- Empty -Black -Green -White -Empty

https://www.domoticaforum.eu/download/file.php?id=1434

And it stand on the website i bought the cable like this:
Red: +5V
Black: GND
White: TXD
Green: RXD

As i can see on the photos TX is the 3 pin from the left and Green should be there right?
And RX is the 4 pin from the left then White should be there?
Black did i put on the 2 pin from the left.

Home assistant telling me “Failed to connect into Visonic Alarm. Check Settings.” right after i finish the intregration. I have 5650 as download code and i have confirm that in the central.

Sorry for all these stupid questions but I just want to make sure I’m right from the start before I troubleshoot deeper.

By password I assume you mean the Download code?
You do not need to use the user or installer codes from your panel with Home Assistant (HA).
The integration should connect and get to “Standard” mode in HA without using the download code.

I think so yes. I assume that you:

  • Have installed the Windows XP/Vista/7/8 or MacOS X PL2303HX.D drivers on your computer
  • Must be able to set the baud rate in the driver somehow, I’m not sure if this uses the setting from Home Assistant or not as I don’t have experience of the hardware / cable that you are using.
  • Have set the other settings correctly i.e. the RS232 setup is to disable control flow i.e CTS/RTS, no parity and 1 stop bit.
  • Are using the correct COM port on your PC

As far as I can tell yes, if it were my panel that’s what I would do and I assume that a PowerMaster is the same.

Can you tell me what else is in the log file, without it I cannot help you much more. e.g. Does it say “Setting USB Options”?
You need to set the logger settings like this

The download code is not important yet. When you get it connected and interacting with the panel (“Standard Mode”) then the download code is used to get to “Standard Plus” and then hopefully “Powerlink” mode.

Sorry if I was unclear, I was referring to the password for Visonic remote programs rar file.

Yes everything is right there.

I changed the USB socket and changed the TX / RX cables and checked that the home assistant found my usb which it did.

Installed the integration again without filling in the download code or checking anything.

After this I see that all my sections jump up as they should and then I go into the integration and check in so I can alarm on / off etc. via home assistant.

Everything looks and works as it should now! :slight_smile: thanks so much for your help.

I have make a automation so i get a notice every time the alarm changes position and goes into alarm mode, do you have any tips on something else I can do? Can I include which section alarms in the notice? Can I get another sound in the notice if the alarm goes off?

Anything else fun you can suggest?

Hi @davesmeghead

You really are a good guy, not only producing a great component, but supporting everyone for years on end. Thank you so much.

I am experiencing issues with the integration and it is a strike of luck if everything works after a restart of HA. As you can imagine, HA can require a lot of reboots if you’re a tinkerer, and adding, or adjusting the configuration.yaml.

Note: I am aware that there is a “spam” limit of some kind which prevents things from working if the component is restarted too many times in a short space of time. I’m not sure what that frequency is, but I am aware of it, hence why my reattempts are only tried a few times and then the next reattempt is hours apart.

I feel it is a timing issue in order for this component to work every time, but cannot explain what the silver bullet is in order to get it to work every time. So my frustrated experience at the moment is, although I might get it working, it’ll probably stay that way for a week until I restart HA for one reason or another. Then the visonic component integration breaks again.

Version Info:

HA Version: 0.118.5
Type: Home Assistant Supervised
Supervisor Version: 2020.12.6
Python Version: 3.8.6
Docker Version: 19.03.14
Healthy: True
HACS version: 1.8.0
Visonic Component Version: 0.6.0.0

9 times out of 10, when I restart I get the notification

  • Visonic Panel Setup
    Failed to connect into Visonic Alarm. Check Settings.

I am using the newer log configuration that includes the new library logs, and I have added them to the following paste site (pastebin said my paste was too big :frowning:) : https://cl1p.net/ha_log_071220

I hope I have provided enough info for you to have a look and help me out. If you need any other information let me know.

Thanks.

UPDATE:
Sods law, I tried one last thing and I’ve got it to work (for now), but no idea if this will survive a restart (whenever I next decide to do that). For the record, I navigated to the alarm_control_panel.visonic_alarm entity and deleted it, then reinstalled the 0.6.0.0 branch of the component, then restarted HA. And magic, it’s all working. I don’t know if that was a fluke or if it was the delete and reinstall that did the trick? Who knows? I’ve attached the log from HA while it is in a working state if its any help for comparing with the broken state: cl1p.net - The internet clipboard (oops, see UPDATE 2…)

UPDATE 2:
My alarm panel just started it’s TRBL beep at me, arghh, I didn’t even restart HA. So it would seem that after about 1 minute, the connection or communication (or something stopped working). BUT… The entities and device in HA are not reporting any problems, and it’s showing everything okay. I’m totally confused, but I’m going to have to restart HA now because my alarm panel will continue it’s warning beeps every minute otherwise.

…I decided not to restart, but instead I called the service: visonic.alarm_panel_reconnect and law and behold, after a few seconds or so, all the entities were showing as not available :frowning: . So here goes another restart…

UPDATE 3:
After the reboot, I’m back to square - not working! I’ll try again in a couple hours because I might have “spammed” myself out.

UPDATE 4:
I tried @pocket 's suggestion, and also did a scan of my logs using the recommended commands, and found no errors or disconnected messages. But I went ahead and uninstalled brltty from my server, and rebooted the server. I also removed, restarted, and reinstalled and restarted the visonic component, and first time… everything is working fine. So… I still cannot be confident what fixed it, so was this the silver bullet? Who knows… I guess I won’t find out until the next restart I guess?

Thanks for allowing me to spill my findings on this post, I hope I never bored you all :slight_smile:

1 Like

This could be related…or not. It’s associated with migrating my HA installation from Ubuntu to Debian in order to use a supported Supervised configuration.

After installing Debian and HA and restoring a snapshot backup, I found the Visonic integration was not working. I had tried to configure the serial port without any luck at all. After hours of frustration, I looked at some activity using the ‘dmesg’ command; I could see the USB-to-serial device was being disconnected. Looking at some online resources, I found there were issues with a utility called ‘brltty’ used for braille devices. The process appeared to be running. Removing it restored communication with the alarm panel.

Here are the CLI commands I used:

sudo apt-get remove brltty
sudo apt autoremove

The second command removes a few dependency files that are no longer needed. After a reboot and reintegration of the Visonic component with the proper port, all was working again.

Thanks @pocket - that’s very random, but worth a shot. I’m going to give it an hour or so cause I think I’ve probably hit that “spam” threshold now.

Interestingly, could you let me know what dmesg command you ran, and when, and what sort of output was you seeing that made you curious?

I’ll let you know how I get on.

The commands I used were these (from memory):

sudo dmesg | more
sudo dmesg | grep tty
sudo dmesg | grep USB

Unfortunately, I can’t recreate the one that looked suspicious. I think it might’ve said ‘disconnected.’

1 Like

I went back through your posts and see you’re using a WiFi Ethernet connection. Is this correct? If so, I’m guessing the removal of brltty had nothing to do with your issues. Looking at the documentation, most of the braille devices use a serial port.

https://brltty.app/guidelines.html

Hi @davesmeghead

First of all, very good integration!! in powerlink mode it has everything, so awesome! Congratulations for your work

I have all set up, I connect in powerlink mode via a RS232-Ethernet module and see the status of all my PIRs but I can not arm or disarm. In the log this is appearing every time I try to arm:

[custom_components.visonic.pyvisonic] [RequestArm] Panel Access Not allowed, user settings prevent access

What user settings should I change?? I have a PowerMaster 30 but in the installer manual I have not seen anything but it is easy that I have missed it.

Wonderful I success to integrate my alarm. Thank you. The only problem is that I can disarm without the code in the interface. That’s not cool. An idea ?

Just to let you know that I’m still looking through your log files but I’ve been busy with familly and work stuff as well, sorry.

If you check out the wiki here for the config settings, have you tried going in to the integration “options” and ticking either/both of these
image

At the moment every logged in HA user gets the same interface so you cannot have different setups for different HA users i.e. a panel next to your front door with a keypad interface and your mobile phone without the keypad. I suggest that you look through the above options as well and decide if you want to allow disarm at all (and if not then untick the user setting box. If you do want to allow disarm then look at this table for the combination that you want. This is copied from the wiki


For further info see the wiki (and some help how to use the table)

EDIT: From what you say you want I suggest you try setting “Arm Without User code” and “Force use of keypad”. Edit the integration options and you should see these settings.

Thank you, @davesmeghead ! I missed the two checkboxes, now it arms and disarms flawlessly.

For anyone considering a migration to Debian, I’d like to update the information I posted here nearly a week ago. It is specific to the use of USB devices for communicating with the alarm panel. It seems Debian looks at attached devices during installation. As a result, the braille software, brltty, is installed which interferes with the Visonic integration. The cleanest way of preventing this is to disconnect the USB-to-serial cable prior to installing Debian.

Also, be aware there is an active alert regarding the version of Docker to use when installing HA.

1 Like

It doesn’t work but it’s not very problematic.

I have a bigger problem. Everything works fine but after a time the connextion is lost (state : unknown) and i have to do this procedure to reconnect :

(*) Full Restart Sequence for Powerlink:

* Stop HA
* Restart the panel: Restart your Visonic panel by going in to and out of installer mode. Do not do any panel resets, the act of exiting installer mode is enough.
* Wait for a couple of minutes for the panel to restart
* Start HA.

Every 5-6 hours and necessarly at home for reconnect, that’s not cool. It’s the same problème if i turn off and turn on the alarme.

My alarm is Powermax+ with the connect mode powerlink mode.

Can you help me for resolve this problem ?
Thanks

Can you set your logger as per my wiki page and upload a log file please, I may then be able to spot what is going on to be able to help you. I need the start of the log file to see your settings and EEPROM download to get to a normal powerlink connected state and then the point in the log file where the connection is broken. That’s likely to be about the first 1500 lines and then probably search for “PyVisonic has caused an exception” in the log file and then a few hundred lines either side of this.
:slight_smile:

thank you for your help

I cannot activate the log file
config error_xml

When i add the integration, I must tick the box "Force auto enroll for the powermax+ panel ?
it seems contrary to the wiki (This will work but needs to be Manually Enrolled (please set force_autoenroll to ‘no’). (i have a visonic powermax+)

In the general log, i can see when i lost the connection :

Logger: pyvisonic
Source: /usr/local/lib/python3.8/site-packages/pyvisonic/__init__.py:1362
First occurred: 13:28:50 (1 occurrences)
Last logged: 13:28:50

ERROR Connection Lost : disconnected due to exception [Errno 104] Connection reset by peer
Logger: pyvisonic
Source: /usr/local/lib/python3.8/site-packages/pyvisonic/__init__.py:1386
First occurred: 13:28:55 (1 occurrences)
Last logged: 13:28:55

Calling Exception handler.
Logger: custom_components.visonic.client
Source: custom_components/visonic/client.py:116
Integration: Visonic Intruder Alarm ([documentation](https://github.com/davesmeghead/visonic/wiki))
First occurred: 13:29:02 (1 occurrences)
Last logged: 13:29:02

Failed to connect into Visonic Alarm. Check Settings.

when I add the integration I have this :

Logger: pyvisonic
Source: /usr/local/lib/python3.8/site-packages/pyvisonic/__init__.py:1725
First occurred: 13:18:50 (3 occurrences)
Last logged: 13:24:23

* [data receiver] Warning : Construction of incoming packet validation failed - Message = 0d f1 07 43 00 00 8b 56 0a 0d 02 43 ba 0a checksum calcs 0X85
* [data receiver] Warning : Construction of incoming packet validation failed - Message = 0d f1 07 43 00 00 8b 56 0a 0d ab 03 00 1e checksum calcs 0X1C
* [data receiver] Warning : Construction of incoming packet validation failed - Message = 0d f1 07 43 00 00 8b 56 0a 0d a5 00 02 00 checksum calcs 0X25

and after manually connecting powerlink from the alarm :

Logger: pyvisonic
Source: /usr/local/lib/python3.8/site-packages/pyvisonic/__init__.py:3444
First occurred: 13:24:28 (1 occurrences)
Last logged: 13:24:28

[handle_msgtypeA7] Panel has been reset. Don't do anything and the comms might reconnect and magically continue

Is there anywhere I can download updated firmware for my PowerMax ? I bought it in 2007, so I assume there are updates.
I am using esp-link, and it seems it loses connection once in a while despite having a -43 to -51 dBm signal

I would be happy as well if the code was updated, such that if it detect connection failures, it will wait 30 secs and retry so I get rid of the “Failed to connect into Visonic Alarm. Check Settings. status”

After reboot of HomeAssistant, I always gets a working connection.

Update: Found the call I can always do if it is down: visonic.alarm_panel_reconnect - Did not work. But I will try and get some logic running to try it automatically

New update.
Did a wireshark test. Panel working. Then reconnect.
FIN/ACK and new connection with SYN, SYN/ACK.
Never seems to come up again on the HA side, yet they are talk back and forth the 30 seconds I wait before doing a restart. HA sends 415 bytes and receives 2845.
Doing the restart shuts down the connection nicely. Then 37 seconds passes, and communications happens again. This time with success…
After about 30 seconds, we are close to the same number of bytes exchanged.
To me the flow on the failed reconnect, and the successfull connect looks more or less the same, yet the code says that the connection failed. But behind the scenes it looks like the same amount of data keeps flowing. So communications runs as usual. So maybe it is just front-end failing ?
Guess I have to look at bit more at the code, possible insert some debug stuff, and then create issues on github

Assuming you’re not using HA-OS, I have a few random thoughts…

Check and see if the ModemManager process is running. If so, disable and stop it using the systemctl command. Also double check the UART settings on the esp-link configuration.

Lastly – and this is just good practice – ensure the logic levels of the signals are compatible. If the panel is 5 volts and the esp-link is using 3.3 volt logic, you might have reduced or negative logic levels margins in one direction, and the potential for an over-driven input in the other.