Visonic Powermax and Powermaster Component

It will not work with the powerlink2 I’m afraid, it needs direct access to the TTL level RS232 inside the panel. You would either need a TTL RS232 to Ethernet or TTL RS232 to USB to use this component.
Let me know if you make any progress and welcome on board!

Edit1: If you use the USB option I’m not sure how it would work using Microsoft Windows. Linux / Synology NAS should be OK.
Edit2: Technically you could use a TTL RS232 to “proper” +/- RS232 and connect that to something but I wouldn’t reccommend it.

1 Like

Yes! it works :slight_smile:

State goed to pending and allows me to disarm!
Is it not possible to set the state simply to “entry delay” then? Or does the standard alarm panel in HA not allow you to disarm then?

Yes the states in the generic alarm panel within HA are limited. The only one I haven’t used is ‘disarming’ but I tried it and it didn’t let me enter the alarm code during the entry delay where as “pending” does!
I might take another look at ‘disarming’ in the HA code itself and see what it does, maybe over the weekend though when I have more time. It’s now on the “to do” list.

Thank you for your answer.
So… I also have a Visonic RS232 Dual. That is the TTL RS232 to Ethernet convertor that I need, right?

No I’m afraid it isn’t, All that does is split the RS232 connector in the alarm panel in to the 2 RS232 connections. It would allow you to connect your panel to your PC, if your PC has an RS232 port but most modern PCs don’t have them now (they used to for printers and mice etc but not anymore). Also, I don’t think my software component would interact with that unless you could install a driver on your PC to make it appear like a USB device. So, overall I don’t think that you can use this convertor, sorry.

Thank you again for answer.
It is fine. Just wanted to ask before buy or not. I have ordered the USR-TCP232-E2 adaptor.
The bad thing is I have to wait a few weeks not for testing :slight_smile:
Have a good day!

I tried automation. But get following error

Error executing service <ServiceCall alarm_control_panel.alarm_disarm (c:a406d5c4616a4eb9905c26c7e671f5f3)>
Traceback (most recent call last):
File “/usr/local/lib/python3.6/site-packages/homeassistant/core.py”, line 1115, in _event_to_service_call
await service_handler.func(service_call)
File “/config/custom_components/alarm_control_panel/init.py”, line 140, in async_alarm_service_handler
yield from getattr(alarm, method)(code)
File “/usr/local/lib/python3.6/concurrent/futures/thread.py”, line 56, in run
result = self.fn(*self.args, **self.kwargs)
File “/config/custom_components/alarm_control_panel/visonic.py”, line 162, in alarm_disarm
_LOGGER.info(“alarm disarm code=” + code)
TypeError: must be str, not NoneType

OK, I spotted that bug straight away and it gave me an excuse to upload my changes from over the last few weeks. I’ve mainly updated the EPROM decode in powerlink mode.
Anyway, give 0.0.6 a try please!

Working fine now :slight_smile:

Ok, I have a weird issue. I’m migration from hassio to hassbian right now because i needed some additional libraries for a custom component.

First i got some errors about requirements, so I tried installing:

sudo pip3 install pyserial
sudo pip3 install python-datetime
sudo pip3 install pyserial_asyncio

Datetime gives me these erros:

pi@hassbian:~ $ sudo pip3 install python-datetime
Collecting python-datetime
Could not find a version that satisfies the requirement python-datetime (from versions: )
No matching distribution found for python-datetime

After a reboot i got these errors inthe log:

2018-08-19 13:02:48 ERROR (MainThread) [homeassistant.core] Error doing job: Exception in callback _SelectorSocketTransport._read_ready()
Traceback (most recent call last):
  File "/usr/lib/python3.5/asyncio/events.py", line 126, in _run
    self._callback(*self._args)
  File "/usr/lib/python3.5/asyncio/selector_events.py", line 730, in _read_ready
    self._protocol.data_received(data)
  File "/home/homeassistant/.homeassistant/custom_components/pyvisonic.py", line 1004, in data_received
    self.handle_received_byte(databyte)
  File "/home/homeassistant/.homeassistant/custom_components/pyvisonic.py", line 1085, in handle_received_byte
    self.handle_packet(self.ReceiveData)
  File "/home/homeassistant/.homeassistant/custom_components/pyvisonic.py", line 1961, in handle_packet
    self.handle_msgtypeA5(packet[2:-2])
  File "/home/homeassistant/.homeassistant/custom_components/pyvisonic.py", line 2419, in handle_msgtypeA5
    self.pmSensorDev_t[key].pushChange()
  File "/home/homeassistant/.homeassistant/custom_components/pyvisonic.py", line 695, in pushChange
    self._change_handler()
  File "/home/homeassistant/.homeassistant/custom_components/sensor/visonic.py", line 46, in onChange
    self.schedule_update_ha_state()
  File "/srv/homeassistant/lib/python3.5/site-packages/homeassistant/helpers/entity.py", line 289, in schedule_update_ha_state
    self.hass.add_job(self.async_update_ha_state(force_refresh))
AttributeError: 'NoneType' object has no attribute 'add_job'

BUT:

It’s working in Powerlink mode now…!! Not sure what the errors in the logs mean right now.

You’re correct, you do not need to install the datetime library, it is there as a built in library. I run mine in docker and I’ve just looked at the library versions (by using pip3 list | grep serial)
I use:
pyserial-asyncio version 0.4
pyserial version 3.1.1

Here are the versions of some of the other libraries, I believe these are installed with HA but just in case you can check them:
python-dateutil version 2.7.3
asyncio version 3.4.3

I’m not sure if that would make the difference. I also have the REQUIREMENTS section so that HA should automatically install these now so you shouldn’t need to do anything like pip3 installs from the command line now.

Having said all that, I’m not sure what the error is that you’re getting in the log, does it repeat or is it only once?

EDIT:
Found these
https://github.com/home-assistant/home-assistant/issues/10031
https://github.com/home-assistant/home-assistant/issues/12543

Still not sure what’s going on though!

went back to hassio, since hassbian was causing several issues besides the visonic errors. No its working in PL mode in Hassio as well :). Without any issues!

The errors seemed to take place at initialization of the module…

Maybe if I have time I’ll have another look at hassbian next week. But for now , no more issues.

Only thing I noticed, but maybe this is normal. I was testing what would happen if I reloaded hass when the panel is armed (to see if this doesn’t cause an alarm). If this happens, it goes back into standard mode. Until the next reboot when the panel is disarmed, then it goes back to PL mode.

EDIT:

Weird, after 2 reboots in Hassio, its back in standard mode again. Well, everything works, so not big issue.

davesmeghead THANK YOU SO MUCH!!!

Finally yesterday I could give a try and it works perfectly! It is so nice arm or disarm so quickly. Not like with Visonic Go app and the server of the local store where I bought the alarm.

I was a little bit upset about the access to the alarm (via phone, SMS and app) but now… It is so good. And… The integration with Home Assistant is awesome.

Even I bought PowerLink 2 and the WebServer was so shitty. And very slow speed. And it costed like 30 times the price of the adaptor (and it is second hand)

I was trying to make a card with the numbers for write the code (without click first) but I am able to do it. Do you know if that is possible? (I am new on Home Assistant)

I am testing some automations and all work perfect. Some examples:

  • alias: Visonic - Fuego Planta Baja
    trigger:

    • platform: state
      entity_id: sensor.visonic_z22
      to: T
      action:
      service: notify.PUSHBULLET
      data:
      title: “Visonic: FUEGO Sotano”
      message: “Probando notificacion”
  • alias: Visonic - Inundación
    trigger:

    • platform: state
      entity_id: sensor.visonic_z23
      to: T
      action:
      service: notify.PUSHBULLET
      data:
      title: “Visonic: INUNDACIÓN”

      • alias: Visonic - Alarma ARMADA
        initial_state: ‘on’
        trigger:
    • platform: state
      entity_id: alarm_control_panel.visonic_alarm
      to: armed_away
      action:
      service: notify.PUSHBULLET
      data:
      title: “Alarma Visonic ARMADA”
      message: “Probando notificacion”

  • alias: Visonic - Alarma DESARMADA
    initial_state: ‘on’
    trigger:

    • platform: state
      entity_id: alarm_control_panel.visonic_alarm
      to: disarmed
      action:
      service: notify.PUSHBULLET
      data:
      title: “Alarma Visonic DESARMADA”
      message: “Probando notificacion”
  • alias: Visonic - Puerta principal ABIERTA
    trigger:

    • platform: state
      entity_id: sensor.visonic_z01
      to: T
      action:
      service: notify.PUSHBULLET
      data:
      title: “Puerta Principal Abierta”
      message: “Probando notificacion”

The only thing is I have to write ‘yes’ in Force Standard option. It is fine, because alarm works perfect. But if I write ‘no’ the panels shows like unknown.

Thank you again, you make my day! :)))

Hi

Does this also work when the PowerMax alarm is connected to the LAN via a PowerLink2 module? Or does it only work with the mentioned hardware installed?

Best regards
Kristian

I’m not sure how to do that sorry, my “HA frontend” knowledge is not so good. I’m glad you like it overall though.

The problem with powerlink / standard is the timing issues I have with the interaction between HA and the alarm panel. The panel is very specific about the time it takes for certain commands and this is difficult to achieve within HA as with the different hardware and different components the time varies too much.

I’ve said this before, there are 2 advantages of powerlink. 1st is not having to enter the code (although you could force this in your config file anyway) and 2nd is you get all the EEPROM information decoded from the panel (after you see it once it’s not interesting anymore)

Have fun!

No sorry. It works with the mentioned LAN hardware interface and not the powerlink2.

1 Like

Okay thanks. Will have to look into that then since the powerlink2 is quite usesless these days.

Hi!
I used this component https://github.com/ciotlosm/custom-lovelace/tree/master/alarm_control_panel-card to get a card with the Visonic alarm. It is perfect!

About Powerlink / Standard mode is curious: At the first it worked with Powerlink, but later only in Standard mode. Maybe I changed something… But it is fine. Im so happy with your component!

Again, thank you so much.

Hat-tip to @davesmeghead, I’m migrating from a Vera environment to HA and this component works a treat, actually better than under Vera because of the sensor history information. I’m also using the lovelace alarm_control_panel-card and it all works a treat. Many thanks.

I did that too, Vera just got too unreliable for me with other devices (not the alarm). Can I ask you, were you able to get and keep Powerlink status with Vera?

Thanks for the recommendation, I’ll look in to using it. And thanks for the thanks, it’s much appreciated