Visonic Powermax and Powermaster Component

Firstly @davesmeghead, I’d like to let you know that I appreciate the time and effort that you have put into this amazing component for the Visonic Powermax. I can see you created this component ages ago and continue to support it and the community. Good on ya, and thanks.

I’m new to HA, but have been on a crash course journey getting to grips with it.

I’ve recently moved house and we have a Powermax Coomplete alarm system. I was impressed by some of the features but was excited to see there was a way to interact with the panel remotely using HA and your component.

Ok, so enough of the back story…

I bought a USR-WIFI232-A2 Serial TTL UART to Wifi Wireless Module and connected it to my panel as per your example instructions. Everything works well. The default download code appears to be getting the data from the eeprom and your component is recognising my panel in “Powerlink mode”. I am able to arm and disarm the panel via the HA component and all is good. However I have found for some unknown reason while I tinker, and restart HA when making config changes (e.g. to my configuration.yaml of some sort) the panel occasionally fails to reconnect. If I look at the physical panel I can sometimes see on the screen that it says “DOWNLOADING” for a minute, then the yellow “TRBL” indicator is illuminated. Subsequently the entities in HA for the alarm are no longer connected. I found that if I reinstall the component again, or restart HA a few more times, I can get lucky and the entities are discovered once again. However I have no idea how to troubleshoot this inconsistent error. The other night, the entities disappeared overnight, and I woke up in the morning to hear and see the “TRBL” indicator and HA has lost the entities. What is weird is that I made no changes to anything in HA to have caused this to happen.

I’d appreciate if you could help me troubleshoot this issue. Could it be my network dropping? Could it be the Wifi module dropping connections? Or is it something incompatible with the panel and the component?

During the installation of the component, I used panel_log.xml and panel_log.csv but cannot see either file in my HA config folder? My latest refresh of the home-assistant.log file has nothing in it associated to this component.

And the only manual configuration I’ve used is the following in the customize.yaml file:

binary_sensor.visonic_z01:
  friendly_name: 'Front Door'
  device_class: door
  icon: mdi:door

binary_sensor.visonic_z02:
  friendly_name: 'Living Room PIR'
  device_class: motion
  icon: mdi:motion-sensor

binary_sensor.visonic_z03:
  friendly_name: 'Kitchen PIR'
  device_class: motion
  icon: mdi:motion-sensor

binary_sensor.visonic_z04:
  friendly_name: 'Upstairs Landing PIR'
  device_class: motion
  icon: mdi:motion-sensor

How can I help you to help me?

Hi and welcome :slight_smile:

It could be a few different things and without a log file I can’t tell which, can you please create a debug log file as described here in your configuration.yaml file, replace (comment out) the existing “logger:” entry if there’s already one there.

I do end up saying this a lot but I can’t really help without you creating a log file for me. If you want to upload more than 1 log file that’s OK with me, it gives me more evidence of what’s happening in your panel. If it runs OK for a while and the log file is too large then cut and upload the relevant bit, but I prefer log files from first starting up HA if possible.

I know that if you restart HA (and this integration) several times in a short space of time then the panels seem to get confused. I’d like to think this is by design in Visonic, that it thinks it’s being “attacked” and does things to deter any interaction but I’m not sure. Usually if you wait a while, enter and then exit installer mode on the panel (to remove the trouble indication) and then restart HA it usually picks up again and it’s OK.

I’ve also seen problems with some users with wifi, do you have a seperate aerial for the A2 or is it onboard. Remember that the panel also interacts wirelessly with it’s own sensors and also has an aerial inside it, I know they are different frequencies but it’s caused problems before. Also if the A2 is inside the panel next to an earthing cable of any kind then that will dampen the wifi signal. Using wifi is brilliant when it works but the panel has electronics inside it with power devices and wireless electronics that all dampen your wifi signal from the A2. I’m no expert at this and I’m just repeating info from other posts in this thread and from googling myself.

Thanks Dave, I’ve enabled the logging and restarted HA. It’s logging lots of info in the home-assistant.log file so now i’m just waiting for it to hiccup, and so far after 16 hours its been all good (typical). I’ll keep the logging in place and hopefully if something comes up, I’d have captured it and will share the log with you.

I’m curious as to why I have no panel_log.xml or panel_log.csv file though. I’m sure I used those filenames during the setup of the component.

Those files are used to capture the event log from the panel itself, nothing to do with HA log files. To create them you need to trigger the HA service visonic.alarm_panel_eventlog as described here. In your HA Frontend, go to the Developer Tools and select the Services. Scroll down the list of services to find this one, assuming you’re in Powerlink mode then you don’t need to provide any service data. Click “Call Service”, it will take a few minutes to download all the event log data from the panel and create the files so be patient.
Some users do this automatically and then process the csv/xml files to put additional data in their HA frontend using a Card.
D :slight_smile:

1 Like

Hello Dave,

I need some help configuring this component.
At this point I have tried a lot of things without any sucess. I had my powermax configured to work with Vera Lite using the mios visonic powermax plugin and I want to migrate it to home assistant. I have done some readying mainly in this forum and got to the point where I have some information in the home assistant logs. I am running home assistant in a vm image and I have powermax connected to the vm using the FTDI USB converter (the same I used for Vera Lite). Looks like the panel is connected but I can’t get any information from it.

Any help would be very appreciated.

Thank you

homeassistant.log

2020-09-25 15:26:52 WARNING (MainThread) [homeassistant.loader] You are using a custom integration for visonic which has not been tested by Home Assistant. This component might cause stability problems, be sure to disable it if you experience issues with Home Assistant.
2020-09-25 15:26:59 INFO (MainThread) [custom_components.visonic.pyvisonic] Initialising Protocol - Component Version 0.4.4.1
2020-09-25 15:27:00 INFO (MainThread) [custom_components.visonic] ************* create connection here **************
2020-09-25 15:27:00 INFO (MainThread) [custom_components.visonic.client] Exclude sensor list = []     Exclude x10 list = []
2020-09-25 15:27:00 INFO (SyncWorker_0) [custom_components.visonic.client] [Settings] Log Max Entries set to 10000
2020-09-25 15:27:00 INFO (SyncWorker_0) [custom_components.visonic.client] [Settings] Log Reverse set to False
2020-09-25 15:27:00 INFO (SyncWorker_0) [custom_components.visonic.client] [Settings] Log Create Event set to True
2020-09-25 15:27:00 INFO (SyncWorker_0) [custom_components.visonic.client] [Settings] Log Final Event set to True
2020-09-25 15:27:00 INFO (SyncWorker_0) [custom_components.visonic.client] [Settings] Log XML Filename set to panel_log.xml
2020-09-25 15:27:00 INFO (SyncWorker_0) [custom_components.visonic.client] [Settings] Log CSV Filename set to panel_log.csv
2020-09-25 15:27:00 INFO (SyncWorker_0) [custom_components.visonic.client] [Settings] Log CSV title Row set to True
2020-09-25 15:27:00 INFO (SyncWorker_0) [custom_components.visonic.pyvisonic] Setting USB Options
2020-09-25 15:27:00 INFO (MainThread) [custom_components.visonic.pyvisonic] [Settings] Force Standard set to False
2020-09-25 15:27:00 INFO (MainThread) [custom_components.visonic.pyvisonic] [Settings] Force Auto Enroll set to False
2020-09-25 15:27:00 INFO (MainThread) [custom_components.visonic.pyvisonic] [Settings] Force Auto Sync Time set to True
2020-09-25 15:27:00 INFO (MainThread) [custom_components.visonic.pyvisonic] [Settings] Language set to EN
2020-09-25 15:27:00 INFO (MainThread) [custom_components.visonic.pyvisonic] [Settings] Remote Arm set to False
2020-09-25 15:27:00 INFO (MainThread) [custom_components.visonic.pyvisonic] [Settings] Remote DisArm set to False
2020-09-25 15:27:00 INFO (MainThread) [custom_components.visonic.pyvisonic] [Settings] Enable Sensor Bypass set to False
2020-09-25 15:27:00 INFO (MainThread) [custom_components.visonic.pyvisonic] [Settings] Motion Off Delay set to 120
2020-09-25 15:27:00 INFO (MainThread) [custom_components.visonic.pyvisonic] [Settings] Override Code in new settings, the length is 4   isdigit = True
2020-09-25 15:27:00 INFO (MainThread) [custom_components.visonic.pyvisonic] [Settings]     Override Code set <omitted for security>
2020-09-25 15:27:00 INFO (MainThread) [custom_components.visonic.pyvisonic] [Settings] Force Numeric Keypad set to False
2020-09-25 15:27:00 INFO (MainThread) [custom_components.visonic.pyvisonic] [Settings] Arm Without Code set to False
2020-09-25 15:27:00 INFO (MainThread) [custom_components.visonic.pyvisonic] [Settings] Siren Trigger List set to ['intruder']
2020-09-25 15:27:00 INFO (MainThread) [custom_components.visonic.pyvisonic] [Settings] B0 Enable set to False
2020-09-25 15:27:00 INFO (MainThread) [custom_components.visonic.pyvisonic] [Settings] B0 Min Interval set to 5
2020-09-25 15:27:00 INFO (MainThread) [custom_components.visonic.pyvisonic] [Settings] B0 Max Wait Time set to 30
2020-09-25 15:27:00 INFO (MainThread) [custom_components.visonic.pyvisonic] [Connection] Connected to local Protocol handler and Transport Layer
2020-09-25 15:27:00 DEBUG (MainThread) [custom_components.visonic.pyvisonic] [ClearList] Setting queue empty
2020-09-25 15:27:00 INFO (MainThread) [custom_components.visonic.pyvisonic] [StartDownload] Starting download mode
2020-09-25 15:27:00 DEBUG (MainThread) [custom_components.visonic.pyvisonic] [pmSendPdu] Resetting expected response counter, it got to 0   Response list length before 0  after 1
2020-09-25 15:27:00 DEBUG (MainThread) [custom_components.visonic.pyvisonic] [Controller] download_counter is 1
2020-09-25 15:27:00 DEBUG (MainThread) [custom_components.visonic.pyvisonic] [pmSendPdu] Sending Command (Exit)    raw data 0d 0f f0 0a    waiting for message response ['0X3C']
2020-09-25 15:27:00 DEBUG (MainThread) [custom_components.visonic.pyvisonic] [pmSendPdu]          Command has a wait time after transmission 1.5
2020-09-25 15:27:01 DEBUG (MainThread) [custom_components.visonic.alarm_control_panel] code format called *****************************
2020-09-25 15:27:01 DEBUG (MainThread) [custom_components.visonic.alarm_control_panel] code format none as armcode is none (panel starting up?) *****************************
2020-09-25 15:27:02 DEBUG (MainThread) [custom_components.visonic.pyvisonic] [Controller] download_counter is 2
2020-09-25 15:27:03 DEBUG (MainThread) [custom_components.visonic.pyvisonic] [pmSendPdu] Sending Command (Stop)    raw data 0d 0b f4 0a    waiting for message response ['0X3C']
2020-09-25 15:27:03 DEBUG (MainThread) [custom_components.visonic.pyvisonic] [pmSendPdu]          Command has a wait time after transmission 1.5
2020-09-25 15:27:03 DEBUG (MainThread) [custom_components.visonic.pyvisonic] [Controller] download_counter is 3
2020-09-25 15:27:05 DEBUG (MainThread) [custom_components.visonic.pyvisonic] [Controller] download_counter is 4
2020-09-25 15:27:05 DEBUG (MainThread) [custom_components.visonic.pyvisonic] [pmSendPdu] Setting Download Mode to true
2020-09-25 15:27:05 DEBUG (MainThread) [custom_components.visonic.pyvisonic] [pmSendPdu] Sending Command (Start Download Mode)    raw data 0d 24 00 00 56 50 00 00 00 00 00 00 35 0a    waiting for message response ['0X3C']
2020-09-25 15:27:38 ERROR (MainThread) [custom_components.visonic.pyvisonic] [Controller] Visonic Plugin has suspended all operations, there is a problem with the communication with the panel (i.e. no data has been received from the panel after several minutes)
2020-09-25 15:27:38 INFO (MainThread) [custom_components.visonic.client] Visonic update event 10 {'condition': 10}
2020-09-25 15:27:38 ERROR (MainThread) [custom_components.visonic.client] Failed to connect to your Visonic Alarm. We have not received any data from the panel at all, not one single byte.
2020-09-25 15:27:38 DEBUG (MainThread) [custom_components.visonic.alarm_control_panel] code format called *****************************
2020-09-25 15:27:38 DEBUG (MainThread) [custom_components.visonic.alarm_control_panel] code format none as armcode is none (panel starting up?) *****************************

-core.config_entries (visonic component part) that is inside /config/.storage

            {
                "entry_id": "6f58844ffe8b11eab3e1c5dc99c5dc04",
                "version": 1,
                "domain": "visonic",
                "title": "Alarm Panel",
                "data": {
                    "type": "usb",
                    "path": "/dev/ttyUSB0",
                    "baud": "9600",
                    "language": "EN",
                    "force_standard": false,
                    "force_autoenroll": false,
                    "sync_time": true,
                    "exclude_x10": [],
                    "download_code": "",
                    "exclude_sensor": [],
                    "motion_off": 120,
                    "siren_sounding": [
                        "intruder"
                    ],
                    "arm_without_usercode": false,
                    "force_numeric_keypad": false,
                    "arm_away_instant": false,
                    "arm_home_instant": false,
                    "allow_remote_arm": false,
                    "allow_remote_disarm": false,
                    "allow_sensor_bypass": false,
                    "override_code": "",
                    "panellog_logentry_event": false,
                    "panellog_complete_event": false,
                    "panellog_reverse_order": false,
                    "panellog_csv_add_title_row": false,
                    "panellog_xml_filename": "panel_log.xml",
                    "panellog_csv_filename": "panel_log.csv",
                    "panellog_max_entries": 10000
                },
                "options": {
                    "type": "usb",
                    "path": "/dev/ttyUSB0",
                    "baud": "9600",
                    "language": "EN",
                    "force_standard": false,
                    "force_autoenroll": false,
                    "sync_time": true,
                    "exclude_x10": [],
                    "download_code": "",
                    "exclude_sensor": [],
                    "motion_off": 120,
                    "siren_sounding": [
                        "intruder"
                    ],
                    "arm_without_usercode": false,
                    "force_numeric_keypad": false,
                    "arm_away_instant": false,
                    "arm_home_instant": false,
                    "allow_remote_arm": false,
                    "allow_remote_disarm": false,
                    "allow_sensor_bypass": false,
                    "override_code": "my_4_digit_user_code",
                    "panellog_logentry_event": true,
                    "panellog_complete_event": true,
                    "panellog_reverse_order": false,
                    "panellog_csv_add_title_row": true,
                    "panellog_xml_filename": "panel_log.xml",
                    "panellog_csv_filename": "panel_log.csv",
                    "panellog_max_entries": 10000
                },
                "system_options": {
                    "disable_new_entities": false
                },
                "source": "user",
                "connection_class": "local_poll",
                "unique_id": "visonic_unique_id"
            },

Where I have “my_4_digit_user_code” I put my alarm user code I just removed it and put this text to show the configuration in this post.

homeassistant_hardware_info|506x314

Hi Carlos and welcome

I’m afraid the panel is not connected, this information in your log file tells me

Most of the other text in the log file is telling me that you have the integration installed OK and it is trying to send to the panel.

If you have HA in a VM, have you mapped the usb ports through to the VM so it can access them?

Hi Dave,

Thank you for your reply.

I have just done what is in the screen shot, is that what you mean by mapping the usb ports?

I had the same issue when I first set up my power max+.

Make sure you set the connection to USB0 as it defaults to USB1.

I don’t know if you can modify the port after you’ve initially set up the integration. I just deleted it and re-installed it and set the connection to USB0

I am setting it to

"data": {
                    "type": "usb",
                    "path": "/dev/ttyUSB0",
                    "baud": "9600",

Should it be?

"data": {
                    "type": "usb",
                    "path": "USB0",
                    "baud": "9600",

On the hardware info of my HA I have the following
homeassistant_hardware_info

OK, so first of all you probably shouldn’t be directly editing those HA config files, do you restart HA every time you make a change. There is an easier way, just delete the integration from within HA and then recreate it from within HA. Most of the settings for the integration are kept, but the usb settings aren’t so you’ll need to type them in again, apart from that it is much quicker. Some parameters of the integration can be modified but the connection settings cannot so you need to delete and re-create the integration from within HA.

You have the “type” setting correct as from your earlier post I saw this in the log file “Setting USB Options”

I assume that you have the FTDI device set up correctly as you’ve used it before with your panel.
The baud setting is not used when you use USB with a FTDI hardware device like you are. The baud setting is only used when connecting directly with an RS232 cable from your PC to a panel to set the baud rate in the PC. You have already done this in the FTDI device and you then use USB.

From your hardware image, have you tried using the /dev/serial/by-id/usb-FT… etc as the path instead of “/dev/usb0”?

D :slight_smile:

I think I got a bit further. Tested all the possible combinations of the USB path considering what HA shows me in the hardware info. I also removed the integration from the UI and added it again everytime. By using just ttyUSB0 instead of /dev/ttyUSB0 I got the following log

2020-09-28 10:46:40 INFO (MainThread) [custom_components.visonic.pyvisonic] Initialising Protocol - Component Version 0.4.4.1
2020-09-28 10:46:40 INFO (MainThread) [custom_components.visonic.config_flow] Visonic in async_step_user - trigger user input
2020-09-28 10:46:45 INFO (MainThread) [custom_components.visonic.config_flow] async_step_device {'type': 'USB'}
2020-09-28 10:47:40 INFO (MainThread) [custom_components.visonic.config_flow] [config] Detected a powermax so not asking about B0 parameters
2020-09-28 10:47:40 INFO (MainThread) [custom_components.visonic] visonic unique id was None
2020-09-28 10:47:40 INFO (MainThread) [custom_components.visonic] ************* create connection here **************
2020-09-28 10:47:40 INFO (MainThread) [custom_components.visonic.client] Exclude sensor list = []     Exclude x10 list = []
2020-09-28 10:47:40 INFO (SyncWorker_5) [custom_components.visonic.client] Checking HA Entity ID: binary_sensor.updater
2020-09-28 10:47:40 INFO (SyncWorker_5) [custom_components.visonic.client] Checking HA Entity ID: binary_sensor.sm_g920f_is_charging
2020-09-28 10:47:40 INFO (SyncWorker_5) [custom_components.visonic.client] [Settings] Log Max Entries set to 10000
2020-09-28 10:47:40 INFO (SyncWorker_5) [custom_components.visonic.client] [Settings] Log Reverse set to False
2020-09-28 10:47:40 INFO (SyncWorker_5) [custom_components.visonic.client] [Settings] Log Create Event set to True
2020-09-28 10:47:40 INFO (SyncWorker_5) [custom_components.visonic.client] [Settings] Log Final Event set to True
2020-09-28 10:47:40 INFO (SyncWorker_5) [custom_components.visonic.client] [Settings] Log XML Filename set to visonic_xml.log
2020-09-28 10:47:40 INFO (SyncWorker_5) [custom_components.visonic.client] [Settings] Log CSV Filename set to visonic_csv.log
2020-09-28 10:47:40 INFO (SyncWorker_5) [custom_components.visonic.client] [Settings] Log CSV title Row set to True
2020-09-28 10:47:40 INFO (SyncWorker_5) [custom_components.visonic.pyvisonic] Setting USB Options
2020-09-28 10:47:40 DEBUG (MainThread) [custom_components.visonic.alarm_control_panel] code format called *****************************
2020-09-28 10:47:40 DEBUG (MainThread) [custom_components.visonic.alarm_control_panel] code format none as armcode is none (panel starting up?) *****************************

This line caught my attention
2020-09-28 10:47:40 INFO (MainThread) [custom_components.visonic.config_flow] [config] Detected a powermax so not asking about B0 parameters

But no devices were imported…

If I restart HA I don’t see the line anymore.

2020-09-28 10:56:15 WARNING (MainThread) [homeassistant.loader] You are using a custom integration for sonoff which has not been tested by Home Assistant. This component might cause stability problems, be sure to disable it if you experience issues with Home Assistant.
2020-09-28 10:56:15 WARNING (MainThread) [homeassistant.loader] You are using a custom integration for hacs which has not been tested by Home Assistant. This component might cause stability problems, be sure to disable it if you experience issues with Home Assistant.
2020-09-28 10:56:15 WARNING (MainThread) [homeassistant.loader] You are using a custom integration for visonic which has not been tested by Home Assistant. This component might cause stability problems, be sure to disable it if you experience issues with Home Assistant.
2020-09-28 10:56:23 INFO (MainThread) [custom_components.visonic.pyvisonic] Initialising Protocol - Component Version 0.4.4.1
2020-09-28 10:56:23 INFO (MainThread) [custom_components.visonic] ************* create connection here **************
2020-09-28 10:56:23 INFO (MainThread) [custom_components.visonic.client] Exclude sensor list = []     Exclude x10 list = []
2020-09-28 10:56:23 INFO (SyncWorker_0) [custom_components.visonic.client] [Settings] Log Max Entries set to 10000
2020-09-28 10:56:23 INFO (SyncWorker_0) [custom_components.visonic.client] [Settings] Log Reverse set to False
2020-09-28 10:56:23 INFO (SyncWorker_0) [custom_components.visonic.client] [Settings] Log Create Event set to True
2020-09-28 10:56:23 INFO (SyncWorker_0) [custom_components.visonic.client] [Settings] Log Final Event set to True
2020-09-28 10:56:23 INFO (SyncWorker_0) [custom_components.visonic.client] [Settings] Log XML Filename set to visonic_xml.log
2020-09-28 10:56:23 INFO (SyncWorker_0) [custom_components.visonic.client] [Settings] Log CSV Filename set to visonic_csv.log
2020-09-28 10:56:23 INFO (SyncWorker_0) [custom_components.visonic.client] [Settings] Log CSV title Row set to True
2020-09-28 10:56:23 INFO (SyncWorker_0) [custom_components.visonic.pyvisonic] Setting USB Options
2020-09-28 10:56:24 DEBUG (MainThread) [custom_components.visonic.alarm_control_panel] code format called *****************************
2020-09-28 10:56:24 DEBUG (MainThread) [custom_components.visonic.alarm_control_panel] code format none as armcode is none (panel starting up?) *****************************

There must be something with the USB port mapping :confused:

Is there any goog guide to install a service like ser2net on a windows machine?

Sorry but that line does not mean that it is working or has worked. Anything in the log file from config_flow.py is from when you create the integration and not when the integration starts. That line just means that last time the integration was created it did not detect a powermaster, and powermax is the default. So it is only using the default settings when the integration is created.

You mention using a windows PC, is it possible to plug the FTDI USB device in to a Windows PC and be able to run windows applications. If so then you can try these things on the wiki
That will test to make sure your hardware is set up correctly.
If the hardware is OK then try installing python3 on to your windows PC and using my test.py from a windows command prompt
However, you may have to install some python libraries and if you’re not confident at doing this, then don’t. I suggest that you don’t put much effort in to this as it is a bit of a distraction, it may just be a quick way to test your setup if you know what you’re doing with python libraries and pip3.

Hi,

I decided to go down the ser2net way, but still no joy. From my understanding almost looks like HA or the component is not making any requests to ser2net server.

Ser2net is configured this way

The ser2net service running on a lubuntu machine does not show any info in the output

Netstat shows the connection as established

Syslog doesn’t show any relevant info in my opinion

And HA logs show that is still not possible to connect to PowerMax

2020-10-01 13:35:11 WARNING (MainThread) [homeassistant.loader] You are using a custom integration for hacs which has not been tested by Home Assistant. This component might cause stability problems, be sure to disable it if you experience issues with Home Assistant.
2020-10-01 13:35:19 INFO (MainThread) [custom_components.visonic.pyvisonic] Initialising Protocol - Component Version 0.4.4.1
2020-10-01 13:35:19 INFO (MainThread) [custom_components.visonic] ************* create connection here **************
2020-10-01 13:35:19 INFO (MainThread) [custom_components.visonic.client] Exclude sensor list = []     Exclude x10 list = []
2020-10-01 13:35:19 INFO (SyncWorker_4) [custom_components.visonic.client] [Settings] Log Max Entries set to 10000
2020-10-01 13:35:19 INFO (SyncWorker_4) [custom_components.visonic.client] [Settings] Log Reverse set to True
2020-10-01 13:35:19 INFO (SyncWorker_4) [custom_components.visonic.client] [Settings] Log Create Event set to True
2020-10-01 13:35:19 INFO (SyncWorker_4) [custom_components.visonic.client] [Settings] Log Final Event set to True
2020-10-01 13:35:19 INFO (SyncWorker_4) [custom_components.visonic.client] [Settings] Log XML Filename set to visonic_xml.log
2020-10-01 13:35:19 INFO (SyncWorker_4) [custom_components.visonic.client] [Settings] Log CSV Filename set to visonic_cvs.log
2020-10-01 13:35:19 INFO (SyncWorker_4) [custom_components.visonic.client] [Settings] Log CSV title Row set to True
2020-10-01 13:35:19 INFO (SyncWorker_4) [custom_components.visonic.pyvisonic] Setting TCP socket Options
2020-10-01 13:35:20 INFO (SyncWorker_4) [custom_components.visonic.pyvisonic] Buffer Flushed and Didn't receive data! [Timeout]
2020-10-01 13:35:21 INFO (MainThread) [custom_components.visonic.pyvisonic] [Settings] Force Standard set to False
2020-10-01 13:35:21 INFO (MainThread) [custom_components.visonic.pyvisonic] [Settings] Force Auto Enroll set to False
2020-10-01 13:35:21 INFO (MainThread) [custom_components.visonic.pyvisonic] [Settings] Force Auto Sync Time set to True
2020-10-01 13:35:21 INFO (MainThread) [custom_components.visonic.pyvisonic] [Settings] Download Code set to 56 50
2020-10-01 13:35:21 INFO (MainThread) [custom_components.visonic.pyvisonic] [Settings] Language set to EN
2020-10-01 13:35:21 INFO (MainThread) [custom_components.visonic.pyvisonic] [Settings] Remote Arm set to True
2020-10-01 13:35:21 INFO (MainThread) [custom_components.visonic.pyvisonic] [Settings] Remote DisArm set to True
2020-10-01 13:35:21 INFO (MainThread) [custom_components.visonic.pyvisonic] [Settings] Enable Sensor Bypass set to False
2020-10-01 13:35:21 INFO (MainThread) [custom_components.visonic.pyvisonic] [Settings] Motion Off Delay set to 180
2020-10-01 13:35:21 INFO (MainThread) [custom_components.visonic.pyvisonic] [Settings] Override Code in new settings, the length is 4   isdigit = True
2020-10-01 13:35:21 INFO (MainThread) [custom_components.visonic.pyvisonic] [Settings]     Override Code set <omitted for security>
2020-10-01 13:35:21 INFO (MainThread) [custom_components.visonic.pyvisonic] [Settings] Force Numeric Keypad set to False
2020-10-01 13:35:21 INFO (MainThread) [custom_components.visonic.pyvisonic] [Settings] Arm Without Code set to False
2020-10-01 13:35:21 INFO (MainThread) [custom_components.visonic.pyvisonic] [Settings] Siren Trigger List set to ['intruder']
2020-10-01 13:35:21 INFO (MainThread) [custom_components.visonic.pyvisonic] [Settings] B0 Enable set to False
2020-10-01 13:35:21 INFO (MainThread) [custom_components.visonic.pyvisonic] [Settings] B0 Min Interval set to 5
2020-10-01 13:35:21 INFO (MainThread) [custom_components.visonic.pyvisonic] [Settings] B0 Max Wait Time set to 30
2020-10-01 13:35:21 INFO (MainThread) [custom_components.visonic.pyvisonic] [Connection] Connected to local Protocol handler and Transport Layer
2020-10-01 13:35:21 DEBUG (MainThread) [custom_components.visonic.pyvisonic] [ClearList] Setting queue empty
2020-10-01 13:35:21 INFO (MainThread) [custom_components.visonic.pyvisonic] [StartDownload] Starting download mode
2020-10-01 13:35:21 DEBUG (MainThread) [custom_components.visonic.pyvisonic] [pmSendPdu] Resetting expected response counter, it got to 0   Response list length before 0  after 1
2020-10-01 13:35:21 DEBUG (MainThread) [custom_components.visonic.pyvisonic] [Controller] download_counter is 1
2020-10-01 13:35:21 DEBUG (MainThread) [custom_components.visonic.pyvisonic] [pmSendPdu] Sending Command (Exit)    raw data 0d 0f f0 0a    waiting for message response ['0X3C']
2020-10-01 13:35:21 DEBUG (MainThread) [custom_components.visonic.pyvisonic] [pmSendPdu]          Command has a wait time after transmission 1.5
2020-10-01 13:35:23 DEBUG (MainThread) [custom_components.visonic.pyvisonic] [Controller] download_counter is 2
2020-10-01 13:35:23 DEBUG (MainThread) [custom_components.visonic.alarm_control_panel] code format called *****************************
2020-10-01 13:35:23 DEBUG (MainThread) [custom_components.visonic.alarm_control_panel] code format none as armcode is none (panel starting up?) *****************************
2020-10-01 13:35:23 DEBUG (MainThread) [custom_components.visonic.pyvisonic] [pmSendPdu] Sending Command (Stop)    raw data 0d 0b f4 0a    waiting for message response ['0X3C']
2020-10-01 13:35:23 DEBUG (MainThread) [custom_components.visonic.pyvisonic] [pmSendPdu]          Command has a wait time after transmission 1.5
2020-10-01 13:35:24 DEBUG (MainThread) [custom_components.visonic.pyvisonic] [Controller] download_counter is 3
2020-10-01 13:35:25 DEBUG (MainThread) [custom_components.visonic.pyvisonic] [Controller] download_counter is 4
2020-10-01 13:35:25 DEBUG (MainThread) [custom_components.visonic.pyvisonic] [pmSendPdu] Setting Download Mode to true
2020-10-01 13:35:25 DEBUG (MainThread) [custom_components.visonic.pyvisonic] [pmSendPdu] Sending Command (Start Download Mode)    raw data 0d 24 00 00 56 50 00 00 00 00 00 00 35 0a    waiting for message response ['0X3C']
2020-10-01 13:35:55 ERROR (MainThread) [custom_components.visonic.pyvisonic] [Controller] Visonic Plugin has suspended all operations, there is a problem with the communication with the panel (i.e. no data has been received from the panel after several minutes)
2020-10-01 13:35:55 INFO (MainThread) [custom_components.visonic.client] Visonic update event 10 {'condition': 10}
2020-10-01 13:35:55 ERROR (MainThread) [custom_components.visonic.client] Failed to connect to your Visonic Alarm. We have not received any data from the panel at all, not one single byte.
2020-10-01 13:35:55 DEBUG (MainThread) [custom_components.visonic.alarm_control_panel] code format called *****************************
2020-10-01 13:35:55 DEBUG (MainThread) [custom_components.visonic.alarm_control_panel] code format none as armcode is none (panel starting up?) *****************************

I am feeling a bit desperate at the moment, lost so many hours without seeing any success :frowning: . I really want to get away from Vera!!! By the way just tried again to connect powermax to Vera again using visonic powermax mios plugin and everything is working fine in a matter of minutes. I need to be missing something pretty fundamental with this component :confused:

I didn’t mentioned it before but I have a PowerMax Pro

Let’s see if I can suggest some things for you to try, it looks like you need to get back to a basic setup as there seems to be too many things that could go wrong. I also don’t know anything about ser2net so can’t really help you with it :frowning:

  1. I’m assuming that you are using the FTDI device with Vera and it works. I am also assuming that the FTDI device plugs in to the Vera using a USB port, is this correct? Is there a network involved with your Vera setup? If your Vera works then we have to assume that it is correctly wired to your panel and that the problem lies with the intermediate setup.
  2. Get rid of the virtual machine (if you’re still using it). Use a device with direct connection to the USB of the FTDI. It doesn’t matter if the device is linux, windows, it could be a raspberry pi as well. Plug the FTDI in to a USB port of a proper computer.
  3. If using a Windows PC then install the visonic programmer software and see if it works.
  4. For Windows, Linux or Raspberry Pi. Install python3 and pip3. On linux you may need to be logged in as root.

From a command/terminal prompt:

python.exe -m pip install --upgrade pip
pip3 install datetime
pip3 install pyserial
pip3 install pyserial_asyncio

Sometimes pip3 is just called pip.
You should then be able to run my test routine. Change directory to where the pyvisonic.py and test.py files are and then:

On Linux:   python3 test.py -usb /dev/ttyUSB1
On Windows: python3 test.py -usb COM1

Try the different com ports and maybe the serial FTDI device if there is one. On Windows you can use device manager to work out the correct COM.

If the test python script is working then you should see some lines with “[data receiver]” in them to show that we are receiving data from the panel.

If you have any problems with the python then copy / show any error messages here and I can help.

I hope i’m not bringing up something that has already been asked in the past, and I hope it is okay to post such a question in this post.

I have the component running in HA and I have the UI present with the “Arm Home” and “Arm Away” buttons available. A quick tap of either button does what is expected, and no PIN is required because I set the PIN in the options.

My question is to do with Google Assistant interaction. My entities are exposed to GA correctly, and I am able to use my voice to interact with most entities directly. I’ve renamed the alarm system to “Home Security System” to avoid confusion with commands containing the word “Alarm”, because GA occasionally assumes I’d like to set an alarm clock appointment/reminder.

I can prove the integration works with GA because when I say…

“Hey Google, what is the status of the Home Security System”

I get a response back…

“The Home Security System is disarmed”

If I say…

“Hey Google, enable the Home Security System”

I get a response back saying…

“I’m not sure which level to set Home Security System to, try saying Set Home Security System to Armed Home or Set Home Security System to Armed Away”

So I change my voice command to…

“Hey Google, Set Home Security System to Armed Away” and the response is “This action requires a PIN but hasn’t been set up in your devices app”

So the key question is how do I setup the PIN? The GA integration documentation says to use secure_devices_pin: 1234 or code_arm_required: false but neither work. It still asks for the PIN. I think other alarm components work with these values but Visonic doesn’t seem to honour the values.

@davesmeghead, is this something that you are aware of or have been asked about before?

That’s something that hasn’t been discussed in this thread but if any changes need to be made or you work out how to do it then let me know. I must admit that I have Amazon Alexa devices and not Google but it could be similar.
Have you read this thread, I haven’t but it came up in a quick search

You may need to wrap the visonic calls with entities/scripts that work with Google.
As well as the alarm related entities there are service calls available here
I’d be worried that a burglar can shout through the letterbox “Alexa, disarm the alarm” :wink:

Hi Dave -

OK, so finally I captured when my Alarm Panel started beeping with a TRBL warning. This time it happened during the day, and since I’m working from home I was able to identify exactly when it happened. The cause was due to an intermittent outage on my WiFi router not exactly sure what the cause was, but the internet connectivity throughout the house dropped on every device and reconnected after about 60 or so seconds. I wouldn’t have been so bothered but I just so happened to be on a Teams conference call… typical!

I grabbed the home-assistant.log and saw the lines:

2020-10-05 15:40:49 ERROR (MainThread) [custom_components.visonic.pyvisonic] ERROR Connection Lost : disconnected due to exception [Errno 104] Connection reset by peer
2020-10-05 15:40:54 ERROR (MainThread) [custom_components.visonic.pyvisonic]                         Calling Exception handler.

I have private messaged you with the log file as requested.. I dont know how to send a direct message, maybe I’m not a seasoned enough user yet. @davesmeghead What’s the best method to send you my logs?

My thoughts are, this may be a simple case of there being an interruption in network connectivity and the alarm panel or WiFi module being unable to reconnect seamlessly. I restarted HA and everything was playing nicely again. My knee-jerk reaction to solve this would be to create something that is able to restart the integration if connection has been lost for X minutes? or restart if a specific TRBL code is detected?

Your thoughts and input on this issue is greatly welcomed and appreciated.

Thanks.

Just an update on this.

I got it working whereby I can speak to my Google Assistant to set the “Home Security System” to “Armed Away” or “Armed Home”. For the example, lets say my panel PIN is 1234, I needed to hardcode this value into my configuration.yaml file to state this PIN code. So in order to do this, here is a condensed snippet:

google_assistant:
  project_id: my-project-id
  service_account: !include hass-google-service.json
  report_state: true
  expose_by_default: false
  secure_devices_pin: "1234"
  exposed_domains:
    - alarm_control_panel
  entity_config:
    alarm_control_panel.visonic_alarm:
      name: "Home Security System"
      room: "Entryway"
      expose: true

This meant that when I asked it to “Arm Away”, I got a response asking me for my PIN. I could then vocally say “1, 2, 3, 4”. Alternatively if I was near my Google Nest Hub, a PIN panel would be displayed on the screen, so I could tap the PIN code. An as if by magic, the alarm panels arm mode is activated.

I then discovered I could get this done without vocally saying the PIN, and this was to use code_arm_required: false however, this threw an error if I used it in the configuration.yaml. So I tried putting it in my customize.yaml and that worked.

alarm_control_panel.visonic_alarm:
  code_arm_required: false

So now I can arm the panel without it asking for a PIN.

Now, to take into consideration your comment:

I’d be worried that a burglar can shout through the letterbox “Alexa, disarm the alarm”

I am in full agreement with you here. I haven’t tried it yet, but my guess is that so long as I have the PIN code set as required, this should mitigate the risk of anyone disarming the system without knowing the code.

The perfect outcome would be to have it arm without a PIN code, but in order to disarm, a PIN code would be required.

By way of an explanation:

  1. The integration in HA mimics the visonic Powerlink hardware device.That is why you cannot have the real hardware device connected at the same time as using this integration.
  2. If the communication between them is broken and an “I’m Alive” message is not received and acknowledged then the panel thinks there is trouble.
  3. The only way to remove the trouble indication is by either a panel “system reset” or by restarting the integration in HA and re-connecting in powerlink mode. A “system reset” only means going in to installer mode on the panel and exiting out.

When the communication is interrupted I generate an HA Event as described on the wiki here. Note that condition is set to 0 and there is no more event data associated with it.
There is also an HA Service as described here that you can call to restart the integration, it’s called visonic.alarm_panel_reconnect. It’s called reconnect as it disconnects if connected and then connects to the panel, it’s like restarting the integration.

So, after all that,you could add an automation to automatically restart the integration after a small period of time to hopefully reconnect to your panel.

- alias: Alarm Reconnect
  initial_state: true
  trigger:
    platform: event
    event_type: alarm_panel_state_update
    event_data:
      condition: 0
  action:
  - delay: 2:00
  - service: visonic.alarm_panel_reconnect

Make the delay longer than the recovery time of your router
:smile:

1 Like

If you look at the table here and scroll down to note 2.

Try setting it like this:
Arm Without User Code: Yes
Force use of a Keypad: Yes

The problem is that I cannot differentiate different HA users so it will be like this on all devices that you use HA on i.e allow you to arm without entering a code but it will ask for the code to disarm.

How you achieve this with the google assistant I have no idea

Give it a try :wink: