Visonic Powermax and Powermaster Component

Are you aware of using customize.yaml something like this?

    "binary_sensor.visonic_z01":
      friendly_name: 'Kitchen PIR'
    "binary_sensor.visonic_z05":
      friendly_name: 'Conservatory Door'
      device_class: door
    "binary_sensor.visonic_z06":
      friendly_name: 'Garage Door'
      device_class: garage_door

You would need this in your configuration.yaml

homeassistant:
  customize: !include customize.yaml

You can override the device_class that I assign to it, looking for key words in the name might mean I get it wrong anyway! Check out the list of device classes here.

Does the above also help with the name, you can set the friendly name for use within HA.

I’ll hopefully get an update uploaded in a few hours time :smile:

Yes, I’ve already used this to display the door and motion sensor icons. I agree it’s not a huge impact, but since the information is already available, it would just be a nicety. Like I said, the suggestions were nits.

I can test the updates soon after I see they’re posted. Still, I’m amazed at the speed you can implement the changes.

That’s because after my last edit here i’m testing for a total of about 15 minutes on my panel and then uploading to github :blush:

I’ve just uploaded 0.2.7
It changes the method of EPROM download and so should be much faster, probably less than a minute to get to powerlink

bwillette can you use 0.2.7 as well and upload your log file again please. You should only need a single pastebin this time :wink:

For all those asking about HACS how would I do this kind of thing? I don’t wish everyone to get automatically updated every time I upload a version to Github, these are test releases really. Although when it becomes stable, those test releases become more and more used by everyone I guess.

Glad to try. As a followup, there seems to be some sort of timing issue going on in my situation, if I simply add some debug code to binary_sensor.py, things start working.

The code I added was in setup_platform, like so:

def setup_platform(hass, config, add_devices, discovery_info=None):
    """Set up the visonic controller devices."""
    _LOGGER.info("In setup_platform the sensor config file")
    _LOGGER.info("VS: Sensor list {0}".format(hass.data[VISONIC_SENSORS]))
    for device in hass.data[VISONIC_SENSORS]['binary_sensor']:
        _LOGGER.info("Binary sensor: {0}". format(device))

The delay caused by logging each Binary Sensor entry made it so my sensors started showing up in HA.

Not sure if that helps?

UPDATE: I had posted the wrong log file, sorry, correct one below!

Here’s my new logs after the latest version you just posted:

https://pastebin.com/h478L3Ec

Thanks again!

Thanks for the updates, it was starting to drive me crazy it wasn’t working despite your efforts so I’ve checked for all commucation parameters on panel menu…and…

I just saw that in install mode > 5 . Com settings > 28. install code DL that the download code wasn’t set to 5650 but 8888 instead :dizzy_face:
I need to say i had to hardware hard reset factory defaults last year as previous owner lost all the codes.

My panel is in french so i don’t know wether menu translation are correct or not but numbers should.

I’ve modified this and magically it is now working like a charm in powerlink mode in less than 2 min !!!

Awesome to have all that panel options shown as HA attributes !

I would never have checked for that if you hadn’t spend time on my issue, so thanks a lot for your support !!!

Smokin’! Powerlink in about 1 min, 25 seconds. A new world record…at least on the PowerMaster 10!

Here’s the log:
https://pastebin.com/ryLermQ9

Definitely some sort of timing going on, but I was wrong about the changes to binary_sensor.py influencing it, it was instead some logging I added to __init.py__. Reverting back to the 0.2.6 version and making the following mods seems to make it work most of the time for me:

around line 144 (add sleep):

            sleep(2)                                                          
            hass.data[VISONIC_SENSORS] = sensor_devices                      

and then enabling the logging in line 154

            _LOGGER.info("VS: Sensor list {0}".format(hass.data[VISONIC_SENSORS])) 

You’re right, it was a timing problem and the way that asyncio works in HA. I think I’ve fixed the issue, I relied on a certain sequence and made certain assumptions about how HA works and that wasn’t happening for you, it should be more robust now.

I’ve uploaded version 0.2.8 to Github, please give it a try (and again upload logs to pastebin so I can make sure please).

I’ve removed a lot of the downloading EPROM logging as it seems to be OK, let’s keep testing it and let me know if it all goes horribly wrong :wink:

If you’re able to provide French translations for all the key words and phrases we can add them as another language option :slight_smile:

Which ones, all dictionnaries in pyvisonic.py with EN and NL keys ? I’ll do my best from next week

Worked great, thank you!!

Here’s the log file to verify:
https://pastebin.com/aJxM5DXU

Appreciate the responsiveness, sincerely!

It looks like it’s working and fairly stable, at least for the few of us that have been testing it over the past few days or so. Thanks for uploading your log files, it’s been a great help as it’s difficult to test with just one panel type. Between us we’ve got a good mix of different panel types.

Yes that’s right. If you can provide them to me already in python code format that would be even better :smile: If you replace words and phrases “like for like” in the variables.

I go on holiday (vacation) mid week, so no hurry for the language translation. I also won’t know what internet access I’ll have while I’m away but I hope to still keep up with this forum page from my phone.

I’ll keep testing and do some tidy up of the code before I go on holiday, can you also let me know if you get problems too. I won’t upload a new version until I get back, unless we get problems over the next few days that I’ll need to fix. I’ll just leave 0.2.8 on Github. If anyone else uses 0.2.8 then they’ll just get more debug to the log file (if they have debug set in the logger) so it should still be OK.

1 Like

Enjoy your vacation !

I’ve pushed the PR for french translation.
I tried to stay close to official words found in french user and installer manuals.

Otherwise, seen in pyvisonic.py code :

# Messages left to work out
# Panel sent 0d 22 fd 0a 01 16 15 00 0d 00 00 00 9c 0a No idea what this means

It’s a pure supposition but does it happens when a sensor is triggered ? If so, according to pmax.h of the PMax library it could mean :
0d : Panel System Status Not Ready (not arm-able)
in opposition to :
0c : Panel System Status Ready(arm-able)

I saw you force panel ready status while handling A5 messages but might it be directly sent as is by the panel ?

Just to note, I moved to 0.2.8 last night, comments from me.
Pros : works amazingly well and much faster to powerlink my powermaster 30
Now list my zones as motion / doors correctly :slight_smile: thanks

Not pros, but not cons:
Still getting the A7 message, but it’s not stopping anything :slight_smile:

Thanks for your hard work on this

That’s excellent, really kind of you to do that. I’ve integrated it in to my local build ready to push up to Github as I’d made several local changes to tidy it up and I didn’t trust the Github merge. Still not sure whether to risk it just before I go on holiday or not.

# Panel sent 0d 22 fd 0a 01 16 15 00 0d 00 00 00 9c 0a No idea what this means

The 0d at the start is the header and the 0a at the end is the footer
The 9c is the checksum
The 22 is the command and the data is in between the 22 and 9c.
I don’t know what a command 22 is

Is it the middle 0d that you think is the panel system status?
Normally panel status is in the A7 message.

Talking of A7 messages…

I know but it doesn’t seem to affect the operation, it doesn’t seem to provide anything that we don’t already have. Are you able to time it i.e. do something with the sensors or the panel and is that when the panel sends this A7 message. Can you correlate an action with this A7 message? It only seems to happen with the Powermaster 30.

In the latest version you can set updates as Beta. (Add option to show beta releases (pre-release) for a repository.)

Also, it doesnt auto update, it just tells you an update can be installed, but i think the Beta flag should help out.

uspino spotted a bug that I believe I’ve fixed so I’ve uploaded 0.2.9. This does not include anything else other than this bug fix (so if you’re not having problems it’s probably not worth updating)
When the panel sends me exactly the same message in rapid succession then I assume that the panel had gone rogue and I reset the Component. This is usually a specific A5 message

0d a5 10 04 00 01 05 00 00 10 00 00 43 ec 0a

And uspino does have this instance in the problem he has. The thing is the first time that there are 20 messages the same in a row occurs in normal operation with AB messages so I have fixed that. uspino can you please give 0.2.9 a go. I hate to hurry you but I go on holiday tomorrow and won’t be making any code changes until I return. If we don’t get it resolved you could always revert back to the version that worked for you until I return.

Here’s a log of a system reboot with V 0.2.9, just for the record.

https://pastebin.com/cXwbPCtG

@davesmeghead 10 hours and running with no issues on 0.2.9… I still have to wait and see; some of the crashes took 15 to 20 hours since restart… Thanks! (And I’d say go on vacation and forget about us!)