Visonic Powermax and Powermaster Integration

I’ll try to help. One thing I’m concerned about is the difference in logic levels. The Wemos D1 runs on 3.3 volts, and the panel (I think) is 5 volts. Can you disconnect the panel from the D1 and verify the voltage on its Tx pin when nothing is connected to it? Can you see any jitter on the measurement when the integration is trying to establish communication after a Server restart?

I also have a concern that the panel’s Tx signal, which I expect is at 5 volts before communication is established, is being overstressed. Essentially, it’s attempting to power the Wemos through its Rx pin, which can also be overstressed. Hopefully, the driver and receiver components haven’t suffered any failures.

Once we verify these things, the next steps might be verify the panel pin configuration and consider putting a proper logic voltage translator at the Wemos. It looks like it’s powered with 5 volts and derives it’s own 3.3 volts. Do you have links to a user’s guide and spec sheet?

Thanks @davesmeghead Dave (as always!)

I finally found how to pull the state attributes into NodeRed - Thanks for the pointers. However I found that Panel Siren Active doesnt change in my testing when setting the alarm off. I basically armed the alarm, then walked in front of a motion sensor which triggered the panel to start the internal siren (I have a short delay before the outside siren goes off so in my testing I never allowed that to go off). So does “Panel Siren Action” only go true when the outside siren starts?

I did find that “Panel Alarm Event” changed to Yes when the (internal) alarm sounded so I have just used that for my notifications - hope thats ok?

And for anyone else struggling with this, I used an events state node that is listening to event data and then I used a switch to trigger when the Alarm Panel Event goes to Yes

I’ve also got another Events Node listening to visonic_alarm_panel_state_update which again uses a switch node to determine if a motion/smoke or door sensor has been triggered


Hope that helps someone.

The panel does not directly tell me when the external siren is sounding. What the panel does tell me is a set of indications for things like Intruder, Tamper, Fire, Emergency etc, so I added it as a config item for the integration. In the config for the integration there’s a setting for this under List of Triggers for the Siren. It looks like this, you can edit it (it is not only done on creation)
image

What you need to do is to match the settings in this with the settings in your panel that trigger the external siren. I suspect that there’s 1 or more EPROM parameters that I could use instead of this integration setting, if I could only work out which.
Also, this only works properly when in PowerLink mode with the panel.

To be specific, “Panel Siren Active” (Active not Action) goes True when the panel outputs a message that matches the config setting above.
For example, if in your panel settings you have the Panic Input cause the external siren to sound then you would tick this in the integration settings to give the indication in HA setting “Panel Siren Active” to True.

Whatever works for you :slight_smile:
However, this is used for any generic alarm event (depending on your panel settings it may be more than just the internal and external siren).

When I’m feeling inspired I’ll update the wiki with this information :grinning: :wink:

1 Like

Took me 3 weeks to finally make time for the next steps.
I setup the Wifi chip and connected it as in the instructions, but now I am running into problems (mainly with my understanding how things should work, sorry for that :smiley: ).
The house I bought has the PowerMaxPro and it had a PowerLink2 connected, but that wasnt set up at all. But when I want to enroll the connection, the option 7 (as described in the wiki: INSTALLER MODE → 7. ENROLL PWRLNK → 01: INSTALL.) doesnt exist, it jumps from 6 to 8. Any idea how to change that?
Is it because it was maybe already enrolled or is there some setting to first enable it? Unfortunately I also face the issue that the entire alarm is in French which I am not fluent in :frowning:
Thanks in advance for any help

I don’t have a PowerMax Pro but it’s possible that the menu option 7 is only displayed when a device is attached that communicates like the PowerLink hardware. I suggest that you forget this (for now) and try to get your gadget communicating with this integration. If you’re successful at getting it to “Standard Plus” Mode and you need to manually enroll, we’ll return to this menu option 7 problem. My Integration pretends to be a PowerLink hardware module, so when it’s setup in Home Assistant your panel may recognise it and show the menu item.

You say that you have a wifi gadget, is it setup and working with Home Assistant yet?

Okay, clear. I will ignore the PowerLink part and will try Standard Plus.
The wifi gadget is not working with Home Assistant yet on my side. I added the integration via HACS and added the Visonic Intruder Alarm in the integrations menu.
But afterwards I dont see anything further in home assistant. The only entity I see is “persistent_notification.visonic_notification”. So I believe the connection to the wifi gadget is not working correct.
The device is in Station mode and enrolled to the wifi, I can connect to the webinterface and configure it, but in the STA settings I dont see a setting for the port. The only menu that offers an option for the port is the " Wifi-Uart Setting", see screenshot attached


Do I have to configure something further there?

Will post a question about the connection of the cables in the next post, but I can only attach one item per post

I also still have to connect the RX and TX cables. There are several options on the usr-wifi232-d2, do I assume correctly I take the RXD and TXD? Or TX1 or RX1, but then + or -?

Sorry to bother you with my questions and problems

There’s a few things here that you need to change

  • Baudrate for a PowerMax Pro is 9600
  • Disable Baudrate Adaptive
    Click apply

You need to configure the Network A Setting as follows (you already have some of these correct):

  • Mode: Server
  • Protocol: TCP
  • Port: pick a port number greater than 1024, lets say 10000
  • Server Address: You shouldn’t be able to change this, this should be the IP address of itself
  • Backup Domain: OFF
  • Max TCP: This is the maximum clients that the server will allow, you could leave this at 32
  • TCP Timeout: 0
  • TCP connection password auth: Disable
    Click Apply

For the wiring, connect:

  • Pin 6 (TXD) to the Rx pin on the panel
  • Pin 7 (RXD) to the Tx pin on the panel
  • Pin 12 (GND) to the Gnd pin on the panel
  • Pin 13 (VCC) to the VCC pin on the panel

In Home Assistant you then need to delete the integration and then re-create it (from the integrations page in Home Assistant) and set the Ethernet to 10.10.100.100 port 10000 (using my example above).

If this doesn’t work then you could try the loopback test as here on the wiki.

As usual, big thanks dave. I now see the entities and devices in home assistant.
Now that the working week started again, I dont know when I will have time to look into the details, but it seems the connection is established. Amazing :slight_smile:

I have just moved into a new house that has the Visonic Powermax Complete and I will be trying to get this working over the coming weeks. Just a few questions. I intend on using an ESP, but can I just use a D1 mini? Or does it need to be D1 R2? I have a number of D1 Minis used in other projects and was hoping I wouldn’t have to buy anything new.

With regards to installing ESPHome on the D1 can I not just use ESPHome within HA to compile the yaml for me rather than having to install it all via a PC? I am not really sure what the difference is with the methods.

Give it a try, it should work with it OK, assuming you can get ESPHome on it with all the libraries it needs (but I’m certainly not a Wemos or ESPHome expert). I used a D1 R2 for the reasons I put on the wiki here, but give it a go on the D1 mini. The only concern I might have is the strength of the wifi signal from a D1 mini, but use whatever works for you.

I’m not sure either but I think it should work, the problem you might have is including the stream_server.h and .cpp files.

So I managed to compile the code using Esphome add-on on my HA instance. All I needed to do was create a blank config and then paste in your visonic.yaml code, migrate and modify the entries over to my secrets.yaml and finally move the .h and .cpp files into the config/esphome directory on my HA instance.

Downloaded the .bin file and flashed it to the ESP using espflasher. Haven’t connected it to the unit yet the R2 has the advantage of 12v, so will need to step down the voltage, but at least the flashing worked successfully.

I saw people above had issues with connection when they didnt connect the ground wire, is that only if you are powering it from its own power source or even if you are taking 12v from the alarm panel itself?

Will report back if I get it connected and working, I should prioritise unpacking before automations :smiley:

That’s pretty much why I suggest using it, especially for its cost it makes life much easier. The alternative is buying or building a voltage regulator to 5v or 3.3v. I think I read somewhere that it makes the wifi signal stronger as well.

If you are using power from inside the panel e.g. the 12v DC stepped down to 5v DC (or using a D1 R2 from the 12v DC) then you only need to connect the Rx and Tx to the PC/IP connector, as they already share a common Gnd.

If you are powering the device from a separate power source e.g. USB plugged in to a mains outlet then you need to connect Rx, Tx and Gnd. The Gnd needs connecting to share a common voltage reference. Do not connect the 2 Vcc together or you will likely destroy one or the other devices.

Haha yes, get your priorities right :grinning:

Hi Dave,
I finally got around to update everything and my motion sensor is finally correctly registered as a motion sensor (and not as a magnet sensor anymore).
Thanks a lot !

Hi @davesmeghead , thanks for your work.
I’ve been wanting to make your plugin work but without success.
I have a Powermax+ alarm panel (I don’t know the model)
initially I had connected the panel with the RS232 kit + usb to rs232 converter that I used with the pooermaster+windows 10 software and it worked correctly.
I installed your plugin and it seemed that the integration worked, it detected 31 devices and 46 entities, even the arming and disarming panel came out but the arming and disarming did not work, it told me unknown status.
I read all the parts of the wiki and configure according to the wiki’s recommendations
I thought then that the error would be the rs232+usb to rs232 converter kit
I bought a new usb to TTL cable and plugged it in, tried visonic softwre on windows and all ok, even faster.
I restarted the entire plugin and the integration and it detected the sensors but the arming and disarming panel no longer came out and the panel marked an unknown status.
This is the log at that time:
log1
There was an HA update today and this is the post log:
log2
I have deleted everything again and started from scratch and this is the log:
log3
I would appreciate it if you would review the logs to see if you can see what is the reason that it does not work.

Greetings.
Jon

Hi, I’m sorry but I must have missed your post somehow.

You have a really early PowerMax+, I know this from this in the log file:
PowerMax+ , Model=6

The Windows software only downloads and uploads the EPROM from and to the panel, it does not interact with the panel in the way that this integration does. On starting up, this integration also downloads the EPROM.

I’ve had a look through all 3 log files. A PowerMax+ model 6 is the oldest panel that I’ve seen, I mention this because it has some problems interacting with this integration.

In all 3 log files it eventually downloaded the EPROM from the panel to decode the devices. So that is what you see. I say eventually as it had a few problems.

There are a few entries like this in the log files:
Not valid packet, CRC failed, may be ongoing and not final 0A
This means that the data from the panel is incorrect, this is likely to be the early software in the panel for your model 6 I’m afraid.

Have you tried your old RS232 hardware? I ask because the data is being corrupted. This could be because of the new cable or simply because you have an older panel and there may be bugs in the software.
Can you install Home Assistant and this integration on your Windows 10 PC to try the old hardware?

You need to manually enroll powerlink from your panel, within 2 or 3 minutes of starting HomeAssistant but after the EPROM download has complete i.e. when you see the sensors appear in Home Assistant.

Hope this helps :slight_smile:

I had a “funny” bug last week during the transition from winter time to summer time:

2022-03-27 01:59:42 DEBUG (MainThread) [custom_components.visonic.pyvisonic]    Model PowerMax Pro Part      PowerMaster No                     LastEvent Armement Partiel / User 01     Ready   Yes          
2022-03-27 01:59:42 DEBUG (MainThread) [custom_components.visonic.pyvisonic]    Mode  Powerlink              Status      Armé Partiel           Armed     Yes                    Trouble None              AlarmStatus None        
2022-03-27 01:59:42 DEBUG (MainThread) [custom_components.visonic.pyvisonic] ==============================================================================================================
2022-03-27 01:59:42 DEBUG (MainThread) [custom_components.visonic.pyvisonic] [sendPdu] Sending Command (Ack Long)    raw data 0d 02 43 ba 0a    waiting for message response []
2022-03-27 01:59:42 DEBUG (MainThread) [custom_components.visonic.client] No Code Required as powerlink or std plus ********
2022-03-27 03:00:00 ERROR (MainThread) [custom_components.visonic.pyvisonic] [Controller] Visonic Plugin has suspended all operations, there is a problem with the communication with the panel (i.e. data has not been received from the panel in 600 seconds)
2022-03-27 03:00:00 DEBUG (MainThread) [custom_components.visonic.client] Visonic update event 10 {'condition': 10}
2022-03-27 03:00:00 DEBUG (MainThread) [custom_components.visonic.client] No Code Required as code set in config

It seems that the interface didn’t like the hours suddenly changing :wink:
Home Assistant was working correctly and the Visonic Panel was also working correctly (as I loudly found out as the automatic deactivation of the alarm from HA didn’t work).

I am using version 0.6.16.0 with HA 2022.2.9

This is an easy one as I had the same indication.
The clue is in the bracketed text in the log file that I output from the integration

If no data has been received from the panel in 10 minutes (or more) then I assume an error has happened. When the clocks go forward, the operating system reports the new time and the integration thinks it’s been an hour since data was received from the panel.

So now on to what to do about it:

  • Remove the check in the code … I’d rather keep the check as I’ve had the occasion when it’s stopped and HA has notified me (although this was a long time ago when I used a wifi connection)
  • Set the check in the code to be 65 minutes, that should be enough but this seems too long to wait if there really has been a problem with the panel
  • Try and determine when the clocks go forward and compensate for it in some way

I’m currently wondering how to do the last one :slight_smile:

Using local time for processing always lead to issues it seems…
Perhaps there is a way to work internally only with UTC timestamp or Unix timestamp ?
To convert exactly from local time to UTC time, you can use pytz with is_dst=None (pytz - World Timezone Definitions for Python — pytz 2014.10 documentation) but for that you need the exact local time with the timezone specified: 2022-04-05 21:47:00+01:00 (and not only 2022-04-05 21:47:00).

Hi Everyone,

I’ve just released version 0.7.0.2 to github.
This minor release takes account of time changes when the clocks change twice per year (in some countries across the world). There are now 2 times used within the integration, UTC time is used for interval timing and local time is used for time-stamping zone and siren times. This ensures that interval timing cannot be corrupted by the local time suddenly changing (twice per year).

There are also 2 further minor changes.

  • The service calls have been updated but there’s no API or functional change.
  • The manifest, hacs and readme files have been updated.

The minimum Home Assistant version is now 2022.3.3

After googling I think I’ve got it sorted although we’ll see whether it works for everyone the next time the clocks change. For local time I continue to use the same python call datatime.now(), for UTC time I call datetime.utcnow(). I have split the use in the pyvisonic.py panel interface file.
:slight_smile:

1 Like