Visonic Powermax Powerlink protocol description

Forum about Visonic products like Powermax Plus and Powermax Pro

Moderators: Rene, Willem4ever

Re: Visonic Powermax Powerlink protocol description

Postby ayasystems » Sat Jul 05, 2014 12:17 pm

What can you tell me about it:

NOTICE: [Sat Jul 5 13:16:39 2014 packetManager:0349]Packet received
NOTICE: [Sat Jul 5 13:16:39 2014 logBuffer:0158]Buffer: A5 09 07 00 00 00 00 00 00 00 00 43
NOTICE: [Sat Jul 5 13:16:39 2014 packetManager:0361]Packet not recognized
NOTICE: [Sat Jul 5 13:16:39 2014 logBuffer:0158]Buffer: A5 09 07 00 00 00 00 00 00 00 00 43
NOTICE: [Sat Jul 5 13:16:39 2014 packetManager:0349]Packet received
NOTICE: [Sat Jul 5 13:16:39 2014 logBuffer:0158]Buffer: A5 09 08 00 00 00 00 00 00 00 00 43
NOTICE: [Sat Jul 5 13:16:39 2014 packetManager:0361]Packet not recognized
NOTICE: [Sat Jul 5 13:16:39 2014 logBuffer:0158]Buffer: A5 09 08 00 00 00 00 00 00 00 00 43
NOTICE: [Sat Jul 5 13:16:39 2014 packetManager:0349]Packet received
NOTICE: [Sat Jul 5 13:16:39 2014 logBuffer:0158]Buffer: A5 09 09 00 00 00 00 00 00 00 00 43
NOTICE: [Sat Jul 5 13:16:39 2014 packetManager:0361]Packet not recognized
NOTICE: [Sat Jul 5 13:16:39 2014 logBuffer:0158]Buffer: A5 09 09 00 00 00 00 00 00 00 00 43


I'm using pmaxd if viknet and this packet is not recognized

Best regards
ayasystems
Starting Member
Starting Member
 
Posts: 39
Joined: May 2014

Re: Visonic Powermax Powerlink protocol description

Postby uAlex73 » Sat Jul 05, 2014 7:38 pm

The packet looks to be correct, but nobody has decoded the the A5, message 07, 08 and 09 yet. I saw somewhere the 07 is a device status message ... So if you can decode and share it with us? :D
DomotiGa / Z-Wave / RFXCom / Visonic PowerMaster / Home Assistant / Zigbee2MQTT / DSMR Reader / Toon1 (rooted)
uAlex73
Member
Member
 
Posts: 217
Joined: January 2012

Re: Visonic Powermax Powerlink protocol description

Postby ayasystems » Sat Jul 05, 2014 7:40 pm

I think it can be a phone line fail. I will try to test it. Thanks
ayasystems
Starting Member
Starting Member
 
Posts: 39
Joined: May 2014

Re: Visonic Powermax Powerlink protocol description

Postby uAlex73 » Sat Jul 05, 2014 7:54 pm

The A5 messages aren't send when e.g. a sensor detects something or such error ... Normally it reports the (global) status of the system, if you want to have more understandig, have a look into the following (lua) source code:
http://code.mios.com/trac/mios_visonic- ... wser/trunk

It is the best documented PowerMax protocol decoding i could find.
DomotiGa / Z-Wave / RFXCom / Visonic PowerMaster / Home Assistant / Zigbee2MQTT / DSMR Reader / Toon1 (rooted)
uAlex73
Member
Member
 
Posts: 217
Joined: January 2012

Re: Visonic Powermax Powerlink protocol description

Postby Edwin2008 » Fri Nov 21, 2014 10:46 pm

Yes, found it
** edwin **
Edwin2008
Advanced Member
Advanced Member
 
Posts: 712
Joined: November 2008
Location: Netherlands

Re: Visonic Powermax Powerlink protocol description

Postby Robby » Sat Dec 06, 2014 3:30 pm

Hi all,

I recently started developing a node.js app which is going to run on my Synology.
The information found over here is very valueable and basic communication with my PowerMax has been accomplished.
Howerever, the 3E command as mentioned by user nlrb on page 3 of this topic (Wed Nov 14, 2012 12:05 am) is not yet clear to me. The only command I get a reasonable answer from the powermax is this one (pre-amble, checksum and post-amble have been left out):

Code: Select all
0x3e 0x00 0x04 0x36 0x00 0xb0 0x00 0x00 0x00 0x00 0x00


This command results in a response like Rene mentioned in the post above.
Unfortunately, I cannot determine the type of PowerMax I am using, although I know its a PowerMax Pro (without partitions). Version info is correct however.
When sending other 3E commands like 'User pincodes' or 'Zone names', the powermax sends rubbish back to me.

Hope someone can give me a working example of the message to be sent to retrieve the zone names (which is the most important to me now)?
Robby
Starting Member
Starting Member
 
Posts: 5
Joined: December 2014

Re: Visonic Powermax Powerlink protocol description

Postby hydrogenetic » Tue Dec 09, 2014 10:25 am

I'm working towards integrating the powerlink protocol with Domoticz. There was a version of viknet's daemon in the repository so I have adapted that. I was able to fix a serial port initialisation problem and make a few improvements with the packet handling. I would have uploaded these already but the changes are littered with my experiments and mods for Domoticz. I have hit upon a possible problem and wanted to get some feedback to see whether anyone else has encountered it.

I'm running this using the dual rs232 board in a powermaster connected by cat5 to a proper serial port on a linux server. It mostly works fine but occasionally I get a comms failure showing up on the panel, not a good thing with an alarms system! I had thought a possible explanation may be the 2-3m of cat 5 although according to Wikipedia this is well within any limits even for normal serial cable (allegedly cat 5 cable will support longer runs). I will try a better cable (shielding is an issue) and see how it goes but in the meanwhile I was hopping for some feedback to see if others had encountered the comms failure message and what cable types others were using.

My changes also incorporate tracking of the powerlink ping / keepalive messages (0xAB,0x03) which I track around 30s for a warning and 60s for a failure (with a reset if we get a valid message or a system reset). The tracking of the messages seems to work as expected but does not reveal anything going on at the time and I'm still getting data from the panel anyway. I did try sending a periodical ack after the 30s warning and also closing / opening the serial port but that also does not help. I thought going in and out of programming mode may resolve the issue but it could also interfere with the operation of the panel so I haven't done that. Maybe there is a better way to fix this if it occurs or maybe there is some other message that needs handling with more than a simple ack.

Anyway I will increase the logging in the daemon and see if anything else pops up but as this can take days to happen I was after some other user experience for reference i.e. have you seen the issue and how are you connecting to the panel.
hydrogenetic
Starting Member
Starting Member
 
Posts: 25
Joined: December 2014

Re: Visonic Powermax Powerlink protocol description

Postby marck » Sat Dec 13, 2014 3:45 pm

@Hydro

I follow your progress with interest. Given that I'm also a user of Domoticz, connecting the Visonic Powermax is already for a long time on my wish list.

This won't help you very much, but I have connected the powermax to ethernet via a Digi Portserver. So RS232 port is connected via a custom made ethernet cable to the Digi Portserver. This connection is stable, but keep in mind I use it occasionally for a short time period, max 1 hour. Just for Remote Programming purposes.
marck
Member
Member
 
Posts: 127
Joined: September 2010

Re: Visonic Powermax Powerlink protocol description

Postby hydrogenetic » Fri Dec 19, 2014 11:23 pm

@marck

Thanks for your interest. I'm going to see how it goes with the evohome patch I submitted before I consider submitting anything else.
hydrogenetic
Starting Member
Starting Member
 
Posts: 25
Joined: December 2014

Re: Visonic Powermax Powerlink protocol description

Postby hydrogenetic » Sat Dec 20, 2014 12:30 am

I still haven't made my new cable but I did get round to increasing the logging on the daemon. The results either lead me to think that the comms is really bad or that the daemon needs to do something additional to work correctly.

Here's a snippet of a failure...

Code: Select all
Dec 19 18:00:22 domoticz pmaxd[27194]: [Fri Dec 19 18:00:22 2014 logBufferRW:0241]Buffer [<-] (12) AB 03 00 1E 00 31 2E 33 33 00 00 43
Dec 19 18:00:22 domoticz pmaxd[27194]: [Fri Dec 19 18:00:22 2014 PmaxPLPing:0402]Acknowledging Powerlink ping (packet may contain fw ver).....
Dec 19 18:00:22 domoticz pmaxd[27194]: [Fri Dec 19 18:00:22 2014 logBufferRW:0241]Buffer [->] (02) 02 43
Dec 19 18:00:52 domoticz pmaxd[27194]: [Fri Dec 19 18:00:52 2014 logBufferRW:0241]Buffer [<-] (12) AB 03 00 1E 00 31 2E 33 33 00 00 43
Dec 19 18:00:52 domoticz pmaxd[27194]: [Fri Dec 19 18:00:52 2014 PmaxPLPing:0402]Acknowledging Powerlink ping (packet may contain fw ver).....
Dec 19 18:00:52 domoticz pmaxd[27194]: [Fri Dec 19 18:00:52 2014 logBufferRW:0241]Buffer [->] (02) 02 43
Dec 19 18:01:22 domoticz pmaxd[27194]: [Fri Dec 19 18:01:22 2014 logBufferRW:0241]Buffer [<-] (12) AB 03 00 1E 00 31 2E 33 33 00 00 43
Dec 19 18:01:22 domoticz pmaxd[27194]: [Fri Dec 19 18:01:22 2014 PmaxPLPing:0402]Acknowledging Powerlink ping (packet may contain fw ver).....
Dec 19 18:01:22 domoticz pmaxd[27194]: [Fri Dec 19 18:01:22 2014 logBufferRW:0241]Buffer [->] (02) 02 43
Dec 19 18:01:32 domoticz pmaxd[27194]: [Fri Dec 19 18:01:32 2014 logBufferRW:0241]Buffer [<-] (12) AB 03 00 1E 00 31 2E 33 33 00 00 43
Dec 19 18:01:32 domoticz pmaxd[27194]: [Fri Dec 19 18:01:32 2014 PmaxPLPing:0402]Acknowledging Powerlink ping (packet may contain fw ver).....
Dec 19 18:01:32 domoticz pmaxd[27194]: [Fri Dec 19 18:01:32 2014 logBufferRW:0241]Buffer [->] (02) 02 43
Dec 19 18:01:42 domoticz pmaxd[27194]: [Fri Dec 19 18:01:42 2014 logBufferRW:0241]Buffer [<-] (12) AB 03 00 1E 00 31 2E 33 33 00 00 43
Dec 19 18:01:42 domoticz pmaxd[27194]: [Fri Dec 19 18:01:42 2014 PmaxPLPing:0402]Acknowledging Powerlink ping (packet may contain fw ver).....
Dec 19 18:01:42 domoticz pmaxd[27194]: [Fri Dec 19 18:01:42 2014 logBufferRW:0241]Buffer [->] (02) 02 43
Dec 19 18:01:52 domoticz pmaxd[27194]: [Fri Dec 19 18:01:52 2014 logBufferRW:0241]Buffer [<-] (12) AB 03 00 1E 00 31 2E 33 33 00 00 43
Dec 19 18:01:52 domoticz pmaxd[27194]: [Fri Dec 19 18:01:52 2014 PmaxPLPing:0402]Acknowledging Powerlink ping (packet may contain fw ver).....
Dec 19 18:01:52 domoticz pmaxd[27194]: [Fri Dec 19 18:01:52 2014 logBufferRW:0241]Buffer [->] (02) 02 43
Dec 19 18:02:02 domoticz pmaxd[27194]: [Fri Dec 19 18:02:02 2014 logBufferRW:0241]Buffer [<-] (12) AB 03 00 1E 00 31 2E 33 33 00 00 43
Dec 19 18:02:02 domoticz pmaxd[27194]: [Fri Dec 19 18:02:02 2014 PmaxPLPing:0402]Acknowledging Powerlink ping (packet may contain fw ver).....
Dec 19 18:02:02 domoticz pmaxd[27194]: [Fri Dec 19 18:02:02 2014 logBufferRW:0241]Buffer [->] (02) 02 43
Dec 19 18:02:34 domoticz pmaxd[27194]: [Fri Dec 19 18:02:34 2014 initSerialPort:0086]there are 1 device(s) in your config file
Dec 19 18:02:34 domoticz pmaxd[27194]: [Fri Dec 19 18:02:34 2014 initSerialPort:0106]opening /dev/ttyS0
Dec 19 18:02:34 domoticz pmaxd[27194]: [Fri Dec 19 18:02:34 2014 logBufferRW:0241]Buffer [->] (02) 02 43
Dec 19 18:02:34 domoticz pmaxd[27194]: [Fri Dec 19 18:02:34 2014 main:0575]Ping ack retry - we have not heard a ping in a while
Dec 19 18:02:38 domoticz pmaxd[27194]: [Fri Dec 19 18:02:38 2014 initSerialPort:0086]there are 1 device(s) in your config file
Dec 19 18:02:38 domoticz pmaxd[27194]: [Fri Dec 19 18:02:38 2014 initSerialPort:0106]opening /dev/ttyS0
Dec 19 18:02:38 domoticz pmaxd[27194]: [Fri Dec 19 18:02:38 2014 logBufferRW:0241]Buffer [->] (02) 02 43
Dec 19 18:02:38 domoticz pmaxd[27194]: [Fri Dec 19 18:02:38 2014 main:0575]Ping ack retry - we have not heard a ping in a while
Dec 19 18:02:42 domoticz pmaxd[27194]: [Fri Dec 19 18:02:42 2014 initSerialPort:0086]there are 1 device(s) in your config file
Dec 19 18:02:42 domoticz pmaxd[27194]: [Fri Dec 19 18:02:42 2014 initSerialPort:0106]opening /dev/ttyS0
Dec 19 18:02:42 domoticz pmaxd[27194]: [Fri Dec 19 18:02:42 2014 logBufferRW:0241]Buffer [->] (02) 02 43
Dec 19 18:02:42 domoticz pmaxd[27194]: [Fri Dec 19 18:02:42 2014 main:0575]Ping ack retry - we have not heard a ping in a while
Dec 19 18:02:46 domoticz pmaxd[27194]: [Fri Dec 19 18:02:46 2014 initSerialPort:0086]there are 1 device(s) in your config file
Dec 19 18:02:46 domoticz pmaxd[27194]: [Fri Dec 19 18:02:46 2014 initSerialPort:0106]opening /dev/ttyS0
Dec 19 18:02:46 domoticz pmaxd[27194]: [Fri Dec 19 18:02:46 2014 logBufferRW:0241]Buffer [->] (02) 02 43
Dec 19 18:02:46 domoticz pmaxd[27194]: [Fri Dec 19 18:02:46 2014 main:0575]Ping ack retry - we have not heard a ping in a while
Dec 19 18:02:50 domoticz pmaxd[27194]: [Fri Dec 19 18:02:50 2014 initSerialPort:0086]there are 1 device(s) in your config file
Dec 19 18:02:50 domoticz pmaxd[27194]: [Fri Dec 19 18:02:50 2014 initSerialPort:0106]opening /dev/ttyS0
Dec 19 18:02:50 domoticz pmaxd[27194]: [Fri Dec 19 18:02:50 2014 logBufferRW:0241]Buffer [->] (02) 02 43
Dec 19 18:02:50 domoticz pmaxd[27194]: [Fri Dec 19 18:02:50 2014 main:0575]Ping ack retry - we have not heard a ping in a while
Dec 19 18:02:54 domoticz pmaxd[27194]: [Fri Dec 19 18:02:54 2014 initSerialPort:0086]there are 1 device(s) in your config file
Dec 19 18:02:54 domoticz pmaxd[27194]: [Fri Dec 19 18:02:54 2014 initSerialPort:0106]opening /dev/ttyS0
Dec 19 18:02:54 domoticz pmaxd[27194]: [Fri Dec 19 18:02:54 2014 logBufferRW:0241]Buffer [->] (02) 02 43
Dec 19 18:02:54 domoticz pmaxd[27194]: [Fri Dec 19 18:02:54 2014 main:0575]Ping ack retry - we have not heard a ping in a while
Dec 19 18:02:58 domoticz pmaxd[27194]: [Fri Dec 19 18:02:58 2014 initSerialPort:0086]there are 1 device(s) in your config file
Dec 19 18:02:58 domoticz pmaxd[27194]: [Fri Dec 19 18:02:58 2014 initSerialPort:0106]opening /dev/ttyS0
Dec 19 18:02:58 domoticz pmaxd[27194]: [Fri Dec 19 18:02:58 2014 logBufferRW:0241]Buffer [->] (02) 02 43
Dec 19 18:02:58 domoticz pmaxd[27194]: [Fri Dec 19 18:02:58 2014 main:0575]Ping ack retry - we have not heard a ping in a while
Dec 19 18:03:02 domoticz pmaxd[27194]: [Fri Dec 19 18:03:02 2014 initSerialPort:0086]there are 1 device(s) in your config file
Dec 19 18:03:02 domoticz pmaxd[27194]: [Fri Dec 19 18:03:02 2014 initSerialPort:0106]opening /dev/ttyS0
Dec 19 18:03:02 domoticz pmaxd[27194]: [Fri Dec 19 18:03:02 2014 logBufferRW:0241]Buffer [->] (02) 02 43
Dec 19 18:03:02 domoticz pmaxd[27194]: [Fri Dec 19 18:03:02 2014 main:0575]Ping ack retry - we have not heard a ping in a while
Dec 19 18:03:02 domoticz pmaxd[27194]: [Fri Dec 19 18:03:02 2014 main:0587]Ping timeout - comms may be down


The curious thing is that the time between those ping messages varies and seems to be mostly 10 or 30 seconds which is quite random. Makes me wonder if they shouldn't be every 10 seconds reliably and I'm missing loads of them. That only makes more questions though I mean surely if the comms was that bad I'd be seeing all sorts of corrupted messages all the time rather than just nothing?

I just looked up what the Digi Portserver is and I was just thinking I need something exactly like that if all else fails! Maybe I could try something with an Arduino so I can program it to maintain the ping directly inside the panel similar to viknet's solution viewtopic.php?f=68&t=7152 Although I guess if I can make it work reliably how it is now then knowing if the comms failed directly in Domoticz is also useful.
hydrogenetic
Starting Member
Starting Member
 
Posts: 25
Joined: December 2014

Re: Visonic Powermax Powerlink protocol description

Postby hydrogenetic » Sun Dec 21, 2014 5:47 am

So I made up a new cable with screened cat 6a cable and a db9 on one end and an rj45 on the other. The screen is only connected to the db9 end to avoid any grounding loops.... Anyway it didn't make the problem any better

Initially when I first started testing the connection would stay ok for several days before there were any problems now it seems to only last a few hours. This seems odd to say the least. One change I did make was to use select to make it wait for an interrupt so it should see the message and respond almost instantly (or at least as fast as the serial connection will allow). Although the serial connection is obviously very slow the server is relatively fast compared with a powerlink or whatever. One unlikely scenario that occurs to me is if the ack is sent before the panel expects it, it could just be going into a black hole and be ignored. I don't think it's very likely that is what's happening unless the code in the panel is quite poor and the panel occasionally goes off and does stuff after sending the keep alive message and before setting up the required response codes and handler or whatever.

I did consider trying to use the status request message instead of the ack to try and keep the connection from failing but having a look at the vera plugin mentioned in this thread has revealed a much more interesting message....

Code: Select all
0xAB,0x06,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x43


This does seem to be specifically designed to restore a failed connection so definitely part of what I'm looking for.

Overall the problem I'm experiencing still doesn't seem right to me and suggests something still requires fixing. It seems the panel decides there is a comms failure after some random amount of time and then just stops sending the ping. That isn't the consistent behaviour one expects from this sort of thing. If it was for example a secondary timeout then I'd expect some other time period to reveal itself. Like maybe from the point it was armed or we restarted our emulated powerlink.

I'm going to try an experiment of sending a periodic status request once an hour using the original A2 message (not the AB message above which also returns the status). It wouldn't surprise me if the powerlink did something like that anyway as a fall back to missing a message. I will switch to the AB message if that doesn't work and maybe slow my ack response down and see if any of that helps.
hydrogenetic
Starting Member
Starting Member
 
Posts: 25
Joined: December 2014

Re: Visonic Powermax Powerlink protocol description

Postby hydrogenetic » Sun Dec 21, 2014 7:42 am

More investigation reveals that there are actually a fair amount of repeated messages coming from the panel when I request the status. It therefore seems likely that the panel is actually very slow and doesn't cope well if you send an ack back quickly. This actually would also fit with what I saw with the ping. Extrapolating from the above, the normal time between ping messages should be 30 seconds. Just before a failure I'm seeing the interval drop to 10 seconds. My guess is that this is actually because the panel doesn't see my ack at all and is therefore repeating the message every 10 seconds. So basically I think the panel pings then tries an additional 3 times on failure before deciding there is a problem.

The changes I made (scanning for the checksum & postamble directly when reading rather than waiting for the timeout) had the by product of making the ack go out a lot more quickly. So I changed this again by putting the ack in my send queue instead of doing the immediate reply. I then let the main loop go round to wait and see if there is any more data to receive before doing the send. First I tried a 100ms read select delay then 1 second, I think there were improvements but there were still duplicate messages. I then tried a 2 second delay and this seemed to get rid of the duplicates. I think that viknet's original code waited at least 2 seconds before responding to a packet so this may explain why my changes seemed to make things worse. Now I think I have an idea of what is happening I'm tempted to look for a drop in the ping interval and maybe do something if I see the panel is not seeing my ack. Sorry if any of this has been mentioned in the thread before but I haven't spotted it yet.
hydrogenetic
Starting Member
Starting Member
 
Posts: 25
Joined: December 2014

Re: Visonic Powermax Powerlink protocol description

Postby hydrogenetic » Sun Dec 21, 2014 10:23 am

So a 2 second delay didn't work any better than before. It actually failed pretty quickly. I'm now wondering if it's not just inherently unreliable. I'd like to get a handle on if this is normal behaviour or if there is something wrong with the hardware, code etc.

So I don't suppose anyone else has feedback on whether they get repeated messages or see the 10 sec delay between ping messages (which afaik also indicates a repeat due to failure).
hydrogenetic
Starting Member
Starting Member
 
Posts: 25
Joined: December 2014

Re: Visonic Powermax Powerlink protocol description

Postby Rene » Sun Dec 21, 2014 4:35 pm

When you acknowledge the keepalive of the Powerlink the frequency is one each 30 seconds. When you do not acknowledge the keepalives, the frequency is increased and after 10 non-acknowledged keepalives, the panel will display a Powerlink error and stops sending the keepalive.
Rene.
User avatar
Rene
Global Moderator
Global Moderator
 
Posts: 1689
Joined: October 2008
Location: Netherlands

Re: Visonic Powermax Powerlink protocol description

Postby hydrogenetic » Wed Dec 24, 2014 3:05 pm

@Rene: Thanks for the feedback.

I didn't really have anything to compare with when I started so as to be able to gauge what normal behaviour would be like. I've spent a while looking in a bit more detail and it looks like not only are there repeated messages but also missing messages too so I figured there was a definite chance of an issue to do with the serial port itself.

When I looked for my usb serial port to use for this I found the com header for my motherboard instead. The problem is as I'm using a virtual machine that I now strongly suspect the implementation of the virtual com port is buggy and that Oracle won't fix it as there seemed to be some reports of similar issues dating years back closed without a fix then reopened and left again. I searched again for the usb serial and couldn't find it so I decided to stop wasting my time and just buy another and it came already which surprised me.

I used the usb pass-through this time to attach the device to the vm and so far it's been working much better no missed messages, repeats or problems with the ping. So the moral of the story is don't use the VirtualBox serial port function because it sucks and you will waste lots of time try to fix problems that don't exist but the good News is my code changes weren't to blame for once :D
hydrogenetic
Starting Member
Starting Member
 
Posts: 25
Joined: December 2014

PreviousNext

Return to Visonic Alarm systems

Who is online

Users browsing this forum: No registered users and 1 guest