SmartThings Community

[RELEASE] Visonic Powermax Alarm

dth_security
dth_sensors
requires_server
project_security
project_sensors

(Oscar B) #347

@cjcharles I will hook up a serial connection as soon as possible, but will take a couple of weeks. I should have a regular USB-RS232 dongle which I hope I can use? Would appreciate a simple schematic for connecting it though :slight_smile:
I have a Powermaster 10 which seems to crash the esp8266 when going into “DOWNLOADING” state.


#348

@cjcharles: Hi Chris, thank you very much for your work in this ESP8266 firmware and for sharing it.

I’m trying to enroll ESP8266 into my Powermax PRO panel, but isn’t possible, after trying every way I can think of (tried different PINs, different sequences, reboots, waiting between steps, etc).

I suspect it’s a overflow or timeout as I have many zones enrolled (I think I have 15 or 16 zones) and I see when I enter the “Alarm status” page it crashes and restarts most of the times.

I can see mqtt messages with zone events and can also “Arm home”, via web page and mqtt, so I guess communication between panel and ESP8266 is working fine and isn’t not a communications voltage, noise or timing problem.

My Powermax PRO panel has the Enroll Powerlink option and in fact I already used it with some other softwares as Vera plugin and Visonic Driver (https://www.domoticaforum.eu/viewtopic.php?f=68&t=11129&p=88843#p88843) so panel is capable and working fine.

When I try the “Enroll pwlink” in the panel I get the happy beeps most of the time (only if the ESP8266 was recently rebooted, if it’s running for some time it fails miserably with the sad beep).

Any clue how to solve it?

Edit: I played with the telnet debug: I can’t see the AB 0A 00 01 00 00 00 00 00 00 00 43 enrollment message at any time. When I press the memorize option in the panel I see nothing in the Telnet terminal.

Edit2: I rely heavily in my MQTT/Homeseer/Powermax integration so I had to remove and deactivate this until I have a clue on how to solve it.


(Oscar B) #349

@cjcharles I soldered on a cable to the power supply (on the backside, where the original cable attach) and it worked fine. However something happened when I re-mounted everything, and the PS died. Ordered a new one (40€) but thought I wanted to avoid doing the same thing again.
Will it work powering it from USB and having a common ground? I guess I’ll splice the cable otherwise, to avoid soldering on the PCB.

For hooking up serial monitor, it’s just a matter of connecting a RS232 RX to pin 9?


(cjcharles) #350

I’ve been having some problems with SmartThings forums posting my responses in emails so I’m trying to copy everything in to the forums from my email responses. Hence sorry about the extra delay!

Hi all, sorry for the delay I’ve been away for a bit and will be for a while more, so supporting you is difficult. Some things I can say from a remote read of my emails:

You can use an external usb power supply but definitely make sure you use a good one as cheap ones can sometimes do strange backwards conduction which may cause problems, that’s why I don’t recommend it normally.

Yes debugging via pin 9 to rx is good when connected like that. So long as your usb-rs232 converter is at ttl levels, ie it’s not a just a serial port on the back of your PC.

I’ve never had a problem with 16 zones before so not sure it could cause a problem… The quick test you could do would be to remove a couple of zones from the Powerlink installer menu and then try enrolling again. If that is the issue I’ll have a look at the library again as it should deal with 32 from memory, but possibly not on the Pro model…maybe… The other thing would be to send me a list of the names of the zones. Perhaps one is using a strange character that doesn’t have an ascii code…?


(Jonathan Coley) #351

@cjcharles, I’m a newbie on this forum…as stated by others thank you for your work on this. I have a US Powermax Pro and programmed a Wemos D1 mini with a simple serial read, connected the RX, TX and GND to the PMX PC/IP ports. I get a never-ending series of 00, 00, B0, 58, repeat. I know that you’ve detailed the right way to communicate with the PMX Pro above, but with the ‘no request, open serial read’ approach…any thoughts as to what I’m seeing in the data stream above? I’m not trying to reinvent the wheel, but on a whim just decided to snoop in on the serial data and was wondering about the above. Thanks, and I appreciate your time.


(cjcharles) #352

It seems there are some terrible serial chips and electronics in the Powermax, hence some boards will not communicate with anything on their serial connection. That’s why I coded the Arduino device, as it fixes a lot of those problems due to having a more resilient serial port to fix the timing and voltage levels.
I would suggest that is the next step for you, since while you see that stream the Wemos won’t be able to create a connection. It doesn’t fix every board but it does work for most of them I’ve tried.


(Jonathan Coley) #353

Charles, thanks for your quick reply. I actually tried it on the Arduino UNO first and got the same string. What should a straight read from the serial port look like (no request sent, no registering the pseudo p-link, just hook up the wires and read)? Thanks, Jonathan.


(cjcharles) #354

There all sorts of messages that can be sent in the background, depending on things such as whether Powerlink has been used before and is enrolled (even if disconnected), such as zone events messages, ping messages… But they are all formatted as messages with preamble, length,…


(Jonathan Coley) #355

Charles, I appreciate your reply. I have a Wemos D1 on order and will be loading that up with the proper code soon. Thank you…your work on all of this is incredibly valuable!!!


(Jonathan Coley) #356

Charles, I received the Wemos D1 today, and am compiling the code for it. The module pmax.cpp on this line: const char* PowerMaxAlarm::GetStr##tblName(int index)\ with the following error:

pmax.cpp:9: error: stray ‘##’ in program

const char* PowerMaxAlarm::GetStr##tblName(int index)\

…can you confirm this is the proper syntax? Thanks, Jonathan.


(Oscar B) #357

I was able to get some logs off the device using Telnet mode, there are messages marked with Packet not recognized which I expect to be the culprit! Is this enough information, @cjcharles ? Or do you need me to hook up against the serial interface?

~ $ nc 10.5.5.109 23
Connected to WiFi, type '?' for help.
?
Allowed commands:
	 c - exit
	 C - reset device
	 p - output debug messages
	 P - stop outputing debug messages
	 h - Arm Home
	 d - Disarm
	 a - Arm Away
	 D - Direct mode (relay all bytes from client to PMC and back with no processing, close connection to exit
	 g - Get Event Log
	 t - Restore Comms
	 v - Exit download mode
	 r - Request Status Update
	 j - Dump Application Status to JSON
	 H - Get free heap
p
Debug Logs enabled type 'P' (capital) to disable
Sending the following buffer to serial TTY
checksum: 000E
serial write OK
Passing invalid packet to packetManager
checksum: 0095
Packet not correctly formated
BufferSize: 12
Buffer: A5 00 01 00 00 00 00 00 00 00 80 43 
End of packet treatment
--- new packet 615697 ----
checksum: 0095
checksum OK
Packet received
BufferSize: 12
Buffer: A5 00 01 00 00 00 00 00 00 00 80 43 
Packet not recognized
BufferSize: 12
Buffer: A5 00 01 00 00 00 00 00 00 00 80 43 
Sending the following buffer to serial TTY
checksum: 00BA
serial write OK
End of packet treatment
--- new packet 615761 ----
checksum: 0090
checksum OK
Packet received
BufferSize: 12
Buffer: B0 03 39 07 FF 08 FF 02 09 24 01 43 
Packet not recognized
BufferSize: 12
Buffer: B0 03 39 07 FF 08 FF 02 09 24 01 43 
Sending the following buffer to serial TTY
checksum: 00BA
serial write OK
End of packet treatment
--- new packet 615824 ----
checksum: 0015
checksum OK
Packet received
BufferSize: 12
Buffer: A5 00 02 00 00 00 00 00 00 00 00 43 
Command found: 'Status Update Zone Battery'
Sending the following buffer to serial TTY
checksum: 00BA
serial write OK
Status Update : Zone state/Battery
End of packet treatment
--- new packet 615881 ----
checksum: 0014
checksum OK
Packet received
BufferSize: 12
Buffer: A5 00 03 00 00 00 00 00 00 00 00 43 
Command found: 'Status Update Zone tamper'
Sending the following buffer to serial TTY
checksum: 00BA
serial write OK
Status Update : Zone active/tampered
End of packet treatment
--- new packet 615940 ----
checksum: 00D8
checksum OK
Packet received
BufferSize: 12
Buffer: A5 00 04 00 E6 FF 0D 42 04 00 00 43 
Command found: 'Status Update Panel'
Sending the following buffer to serial TTY
checksum: 00BA
serial write OK
System status: Disarmed (0), Flags : Alert-in-Memory Trouble Zone-event Arm/disarm-event Alarm-event
Creating JSON string
End of packet treatment
--- new packet 616002 ----
checksum: 00C9
checksum OK
Packet received
BufferSize: 12
Buffer: A5 00 05 00 00 00 01 01 00 12 34 43 
Packet not recognized
BufferSize: 12
Buffer: A5 00 05 00 00 00 01 01 00 12 34 43 
Sending the following buffer to serial TTY
checksum: 00BA
serial write OK
End of packet treatment
--- new packet 616069 ----
checksum: 00F1
checksum OK
Packet received
BufferSize: 12
Buffer: A5 00 06 FF 1F 00 00 00 00 00 00 43 
Command found: 'Status Update Zone Bypassed'
Sending the following buffer to serial TTY
checksum: 00BA
serial write OK
Status Update : Zone Enrolled/Bypassed
Zone 1 is enrolled
Zone 2 is enrolled
Zone 3 is enrolled
Zone 4 is enrolled
Zone 5 is enrolled
Zone 6 is enrolled
Zone 7 is enrolled
Zone 8 is enrolled
Zone 9 is enrolled
Zone 10 is enrolled
Zone 11 is enrolled
Zone 12 is enrolled
Zone 13 is enrolled
End of packet treatment
--- new packet 616155 ----
checksum: 0010
checksum OK
Packet received
BufferSize: 12
Buffer: A5 00 07 00 00 00 00 00 00 00 00 43 
Packet not recognized
BufferSize: 12
Buffer: A5 00 07 00 00 00 00 00 00 00 00 43 
Sending the following buffer to serial TTY
checksum: 00BA
serial write OK
End of packet treatment
--- new packet 616225 ----
checksum: 000F
checksum OK
Packet received
BufferSize: 12
Buffer: A5 00 08 00 00 00 00 00 00 00 00 43 
Packet not recognized
BufferSize: 12
Buffer: A5 00 08 00 00 00 00 00 00 00 00 43 
Sending the following buffer to serial TTY
checksum: 00BA
serial write OK
End of packet treatment
--- new packet 616299 ----
checksum: 000E
checksum OK
Packet received
BufferSize: 12
Buffer: A5 00 09 00 00 00 00 00 00 00 00 43 
Packet not recognized
BufferSize: 12
Buffer: A5 00 09 00 00 00 00 00 00 00 00 43 
Sending the following buffer to serial TTY
checksum: 00BA
serial write OK
End of packet treatment
--- new packet 616366 ----
checksum: 000D
checksum OK
Packet received
BufferSize: 12
Buffer: A5 00 0A 00 00 00 00 00 00 00 00 43 
Packet not recognized
BufferSize: 12
Buffer: A5 00 0A 00 00 00 00 00 00 00 00 43 
Sending the following buffer to serial TTY
checksum: 00BA
serial write OK
End of packet treatment
--- new packet 616429 ----
checksum: 000C
checksum OK
Packet received
BufferSize: 12
Buffer: A5 00 0B 00 00 00 00 00 00 00 00 43 
Packet not recognized
BufferSize: 12
Buffer: A5 00 0B 00 00 00 00 00 00 00 00 43 
Sending the following buffer to serial TTY
checksum: 00BA
serial write OK
End of packet treatment
--- new packet 616498 ----
checksum: 000B
checksum OK
Packet received
BufferSize: 12
Buffer: A5 00 0C 00 00 00 00 00 00 00 00 43 
Packet not recognized
BufferSize: 12
Buffer: A5 00 0C 00 00 00 00 00 00 00 00 43 
Sending the following buffer to serial TTY
checksum: 00BA
serial write OK
End of packet treatment
--- new packet 616564 ----
checksum: 000A
checksum OK
Packet received
BufferSize: 12
Buffer: A5 00 0D 00 00 00 00 00 00 00 00 43 
Packet not recognized
BufferSize: 12
Buffer: A5 00 0D 00 00 00 00 00 00 00 00 43 
Sending the following buffer to serial TTY
checksum: 00BA
serial write OK
End of packet treatment
--- new packet 616628 ----
checksum: 0083
checksum OK
Packet received
BufferSize: 11
Buffer: B0 03 39 06 FF 08 FF 01 3B 02 43 
Packet not recognized
BufferSize: 11
Buffer: B0 03 39 06 FF 08 FF 01 3B 02 43 
Sending the following buffer to serial TTY
checksum: 00BA
serial write OK
End of packet treatment
--- new packet 616698 ----
checksum: 0009
checksum OK
Packet received
BufferSize: 12
Buffer: A5 00 0E 00 00 00 00 00 00 00 00 43 
Packet not recognized
BufferSize: 12
Buffer: A5 00 0E 00 00 00 00 00 00 00 00 43 
Sending the following buffer to serial TTY
checksum: 00BA
serial write OK
End of packet treatment
--- new packet 616761 ----
checksum: 0008
checksum OK
Packet received
BufferSize: 12
Buffer: A5 00 0F 00 00 00 00 00 00 00 00 43 
Packet not recognized
BufferSize: 12
Buffer: A5 00 0F 00 00 00 00 00 00 00 00 43 
Sending the following buffer to serial TTY
checksum: 00BA
serial write OK
End of packet treatment
--- new packet 616859 ----
checksum: 0003
checksum OK
Packet received
BufferSize: 12
Buffer: A5 00 10 00 04 00 00 00 00 00 00 43 
Packet not recognized
BufferSize: 12
Buffer: A5 00 10 00 04 00 00 00 00 00 00 43 
Sending the following buffer to serial TTY
checksum: 00BA
serial write OK
End of packet treatment
Sending the following buffer to serial TTY
checksum: 000E
serial write OK
--- new packet 625037 ----
checksum: 00BA
checksum OK
Packet received
BufferSize: 2
Buffer: 02 43 
Command found: 'Acknowledgement'
End of packet treatment
Sending the following buffer to serial TTY
checksum: 000E
serial write OK
--- new packet 656038 ----
checksum: 00BA
checksum OK
Packet received
BufferSize: 2
Buffer: 02 43 
Command found: 'Acknowledgement'
End of packet treatment
--- new packet 675604 ----
checksum: 00C6
checksum OK
Packet received
BufferSize: 12
Buffer: A5 00 04 00 06 00 00 42 04 00 00 43 
Command found: 'Status Update Panel'
Sending the following buffer to serial TTY
checksum: 00BA
serial write OK
System status: Disarmed (0), Flags : Alert-in-Memory Trouble
End of packet treatment
--- new packet 684306 ----
checksum: 00F8
checksum OK
Packet received
BufferSize: 12
Buffer: A5 00 0E 00 10 00 00 00 00 00 00 43 
Packet not recognized
BufferSize: 12
Buffer: A5 00 0E 00 10 00 00 00 00 00 00 43 
Sending the following buffer to serial TTY
checksum: 00BA
serial write OK
End of packet treatment
--- new packet 684607 ----
checksum: 00B4
checksum OK
Packet received
BufferSize: 11
Buffer: B0 03 39 06 FF 08 FF 01 09 03 43 
Packet not recognized
BufferSize: 11
Buffer: B0 03 39 06 FF 08 FF 01 09 03 43 
Sending the following buffer to serial TTY
checksum: 00BA
serial write OK
End of packet treatment
Sending the following buffer to serial TTY
checksum: 000E
serial write OK
--- new packet 687039 ----
checksum: 00BA
checksum OK
Packet received
BufferSize: 2
Buffer: 02 43 
Command found: 'Acknowledgement'
End of packet treatment
Sending the following buffer to serial TTY
checksum: 000E
serial write OK
--- new packet 718069 ----
checksum: 00BA
checksum OK
Packet received
BufferSize: 2
Buffer: 02 43 
Command found: 'Acknowledgement'
End of packet treatment

Ok I have some more interesting info. It seems like it enrols properly(isch), since it starts outputing a lot of info in the status, including pin codes. However, every time I do this, it crashes when it is about to print "zoneTypeStr":" it seems, it stops and reboots on exactly the same output every time:

"stat_str":"Disarmed",
"lastCom":1,
"panelType":7,
"panelTypeStr":"PowerMaster10",
"panelModelType":18,
"alarmState":0,
"alarmStateStr":"None",
"alarmTrippedZones":[],
"config":{"installer_pin":"----",
"masterinstaller_pin":"----",
"powerlink_pin":"----",
"user_pins":["----","----","----"],
"telephone_numbers":[],
"serial_number":"3012xxxx",
"eprom":"J-701465 I15.010",
"software":"JS702176 I15.019",
"partitionCnt":1},
"flags":70,
"flags_ready":false,
"flags_alertInMemory":true,
"flags_trouble":true,
"flags_bypasOn":false,
"flags_last10sec":false,
"flags_zoneEvent":false,
"flags_armDisarmEvent":true,
"flags_alarmEvent":false,
"enroled_zones":[{"zoneName":"Entre",
"zoneType":0,
"zoneTypeStr":"

I haven’t checked yet, but “Entre” should be a regular door sensor, as far as I remember.

@cjcharles I have a capture of a Download session as well, but I’d rather send that to you in an email instead (guessing it contains pins and so on). Send an email to domain joos dot se and my first name from my username :slight_smile:


(Phil) #358

Hi Oscar-b, what connection did you do to get the usb connected to the device?
I am wanting to output the powermaster30 data and not sure which connection to make to get it out…
Cheers


(Rajan) #359

I have finally got round to installing this and have logged in to the IP address and can see that the wemos module works - arm/disarm etc.
However I have got stuck on step 10 from here:

when I open the app and look at the device it just comes up saying “checking status…” and there’s not settings to change - where am I going wrong please?


(Rajan) #360

noticed that when I went into the wemos settings it said {“ip_for_st”:“яяяяяяяяяяяяяяяяя”,
“port_for_st”:яяяяяяя,
“inactivity_seconds”:10,
“neohub_relay_firmware_date”:“Jan 24 2018 - 17:02:17”}

is that the issue?


(cjcharles) #361

Grab the latest firmware off my Github and it will be easy to update settings - you’ve got quite an old version now.

@pbathuk You can use telnet (just connect to the ip), but you’ll never get full logs like that as the interface is too slow to keep up with all the comms with the alarm. The best option is connecting a serial-usb dongle to the TX1 pin on the Wemos (and ground too).


(Rajan) #363

thanks I have updated the firmware now but still can’t do the next step as the settings doesn’t have this option for me:

  1. Open the new Alarm device (e.g. if you called it ‘Visonic Alarm’ in the above step) on SmartThings on your phone and go into settings. Here you should add the IP address for your Wemos, and I also suggest adding a Pre and/or Post name in the settings (e.g. putting Visonic in PreName means that all created zones will have Visonic added at the front of them - this will make them easier to identify in your device list.). I suggest not changing the inactivity timeout yet.

(cjcharles) #364

You can also do it through the IDE webpage. But maybe check what app you are using? The classic ST app is much easier to use than the new one


(Rajan) #365

Thanks, tried it in both apps but still nothing.
Sorry to sound silly but what would I need to update in the ide webpage? I’ve made it a static IP in my router settings already


(cjcharles) #366

Can you go to the IDE and then devices, then choose the Visonic device you added, i want to confirm all the settings are correct there, that’s all i can think of that would prevent it from loading.


(Rajan) #367

Name: Visonic Alarm

Device Network Id: AABBCCDDEEFF Format (MAC Address from router)

Type: Alarm Capability

Version: Published

Hub: Home Hub