Visonic Powermax and Powermaster Integration

Can’t wait. :slight_smile:

No issue. It’s not a priority for me.

Yes, of course.

My setup is Powermax complete using an ESP32 (esp-link), every now & again the panel reports ‘BBA Comms Lost’ which causes the panel to beep twice (which freaks my dog out for some reason - she’s a rescue). My solution is to restart HA which works just fine.

Is there a way I can setup an automation within HA that somehow detects if the panel is not reachabel & restarts HA (or the integration preferably) ?

Would monitoring [alarm_control_panel.visonic_alarm] ‘Panel Alarm Status’ attribute work - looking for status ‘unknown’?

The best way to do this is based on the HA Event that the integration creates on disconnection, see here for more details, probably something based on this event “visonic_alarm_panel_state_update”. Then set the Action to reload the integration.

I have not tested the following but something like this

trigger:
  - platform: event
    event_type: visonic_alarm_panel_state_update
condition:
  - condition: template
    value_template: >
      {{ trigger.event.data['action'] == 'connection' and  trigger.event.data['state'] == 'disconnected' }}
action:
  - service: homeassistant.reload_config_entry
    target:
      entity_id: alarm_control_panel.visonic_alarm
    data: {}
1 Like

I have uploaded a development build to the dev release. To use it please go to Github here:

This is not a production release

After you have followed the link, or selected the dev tree on Github.
Select “code” and “download zip”,

This will give you a zip file “visonic-dev.zip”.
I suggest that you backup the existing “visonic” files in the custom_components directory, delete the content of that directory and unzip the visonic directory from this zip file. Remember to restart Home Assistant.

I have made significant changes to the code since last year’s release, some parts have been re-written completely.

These changes have been made to:

  • Make it more robust
  • Make it more maintainable
  • Get ready for additional features coming over the next few months, particularly for PowerMaster panels

This current dev release includes:

  • Changes to the Home Assistant Service calls
  • Changes to the Home Assistant Events and the Event Data

Specifically for PowerMaster Panels, the changes in this dev release include:

  • The “Command” Home Assistant Service call includes Trigger, Mute, Emergency, Panic and Fire. These should trigger your alarm so test it at a time of the day that doesn’t annoy your neighbours.
  • It handles F4 Image messages from Camera Sensors (and doesn’t crash the integration). This data is not processed yet but I’m working on it.
  • The triggering of PIRs on PowerMaster panels should be more reliable, responsive and robust (but you still need to set 0 delay on the panel for each PIR sensor)
  • Sensors in the range Z33 to Z64 for PowerMaster30 Panels should now work properly

Overall, for all panel types:

  • I have added 2 Emulation Modes, “Minimal Interaction” and “Passive Monitor”. Please do not use these, they are there to support capabilities I have not yet included.
  • In the settings there is a selection to include EEPROM data in the Panel Attributes. This is a minor thing but it makes it a use choice.

As said above, this is a development release. Remember that I have re-written chunks of the code ready for future releases and as such changes have been made to the Event and Service Data. In other words your existing automations may no longer work and you’ll need to redo them.

The Integration update should be reversible, you should be able to delete the content of the visonic directory and put back the original version.

I’m currently working on the F4 message data from PowerMaster Camera sensors (e.g. Next CAM PG2) to be able to display the image in Home Assistant … wish me luck!

EDIT: Forgot to mention, if you report problems here in this forum (or issues on Github) with the dev release please make it clear to me that it’s the dev release and not the main release.

Thanks a lot for your sharing!

I’ve just made the update and I got this notification after the restart of HA:

Failed to connect into Visonic Alarm Panel 0. Check Your Network and the Configuration Settings.

Should I remove and add the integration?

You should not need to, it should reuse the settings but just in case then yes, please remove and add the integration and give it a try please.
It looks like you’ve given me the first issue to look at :slight_smile:

Hey!

Got my Powermaster 30 integrated with HA over USR ETH. Everything works fine I can arm disarm etc. Also my MC-303V PG2 sensor reports correctly without any delay opened or closed doors, but all my motion sensors are kind of dead and they never change their status. They are always CLEAR. I changed the settings in the control panel so they report even when alarm is disarmed and I can see zones are violated on the panel LCD. HA doesn’t see it. Is there anything I need to change to have motion reporting same as door reporting?

Hi again, there’s a couple of things. After you first configure the panel it determines that you have a PowerMaster panel. If you now go in to settings and configure the integration again you should see the B0 settings, tick these to enable them. It could also be the timeout for sensors, try reducing that to 10 or 15 seconds and see if this makes a difference.

If this doesn’t make any difference, and as you’ve changed your panel setting to make the delay zero for these PIRs there’s nothing more that the main release can do. After you do the above, if you want me to look at a log file then create / upload it as an issue on github and I’ll take a look.

Having said all that, I’ve made improvements to the PIR detection (and a few other things) in the dev release as described 3 or 4 posts ago in this thread here. If you’re able to install the integration manually by unzipping the files, and you’re willing to join in the debugging of the dev build then please give it a go. Although I do understand if you don’t want to do this, but the main release is what it is for PowerMaster PIRs.

EDIT: I also see that you have PIR Cameras, if these trigger an alarm they seem to automatically send image data to the integration (mimicing the powerlink hardware remember), these image messages currently crash the main integration. The dev integration fixes this. In fact I’m working on decoding these messages to actually create the image and show it in Home Assistant.

1 Like

I have just uploaded a new dev release, this should fix the serial connection for people who use USB/RS232

1 Like

I can confirm that the serial connection for USB/RS232 has been fixed. Thanks a lot!

Hi,

I’ve been using the integration for about about a year, and have had the odd occasional glitch where the panel reports ‘Powerlink Comms lost’ but wasn’t causing me a big issue so have not reported it.

However in the last 2 weeks it’s happened twice, so i’ve captured the logs and disabled the integration for now.

The log file can be found at Dropbox - home-assistant.10042024.log - Simplify your life

I was hoping if you could advise on what may be causing the issue?

Thanks in advance.

Hi, I can help you with what’s in the log file but I don’t know what’s happening in your system. I see that you are using Ethernet, is it a wifi connection?
I can also see that at 10:28:24.901 you reload the integration, that’s OK.

However, towards the end of the log file there are periods of time where the connection between the panel has stopped but has not be disconnected.

For example.
At time 15:51.23.602 the integration asks the panel to send its status. The panel doesn’t respond. The integration keeps asking the panel for it’s status (approx) every 10 seconds with no response until 15:53:53.786 when the panel responds.
So that’s 2.5 minutes with no responses from the panel.

There are a few (I didn’t count them) times like this in the log file where there are long periods of time that the panel doesn’t respond.

The integration pretends to be a Powerlink module and so the panel believes it has a Powerlink module connected. If the panel thinks that the Powerlink module has gone then it reports a “Powerlink Comms lost” warning. This is what is happening to you, as the interaction stops for a long period of time the panel thinks it has lost the Powerlink module.

So, if you are using wifi, is it possible that your router is restarting? although that would normally disconnect / terminate the connection completely. Is your wifi perhaps dropping packets for long periods of time?

Is there something that happened 2 weeks ago that changed your system?
Perhaps even a change in your house setup, a new wall or something that affects the wifi around the house?

I must admit that if you’re using a wired connection then I don’t have any clues apart from the router being the problem, or perhaps the hardware that you run Home Assistant on.

It’s strange that it stops sending data without disconnecting which implies that the connection is still kept alive but something is preventing the data getting through for periods of time.

If you can think of any other clues then please let me know.

EDIT: Just a couple of other observations, but not for the problem you’re having:

  1. Can you update the integration to the latest version
  2. I see that you have a PowerMaster 30, you haven’t changed the delay to 0 (zero) so the motion sensors work when the panel is disabled, see here on the wiki

Hi Dave, thanks for taking the time to respond, and apologies for my delayed response.

Firstly a little about my setup:

  • Panel: Powermaster 30.
  • Panel Connection: Wired ethernet using USR-TCP232-T2.
  • Home Assistant: Running in a VM on a Proxmox host.
  • Connectivity: Panel and Home Assistant are connected via same physical switch.
  • Motion Sensors: Set to ‘Not Active’ in disarmed mode.

Regarding the integration I’ll plan to get that upgraded. However in the meantime, after my last post, i restarted the integration in ‘Standard’ mode, and noticed that it has been stable other than the below in the log…

2024-04-14 20:04:21.248 DEBUG (MainThread) [custom_components.visonic.pyvisonic] [handle_msgtype02]    Received a powerlink acknowledge, I am in STANDARD mode
2024-04-14 20:04:26.817 DEBUG (MainThread) [custom_components.visonic.pyvisonic] [_processReceivedPacket] Received AB Message but we are in Standard Mode (ignoring message) 0d ab 03 00 1e 00 31 2e 34 30 00 00 43 2d 0a 
2024-04-14 20:04:26.818 DEBUG (MainThread) [custom_components.visonic.pyvisonic] [sendPdu] Sending Command (Ack)    raw data 0d 02 fd 0a    waiting for message response []
2024-04-14 20:04:51.262 DEBUG (MainThread) [custom_components.visonic.pyvisonic] [Controller] ****************************** WatchDog Timer Expired ********************************
2024-04-14 20:04:51.263 DEBUG (MainThread) [custom_components.visonic.pyvisonic] [Controller]               ******************* Trigger Restore Status *******************
2024-04-14 20:04:51.263 DEBUG (MainThread) [custom_components.visonic.client] Firing HA event, panel=1  event=9 {'condition': 9, 'action': 'timeoutactive'}
2024-04-14 20:04:51.263 INFO (MainThread) [custom_components.visonic.client] HA Notification: Communication Timeout - Watchdog Timeout, restoring panel connection
2024-04-14 20:04:51.263 DEBUG (MainThread) [custom_components.visonic.pyvisonic] [_clearList] Setting queue empty
2024-04-14 20:04:51.263 DEBUG (MainThread) [custom_components.visonic.pyvisonic] [Controller]               Watchdog counter array, current=3
2024-04-14 20:04:51.263 DEBUG (MainThread) [custom_components.visonic.pyvisonic] [Controller]                       [0, 85351, 85921, 86400, 0, 0, 0, 0, 0, 0]
2024-04-14 20:04:51.264 DEBUG (MainThread) [custom_components.visonic.pyvisonic] [sendPdu] Resetting expected response counter, it got to 0   Response list is now 2

My suspicions are that the issue maybe with the USR module or my panel rather than the host machine where home assistant runs, although i can test this my migrating the VM onto another host.

I’ll migrate the VM onto another host and re-enable powerlink mode to see what happens. It maybe a while before i report back.

In the meantime if you have any other thoughts based on the above, i’d appreciate the help.

Hi Dave. I have been following the work you have put together in hope that one day 360r will be supported.

I have found a work around 360r however it only allows me to change the alarm state and contact sensors. I really want motion sensors to work.

The dev does state that the app can do much more but its not coded and he seems to be away from git.

Is there anyone here who can help enable it? its in python?

Thanks in advance

This uses the REST API Server hosted by your home alarm system company and is not something that I’m currently supporting, for further information please see these issues on Github:
Visonic-Go app (a REST API) PowerMaster using a PowerLink 3 IP module · Issue #88 · davesmeghead/visonic (github.com)
Using this integration and the PowerLink module? · Issue #99 · davesmeghead/visonic (github.com)

The problem I see with using the REST API is that it simply isn’t fast enough (for me at least) to use the sensor triggers in Home Assistant, the sensor is triggered and then seconds later it comes through.
It may be something I add in future but no promises

Hi all.
As 3G/GSM is on the way out the door I’m trying to set up a HA - Visonic PowerMax Pro integration.
Things are working to some extent, like I have coms with the panel over the E2-module, I get a list of sensors/detectors, but…
I can not get the visuals correct in HA and I cannot arm/disarm via HA.
My pin is correct, but I’m unsure if this is a pin error only and how do I change the pin in the HA-config?

Logg says:

2024-04-24 13:57:34.710 DEBUG (MainThread) [custom_components.visonic.pyvisonic] [handle_msgtype02] Received a powerlink acknowledge, I am in STANDARD mode
2024-04-24 13:57:34.711 DEBUG (MainThread) [custom_components.visonic.pyvisonic] [handle_msgtype08] Access Denied len 1 data 43
2024-04-24 13:57:34.711 DEBUG (MainThread) [custom_components.visonic.pyvisonic] [handle_msgtype08] last command a1 00 00 05 00 00 00 00 00 00 00 43
2024-04-24 13:57:34.712 DEBUG (MainThread) [custom_components.visonic.pyvisonic] [handle_msgtype08] Attempt to send a command message to the panel that has been denied, wrong pin code used
2024-04-24 13:57:34.713 DEBUG (MainThread) [custom_components.visonic.client] Firing HA event, panel=0 event=5 {‘condition’: 5, ‘action’: ‘pinrejected’}
2024-04-24 13:57:35.498 DEBUG (MainThread) [custom_components.visonic.pyvisonic] [sendPdu] Resetting expected response counter, it got to 1 Response list is now 1
2024-04-24 13:57:35.501 DEBUG (MainThread) [custom_components.visonic.pyvisonic] [sendPdu] Sending Command (Get Bypass Status) raw data 0d a2 00 00 20 00 00 00 00 00 00 00 43 f9 0a waiting for message response [‘0XA5’]
2024-04-24 13:57:35.711 DEBUG (MainThread) [custom_components.visonic.pyvisonic] [handle_msgtype02] Ack Received data = 43
2024-04-24 13:57:35.712 DEBUG (MainThread) [custom_components.visonic.pyvisonic] [handle_msgtype02] Received a powerlink acknowledge, I am in STANDARD mode

I only have arm and disarm “buttons”, no sensor surfice in the visual panel.

Thankful for any pointers I can get!
Greg

Hi,
You haven’t given me much to work on here, only a few lines of the log file and to help more then I’ll need a complete log file.

From what I can see you are in standard mode. If you want to try to get to Powerlink then I’ll need a full log file to look at. However, as you have a PMax Pro then as defined here on the wiki you’ll need to manually enrol. Please try this first.

As you say that you only have arm and disarm buttons in the HA Frontend then that suggests you have already set the code override in the configuration, probably to the wrong value as its failing, it looks like you’ve set the override code to 0000. Edit the config and do one of:

  • Clear the override code, this should show the keypad
  • Set it to force the display of the keypad.
  • Set the override code to the user code of your panel

Hope you get a bit further with this info, give it a go :slight_smile: :grin:

EDIT: I seem to remember that the config settings for the integration keep a value when it shouldn’t so try clearing the override code first.
Also, the sensors do not automatically show in the frontend. You can find them using developer tools and states.

Good morning!
I realize the info was a bit scarce but I didn’t digg deep enough to find more logs.
Apprechiate your efforts!

And as a result; I re-onboarded my panel just to make sure of some details, like disable autoenroll and force pin.
Not really sure how I did on all of these details with powerlink, but as per now I can arm and disarm according to the settings: arm without code, disarm with code!

Where can I find the more extensive logfiles?

Thanks for the helping hand!
Greg

There aren’t more extensive log files, I only meant that I needed more than the few lines you gave me.
In HA go to “Developer Tools”, “States” and in “Filter Entities” type “visonic”. You should see all entities created by the integration.
Did you manually enrol to get Powerlink connectivity?

Ah, ok I see!
There are a few more lines, but what is relevant?

As for the enrollment, I forced (unticked Automatic).
Apparently it is in “Panel Mode: Standard”.
Can I set up powerlink mode now or must I re-enroll the panel?