Visonic Powermax and Powermaster Component

The error you are getting is an HA error, in that it can’t find the visonic python code.

I’m at a loss that something that should be so simple just isn’t. Can you check the indentation in the configuration.yaml file (although your screenshot looks OK) and in notepad++ check that there are no rogue characters in there.

Can you also check that you have installed the python libraries that visonic uses as indicated on the github page. Also remember that if you run HA in something like docker (like I do) then you need to install these libraries inside the docker image.

You could also get more debug info that might give you more of a clue by setting “default: debug” for the logger component in your configuration.yaml file, but this could make your home-assistant.log file really big so don’t leave it like this.

Other things, like is you version of python and HA up to date? Also the custom_components folder must be in the HA configuration directory (where all the yaml files reside)

Let me know if you get more info and I will keep looking in to the problem

Mhh…I’m running Hassio right now, so no possibility to install python libraries. I am assuming that Hassio itself will install the required libraries on its own, when it sees the component needs them, correct?

1 Like

Ah that helps. I haven’t included the “Requirements” statement in the plugin yet as I was still testing it, it does say that on the web site :wink:

If you want to try it, without me altering it and uploading to github, add this in the visonic.py the one in custom_components. Anywhere near the top should do it.

REQUIREMENTS = [‘pyserial’, ‘pyserial_asyncio’, ‘datetime’]

I installed Hass.io again and installed the addon again. With the requirement line there is no errors. I can see there is some kind of communication to my Powermax Complete, beause the panel says OK instead of communication fail. But I am m not able to arm/disarm, nothing happends when I press the buttons in the addon. How can I check next thing?

I’m assuming that you’ve connected to your panel successfully, do you get the sensors showing up in the HA frontend and a switch showing the internal alarm parameters when you click on it? I’m also assuming that you still have allow_remote_arm set to yes?

It should look something like mine here…
alarmstuff1

The “T” on Zone 3 shows that it’s been tripped. I assume that when you click on the left most icon you get a dialog box asking you to arm home or arm away? Is this what you are doing?

Are you connecting in powerlink mode?
Have you looked at your home-assistant.log and search for visonic, is there anything that can give a clue as to what is happening?

In your configuration.yaml file in the visonic bit you could try overriding the pin code by adding this override_code: ‘1234’ # your panel user code

Let me know and if anything looks suspicious in the log file then copy the segment here

Also, you could try setting these in your configuration.yaml file. This will print lots of visonic related debug data in to your log file so don’t leave them like this permanently but it will let me know what is happening.

alarmstuff2

Most of the other log file entries will be “critical” only so most of it will be visonic related. You can set each one to “debug”, “info” or “critical”

It says “disconnected” for the switch “Visonic Alarm” there is no door/motion sensors showing up either.
I still have allow_remote_arm set to yes and I have set override_code: ‘XXXX’. But somehow it identifies my Visonic Panel:

Can this help? (logger in configuration.yaml for hass.io needs another type of setup)
Error doing job: Exception in callback <bound method SerialTransport._read_ready of SerialTransport(<uvloop.Loop running=True closed=False debug=False>, <custom_components.pyvisonic.VisonicProtocol object at 0x7f8daf7898>, Serial<id=0x7f8d9b54a8, open=True>(port=’/dev/ttyUSB0’, baudrate=9600, bytesize=8, parity=‘N’, stopbits=1, timeout=0, xonxoff=False, rtscts=False, dsrdtr=False))>
08:55 custom_components/pyvisonic.py (ERROR)

I changed to force_standard: ‘yes’ and now I can see my sensors. If I change it back to ‘no’ the sensors is not displaying.

I still can’t arm away/disarm and the information says “unknown” for Model - Should say “Powermax Complete Part” as above pic.

(Note I am using serial connection)

OK, so I can see that the Mode is “Download”. Does it ever change from Download? It should either go to Powerlink or Standard. When you force it to Standard then the Mode will go straight to “Standard”. When you force Standard or it goes in to Standard after failing to get in to Powerlink, then you get very little information from the panel. That is why in Standard you do not get the model name etc.

When you force Standard and you can see your sensors, do the sensors trigger “T” or change to open “O” as they are triggered?

When in Standard Mode, if you click on the left most sensor (Visonic Alarm) as in my screen grab earlier with “Disarm” and a bell icon, I assume that is what you are using to try to arm/disarm?
Like this
alarmstuff3

As a final thought, I would need the home-assistant.log file information to get much further, I’m more than willing to take a look through if you could upload it, even just the starting fragment is it’s too large (or you can zip it).

I forgot to ask you, are you connecting using Ethernet or USB/RS232?
By the exception you stated in your earlier post, it looks like USB/RS232. This is not something that has been tested much, although it should work the same way as my Ethernet, just through a different device.

No it dosen’t change from Download. Only when I set force_standard to ‘yes’ the mode says Standard (of course)

When I change back to force_standard to ‘no’ then it says Download forever.

In standard mode (when I see my sensors) I have tested now and if I open my front door for example the sensor is tripped.

Correct I try to Arm Away as in same picture as you are in, but nothing happend except a message says alarm_arm_away called.

I am using USB/RS232. (My USB to Serial-adapter (FTDI-chipet) worked fine in Openhab visonic addon, and also earlier with Visonic addon in Vera Edge).

(I had to change the file from .log to .yaml for upload)
I add the log file. Really appreciate your support/development!
home-assistant.yaml (2.9 KB)

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