Visonic Powermax and Powermaster Component

Thanks dave. I am thinking the message you have never seen could be my camera PIRs sending images after the activation.
I am thinking this because home assistant does see that the alarm has been triggered, just nothing else after that.

Hi

Big thanks to Dave for this component. Is there a way to get the temp and light data from the MP-802? Nothing coming through on either panel that i can see, think i need to update the PM10 to a later firmware to support the data.

PM10 19.109
PM360R 19.412

Not at the moment, sorry.
This may be part of the B0 messages that I do not decode yet as I do not know the structure. If you would be willing to upload a log file to pastebin I can take a look through and see if there are message that I haven’t seen before or maybe that could be decoded as temperature or light data.

Oh, so you have just followed the “tracks”, and soldered the wires to the right areas :-)?

image


Update

I’ve added all my notes, in this post. Feel free to request a edit, or so. However, I would like to add it to the wiki, instead. @davesmeghead - Could you provide me the right permissions on Github?.




Visonic connected to NodeMCU

Hardware

You’ll need:

  • A NodeMCU
  • Four wires

NodeMCU on AliExpress: NoceMCU board v. 0.1

Current Title of Product on AliExpress: ESP8266 CH340G CH340 G NodeMcu V3 Lua Wireless WIFI Module Connector Development Board Based ESP-12E Micro USB Repalce CP2102) - Search Link.

image

Pin layout

Picture of the Visonic PowerMax Pro (Mine is "Model type 6`)


Image credits: viknet from domoticaforum.eu

Visonic Pin Type
TP71 3.75V
TP29 GND
TP35 TX
TP33 RX

So, you’ll do the following from the Visonic PowerMax Pro (I’ve model type 6) to NodeMCU:

Visonic NodeMCU
3.75V 3.3V
GND G
TX RX
RX TX


And, if you’re planning to soldering it to the mainboard, you should do the following wirering:

Visonic NodeMCU
TP71 3.3V
TP29 G
TP35 RX
TP33 TX

Firmware on esp-link

As speaking, esp-link recommend to use version 3.0.14. You can find the latest release here, and 3.0.14 here. A direct download-link to the firmwarepackage version 3.0.14 is here.

You’ll need a software, to flash the firmware. I recommend using esptool, cause it’s easy to use. If you prefer a GUI, take at look at this page.

esptool can be installed from pypi via pip:

pip install esptool

There’s also more information about Serial Port, and so, on the esptool GitHub-page.

Flashing esp-link is easy with esptool, and you’ll find all relevant information here.

Find the current flash-size, with:

> sudo esptool.py --port /dev/ttyUSB0 flash_id
esptool.py v2.8
Serial port /dev/ttyUSB0
Connecting....
Detecting chip type... ESP8266
Chip is ESP8266EX
Features: WiFi
Crystal is 26MHz
MAC: rr:ee:mm:oo:vv:ed
Uploading stub...
Running stub...
Stub running...
Manufacturer: 1c
Device: 3016
Detected flash size: 4MB
Hard resetting via RTS pin..

Now, extract the firmware package file, and cd to the extracted folder.

And now run the following command:

> sudo esptool.py --port /dev/ttyUSB0 --baud 230400 write_flash -fs 4MB -ff 80m \
0x00000 boot_v1.6.bin 0x1000 user1.bin \
0x3FC000 esp_init_data_default.bin 0x3FE000 blank.bin

_If it’s reporting that boot_v1.* is missing, try correct it to the right version. If you can’t find the four files in your folder, you properly downloaded the release from Github, instead of downloading the firmwarepackage version 3.0.14 (If the link is down, check Github and see if you can spot a fresh one)

Setup esp-link

You’ll find a new hotspot, with esp-link. Connect to it, and setup Wifi.

Also, diable all pins, which aren’t in use.

Go to µC Console and change baud to 9600 - Or, whatever needed.

My alarm use baud 9600, but check the GitHub Readme-file, if you’re unsecure:

Baud rate

Different panel firmware versions uses different baudrates. This needs to be set in either the Ethernet/RS232 connection or the USB/RS232 connection. I believe that these are: 17.133 and below - baudrate is 9600 18.XXX and above - baudrate is 38400

Configuration to Home Assistant

You should now be able to see details on the µC Console-page:

Adding Visonic to Home Assistant, can be done with the following configuration to configuration.yaml:

#*# *# #* #* *# *# #* #* *# *# #* #* 
#                      Visonict                #
#*# *# #* #* *# *# #* #* *# *# #* #* 
# https://github.com/davesmeghead/visonic - Alarm

visonic:
  device:
    type: ethernet
    host: !secret visonic_ip
    port: !secret visonic_port
  motion_off: 120
  language: 'EN'
  sync_time: 'yes'
  allow_remote_arm: 'yes'
  allow_remote_disarm: 'yes'
  exclude_x10: [1]
  force_numeric_keypad: 'yes'
#  force_standard: 'yes'
#  exclude_sensor: [2,3]
#  panellog_logentry_event: 'yes'
#  panellog_csv_add_title_row: 'yes'
#  panellog_xml_filename: 'panel_log.xml'
#  panellog_csv_filename: 'panel_log.csv'
#  panellog_complete_event: 'yes'
#  override_code: '1234'
#  download_code: '9876'
#  arm_without_usercode: 'yes'

Kindly note that i’m using secrets. You can replace !secret visonic_ip with the IP if you like to do so…

Tips, recommendations and other stuff

Static IP / IP Reservation**

I highly recommend you to define a Static IP-address on the esp-link device, or even better, defining the IP in your DHCP service (On most normal ISP routers, it’s called IP Reservation, or something like that).

Connect to the Serial device, on a Linux client

If you’re on Linux, and would like to connect to the serial output, it’s fairly straight forward.

Add the device with socat, and define the path (don’t forget to correct the IP):

sudo socat -d -d pty,link=/dev/ip1,raw,echo=0,waitslave tcp:192.168.1.123:23

And now connect a screen-session, to that path:

screen /dev/ip1 9600

Where 9600 is the baud-rate.

Flashing permission-error

You may not have the right permission on your system, to begin with. Normally it’s fairly to fix.

Try and Google your system name and something like /dev/ttyUSB0 permission, if you’re facing the problem.

After correcting the permissions (on some systems by adding your user to a specific group), it’s required to log out, and back in, for the changes to take in place.

1 Like

How have you configured esp-link? Should i do anything special?

With my old WeMos D1 it did work with data showing up in the µC Console, but nothing this time.

I’ve tried both D1 and D2 (as defined here), but also TX and RX on the NodeMCU.

Should i configure something in esp-link, too?


EDIT:

I’m not really sure about, what my main problem was. However, it’s now working.

I’ve used baud 9600, and the following pin assignment:
image

How do i pull the log from it?

I’ll get a temp probe so i can provide log with known variables this week.

Hi, I’ve got to be honest, I haven’t seen any data in anyone elses log files that could be temperature values or light data. Having said that I probably have not seen all messages yet that a PowerMaster panel can generate, so please just upload your log file, there’s no need to be that accurate with temp probes (yet :slight_smile:)

Set your log level to debug but just for the visonic component with the logger setting in HA like here

Then upload your HA log file to pastebin or dropbox and post a link here please.

EDIT: Forgot to mention, please add this to your config file for this component

      b0_enable_motion_processing: ‘yes’

It will enable the test B0 code that I have and will put the B0 messages in the log file.

Hello @davesmeghead,

Sorry for the delay, here is the log file:
https://pastebin.com/8QGcHJFy

I disconnected the ethernet cable to the ESR-TCP232-E2, waited a little, tried to arm the alarm and then reconnected the ethernet cable.
This results in an error (component is stopped) and no visual indication on the HA panel that anything is wrong.

After I restart Home Assistant (Configuration → Server Controls → Server management → RESTART), I cannot get to Powerlink mode anymore:
https://pastebin.com/SGhKxeV0

There is a permanent error displayed on the Visonic alarm (lost pwrlink com) and I even cannot manually arm the alarm anymore.
I have to deactivate and reactivate the Powerlink mode to clear the error.

Let me know if I can do anything else. Thanks

It does result in an error that you can use in HA though:
When communication is lost with the panel, 2 things happen:

  1. An event ‘alarm_panel_state_update’ is put on the HA event bus with condition set to 0 to show communication has failed. This detail is not in the readme on Github and I have corrected this.
  2. Within HA, the Component attempts to re-connect to the alarm panel, assuming that the interruption is temporary and tries to continue operating and re-sync with the panel. When it tries to re-connect, if you look at the attributes of the alarm_control_panel.visonic_alarm entity in HA you should find that Comm Exception Count has been incremented by 1 (it starts at 0).

It does not try to automatically re-connect again, it only tries once. This is by design.

You could take action in HA, given the information above, to call the service visonic.service_panel_reconnect. I have not included this in the readme formally yet as it was added a few months ago and the requester didn’t get back on here to confirm that it worked. If you try it then let me have some feedback :slight_smile:

I can only assume that this is the panel trying to protect itself, it is after all an intruder alarm panel!
In your second log file I can see that it achieves “Standard Plus” but every time it asks the panel to go to powerlink the panel refuses. It does this 4 times (look for “Trigger Powerlink Attempt” in the log file) and then gives up (log file “Giving up on Powerlink Attempts, going to one of the standard modes”).

EDIT: Forgot to say that it does tell you this in HA as well, the system message is set to “Défaut de communication / P-LINK”, you see this as the panel attribute Panel Last Event and the attribute Panel Trouble Status being set to “Communication”

Hi @davesmeghead,

I am not sure I understand : it only tries once to re-connect or several times ? Your point 2 above seems to imply that there are several attempts.

I tried to use the reconnect service and it works indeed: I managed to get back to Powerlink mode after the error (and after deactivating and activating again Powerlink on the alarm).

Hum that’s a real issue.
I thought that Home Assistant cannot interfere with the alarm behavior but here it seems that if Home Assistant is down (for any reason), it will put the Visonic alarm in a difficult state.

I’ll try to test by forcing the standard plus mode to see if the behavior is different in case we lose Home Assistant.
EDIT: oh there is no option to force the standard plus mode…

Thanks

Once only. if you use visonic.service_panel_reconnect and get further disconnections then the Comm Exception Count will continue to increase.

That’s good, thankyou for reporting that you can get it to work. You have the same panel as me so we could do with others testing that too :slight_smile:

This Component within HA mimics the Visonic Powerlink hardware, this is normally installed inside the panel and would not be able to have it’s communication severed in the same way that you are unplugging the ethernet. I can try to experiment with severing the ethernet connection on mine to see if I can improve the operation but it will be next weekend when I can try this.

You need to reset your panel when you have a lost of powerlink connection.

It used to happened often to me when i was using an esp32. When it is inside the panel the wifi coverage is very very poor and you often got connection loss even with the router next to the panel.

To reset your panel, just enter and leave the admin menu. Wait for ~ a minute then use the HA service to reload visonic integration.

The probability is low that the ethernet connection will be broken. I am more concerned about Home Assistant going down. Granted, it should not happened. But I would not like to be waken up by a loud siren because there is a hardware/software malfunction on the Home Assistant server…

If I understand correctly, this won’t happen in standard mode ?
It doesn’t seem that I am losing much by staying in standard mode (I don’t need the sensor type).

Thanks

Thanks for the tip ! I am somehow confused by the different ways to clear the alarm (sometimes you need to arm/disarm, sometimes you have to enter the install mode, etc.).

Hi, Have some trouble setting up my Powermaster 10 with my hass.io RPi4. I guess several of my questions have been answered already but I haven’t been able to find them by searching/skimming this thread and since I’m really new to electronics, alarmsystems and HA I guess could have read the solutions without understanding it.

I use the following cable


(description in english aswell). Right now I have only connected 3 wires: gnd (black), RX into USB port (white), and TX out of the USB port (green)
  1. Should I connect the red wire? feels wrong since it’s 5v?
  2. Does it mather that I didn’t ground to the pin indicated in the image?
  3. Have i connected TX and RX correctly?

1d3175efa75b8e49020ddfc7f9d17dced8848bb9

The panel shows up in HA but I only have a choice of disarming even though it’s already disarmed. and nothing happens when I disarm

My config looks as follows:

visonic:
  device:
    type: usb
    path: '/dev/ttyUSB0'
  motion_off: 120
  language: 'EN'
  force_standard: 'no'
  sync_time: 'yes'
  allow_remote_arm: 'yes'
  allow_remote_disarm: 'yes'
#  exclude_sensor: [2,3]
#  exclude_x10: [1]
#  panellog_logentry_event: 'yes'
#  panellog_csv_add_title_row: 'yes'
#  panellog_xml_filename: 'panel_log.xml'
#  panellog_csv_filename: 'panel_log.csv'
#  panellog_complete_event: 'yes'
  force_numeric_keypad: 'yes'
  override_code: '1234'
  download_code: '9876'
  arm_without_usercode: 'yes'
  1. What is the download code?
    The way I understand it is that are three types of passcodes in the alarm.
    users, technician code and master
    currently I only have user passes, do I need to reset it and get the master?

Thankful for any help
/Fredrik

Hi, if its a UK model in installer menu if you go to operation mode what is it set to BS8264(policed) or EN50131(kh)?

BS8264 allows single sensor acts or tech faults(ac loss, comms loss) to be reset by the user.
EN50131 allows users to reset most activation types and disarm with codes

My pin configuration

imagen

As you can see I view powermax data in uC console

And the config of homeassistant powermax component.

imagen

1 Like

No, just put a piece of shrink tubing around it and tie it to the cable jacket.

No, either ground will work.

Yes.

Hi,
Thaks again for this great component. Everything is working great and I just upgraded to the latest version of the component. I am now trying the new service to download the panel event log into a file by callin the visonic.alarm_panel_eventlog service. I am getting the following error messages in the log file:
Error doing job: Exception in callback _SelectorSocketTransport._call_connection_lost(IndexError(‘t…out of range’))
15:59 custom_components/visonic/init.py (ERROR)
PyVisonic has caused an exception tuple index out of range
15:59 custom_components/visonic/init.py (ERROR)
Calling Exception handler.
15:59 custom_components/visonic/pyvisonic.py (ERROR)
ERROR Connection Lost : disconnected due to exception tuple index out of range
15:59 custom_components/visonic/pyvisonic.py (ERROR)
Error doing job: Fatal error: protocol.data_received() call failed.
15:59 custom_components/visonic/pyvisonic.py (ERROR)

I added the following settings in configuration.yaml
panellog_logentry_event: ‘yes’
panellog_csv_add_title_row: ‘yes’
panellog_xml_filename: ‘panel_log.xml’
panellog_csv_filename: ‘panel_log.csv’
panellog_complete_event: ‘yes’

From the log file:
pmPanelTypeNr 2 (2) model PowerMax Pro

Hope you can provide some guidance on what I am doing wrong.
Thanks
Bart

The download code is a special code to allow powerlink modules to interact with the alarm panel. Please remove the line from your config file so it is left at the default value of 5650.

A pocket said, it looks like it’s wired OK. Have you got the correct USB port on your RPi? i.e. how do you know that it’s /dev/ttyUSB0

I keep saying this, the only way that I can help you is if you can set the HA logging settings to only output the log entries from this component and to upload you log file to pastebin or dropbox and post a link to it :slight_smile: