Visonic Powermax and Powermaster Component

It works.
I can remove and set the alarm to different users. As far as I understand log - this works in Powerlink mode.
How can I display the “Panel Last Event” information on the dashboard? For example, on the Lovelace UI panel?
https://pastebin.com/FFuYqyCY

You need to use a template. Something like this


- platform: template
  scan_interval: 3
  sensors:
      visonic_panel_last_event:
        value_template: >-
                    {{ state_attr('alarm_control_panel.visonic_alarm', 'Panel Last Event') | title}}
        friendly_name: 'Last Event' 

And then edit a panel in the front end and find it as a sensor.

If you get really good at it, you can replace “User 01” with your family names :wink:

:ok_hand: I need to deal with all this for a while. You helped me a lot. Thank!

Sorry for the late reply. I’ve armed and then disarmed using different keyfobs. Debug log:

https://pastebin.com/mAse6vSD

For some of the A7 messages that are sent from the PowerMaster panel I currently do not decode them as they seem malformed. Having said that, your log file helps me a lot and I have added some code to maybe, possibly, maybe decode that A7 message in a consistent way, certainly for the log file you have given me (maybe not for everyone yet).

I have uploaded 0.3.3.1 to github if you could give it a try and upload your log file again please.

To everyone else, if you have a PowerMaster 10 or 30 then you could do the same and upload your log file please, you need to:

  1. walk around and trigger PIR sensors (to test the B0 message decode). If you have HA on your phone or tablet then you can look at the status of the sensors as you trigger them. Please add this to your configuration.yaml visonic setting:
  b0_enable_motion_processing: 'yes'
  b0_min_time_between_triggers: 30
  b0_max_time_for_trigger_event: 5
  1. arm (home or away) and then disarm (to test the A7 message decode). You could also have a look at the “Panel Last Event” attribute and see if it gets set to what you think are the correct things when you arm and disarm the panel.

Thankyou in advance for doing this.

Thank you Dave for your work.

I can’t get the powermax pro in powerlink mode, the steps as described on github have been performed.
The following appears in the log file:

[Controller] Trigger Powerlink Attempt
[pmSendPdu] Resetting expected response counter, it got to 10 Response list before 0 after 1
[pmSendPdu] Sending Command (Auto-Enroll of the PowerMax/Master) raw data 0d ab 0a 00 00 24 86 00 00 00 00 00 43 5c 0a waiting for message response [‘0X2’]
[data receiver] msgType 0X2 got it so removed from list, list is now []
[data receiver] msgType 0X2 resetting expected response counter, it got up to 0
[handle_msgtype02] Ack Received data = 43
[handle_msgtype02] Received a powerlink acknowledge but I am in standard mode
[handle_msgtype02] and sending MSG_RESTORE
[pmSendPdu] Resetting expected response counter, it got to 0 Response list before 0 after 2
[pmSendPdu] Sending Command (Restore PowerMax/Master Connection) raw data 0d ab 06 00 00 00 00 00 00 00 00 00 43 0b 0a waiting for message response [‘0XA5’, ‘0X2’]
[data receiver] msgType 0X2 got it so removed from list, list is now [‘0XA5’]
[handle_msgtype02] Ack Received data = 43
[handle_msgtype02] Received a powerlink acknowledge but I am in standard mode
[Controller] Powerlink Counter 1

Does anyone know what caused this and how to solve it, thanks in advance.

I would need to see the whole log file from the beginning, can you upload to github and put a link here please.

Link to log https://pastebin.com/qy7Vikmy
If I wait long enough, the powermaster will fail. In standard mode there is no problem.

I know that you seem to be OK in standard mode but I noticed that you use the telnet port number 23, I’ve seen weird problems in the past where people have used port numbers less than 1024, especially the telnet port i.e. 23. Can you please try changing it to something high up, something like 24555.

So in the log file I see that it successfully downloads your EPROM settings, extracts the zone information and by line 265 it is in “Standard Plus” mode. By line 294 all the devices have been set up in HA correctly. So far, no problems.

At line 308 the powerlink attempt is sent to the panel but by line 317 (and 318) it’s got “XXX” at the start of the line and after that all communication breaks down. This is not something that I output and it may be a coincidence but it’s from there that things go wrong. Have you accidentally added these “XXX” characters as you’ve copied it to pastebin?

After line 318 the panel starts sending periodic timeout errors because it looks like my messages aren’t getting to the panel. That’s just weird. I also have a “keep alive” program loop that after 2 minutes performs a panel re-connect and that has not happened in your log file so this makes me believe that something has gone wrong with the comms to/from the panel. I’m not sure what’s going on so my first change would be to alter the port number and give it a try, please upload another log file to pastebin and I’ll take another look.

I have put the xxx in the log to indicate where the problem starts. The port has been changed to 24555, the problem is the same. The powermax finally indicates that there is a communication problem.
Url to log https://pastebin.com/kpGHvVSE

Hi,
I’ve just uploaded version 0.3.3.2 to Github with better timeout handling for when things don’t go as planned.
I have to admit that I cannot determine what is going wrong with your sequence but I’ve included better timeout responses when your panel stops sending me data. I also attempt to get to powerlink 4 times and then give up instead of trying forever, there are 3 minutes between attempts.
The only thing I can think of for you to try is a different download code, why have you chosen the one you have? The panel defaults to 5650, I just wondered if you had a reason to set it to 2486 in your config.

Let me know how you get on with 0.3.3.2, change the download code to 5650 (or something different to 2486) and upload another log file please.

Hi,

Thanks but unfortunately not a success. see log file https://pastebin.com/acMurJ5U
I also noticed that a number of sensors are not of the right type:

  • i=5 : ZTypeName=Interieur Chime=Uit SensorID=27 sensorTypeStr=[Gas] zoneName=[Living room] (sensorType must bee motion)
  • i=6 : ZTypeName=Interieur Chime=Uit SensorID=27 sensorTypeStr=[Gas] zoneName=[Kitchen] (sensorType must bee motion)

What might make it difficult is that I have a Nuon branded powermax. For now I only use the standard mode, this is also sufficient.
Thank you for your help so far.

Hi unreal,
Apologies for the delayed response, I’ve been away with work and although I could see the forum on my phone there’s no way I could analyse your log file until now.

I see that your panel type is a “PowerMax NUON key 4_17”. I haven’t come across this particular panel but it should be a panel that works with this Component.

I have a few observations that I have made when looking at your log file:

  1. Zone 9 is showing a low battery. Can you confirm it has a low battery, your panel may indicate this.
  2. Can you confirm that Zone 9 is a Smoke Detector?
  3. On lines 643, 850 in the log file, for Zone 7 I see that your Kitchen “Gas” sensor was triggered, if this were a motion sensor that would mean that there was motion in your kitchen at the time of you capturing the log file, could this be true?
  4. You do not need the OverrideCode in your Configuration file as we achieve what I call “Standard Plus”. This means we have downloaded the EPROM but not achieved a Powerlink connection with the Panel.
  5. I ask the panel to go in to Powerlink several times. Each time it responds with the first part of the sequence but does not send the second and last part of the sequence i.e. An “0xAB” message. There’s nothing else I can do, you may be stuck with “Standard Plus”, sorry.

For the “Gas” sensors as Zones 6 and 7, I assume that my code is correct but is there anyone else using this Component that actually has a Gas sensor and does it appear correctly in Home Assistant. Specifically, I’m trying to decide whether to alter line 731 in pyvisonic.py.
Unreal, you could alter it yourself temporarily, on line 731 change “Gas” to “Motion”, you’ll see what I mean if you take a look :slight_smile:

To anyone using this Component,
Do you have a Gas Sensor and does it appear correctly in Home Assistant?
Do you have a Smoke Sensor and does it appear correctly in Home Assistant?

Hello Dave,
No problem

  1. Zone 9 is showing a low battery. Can you confirm it has a low battery, your panel may indicate this.
    is right and solved.
  2. Can you confirm that Zone 9 is a Smoke Detector?
    yes
  3. On lines 643, 850 in the log file, for Zone 7 I see that your Kitchen “Gas” sensor was triggered, if this were a motion sensor that would mean that there was motion in your kitchen at the time of you capturing the log file, could this be true?
    is right
  4. You do not need the OverrideCode in your Configuration file as we achieve what I call “Standard Plus”. This means we have downloaded the EPROM but not achieved a Powerlink connection with the Panel.
    I deleted it, but “Standard plus” does not work anymore, unlike a view versions ago.
  5. I ask the panel to go in to Powerlink several times. Each time it responds with the first part of the sequence but does not send the second and last part of the sequence i.e. An “0xAB” message. There’s nothing else I can do, you may be stuck with “Standard Plus”, sorry.
    I use the forced standard mode, no problem

For the “Gas” sensors as Zones 6 and 7, I assume that my code is correct but is there anyone else using this Component that actually has a Gas sensor and does it appear correctly in Home Assistant. Specifically, I’m trying to decide whether to alter line 731 in pyvisonic.py.

In forced standard mode de log shows:
Zone type for 6 is 0XC Interieur
Zone type for 7 is 0XC Interieur
I don’t know where 0xB comes from (Gas)

Thank you for your help

Can you please elaborate or maybe upload a log file to tell me why you think it isn’t working, that puzzles me.

The Zone Type and Sensor Type are 2 different things and you are mixing them here.

The Zone Type refers to how the panel uses that sensor in the zone, these are the Zone Types (in English, there are Dutch and French versions in the actual code):
“Non-Alarm”, “Emergency”, “Flood”, “Gas”, “Delay 1”, “Delay 2”, “Interior-Follow”, “Perimeter”, “Perimeter-Follow”, “24 Hours Silent”, “24 Hours Audible”, “Fire”, “Interior”, “Home Delay”, “Temperature”, “Outdoor”

The Sensor Type refers to what the actual sensor is, these are the Sensor Types:
“Vibration”, “Shock”, “Motion”, “Magnet”, “Smoke”, “Gas”, “Wired”
A PowerMaster can also have “Temperature” and “Camera”

The Sensor Type is only set from the EPROM i.e. “Standard Plus” and “Powerlink” modes

If you set ForceStandard then you will not get the Sensor Type at all.

And another thing
It is the Sensor Type that I use to set the HA device class. If it is in “Standard” mode then the Sensor Type is not set for each sensor and the device classes are set to the default.
It is the device class in HA that changes what the icon looks like and how it behaves in HA.
If you’re in “Standard” mode or you just need to override the device class then you can do this in your HA customization, for example:

    "binary_sensor.visonic_z07":
      friendly_name: 'Kitchen PIR'
      device_class: motion

So, in your case Z07 is coming out as a Gas sensor type, you can override it like the example above to make it appear in HA as a motion sensor type.
For a list of valid device classes look here

Just wanted to say a big thanks to @davesmeghead for this awesome component! It works flawlessly for me, using a USB-to-TTL-cable for 7€ connected to my Powermaster-10.

I get Powerlink mode quickly and I can finally ditch all my lousy 433Mhz magnetic sensors and use the alarm door sensors instead. Big thumbs up!

Hi Dave,

“Standard plus” does not work, after half an hour the panel is still in the downlaod mode. For the log file see https://pastebin.com/0B85H34a
Thank you for explaining how I can override a device class.

I’ve taken a look through and I’m really confused, your log file for this plugin starts at 19:24:27 and by 19:24:53 it says it’s in Standard Plus mode (line 280 in the log file)

[Process Settings] Entering Standard Plus Mode as we got the pin codes from the EPROM"

It’s downloaded the EPROM and confirms Standard Plus. It tries to get to Powerlink and fails.

Also, I notice throughout your log file:

[custom_components.visonic.alarm_control_panel] code format none as powerlink *****************************

This is HA getting the code status, this means that HA thinks it’s in Powerlink (it’s in Standard Plus but that’s another story, I should update the log file entry to “code format none as powerlink or standard plus”)

What makes you think it’s in Download Mode? If it were in Download Mode then the sensors wouldn’t work, do the sensors work in the HA Frontend?

Just to make sure, from the HA Frontend, can you go in to Developer Tools (it looks like a hammer), then select STATES. Find the entity “alarm_control_panel.visonic_alarm” and look at the attributes column (the 3rd column). Find the attribute called “Mode:” and tell me what it is set to.

D