Oh, so you have just followed the “tracks”, and soldered the wires to the right areas :-)?
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:
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.
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.