Visonic Powermax and Powermaster Component

After a long time trying to upgrade my Home Assistant I decided to to a clean install instead. Now everything with Visonic is working! :slight_smile:
Thanks!

As I was upgrading my OS on my Raspberry Pi a few days ago I rebooted my hardware and restarted my HA a lot of times. One of all times did the Visonic plugin go to an endless loop. Ass seen below it went to all those modes: Download, Standard, Download, Standard Plus, Download, Standard Plus and so on, all in a few minutes. The plugin worked flawless before and after this time.

It is not a big issue, as a restart of HA solved the issue and the issue only happend once since the new installation. (But I think it happend one time with my old setup too.)

I am afraid I cannot reproduce the issue, at least not in any easy way, and I am afraid that below logs is all I have saved from then, but maybe it can help the awsome component to be even better!

Se picture from my Home Assistant notification, and the logs from HA:

2020-04-07 21:07:02 ERROR (MainThread) [homeassistant.core] Error doing job: Future exception was never retrieved
Traceback (most recent call last):
File “/usr/local/lib/python3.7/concurrent/futures/thread.py”, line 57, in run
result = self.fn(*self.args, **self.kwargs)
TypeError: ‘bool’ object is not callable
2020-04-07 21:07:02 ERROR (MainThread) [homeassistant.core] Error doing job: Future exception was never retrieved
Traceback (most recent call last):
File “/usr/local/lib/python3.7/concurrent/futures/thread.py”, line 57, in run
result = self.fn(*self.args, **self.kwargs)
TypeError: ‘bool’ object is not callable
2020-04-07 21:07:03 ERROR (MainThread) [homeassistant.core] Error doing job: Future exception was never retrieved
Traceback (most recent call last):
File “/usr/local/lib/python3.7/concurrent/futures/thread.py”, line 57, in run
result = self.fn(*self.args, **self.kwargs)
TypeError: ‘bool’ object is not callable
2020-04-07 21:07:03 ERROR (MainThread) [homeassistant.core] Error doing job: Future exception was never retrieved
Traceback (most recent call last):
File “/usr/local/lib/python3.7/concurrent/futures/thread.py”, line 57, in run
result = self.fn(*self.args, **self.kwargs)
TypeError: ‘bool’ object is not callable
2020-04-07 21:07:03 ERROR (MainThread) [homeassistant.core] Error doing job: Future exception was never retrieved
Traceback (most recent call last):
File “/usr/local/lib/python3.7/concurrent/futures/thread.py”, line 57, in run
result = self.fn(*self.args, **self.kwargs)
TypeError: ‘bool’ object is not callable
2020-04-07 21:07:03 INFO (MainThread) [homeassistant.components.switch] Setting up switch.visonic


2020-04-07 21:07:20 INFO (MainThread) [homeassistant.components.binary_sensor] Setting up binary_sensor.visonic
2020-04-07 21:07:20 INFO (MainThread) [homeassistant.components.switch] Setting up switch.visonic
2020-04-07 21:07:20 ERROR (MainThread) [homeassistant.core] Error doing job: Task exception was never retrieved
Traceback (most recent call last):
File “/usr/src/homeassistant/homeassistant/helpers/entity_platform.py”, line 425, in _async_add_entity
raise HomeAssistantError(msg)
homeassistant.exceptions.HomeAssistantError: Entity id already exists: switch.visonic_pgm. Platform visonic does not generate unique IDs
2020-04-07 21:07:20 ERROR (MainThread) [homeassistant.core] Error doing job: Task exception was never retrieved
Traceback (most recent call last):
File “/usr/src/homeassistant/homeassistant/helpers/entity_platform.py”, line 425, in _async_add_entity
raise HomeAssistantError(msg)
homeassistant.exceptions.HomeAssistantError: Entity id already exists: binary_sensor.visonic_z01. Platform visonic does not generate unique IDs
2020-04-07 21:07:21 ERROR (MainThread) [homeassistant.core] Error doing job: Task exception was never retrieved
Traceback (most recent call last):
File “/usr/src/homeassistant/homeassistant/helpers/entity_platform.py”, line 425, in _async_add_entity
raise HomeAssistantError(msg)
homeassistant.exceptions.HomeAssistantError: Entity id already exists: binary_sensor.visonic_z02. Platform visonic does not generate unique IDs
2020-04-07 21:07:21 ERROR (MainThread) [homeassistant.core] Error doing job: Task exception was never retrieved
Traceback (most recent call last):
File “/usr/src/homeassistant/homeassistant/helpers/entity_platform.py”, line 425, in _async_add_entity
raise HomeAssistantError(msg)
homeassistant.exceptions.HomeAssistantError: Entity id already exists: binary_sensor.visonic_z03. Platform visonic does not generate unique IDs
2020-04-07 21:07:21 ERROR (MainThread) [homeassistant.core] Error doing job: Task exception was never retrieved
Traceback (most recent call last):
File “/usr/src/homeassistant/homeassistant/helpers/entity_platform.py”, line 425, in _async_add_entity
raise HomeAssistantError(msg)
homeassistant.exceptions.HomeAssistantError: Entity id already exists: binary_sensor.visonic_z05. Platform visonic does not generate unique IDs
2020-04-07 21:07:21 ERROR (MainThread) [homeassistant.core] Error doing job: Task exception was never retrieved
Traceback (most recent call last):
File “/usr/src/homeassistant/homeassistant/helpers/entity_platform.py”, line 425, in _async_add_entity
raise HomeAssistantError(msg)
homeassistant.exceptions.HomeAssistantError: Entity id already exists: binary_sensor.visonic_z04. Platform visonic does not generate unique IDs


2020-04-07 21:07:33 ERROR (MainThread) [custom_components.visonic.pyvisonic] ERROR Connection Lost : disconnected due to exception Same Packet for 20 times in a row
2020-04-07 21:07:38 ERROR (MainThread) [custom_components.visonic.pyvisonic] Calling Exception handler.
2020-04-07 21:07:38 ERROR (MainThread) [custom_components.visonic] PyVisonic has caused an exception Same Packet for 20 times in a row
2020-04-07 21:07:43 ERROR (MainThread) [custom_components.visonic] … setting up reconnection
2020-04-07 21:07:43 ERROR (MainThread) [custom_components.visonic] … attempting reconnection
2020-04-07 21:07:47 ERROR (MainThread) [homeassistant.core] Error doing job: Future exception was never retrieved
Traceback (most recent call last):
File “/usr/local/lib/python3.7/concurrent/futures/thread.py”, line 57, in run
result = self.fn(*self.args, **self.kwargs)
TypeError: ‘bool’ object is not callable
2020-04-07 21:07:47 ERROR (MainThread) [homeassistant.core] Error doing job: Future exception was never retrieved
Traceback (most recent call last):
File “/usr/local/lib/python3.7/concurrent/futures/thread.py”, line 57, in run
result = self.fn(*self.args, **self.kwargs)
TypeError: ‘bool’ object is not callable
2020-04-07 21:07:47 ERROR (MainThread) [homeassistant.core] Error doing job: Future exception was never retrieved
Traceback (most recent call last):
File “/usr/local/lib/python3.7/concurrent/futures/thread.py”, line 57, in run
result = self.fn(*self.args, **self.kwargs)
TypeError: ‘bool’ object is not callable
2020-04-07 21:07:47 ERROR (MainThread) [homeassistant.core] Error doing job: Future exception was never retrieved
Traceback (most recent call last):
File “/usr/local/lib/python3.7/concurrent/futures/thread.py”, line 57, in run
result = self.fn(*self.args, **self.kwargs)
TypeError: ‘bool’ object is not callable
2020-04-07 21:07:47 ERROR (MainThread) [homeassistant.core] Error doing job: Future exception was never retrieved
Traceback (most recent call last):
File “/usr/local/lib/python3.7/concurrent/futures/thread.py”, line 57, in run
result = self.fn(*self.args, **self.kwargs)
TypeError: ‘bool’ object is not callable
2020-04-07 21:07:47 INFO (MainThread) [homeassistant.components.switch] Setting up switch.visonic

From the above clue plus that you are constantly rebooting HA, I have seen this before. If you try to connect to the panel multiple times in a row without letting the previous startup sequence complete and you keep doing this then I think that the panel detects that there’s something wrong (or there’s a bug in the visonic panel internals) and it just keeps outputting the same message over and over again.

The only solution I have found is to stop this component, then wait and let the panel time out, and then start HA and/or the component. As you say, it is then back to normal and seems to work again.

When the panel streams the same data over and over again, I try to reconnect but it rarely works, maybe 1 in 20 times it works with my panel but different panel types may do things differently.

Hi all,

I’m using this component since the beginning and I am very satified. Now that the new panel info is available I’m thinking of using more automations and using notifications.

I’m struggling with templates (sort of new to that) right now. I guess this is more of a generic templating question (although related to this component).

What I’m trying to achieve:

- alias: 'Alarm Triggered'
  initial_state: true
  trigger:
    - platform: state
      entity_id: sensor.visonic_panel_alarm_status
    - platform: state
      entity_id: sensor.visonic_panel_trouble_status
  condition:
    condition: template
    value_template: "{{ trigger.to_state.state != 'None' }}"
  action:
    - service: notify.telegram_oliver
      data_template:
        message: " Alarm Status changed!
        
        Panel last event is {{ state_attr('alarm_control_panel.visonic_alarm', 'Panel Last Event') }}
        
        Alarm is last triggered by {{ state_attr( 'XXXX', 'friendly_name') }}"

Now I would like the XXXX in the last line to be filled by the following template value:

{{ state_attr('alarm_control_panel.visonic_alarm', 'Panel Last Event Data'['Entity']) }}

Because that is actually the entity last triggered (binary sensor). In combination with the template this would than result in the friendly name of this entity. Is this somehow possible? Can i set a variable somewhere before the data_template part? Or within?

Anyone else having issues with HA 0.108.4 and component version: 0.3.7.0?
Ever since I updated my Powermaster 30 Panel has been acting weird.
It can work for a few hours, but then suddenly the panel starts to beep and the error triangle is flashing.
If I arm during this time it says “arming away, check system for troubles”
However, the panel log is not showing any troubles.
Then after a while it starts working normally again.

Should I just revert my updates or is there any solution?

My regular HA log does not show anything wrong either.

What can I do to investigate the problem?

I’m running HA in docker on a Synology NAS.

I had zwave problems with 0.108 so I’m currently using a 0.109 dev release and mine is OK (that doesn’t help you though). I know you say there’s nothing wrong in the log file but please set it to debug and upload the log and I’ll take a look through.

Hi Dave,

Thanks for your reply, I think I found the problem.
It was multiple HA instances started at once, one with “python” and one with “python3”
Are you using docker as well?

I recreated my docker container and now I only have one instance running with “python3”.

Before in docker:
image

Now in docker:
image

I didn’t take any screenshot of the processes before but this is how it looks now with only one HA process running:

It looks like 109 only temporally fixes the issue and that you will have to fix “your installation” in the end:

I’ll let you know if my panel starts to misbehave again but I think the problem is solved.

Ah yes, I saw this problem, I think it was with a 0.107 HA release (I also use Docker on Synology). You get really weird things happening. The log file had multiple occurances of debug data and at first I couldn’t work it out.

Ok forget my last post, I guess triggering automation based on Panel Alarm Status is not the best way.

But what is? Can someone point me in the right direction? I’m trying to send a notify message (telegram) that contains the alarm status if in alarm, and the zone(s) that triggered it…

Have a look in my automations:

There is a part where i do it.

So first of all check out the wiki and the events that are generated. You’ll see that alarm_panel_state_update is the event you’ll need to use. If you look at Note 2 for the event data here you’ll see that condition 3 is a panel update and the alarm is active (i.e. the siren is sounding and making a big loud noise).
With condition 3 you’ll see that you get data set A with the HA event. In data set A you’ll notice a data item called “Entity” in this table.
You could use the HA developer tools “Listen to events” to look at the data in the event.
Try something like this in your automations.yaml as an example

- alias: 'Alarm Siren Triggered Action'
  initial_state: true
  trigger:
    platform: event
    event_type: alarm_panel_state_update
    event_data:
      condition: 3
  action:
    service_template: persistent_notification.create
    data_template:
      title: "Alarm Siren"
      message: "{% set ety = trigger.event.data['Entity'] | string %}
                {% if ety == 'None' %}
                    Alarm siren from unknown sensor
                {% else %}
                    The Sensor that triggered the Siren is the {{ state_attr(ety, 'friendly_name') }}
                {% endif %}"

I just made the action up as an example that creates an HA persistent notification, you could get it to generate emails etc instead. I just wanted to show you how you can use the template variables. To try it without setting your alarm off and annoying the neighbours, set the condition : 2 instead of 3 as this gives the panel updates when the siren is not sounding.

Here’s an earlier post in this thread that might give you some ideas as well.

Hope this helps :smile:

I have just uploaded version 0.4.0.0 that incorporates the ability to create and edit an integration from within Home Assistant. This should not be a breaking change but please note the way it works with your existing configuration.yaml settings here. After the first time your configuration.yaml settings are imported then they are ignored.

I’ve been looking at this over the past 2 or 3 months and I’ve been testing it but I’m sure it isn’t perfect for everyone so please give comments and problems. The integration is in English only at the moment, please feel free to translate the file en.json in to other languages but please be careful with the structure and format of the file. I did think about some online auto translate but I wouldn’t be able to verify the output :slight_smile:

Tnx! This helped a lot, I read the wiki already but didn’t realy have the Yaml/templating expierience to work with it. Works like a charm now!

I know this isn’t the primary reason for the topic, but has anyone tried to disable the “alarm horn” itself? My alarm is still just chilling on my desk, where my server is located - but after no dropouts for months, I’m going to install it.

However, without a subscription, i’m not that happy about having the alarmhorn running for a long time, if i missed the alert, or so.

Have anyone made a good work-around for that part? :slight_smile: Maybe some of you are in the same situation with no “service” subscription.

Hi, I know this thread stretches back but I am hopeful that some of you have experience with a Powermax + rev b as I am having trouble connecting one up with a USB to serial adaptor. I wonder if anyone would be able to confirm my connections? Thanks in advance

@exetico: The horn has a max timer (setting in panel) or you can just disable it in the panel settings. I always disable the internal horn of my PM pro when testing automations etc…

1 Like

I don’t have a PowerMax+ but maybe the pictures in this thread could help you. There have been others with a Powermax+ that might be willing to take a photo of their working hardware that I could add to the Wiki as an example :smile:

Thanks. Any help gratefully appreciated. I have got as far as connected a USB to FT232 adaptor to what I believed was the correct pins on the powermax 232 connector (tx,rx and gnd) and fired up the Powermax software to test but got no unit found error. There is no option to define powerlink in the menu. Not sure if this is the reason. I notice that there is also a connector stamped FL-PR on the board. Wonder if anyone knew what this was and also some pinless pads marked PROG which piqued my interest.

Oh, that’s great. I didn’t know that. Maybe i should read all the details in the documentation for the alarm itself.

I also spotted the “Alarm Cancel Time: 5 Minutes”-value in HA. Is that an setting, which are also located on the alarm, or should it be defined in the HA-integration, only?

(I noticed that my alarm was not triggered, after testing it. But after a while, i spotted this on the state-page :slight_smile:


This is actually wierd…

I just armed our alarm, and it’s going into the armed_away state, after counting down for 30sec, as it should (in arming-state`).

After waiting 5 minutes, while It’s in the “armed_away” state, i tried to trigger one of our movement-sensors (but i tried the “door-contact” too.).

Sadly, no alarm was triggered?
It’s going into pending state in HA, while it’s counting down from 30 sec, and after that, it’s back in armed_away state?

Is that due to a specific setting, if it this related to the setting, where i turned off the horn? (While testing this, lol…)

After it’s back in armed_awaystate, it’s the same story, if i trigger one of the sensors again. It’s counting down, while it’s in “pending” state (for 30 secounds), and hereafter, it’s back to the armed_away state, again…

So it’s not going into an state like alarm_onging (or, whatever it’s called if the alarm is “alarming”).

It’s not going back into the disarmed state, at any time, before i use the “disarm”-function, and that’s like it should be. But i’m unsure about why no real “alarm state” is set, if i trigger the alarm, while it’s armed :smiley:

You define it on your panel. It is read from the panel EPROM and shown in HA.

When it does this it’s likely the entry delay, have you set up your panel so that the sensors do this?

Not sure, sorry