Plugin for Visonic Powermax Integration

@mamuli: It might be that by fixing the communication for the PowerMax Pro with partitions we have broken it for the PowerMax+. A number of messages are sent to the panel and we expect a certain response (in a defined order). If these responses don’t occur as expected, then it is seen as an error as the plugin comes in an unknown state. It will then do a reload of of Vera to try it again (a new startup). After 3 or 4 times it stops trying and the plugin won’t start up anymore. This is most likely what you see. You can verify this by looking at the ‘CommExceptions’ variable in the advanced tab. Most likely this will have value 4. If you clear the value (make the variable empty), the plugin will start again. But since the root cause still is there, it will lead to the same result.

Could you do the following for me? Please clear the value ‘CommExceptions’ (& make sure that debug logging is on) and save. Capture the LuaUPnP.log file and send it to me. Then I can figure out what is going wrong.

@Gatorcw: The description for the plugin from the Marketplace can be found here.

Thanks. In my Powermax device I’m only seeing tabs for “Control” “Event Log” “Advanced”. By entering my Zones in the “altid” field of the Advanced tab I got those zones populated as devices and it shows their real status. Under the Control tab, I only get a “Sync Time on Powermax and Vera” button. Is it possible I’m not in the Power Link mode?
I’m looking at wiki Visonic Powermax Alarm Panel, which has a totally different GUI than I have and it has the alarm reporting feature that I need. Is this the GUI for a new release that I don’t have installed?

Yes, indeed. Have a look at the Introduction topic. Note that according to mamuli the latest version has an issue with the PowerMax+. I am still looking for the logs of someone with a PowerMax+ to see what the issue is.

I am currently running version 0.95 (patched for my own need).
Can I move to hte new version without having to create again all the child devices ? My devices are already used in several scenes and I am not motivated to update all my scenes.

I own a PowerMax Pro Partitions without a PowerLink. Is the new version stable for this panel ?

I’m seeing a similar issue to mamuli with my powermax plus, I’ve only had the alarm for a week, and haven’t fully explored it yet, I’d connected it with an old - about 8 years old -prolific usb to rs232 adaptor I had in a drawer. I assumed this might have caused the drop in comms. I have just taken delivery of a startech ftdi cable today, and will see if that makes a difference over the next few days.

In principle: yes. But no guarantees. It will at least generate your devices automatically if they don’t stay.

Relatively stable. I have found one issue that I need to fix. There needs to be a certain amount of time (>500 ms) between the last receive and a new send. I was using ‘call_delay’ with a 1 second interval (which should be enough). But I’ve found out that call_delay does not guarantee a 1 sec interval (it will be <= 1 sec). So I need to check the actual time elapsed and wait longer if needed.

I don’t think it is related to your cable, but something in the send/receive sequence in the plugin that is going wrong. I’ll need the LuaUPnP.log file to verify this.

1.0 RC2 (r61) is available which should make sure that there is enough time between a message receive and send.

Very great job. Felicitations, nirb. 8)

I thought that Powerlink mode would be available only for people with a Powerlink module but I discovered that Powerlink mode is finally used in my case even if I have no Powerlink module. Good surprise 8)

Some of my devices (window sensors) were deleted and then created again, but not all. Not a big problem finally, I was able to update my scenes quickly.

Everything seems to be working well (arm, disarm, sensors update, event logs, …).

The problem I had with the old version relative to the devices arm state has disappeared. 8)

Instant arm is not working, meaning working the same way as a normal arm with an exit delay. I assume it is due to my panel setup ? I think there is a panel parameter to enable instant arming and probably I did not enable it.

After a restart, Ready to use is displayed and mode is Standard. Few seconds later, Reading panel settings is dispayed and mode switches immediately to Powerlink. Finally, few seconds later, Ready to use is displayed again and I get a beep from the panel. Is it the expected behaviour ? Is there a solution to avoid the panel beep after each restart ? It could be very annoying when I develop plugins (due to several reload usage in this case).

Can I suppress the values of variables MotionZones, PGM, … now that I am using the Powerlink mode ?

Regarding the event logs, there is a message for each partition, meaning when I arm all partitions, I get an arm message for partition 1 and an arm message for partition 2. When consulting the event logs on the panel, this information is provided. Do you thing you could add this information ?

Instant arm is like a regular arm, only the entry delay is not there. So you will trigger an alarm immediately even if you have an entry delay set. You’re probably referring to a quick arm, which is the same as a regular arm with pin code ‘0000’.

The PowerMax Pro with partitions has an auto-enrollment for Powerlink mode. It seems to reset that enrollment after each ‘INIT’ message (which is sent at startup). Hence you first see standard mode, then the panel enrolls again, then the download starts and ‘Powerlink’ mode will be displayed.
You probably get a trouble beep from the panel since the alive message has not been acknowledged in time due to the reload an Vera init sequence. You can try 2 things to prevent this. 1: have the PowerMax plugin earlier in the startup sequence (low device nr), or 2: replace the ‘MSG_INIT’ in the pmStartup function by a ‘MSG_RESTORE’.

These variables don’t need to be set manually - you can set everything through the UI. They are still used though.

Multiple partitions are not supported. I don’t have a panel that supports partitions and the messages regarding partitions have not been reverse-engineered (yet). If you could assist with that, then we can add it.

Instant arm is like a regular arm, only the entry delay is not there. So you will trigger an alarm immediately even if you have an entry delay set. You’re probably referring to a quick arm, which is the same as a regular arm with pin code ‘0000’.[/quote]

You’re right, thank you for the explanation.

The PowerMax Pro with partitions has an auto-enrollment for Powerlink mode. It seems to reset that enrollment after each 'INIT' message (which is sent at startup). Hence you first see standard mode, then the panel enrolls again, then the download starts and 'Powerlink' mode will be displayed. You probably get a trouble beep from the panel since the alive message has not been acknowledged in time due to the reload an Vera init sequence. You can try 2 things to prevent this. 1: have the PowerMax plugin earlier in the startup sequence (low device nr), or 2: replace the 'MSG_INIT' in the pmStartup function by a 'MSG_RESTORE'.

Could it be simply a beep when the panel leaves the download mode ? When getting panel settings, I see TELECHARG on the panel (DOWNLOAD in english).
If not, your option 1 is not obvious, I have no idea how to change Vera device id. Regarding your option 2, can you give more information ? I replaced

pmSendMessage("MSG_INIT")

by

pmSendMessage("MSG_RESTORE")a- line 771 ?

No, don’t expect that (don’t have it myself and never heard of it).

[quote=“lolodomo, post:471, topic:169028”]If not, your option 1 is not obvious, I have no idea how to change Vera device id. Regarding your option 2, can you give more information ? I replaced

pmSendMessage("MSG_INIT")

by

pmSendMessage("MSG_RESTORE")

That is correct.

No, don’t expect that (don’t have it myself and never heard of it).

[quote=“lolodomo, post:471, topic:169028”]If not, your option 1 is not obvious, I have no idea how to change Vera device id. Regarding your option 2, can you give more information ? I replaced

pmSendMessage("MSG_INIT")

by

pmSendMessage("MSG_RESTORE")

That is correct.[/quote]

Just tried but it change nothing regarding the panel beep. Change noticed: mode is intially “Unknown” rather than “Standard”.
The beep cleary appears when exiting from the download mode.

Edit: in fact, the change seems to just avoid to go first in the Standard mode. With the original code, I get “Unknown” too but quickly replaced by “Standard”.

[quote=“lolodomo, post:473, topic:169028”]Just tried but it change nothing regarding the panel beep. Change noticed: mode is intially “Unknown” rather than “Standard”.
The beep cleary appears when exiting from the download mode.[/quote]
That’s right. At start mode is set as ‘Unknown’. If our download code is accepted, then the mode switches to ‘Powerlink’. If the code is not accepted, it is set to ‘Standard’.

Yes, since the ‘INIT’ message is not sent anymore the Powerlink enrollment is not broken. So the download code is accepted immediately and it won’t show ‘Standard’ mode.

What option have you set on the panel for ‘Powerlink failure’? Is that set to ‘Report’ or ‘Disable reports’?

Do you have the PC software to test if that also gives a beep if you exit download mode?

I don’t find this setting on the panel. I even think I have nothing relative to Powerlink in my menus.
Can you tell me in what top level menu I should find it ?

Do you have the PC software to test if that also gives a beep if you exit download mode?

I have this software during a time and I believe (not sure) that I got the beep when the soft was disconnected.

[quote=“lolodomo, post:475, topic:169028”]I don’t find this setting on the panel. I even think I have nothing relative to Powerlink in my menus.
Can you tell me in what top level menu I should find it ?[/quote]
It should be under menu option 7, but might well be gone for the partition firmware.

[quote=“nlrb, post:461, topic:169028”]@mamuli: It might be that by fixing the communication for the PowerMax Pro with partitions we have broken it for the PowerMax+. A number of messages are sent to the panel and we expect a certain response (in a defined order). If these responses don’t occur as expected, then it is seen as an error as the plugin comes in an unknown state. It will then do a reload of of Vera to try it again (a new startup). After 3 or 4 times it stops trying and the plugin won’t start up anymore. This is most likely what you see. You can verify this by looking at the ‘CommExceptions’ variable in the advanced tab. Most likely this will have value 4. If you clear the value (make the variable empty), the plugin will start again. But since the root cause still is there, it will lead to the same result.

Could you do the following for me? Please clear the value ‘CommExceptions’ (& make sure that debug logging is on) and save. Capture the LuaUPnP.log file and send it to me. Then I can figure out what is going wrong.[/quote]

@nlrb: yes, the value of ‘CommExceptions’ reaches 4 when i start seen “Powermax Alarm Panel[31] : Startup Lua Failed” message. Clearing that enables Powermax for some time and again stops working from Vera when reaches ‘CommExceptions’ reaches 4 again. I have manages to get the LuaUPnP.log, but not sure how can i send it to you. Shall i attach it to one of messages in this forum? it is about 500KB file (contains logs from restart till the time ‘CommExceptions’ reaches 4).

@mamuli: thanks very much for the logs! I’ve committed 1.0 RC3 (r62) which should correct both your issues. Could you please give it a try?

nlrb,
Just sent you some trace files on R60 and R61. Looks like I was 30mins too early for R62. I’ll wait for your findings to try out 62.
Mano

@nlrb: Thanks for the quick response. However I am not able to try r62 (or r61) as it is not able to automatically getting into Powerlink mode and not autocreating the devices. after creating the main powermax device, it appears in Standard mode and after doing a manual reload, although it comes in PowerLink mode, but still no devices are created. Also, i get this message “PowerMax : Trouble - check system”. Reverted to r60, it again is able to automatically get into Powerlink mode and autocreate the devices/sensors.

Please let me know if you want to analyse the logs corresponding to r62.