Add WiFi to your alarm with esp8266
Moderators: Rene, Willem4ever
Add WiFi to your alarm with esp8266
Wrote a C++ library that can communicate with PowerMax alarms (based on excellent code and articles found here).
First use for this library is to add WiFi capability to PM for less than 5£ using Wemos D1 ESP8266 board.
Here are some highlights:
- ESP8622 can be connected to serial interface of PM alarm, powered from 12V rail, and hidden inside (no wires!)
- No other dependencies, no need for a PC or raspberry Pi
- You have access to ESP8622 sketch source code, and can flash updates to the ESP firmware via WiFi (no need for opening the PM)
ESP8622 can work in two modes:
- stand alone: (where device acts like a powerlink, actively communicating with alarm)
In this mode it exposes a telnet and simple web interface, via telnet you can arm/disarm system etc.
- transparent packet relay: in this mode ESP will not interpret packets, will simply pass all traffic from remote app to the alarm.
This mode is used by Windows command line application - that you can build, modify etc.
Code status:
- ready to play with for DEVELOPERS (people who can read, modify code)
- minimal to no security (anyone on wifi network can talk to alarm, it's up to you to implement something more suitable)
- I will be working on improvements to the code and possibly will implement simple authentication etc
More details and source code:
https://github.com/irekzielinski/PowerMaxAlarm
I'm looking forward for you guys to contribute to the project!
Cheers,
Irek
ps. If you have any issues with the code, it might be faster for your to raise those directly on GitHub:
https://github.com/irekzielinski/PowerMaxAlarm/issues
First use for this library is to add WiFi capability to PM for less than 5£ using Wemos D1 ESP8266 board.
Here are some highlights:
- ESP8622 can be connected to serial interface of PM alarm, powered from 12V rail, and hidden inside (no wires!)
- No other dependencies, no need for a PC or raspberry Pi
- You have access to ESP8622 sketch source code, and can flash updates to the ESP firmware via WiFi (no need for opening the PM)
ESP8622 can work in two modes:
- stand alone: (where device acts like a powerlink, actively communicating with alarm)
In this mode it exposes a telnet and simple web interface, via telnet you can arm/disarm system etc.
- transparent packet relay: in this mode ESP will not interpret packets, will simply pass all traffic from remote app to the alarm.
This mode is used by Windows command line application - that you can build, modify etc.
Code status:
- ready to play with for DEVELOPERS (people who can read, modify code)
- minimal to no security (anyone on wifi network can talk to alarm, it's up to you to implement something more suitable)
- I will be working on improvements to the code and possibly will implement simple authentication etc
More details and source code:
https://github.com/irekzielinski/PowerMaxAlarm
I'm looking forward for you guys to contribute to the project!
Cheers,
Irek
ps. If you have any issues with the code, it might be faster for your to raise those directly on GitHub:
https://github.com/irekzielinski/PowerMaxAlarm/issues
Last edited by irekz on Tue Aug 02, 2016 11:45 am, edited 1 time in total.
-
- Member
- Posts: 66
- Joined: Wed Dec 04, 2013 11:06 am
Re: Add WiFi to your alarm with esp8266
That's fantastic!
-
- Starting Member
- Posts: 5
- Joined: Mon Jul 25, 2016 10:45 pm
Re: Add WiFi to your alarm with esp8266
Irek,
I recently came across your project for connecting to the Visonic Powermax via WiFi and was immediately interested. I have had a Powermax + operational for 8 years and have been looking into using the Raspberry Pi as an interface. I am more interested in your approach so decided to see if I could get your code installed and running for a test. I have the WeMos esp8266 installed and operational and running other sketches but when I try to verify/compile your code I get all kinds of errors. First, please understand I am not a software coder of either C++ or Python so I am starting at a real disadvantage. The first error is that it cannot find the Pmax.h file which I have put in multiple folders. So I removed that #include to see how far I could get but there are multiple other errors so I gave up. So, either I have done something completely wrong or your code is just not ready to be sent to the esp8266 yet.
Would appreciate some guidance....
Richard
I recently came across your project for connecting to the Visonic Powermax via WiFi and was immediately interested. I have had a Powermax + operational for 8 years and have been looking into using the Raspberry Pi as an interface. I am more interested in your approach so decided to see if I could get your code installed and running for a test. I have the WeMos esp8266 installed and operational and running other sketches but when I try to verify/compile your code I get all kinds of errors. First, please understand I am not a software coder of either C++ or Python so I am starting at a real disadvantage. The first error is that it cannot find the Pmax.h file which I have put in multiple folders. So I removed that #include to see how far I could get but there are multiple other errors so I gave up. So, either I have done something completely wrong or your code is just not ready to be sent to the esp8266 yet.
Would appreciate some guidance....
Richard
Re: Add WiFi to your alarm with esp8266
Hi,
I am trying to make this work on my PowerMax Pro, but I am facing a few issues and I hope you will be able to help me with this:
1. When compiling the sketch I am getting following error:
sketch/pmax.cpp
undefined reference to `os_getLocalTime(unsigned char&, unsigned char&, unsigned char&, unsigned char&, unsigned char&, unsigned char&)'
When I remove the os_getLocalTime from the pmax.cpp file I can compile the sketch and load it to the WeMos board.
After that I can connect succesful to the board via Telnet and/or the windows application and I can see a lot of information by pressing r
But when trying to (a)rm or (d)isarm nothing happens.
Also when trying to read the signal strength for instance I get an access denied error:
!
[5][KeyPressHandling @ 104] Get zone signal strength
[6][serialHandler @ 34] --- new packet 16:08:36 ----
[6][PowerMaxAlarm::handlePacket @ 1739] Command found: 'Acknowledgement 2'
[6][serialHandler @ 34] --- new packet 16:08:36 ----
[6][PowerMaxAlarm::handlePacket @ 1739] Command found: 'Access denied'
[6][PowerMaxAlarm::OnAccessDenied @ 1254] Access denied
[6][serialHandler @ 34] --- new packet 16:08:37 ----
[6][PowerMaxAlarm::handlePacket @ 1739] Command found: 'Acknowledgement 2'
I am not sure if this is due to the fact I had to remove the os_getLocalTime function from the sketch?
Any help will be very much appreciated as this is a very interesting project
Regards
Bart
I am trying to make this work on my PowerMax Pro, but I am facing a few issues and I hope you will be able to help me with this:
1. When compiling the sketch I am getting following error:
sketch/pmax.cpp
When I remove the os_getLocalTime from the pmax.cpp file I can compile the sketch and load it to the WeMos board.
After that I can connect succesful to the board via Telnet and/or the windows application and I can see a lot of information by pressing r
But when trying to (a)rm or (d)isarm nothing happens.
Also when trying to read the signal strength for instance I get an access denied error:
!
[5][KeyPressHandling @ 104] Get zone signal strength
[6][serialHandler @ 34] --- new packet 16:08:36 ----
[6][PowerMaxAlarm::handlePacket @ 1739] Command found: 'Acknowledgement 2'
[6][serialHandler @ 34] --- new packet 16:08:36 ----
[6][PowerMaxAlarm::handlePacket @ 1739] Command found: 'Access denied'
[6][PowerMaxAlarm::OnAccessDenied @ 1254] Access denied
[6][serialHandler @ 34] --- new packet 16:08:37 ----
[6][PowerMaxAlarm::handlePacket @ 1739] Command found: 'Acknowledgement 2'
I am not sure if this is due to the fact I had to remove the os_getLocalTime function from the sketch?
Any help will be very much appreciated as this is a very interesting project
Regards
Bart
Re: Add WiFi to your alarm with esp8266
Hi Richard.retiredtech wrote:Irek,
The first error is that it cannot find the Pmax.h file which I have put in multiple folders. So I removed that #include to see how far I could get but there are multiple other errors so I gave up. So, either I have done something completely wrong or your code is just not ready to be sent to the esp8266 yet.
Would appreciate some guidance....
Richard
Directory structure needs to be the same as in Github:
c:\yourArduinoFolder\Libraries\PMax
c:\yourArduinoFolder\PowerMaxEsp8266
Check this link for more information:
https://www.arduino.cc/en/Guide/Libraries#toc5
I would also expect "c:\yourArduinoFolder\" to be listed in settings as "sketchbook location":
http://www.alanzucconi.com/wp-content/u ... 0/ard2.png
Please let me know if it works for you.
Kind regards,
Irek
Re: Add WiFi to your alarm with esp8266
This has been fixed on github.Botap wrote:Hi,
1. When compiling the sketch I am getting following error:
sketch/pmax.cppundefined reference to `os_getLocalTime(unsigned char&, unsigned char&, unsigned char&, unsigned char&, unsigned char&, unsigned char&)'
When I remove the os_getLocalTime from the pmax.cpp file I can compile the sketch and load it to the WeMos board.
We had number of email exchanges outside this forum.Botap wrote: [5][KeyPressHandling @ 104] Get zone signal strength
[6][serialHandler @ 34] --- new packet 16:08:36 ----
[6][PowerMaxAlarm::handlePacket @ 1739] Command found: 'Acknowledgement 2'
[6][serialHandler @ 34] --- new packet 16:08:36 ----
[6][PowerMaxAlarm::handlePacket @ 1739] Command found: 'Access denied'
[6][PowerMaxAlarm::OnAccessDenied @ 1254] Access denied
[6][serialHandler @ 34] --- new packet 16:08:37 ----
[6][PowerMaxAlarm::handlePacket @ 1739] Command found: 'Acknowledgement 2'
The original code was developed on PowerMax Complete system that supports auto-enrollment.
With Bart help I have much better understanding of older units and will update code on Github soon to support manual enrollment.
Kind regards,
Irek
-
- Starting Member
- Posts: 5
- Joined: Mon Jul 25, 2016 10:45 pm
Re: Add WiFi to your alarm with esp8266
irekz wrote:Hi Richard.retiredtech wrote:Irek,
The first error is that it cannot find the Pmax.h file which I have put in multiple folders. So I removed that #include to see how far I could get but there are multiple other errors so I gave up. So, either I have done something completely wrong or your code is just not ready to be sent to the esp8266 yet.
Would appreciate some guidance....
Richard
Directory structure needs to be the same as in Github:
c:\yourArduinoFolder\Libraries\PMax
c:\yourArduinoFolder\PowerMaxEsp8266
Check this link for more information:
https://www.arduino.cc/en/Guide/Libraries#toc5
I would also expect "c:\yourArduinoFolder\" to be listed in settings as "sketchbook location":
http://www.alanzucconi.com/wp-content/u ... 0/ard2.png
Please let me know if it works for you.
Kind regards,
Irek
Irek,
Yes, your instructions worked perfectly.....thank you!
Richard
Re: Add WiFi to your alarm with esp8266
Coolretiredtech wrote: Irek,
Yes, your instructions worked perfectly.....thank you!
Richard

I described this procedure on GitHub:
https://github.com/irekzielinski/PowerM ... MaxEsp8266
If you have any issues, don't hesitate to contact me or raise it via:
https://github.com/irekzielinski/PowerMaxAlarm/issues
Cheers,
Irek
-
- Starting Member
- Posts: 5
- Joined: Mon Jul 25, 2016 10:45 pm
Re: Add WiFi to your alarm with esp8266
Irek,
My Powermax is the + (plus) series and as a result your diagram showing connection of the esp8266 to the RS232 port is incorrect. My connection has 12 pins on it instead of 10. Before I continue on I need to make sure your code will run on the esp8266 connected to the Powermax+? I will find the correct pins for the Tx, Rx and Gnd on my 12 pin plug so that won't be a problem.
Richard
My Powermax is the + (plus) series and as a result your diagram showing connection of the esp8266 to the RS232 port is incorrect. My connection has 12 pins on it instead of 10. Before I continue on I need to make sure your code will run on the esp8266 connected to the Powermax+? I will find the correct pins for the Tx, Rx and Gnd on my 12 pin plug so that won't be a problem.
Richard
Re: Add WiFi to your alarm with esp8266
Hi Richard.retiredtech wrote:Irek,
My Powermax is the + (plus) series and as a result your diagram showing connection of the esp8266 to the RS232 port is incorrect. My connection has 12 pins on it instead of 10. Before I continue on I need to make sure your code will run on the esp8266 connected to the Powermax+? I will find the correct pins for the Tx, Rx and Gnd on my 12 pin plug so that won't be a problem.
Richard
Code should work with Powermax+. If you will get the pinout for your alarm - maybe you can draw a diagram - I will add it to guthub.
Thanks,
Irek
-
- Starting Member
- Posts: 5
- Joined: Mon Jul 25, 2016 10:45 pm
Re: Add WiFi to your alarm with esp8266
Irek,
I found the RS-232 pin-out for the Powermax+ at: http://www.domoticaforum.eu/viewtopic.p ... =45#p63022.
Richard
I found the RS-232 pin-out for the Powermax+ at: http://www.domoticaforum.eu/viewtopic.p ... =45#p63022.
Richard
-
- Starting Member
- Posts: 40
- Joined: Wed May 28, 2014 5:05 pm
Re: Add WiFi to your alarm with esp8266
Great work!!!
I'm using WR703N with viknet powermax code (pmaxd) from some years ago... (last mod done by me here-> http://www.domoticaforum.eu/viewtopic.p ... 373#p80373 )
I will try your code with my test (non production powermax)
Witch features are you implemented on web server?
Could you post some screenshoots?
Best regards!!!!
I'm using WR703N with viknet powermax code (pmaxd) from some years ago... (last mod done by me here-> http://www.domoticaforum.eu/viewtopic.p ... 373#p80373 )
I will try your code with my test (non production powermax)
Witch features are you implemented on web server?
Could you post some screenshoots?
Best regards!!!!
Re: Add WiFi to your alarm with esp8266
Sorry for the delay in response. I have been on holiday.ayasystems wrote:Witch features are you implemented on web server?
Could you post some screenshoots?
Web server allows to query state of the system (it outputs a JSON page).
To control the system - a telnet interface is exposed.
All of this can be easily modified to suit your needs.
Kind regards,
Irek