Visonic Powermax and Powermaster Component

So that’s good news and bad news but I’m going to need more information. At the moment you have the logfile settings set to critical which means that very little information gets sent to the file. I need you to set it to put debug data in the log file from the visonic plugin. Can you set your logger as I suggested yesterday, this will put much more information in the log file.
The 2 problems are:

  1. It stays in download. Can you set force_standard to ‘no’ and send me the log file
  2. It won’t arm. Can you set force_standard to ‘yes’ and send me the log file

So I’d like the 2 log files please.

Oh yes, and try setting my visonic debug to ‘no’ as it may conflict with the log file output

Ok got my usr-tcp232-e2, and its working in standard mode.

visonic:
  device:
    type: ethernet
    host: '192.168.2.40'
    port: 23
  motion_off: 120
  language: 'EN'
  debug: 'yes'
  force_standard: 'no'
  sync_time: 'yes'
  allow_remote_arm: 'yes'
  allow_remote_disarm: 'yes'

So i get the status of the sensors correctly, but no powerlink mode. I can see the panel status, but no further info (like model etc…), which makes sense in standard mode. Furthermore, i can disarm, but not arm the panel. Do i need to set the master installer code somewhere? What does the override code do exactly? My download codes are standard, only panel master installer mode is changed.

I was under the assumption the Powermax pro panel only auto enrolls powerlink after closing the panel or rebooting it, would this influence the mode? I guess the component only tries to engae a certain mode only when it initializes? Or does it keep trying?

But…I’m already happy with these results :), seeing my panel and sensor status already a big win :).

Few more things though (I know its still work in progress):

Standard sensor status is “-”, maybe "normal/closed or "no motion (for PIRs) would be easier?

Whats the differende between triggered and “O” for opened. How long does a sensor stay triggered, before it get the status O after opening a door?

btw:

this is the error i get:

2018-07-21 15:18:44 INFO (MainThread) [custom_components.pyvisonic] [Startup]   count is 1
2018-07-21 15:18:44 INFO (MainThread) [custom_components.pyvisonic] [Start_Download] Starting download mode
2018-07-21 15:18:44 INFO (MainThread) [custom_components.pyvisonic] [QueueMessage] Start Download Mode
2018-07-21 15:18:44 INFO (MainThread) [custom_components.pyvisonic] [pmSendPdu] Sending Command (Start Download Mode)    raw data 0d 24 00 00 56 50 00 00 00 00 00 00 35 0a 
2018-07-21 15:18:45 INFO (MainThread) [custom_components.pyvisonic] [pmSendPdu] Sending Command (Ack)    raw data 0d 02 fd 0a 
2018-07-21 15:18:45 INFO (MainThread) [custom_components.pyvisonic] [handle_msgtype08] Access Denied  len 0 data 
2018-07-21 15:18:45 INFO (MainThread) [custom_components.pyvisonic] [handle_msgtypeAB]  data 0a 00 01 00 00 00 00 00 00 00 43 
2018-07-21 15:18:45 INFO (MainThread) [custom_components.pyvisonic] [pmSendPdu] Sending Command (Ack Long)    raw data 0d 02 43 ba 0a 
2018-07-21 15:18:45 INFO (MainThread) [custom_components.pyvisonic] [handle_msgtypeAB] PowerLink most likely wants to auto-enroll, only doing auto enroll once
2018-07-21 15:18:46 INFO (MainThread) [custom_components.pyvisonic] [SendMsg_ENROLL]  download pin will be 56 50 
2018-07-21 15:18:46 INFO (MainThread) [custom_components.pyvisonic] [QueueMessage] Auto-Enroll of the PowerMax/Master
2018-07-21 15:18:46 INFO (MainThread) [custom_components.pyvisonic] [pmSendPdu] Sending Command (Auto-Enroll of the PowerMax/Master)    raw data 0d ab 0a 00 00 56 50 00 00 00 00 00 43 60 0a 
2018-07-21 15:18:46 INFO (MainThread) [custom_components.pyvisonic] [Start_Download] Starting download mode
2018-07-21 15:18:46 INFO (MainThread) [custom_components.pyvisonic] [QueueMessage] Start Download Mode
2018-07-21 15:18:46 INFO (MainThread) [homeassistant.setup] Setting up discovery
2018-07-21 15:18:46 INFO (MainThread) [homeassistant.setup] Setup of domain discovery took 0.0 seconds.
2018-07-21 15:18:46 INFO (MainThread) [homeassistant.core] Bus:Handling <Event component_loaded[L]: component=discovery>
2018-07-21 15:18:47 INFO (MainThread) [custom_components.pyvisonic] [pmSendPdu] Sending Command (Start Download Mode)    raw data 0d 24 00 00 56 50 00 00 00 00 00 00 35 0a 
2018-07-21 15:18:47 INFO (MainThread) [custom_components.pyvisonic] [pmSendPdu] Sending Command (Ack)    raw data 0d 02 fd 0a 
2018-07-21 15:18:47 INFO (MainThread) [custom_components.pyvisonic] [handle_msgtype08] Access Denied  len 0 data 
2018-07-21 15:18:47 INFO (MainThread) [custom_components.pyvisonic] [handle_msgtypeAB]  data 0a 00 01 00 00 00 00 00 00 00 43 
2018-07-21 15:18:47 INFO (MainThread) [custom_components.pyvisonic] [pmSendPdu] Sending Command (Ack Long)    raw data 0d 02 43 ba 0a 
2018-07-21 15:18:47 INFO (MainThread) [custom_components.pyvisonic] [Startup] Trying to initialise panel
2018-07-21 15:18:47 INFO (MainThread) [custom_components.pyvisonic] [QueueMessage] Exit
2018-07-21 15:18:48 INFO (MainThread) [custom_components.pyvisonic] [QueueMessage] Stop
2018-07-21 15:18:48 INFO (MainThread) [custom_components.pyvisonic] [pmSendPdu] Sending Command (Exit)    raw data 0d 0f f0 0a 
2018-07-21 15:18:49 INFO (MainThread) [custom_components.pyvisonic] [pmSendPdu] Sending Command (Stop)    raw data 0d 0b f4 0a 
2018-07-21 15:18:49 INFO (MainThread) [custom_components.pyvisonic] [QueueMessage] Initializing PowerMax/Master PowerLink Connection
2018-07-21 15:18:50 INFO (MainThread) [custom_components.pyvisonic] [pmSendPdu] Sending Command (Initializing PowerMax/Master PowerLink Connection)    raw data 0d ab 0a 00 01 00 00 00 00 00 00 00 43 06 0a 

Guess there’s indeed something going on with the autoenroll feature.

From your comments and observations I’ve made a couple of changes to the code and also updated the description and instructions on Github here
See the troubleshooting section at the bottom of the page and try a “Full Restart Sequence for Powerlink”.

The panel will only auto enroll with a new powerlink code after a full restart sequence. Once it connects in powerlink, then the code I use is registered with the panel and it then gets easier. You can then stop and start HA and it connects more reliably to the panel, but still not 100% (again see the troubleshooting section)

It seems that for your first go it’s not too bad.

I specifically set ‘-’ as the default state for the sensors as that doesn’t attract my attention when I see it. If you need it to be something different then you could use a text template to change it.
‘T’ is used for trigger. It is used for all panel sensors.
‘O’ is used for open and should only be used for door and window (magnetic) sensors. Initially the sensor will show Triggered ‘T’ and then if left open will change to ‘O’.

A sensor stays triggered as long as the panel says it is.

Could you follow the “logger” instructions in the troubleshooting and send me your log file, it’s the only way that I can work out what’s going on.

Edit: The fact that you are getting multiple “[handle_msgtype08] Access Denied” makes me think that it’s trying to register my powerlink code and failing (it already has a different powerlink code and is refusing my powerlink connection).

I will test the new update you have done.
I have done as you asked for and attached the two log-files.force-standard yes.yaml (154.3 KB)
force-standard no.yaml (160.5 KB)

I’ve looked at your 2 log files and the’ve been very helpful.

In the “yes” log file, I have a confession, I had left some of my test code (as I use it in Powerlink it accidentally didn’t get put back to how it should be). As you said, disarm seemed to work but not arm, it should now.

In the “no” log file, it is trying to decode the panel download and causing an exception. It looks like you have phone numbers in your panel and I don’t so it’s the first time that code was run. I have commented out the phone number decoding python code for now but if we get it working I would like to put it back and ask you to try it. I think it’s more important at the moment to get it working though.

Thankyou for helping with the 2 log files, I’ve uploaded alpha version 0.0.3 to github

Now I have updated to latest version. I am still running in standard mode (else i don’t see any sensors). I have tested arm and disarm and it seems to work fine :slight_smile:
But in standard mode most of the information of the Panel says “unknown”

So Standard mode seems to be working as that is what I would expect.

There are 2 main benefits of Powerlink mode, you get to see all the information instead of “Unknown” and it automatically gets the user codes to arm and disarm the panel without you typing it in each time (but you could use the override_code in the configuration.yaml file).

Can you try powerlink again (force_standard set to ‘no’) and send me the log file please.

Something has happend. This time when I set force standard to “no” the sensors was there after reboot. I can arm/disarm and I can see when a sensor is trigged.
And I have the status for the Panel. I attach the log-file.force standard yes new.log.yaml (562.7 KB)

Ok, tried a panel reset (with your exact procedure) a few times: it refuses to go into Powerlink mode. See attacted some logs.

I have an internal GSM module in the panel as well, also tried removing that, but always the same results.

However, standard mode is quite stable: I think I rebooted HA around 25 times already, and every times it works like a charme. So even when i only get standard mode, I’m already satified. What would actually be the main advantage of Powerlink mode, besides the auto code downloading and more Panel info?

About standard mode:

Without using the override code (which I’m not fond of, because of the clear text code in my config), i’ve noticed the following:

  • I can only use disarm (with entering a code);
  • I cannot arm, because i dont see/get a panel to enter the code (like with disarm)

When using the override code:

  • I can arm and disarm, without a panel (makes sense)
  • When using “arm home” I can also immediatly disarm again with a button
  • When using “arm away” I cannot immedialty disarm again: I have to wait for the " walk-out delay" to pass. Only then i can use disarm again. Really weird.

And finally one more question:

What does the “motion_off” do?
In your readme it states:

‘motion_off’ is in seconds, it is the time to keep the zone trigger True after it is triggered. There will not be another trigger for that sensor within this time period.

But isn’t this something the panel/sensor itself decides? I know the visonic PIRS go into sleep mode until no motion is seen for about 120 seconds (or maybe even longer). Only after not seeing any motionfor this timer the PIR will send a new triggered status. Or is this something else?

Overal I’m very happy whith this component!!! Keep up the good work.

ps: rename the XML logfile to txt or log: the forum doesnt accept .log or .txt

home-assistant_visonic.xml (322.0 KB)

1 Like

hypernative: From looking at your screengrab and the log file it has gone in to powerlink mode :grinning:

If you look through the log file you’ll see this about every 30 seconds from the panel:

It shows that the panel is sending “Powerlink Alive” messages, that is confirmation that the panel sees us as a powerlink device. The only thing that slightly concerns me is that my plugin doesn’t understand the code from the panel for the PanelName, it is “Unknown”. This is the detailed description of the panel type.

The panel sends updates using A5 and A7 messages and the sensors in HA are updated immediatelly, they do not wait for the next 30 seconds. This only prints them to the log file every time it receives the “Powerlink Alive”

When triggered is 1, then I put “T” in the sensor. When Status is 1, then I put “O” in the sensor. Essentially I only pass on the information that the panel tells me.

opaulzen: OK, I can see from your log file that I try to go in to powerlink mode 3 times and each time it returns “Access Denied”.

The procedure for each of the 3 times is like this:

  1. Try to download the EPROM data, the pin is ox5650 (or “VP” in ascii)
  2. Panel responds back with “Access Denied”. This is normal.
  3. Try to Auto-Enroll, the pin is again 0x5650
  4. What the panel would normally do is accept this and start powerlink enrollment. Yours doesn’t, if just sends back another “Access Denied”. Compare this with the log file from hypernative and you’ll see what I mean.

That is why you have 6 occurances of “Access Denied” in the log file.

I don’t really know what else to suggest. Perhaps as you’ve got (or had) another device connected then it has enrolled that as powerlink and refuses my connection.
However, I think the panel has some kind of tamper function that if you try to get powerlink too often then it refuses to cooperate. I have found this as part of my development with my alarm, if I leave it for 24 hours and try again it starts behaving normally again. That’s all I can suggest.

So now for your other questions:

What would actually be the main advantage of Powerlink mode, besides the auto code downloading and more Panel info?

As I said previously, 2 advantages of powerlink, you get to see all the information instead of “Unknown” and it downloads your user code from EPROM inside the panel so you don’t need to enter it.

Without using the override code (which I’m not fond of, because of the clear text code in my config)

I can understand you not wanting to include your panel user code in clear text.

I cannot arm, because i dont see/get a panel to enter the code (like with disarm)

Oh that’s new! My panel allows me to Arm the panel without entering/sending the user code. I do have a physical button on the front of my panel that does this too, maybe that is the difference. I only have to enter and send the user code for disarm. I can include a config parameter to set it to do either way!

Only then i can use disarm again. Really weird.

I agree but it’s part of the built in HA operation of the generic alarm function. I don’t think that I can alter that operation, but it’s something I can check on.

But isn’t this something the panel/sensor itself decides? I know the visonic PIRS go into sleep mode until no motion is seen for about 120 seconds (or maybe even longer). Only after not seeing any motionfor this timer the PIR will send a new triggered status. Or is this something else?

You are correct. Use “motion_off” if you want to sleep longer than the panel settings value in HA.
Edit: This will also affect the number of events that are sent within HA so be careful when setting it too low.

Overal I’m very happy whith this component!!! Keep up the good work

Thankyou for saying so, very kind of you.

And i’ve discovered the blockquote edit function for making replies like this…

Just thought I would add how I do my automations within HA using this plugin. Like this:

someautomations

I suggest you look at the States in the developer tools for more ideas.

I’ve just uploaded 0.0.4 to Github.

I’ve added a configuration setting arm_without_usercode and included phone number decoding again.

Please test and send me your log files again if you can please, it allows me to check things in more detail that my panel doesn’t do (such as smoke detectors for example).

Tnx! Works perfectly, i can arm now without using the override code…

I have never used a powerlink, but did try several other serial to usb/tcp solutions before that never worked…maybe that these solutions somehow registered a powerlink device.

I’m not really missing anything right now, so if i can’tt use Powerlink mode, so be it…I could still try a full panel reset (I think it is possible to do a hard reset using a jumper on the board), but I don’t really like the fact that I would need to relearn all sensors again. Mybe if I have some spare time :slight_smile:

btw:

Something else I noticed: The panel sometimes changes its state to “standby” without having disarmed or armed in between…I have noticed this in all states. This state lasts for about 2 minutes everytime.

Any idea?

I’m pleased it works now and that you’re OK with using it in Standard mode.

For Powerlink, I suggest you leave force_standard set to ‘no’. At some point in the future when you restart HA it might connect in powerlink. The only down side of doing this is that the components in HA will take about 4 minutes longer to appear while it tries to make the powerlink connection (for 3 times) and then reverts to standard anyway.

I’ve never seen “standby”, can you be more specific which parameter name is it exactly. The only way for me to look at this further is for you to upload a log file.

The standby mode is actually the panel status…so where it should be: “Armed”, “Disarmed”, its now “Standby”.

I’m not sure if i restarted HA at this point and that this status is related to the component initializing. I enabled the debug logs en will let it run for a while (hope the log wont get too big).

Yesterday evening I couldn’t arm or disarm the panel suddenly (resulting in my neighbours waking up because of the siren :)), I didn’t have time to troubleshoot or reboot, and this morning it was working again…really weird.

Lets see if the debugs can capture that situation again.

Edit: Ok, had the same issue again today. Coming home and the component won’t let me disarm…seems that once I open a door the panel goes to ‘unknown’ state (I guess in standard mode it doesn’t know the entry delay state, or it’s just not in the code). This removes the option to disarm the panel. So I can only arm or disarm when no triggers are active when armed.

Thank you so much!!!

This is what I was looking for! :))) I can’t test it until next week but… I assume that with the Powerlink2 will work, right? Or do I need the TCP adaptador linked in the Github?

So I can explain this one. It should only happen on startup and it is the default state of the generic alarm part of HA until I set it to something. I can’t set it to something (other than “standby” or “unknown” or something like that) until the visonic alarm has told me what it’s state is. When “force_standard” is “yes” it should only appear for a few seconds, when force_standard is “no” then it may be there for longer while it negotiates powerlink mode and then passes or fails. Does it appear without restarting HA? I can see that your panel is Armed Away, I wonder if that has something to do with it.

For the “seems that once I open a door the panel goes to ‘unknown’ state”, I need to check that as it is not something I’ve tested. I disable my alarm from outside before entering with a keyfob and only enter once disarmed.

I think the standby was indeed related to HA restarts, been playing with my config so I probably restarted a few time, but didn’t relate this to the standby status.

It makes sense to disarm and then enter, but the “disarm once an alarm is triggered”-feature is very handy if someone accidently (say my mother in law :P) forgets to disable the alarm and panics. In case of a false positive it also comes in handy.

I am used to entering and disarming after entering, because I never used the 2 way keyfob. I had to enter to hear the beep that the alarm was actually disabled.

I’ve just uploaded 0.0.5 to github.
The only change is that when the panel reports “entry delay” to me then I now set the generic panel status to pending state which should allow you to enter the disarm code (I’ve tried it twice and it worked but that’s not very well tested really) so give it a go please

1 Like