Visonic Powermax and Powermaster Integration

No problem, glad you got it sorted :grinning:
When the Wemos is powered from the panel, they already share a common gnd so the 3rd wire isn’t needed. In your case you have seperate power supplies for the panel and the Wemos so the gnd has to be tied together.

Hi there, I’ve stumbled upon this thread and the Visonic Custom Component, I have a Visonic PowerMax Complete and running Home Assistant on a Pi4, I’ve looked at the wiring pics, I have also tried to order the dual RS-232 component but seems it’s discontinued and I can’t find one anywhere, reading your Wiki seems I could just use an RS232 TTL serial adaptor but struggling to see the right connection pins on my board (see pic) any ideas?


Hi,

Yes

On the wiki here you’ll see the 10 pin connector layout, it’s the 10 pin connector in both your pictures. Remember to cross over Rx and Tx and align the cut out in the connector so you get the correct pins. Assuming that you’ve already powered the Pi, you’ll need 3 cables: Rx, Tx and Ground. Do not connect the power pin from the panel to your raspberry pi.
:slight_smile:

Awesome, I’ll give it a go and let you know how I get on once the adaptor turns up

Ok I wired it all up and managed to get the panel and devices all in HA but then that’s as far as things went.
I got the following error message, I’ll take a look and ensure the wiring is all good in the morning

[Controller] Visonic Plugin has suspended all operations, there is a problem with the communication with the panel (i.e. data has not been received from the panel in 600 seconds)

Have you checked the FAQ in Dave’s GitHub? There’s reference too that issue there. I had similar and realised if allocated a static IP to the unit, bit the IP was assigned to another device and so caused conflict and the communication to drop. Make sure it is a unique IP and is set as static on your router

I have checked FAQs, I’m using a USB connection directly to Raspberry Pi running HA. I’ll check the connections again in the morning. I’m wondering if there is anything I need to be doing on the alarm panel itself

Hi,
It looks like some data has been received from your panel and then stopped for some reason. Take a look through the Troubleshooting section on the Wiki here. As you have it directly connected using USB/rs232 there are 3 things to check:

  • The rs232 settings such as baud rate, stop bits etc.
  • This on the wiki
  • This on the wiki

A common problem with using a direct USB/RS232 connection is that other driver software in the RasPi tries to interact with it, as it’s a USB device and you need to stop it. The last 2 bullets above might help but there could be other drivers interfering.

Please try the loopback test as described here on the Wiki. Look for “LOOPBACK TEST” in the Home Assistant log file. Note that this is put in the log file as a Warning message so you need to allow warnings in the log file, use the logger settings as per the wiki here.

The only other way that I can help is if you upload a log file to pastebin (or alternatives). Please set your logger settings as per the wiki here (same as above link). Upload the log file to pastebin/dropbox etc and then paste a link to it here. Remember to put it back to normal and connect it to the panel (not the loopback test).

I’m trying to hook up my Powermax+ panel but I’m running into the “We have not received any data from the panel” error. I’m not sure if my wemo is connected correctly, all of the images I’ve seen of the connectors for the Powermax+ show 14 pins (2x7), but mine is only 12 pins (2x6). I’ve attached it based on the other images but not sure if I’m right:


Hi,

There are 2 things for you to try please

  • Disconnect the Wemos from the panel completely and connect the Tx and Rx together on the Wemos. Try the loopback test as described here on the wiki. Please remember to set your Home Assistant logger settings correctly.
  • The pin out for the Powermax+ is different than other panels. I found this here. It seems to show the pin out like this about half way down the page, does this help? When it says USR then that is your Wemos.
    image
    But I don’t have a Powermax+ panel so I would not know if this works or breaks the panel so use with caution.
    Good luck :slight_smile:

Doing the loopback test shows the LOOPBACK TEST SUCCESS msg in the logs.

That is the same picture I found for the pin out, but like I said, that pin out has 14 pins, but mine only has 12. I tried connecting on the upper right pins like that shows, but no success. So I’m not sure if I used the right pins. And I can’t find a diagram for the 12 pin version.

Hi,

That’s good, so it looks like a hardware or baud problem

On the same forum but on page 4 there is this

There’s a post a few posts from the top that says:
“If you have a 12-pin header, looks like they omitted pins 13 & 14.”

Also, I know these are basic questions but I have to ask, have you crossed over Tx and Rx and have you set baud rate, stop bits correctly? The loopback test would still work if baud and stop bits are wrong for the alarm panel.
D

Thanks for the additional post, I must have missed that comment saying to ignore pins 13 and 14. Based on that, my connection should be correct.

I made some progress…I think. I reinstalled and set my download code to AAAA (which is what my panel says) and now the panel says DOWNLOADING after restarting the integration. I was not getting that status on the panel before. I also do not get that message if I set the baud rate to 38400. Stop bits is set to 1, I didn’t see any alternate settings in the wiki to try. Since I am getting a DOWNLOADING msg I assume these means the wemos is talking to the panel correctly?

But I am still getting the same no data error from HA.

Here are my logs from an integration reload:

2022-01-12 10:58:06 DEBUG (MainThread) [custom_components.visonic.client] init self.config = PyConfiguration.DownloadCode {'type': 'ethernet', 'host': '192.168.1.210', 'port': '10077', 'language': 'EN', 'download_code': 'AAAA', 'force_standard': False, 'force_autoenroll': False, 'sync_time': True, 'exclude_x10': [], 'exclude_sensor': [], 'motion_off': 120, 'siren_sounding': ['intruder'], 'panel_state_notifications': ['connectionproblem', 'sirensounding'], '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': 'visonic_log_file.xml', 'panellog_csv_filename': 'visonic_log_file.csv', 'panellog_max_entries': 10000}
2022-01-12 10:58:06 DEBUG (MainThread) [custom_components.visonic.client] Exclude sensor list = [] Exclude x10 list = []
2022-01-12 10:58:06 DEBUG (MainThread) [custom_components.visonic.client] connect_to_alarm self.config = {'type': 'ethernet', 'host': '192.168.1.210', 'port': '10077', 'language': 'EN', 'download_code': 'AAAA', 'force_standard': False, 'force_autoenroll': False, 'sync_time': True, 'exclude_x10': [], 'exclude_sensor': [], 'motion_off': 120, 'siren_sounding': ['intruder'], 'panel_state_notifications': ['connectionproblem', 'sirensounding'], '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': 'visonic_log_file.xml', 'panellog_csv_filename': 'visonic_log_file.csv', 'panellog_max_entries': 10000}
2022-01-12 10:58:06 DEBUG (MainThread) [custom_components.visonic.client] Visonic Connection Device Type is ethernet {<PyConfiguration.DownloadCode: 0>: 'AAAA', <PyConfiguration.ForceStandard: 9>: False, <PyConfiguration.ForceAutoEnroll: 1>: False, <PyConfiguration.AutoSyncTime: 2>: True, <PyConfiguration.PluginLanguage: 3>: 'EN', <PyConfiguration.MotionOffDelay: 4>: 120, <PyConfiguration.SirenTriggerList: 5>: ['intruder'], <PyConfiguration.B0_Enable: 6>: False, <PyConfiguration.B0_Min_Interval_Time: 7>: 5, <PyConfiguration.B0_Max_Wait_Time: 8>: 30}
2022-01-12 10:58:06 DEBUG (MainThread) [custom_components.visonic.pyvisonic] Setting TCP socket Options
2022-01-12 10:58:07 DEBUG (MainThread) [custom_components.visonic.pyvisonic] Initialising Protocol - Using Home Assistant Loop
2022-01-12 10:58:07 DEBUG (MainThread) [custom_components.visonic.pyvisonic] [Settings] Force Standard set to False
2022-01-12 10:58:07 DEBUG (MainThread) [custom_components.visonic.pyvisonic] [Settings] Force Auto Enroll set to False
2022-01-12 10:58:07 DEBUG (MainThread) [custom_components.visonic.pyvisonic] [Settings] Force Auto Sync Time set to True
2022-01-12 10:58:07 DEBUG (MainThread) [custom_components.visonic.pyvisonic] [Settings] Download Code set to AA AA
2022-01-12 10:58:07 DEBUG (MainThread) [custom_components.visonic.pyvisonic] [Settings] Language set to EN
2022-01-12 10:58:07 DEBUG (MainThread) [custom_components.visonic.pyvisonic] [Settings] Motion Off Delay set to 120
2022-01-12 10:58:07 DEBUG (MainThread) [custom_components.visonic.pyvisonic] [Settings] Siren Trigger List set to ['intruder']
2022-01-12 10:58:07 DEBUG (MainThread) [custom_components.visonic.pyvisonic] [Settings] B0 Enable set to False
2022-01-12 10:58:07 DEBUG (MainThread) [custom_components.visonic.pyvisonic] [Settings] B0 Min Interval set to 5
2022-01-12 10:58:07 DEBUG (MainThread) [custom_components.visonic.pyvisonic] [Settings] B0 Max Wait Time set to 30
2022-01-12 10:58:07 DEBUG (MainThread) [custom_components.visonic.pyvisonic] [Connection] Connected to local Protocol handler and Transport Layer
2022-01-12 10:58:07 DEBUG (MainThread) [custom_components.visonic.pyvisonic] [_clearList] Setting queue empty
2022-01-12 10:58:07 DEBUG (MainThread) [custom_components.visonic.pyvisonic] [StartDownload] Starting download mode
2022-01-12 10:58:07 DEBUG (MainThread) [custom_components.visonic.pyvisonic] [sendPdu] Sending Command (Exit) raw data 0d 0f f0 0a waiting for message response []
2022-01-12 10:58:07 DEBUG (MainThread) [custom_components.visonic.pyvisonic] [sendPdu] Command has a wait time after transmission 1.5
2022-01-12 10:58:07 DEBUG (MainThread) [custom_components.visonic.pyvisonic] [Controller] download_counter is 1
2022-01-12 10:58:08 DEBUG (MainThread) [custom_components.visonic.client] ........... connection made
2022-01-12 10:58:08 DEBUG (MainThread) [custom_components.visonic.pyvisonic] [Controller] download_counter is 2
2022-01-12 10:58:09 DEBUG (MainThread) [custom_components.visonic.pyvisonic] [sendPdu] Sending Command (Stop) raw data 0d 0b f4 0a waiting for message response []
2022-01-12 10:58:09 DEBUG (MainThread) [custom_components.visonic.pyvisonic] [sendPdu] Command has a wait time after transmission 1.5
2022-01-12 10:58:09 DEBUG (MainThread) [custom_components.visonic.pyvisonic] [Controller] download_counter is 3
2022-01-12 10:58:10 DEBUG (MainThread) [custom_components.visonic.pyvisonic] [sendPdu] Resetting expected response counter, it got to 3 Response list length before 0 after 1
2022-01-12 10:58:10 DEBUG (MainThread) [custom_components.visonic.pyvisonic] [sendPdu] Setting Download Mode to true
2022-01-12 10:58:10 DEBUG (MainThread) [custom_components.visonic.pyvisonic] [sendPdu] Sending Command (Start Download Mode) waiting for message response ['0X3C']
2022-01-12 10:58:14 DEBUG (MainThread) [custom_components.visonic.pyvisonic] [Controller] Trigger Panel Download Attempt - Not yet received the panel details
2022-01-12 10:58:14 DEBUG (MainThread) [custom_components.visonic.pyvisonic] [StartDownload] Starting download mode
2022-01-12 10:58:14 DEBUG (MainThread) [custom_components.visonic.pyvisonic] [sendPdu] Resetting expected response counter, it got to 5 Response list length before 0 after 1
2022-01-12 10:58:14 DEBUG (MainThread) [custom_components.visonic.pyvisonic] [sendPdu] Setting Download Mode to true
2022-01-12 10:58:14 DEBUG (MainThread) [custom_components.visonic.pyvisonic] [sendPdu] Sending Command (Start Download Mode) waiting for message response ['0X3C']
2022-01-12 10:58:37 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)
2022-01-12 10:58:37 DEBUG (MainThread) [custom_components.visonic.client] Visonic update event 10 {'condition': 10}

According to your log information, the integration sends the download command (twice) to the panel but gets no data response from the panel. As you are getting the downloading indication on the panel display I would assume that data is getting to the panel but not back out to the Wemos. Are you getting data out of your panel at all, although without a multimeter or oscilloscope I’m not sure how you can tell?

The Baud Rate should be 9600 for a Powermax+ with no parity and 1 stop bit
Apart from that I’m struggling to understand why it isn’t working.

I’ve just released a new version, including a formal release so HACS users get it as well.

It’s a minor update to add 2 PowerMaster sensors to the list

I’ve also succumbed to add a Buy Me A Coffee link :love_you_gesture:
Recently I was asked if I had a donations page and I mentioned it to my familly, they convinced me to add one and said now was the right time. To the people who have followed and used this integration over the past 4 years or so, you will know that I develop software for the benefit of everyone. The software isn’t really being developed anymore, it’s now being supported and so I’ve finally done the deed and created a BMAC account.

Hello,

Im trying to install ESP home on my WEMOS but get the following error; can somebody help me?

C:\temp\wemos>python -m esphome .\visonic.yaml run
e[33mWARNING Calling ESPHome with the configuration before the command is deprecated and will be removed in the future. e[0m
e[33mWARNING Please instead use:e[0m
e[33mWARNING    esphome run .\visonic.yamle[0m
e[32mINFO Reading configuration .\visonic.yaml...e[0m
e[33mWARNING 'visonic_interface': Using the '_' (underscore) character in the hostname is discouraged as it can cause problems with some DHCP and local name services. For more information, see https://esphome.io/guides/faq.html#why-shouldn-t-i-use-underscores-in-my-device-namee[0m
e[32mINFO Generating C++ source...e[0m
e[32mINFO Compiling app...e[0m
Processing visonic_interface (board: d1_mini; framework: arduino; platform: platformio/espressif8266 @ 2.6.3)
---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Verbose mode can be enabled via `-v, --verbose` option
CONFIGURATION: https://docs.platformio.org/page/boards/espressif8266/d1_mini.html
PLATFORM: Espressif 8266 (2.6.3) > WeMos D1 R2 and mini
HARDWARE: ESP8266 80MHz, 80KB RAM, 4MB Flash
PACKAGES:
 - framework-arduinoespressif8266 3.20704.0 (2.7.4)
 - tool-esptool 1.413.0 (4.13)
 - toolchain-xtensa 2.40802.200502 (4.8.2)
LDF: Library Dependency Finder -> http://bit.ly/configure-pio-ldf
LDF Modes: Finder ~ off, Compatibility ~ soft
Found 31 compatible libraries
Scanning dependencies...
Dependency Graph
|-- <ESPAsyncTCP-esphome> 1.2.3
|-- <ESPAsyncWebServer-esphome> 2.1.0
|   |-- <ESPAsyncTCP-esphome> 1.2.3
|   |-- <Hash> 1.0
|   |-- <ESP8266WiFi> 1.0
|-- <DNSServer> 1.1.1
|-- <ESP8266WiFi> 1.0
|-- <ESP8266mDNS> 1.2
Building in release mode
Compiling .pioenvs\visonic_interface\src\main.cpp.o
Compiling .pioenvs\visonic_interface\src\stream_server.cpp.o
Compiling .pioenvs\visonic_interface\lib492\ESPAsyncTCP-esphome\ESPAsyncTCPbuffer.cpp.o
Compiling .pioenvs\visonic_interface\lib492\ESPAsyncTCP-esphome\SyncClient.cpp.o
src\stream_server.cpp: In member function 'void StreamServerComponent::read()':
src\stream_server.cpp:59:65: error: 'min' was not declared in this scope
         size_t read = this->stream_->readBytes(buf, min(len, 128));
                                                                 ^
src\stream_server.cpp:59:65: note: suggested alternative:
In file included from c:\users\niels\.platformio\packages\toolchain-xtensa\xtensa-lx106-elf\include\c++\4.8.2\algorithm:62:0,
                 from src/esphome/core/optional.h:19,
                 from src\esphome/core/component.h:7,
                 from src\stream_server.h:19,
                 from src\stream_server.cpp:17:
c:\users\niels\.platformio\packages\toolchain-xtensa\xtensa-lx106-elf\include\c++\4.8.2\bits\stl_algo.h:4226:5: note:   'std::min'
     min(initializer_list<_Tp> __l, _Compare __comp)
     ^
In file included from src\stream_server.cpp:19:0:
src\stream_server.cpp: In member function 'virtual void StreamServerComponent::dump_config()':
src\stream_server.cpp:75:64: error: 'network_get_address' was not declared in this scope
     ESP_LOGCONFIG(TAG, "  Address: %s:%u", network_get_address().c_str(), this->port_);
                                                                ^
src\esphome/core/log.h:97:90: note: in definition of macro 'esph_log_config'
   esp_log_printf_(ESPHOME_LOG_LEVEL_CONFIG, tag, __LINE__, ESPHOME_LOG_FORMAT(format), ##__VA_ARGS__)
                                                                                          ^
src\stream_server.cpp:75:5: note: in expansion of macro 'ESP_LOGCONFIG'
     ESP_LOGCONFIG(TAG, "  Address: %s:%u", network_get_address().c_str(), this->port_);
     ^
*** [.pioenvs\visonic_interface\src\stream_server.cpp.o] Error 1
.\visonic.yaml: In lambda function:
.\visonic.yaml:112:62: error: no matching function for call to 'StreamServerComponent::StreamServerComponent(esphome::uart::ESP8266UartComponent*&)'
.\visonic.yaml:112:62: note: candidates are:
In file included from src\main.cpp:56:0:
src\stream_server.h:34:14: note: StreamServerComponent::StreamServerComponent(Stream*)
     explicit StreamServerComponent(Stream *stream) : stream_{stream} {}
              ^
src\stream_server.h:34:14: note:   no known conversion for argument 1 from 'esphome::uart::ESP8266UartComponent*' to 'Stream*'
src\stream_server.h:32:7: note: StreamServerComponent::StreamServerComponent(const StreamServerComponent&)
 class StreamServerComponent : public esphome::Component {
       ^
src\stream_server.h:32:7: note:   no known conversion for argument 1 from 'esphome::uart::ESP8266UartComponent*' to 'const StreamServerComponent&'
src\stream_server.h:32:7: note: StreamServerComponent::StreamServerComponent(StreamServerComponent&&)
src\stream_server.h:32:7: note:   no known conversion for argument 1 from 'esphome::uart::ESP8266UartComponent*' to 'StreamServerComponent&&'
.\visonic.yaml:114:28: error: could not convert '{stream_server}' from '<brace-enclosed initializer list>' to 'std::vector<esphome::Component*>'
.\visonic.yaml:115:3: warning: control reaches end of non-void function [-Wreturn-type]
*** [.pioenvs\visonic_interface\src\main.cpp.o] Error 1
======================================================================================================== [FAILED] Took 4.15 seconds ========================================================================================================

And now I’m getting this error; can somebody give me some adivce? I’ve beentrying for hours but nothing works…

C:\WEMOS> python -m esphome .\visonic.yaml run
e[33mWARNING Calling ESPHome with the configuration before the command is deprecated and will be removed in the future. e[0m
e[33mWARNING Please instead use:e[0m
e[33mWARNING    esphome run .\visonic.yamle[0m
e[32mINFO Reading configuration .\visonic.yaml...e[0m
e[33mWARNING 'visonic_interface': Using the '_' (underscore) character in the hostname is discouraged as it can cause problems with some DHCP and local name services. For more information, see https://esphome.io/guides/faq.html#why-shouldn-t-i-use-underscores-in-my-device-namee[0m
e[32mINFO Generating C++ source...e[0m
e[31mERROR Error copying file C:\Users\Niels\AppData\Local\Programs\Python\Python310\lib\site-packages\esphome\components\esp8266\post_build.py.script to .\.esphome/build/visonic_interface\post_build.py: [Errno 2] No such file or directory: 'C:\\Users\\Niels\\AppData\\Local\\Programs\\Python\\Python310\\lib\\site-packages\\esphome\\components\\esp8266\\post_build.py.script'e[0m

Hi,

I updated ESPHome to the latest version and it stopped working for me as well.

The ESPHome community have updated the way things work and you’ll need to download the latest stream server files.

Go here

Click “Code” and select Download Zip.
Open the zip file and extract the 2 files:
stream_server.h
stream_server.cpp

Replace them in the main directory (where visonic.yaml is) and in the visonic_interface/src directory.

Then give it a try

The command is the other way around now, it’s like this

python -m esphome run .\visonic.yaml

This worked for me.

Hi Dave,

I managed to flash the file, many thanks for your support, now gong to install the board into the panel!

Thanks again for your support, really appreciated!

Wired up the WEMOS board to the panel; I see the following 5 enitites in home assistant:
visonic_interface_on_board_led
visonic_interface_relay_trigger1
visonic_interface_relay_trigger2
visonic_interface_relay_trigger3
visonic_interface_relay_trigger4

And 1 device called visonic_interface

Log says this (home-assistant.log):
2022-01-20 12:45:00 ERROR (MainThread) [custom_components.visonic.pyvisonic] ERROR Connection Lost : disconnected because the Ethernet/USB connection was externally terminated.
2022-01-20 12:45:00 ERROR (MainThread) [custom_components.visonic.pyvisonic] ERROR Connection Lost : disconnected due to exception [Errno 104] Connection reset by peer
2022-01-20 12:45:05 ERROR (MainThread) [custom_components.visonic.pyvisonic] No Exception handler to call, terminating Component…

When I add the alarm panel card, it says invalid configuration and I cannot select an entity.

What I’m I doing wrong and is there perhaps an more extended log availlable somewhere on my system?

Regards Niels