Visonic Powermax and Powermaster Component

home-assistant.yaml (181.1 KB)

Sorry, I was a bit busy with other things. But here is the log file created by the new pysonic.py.

Oh that’s OK, there’s no hurry for these things, it’s just that I wanted you to still try it.

Have you changed anything, like updated HA at all. The thing is, the log.info logging isn’t working from custom components now, all I can really see from the log file is that my code crashes when decoding one of the panel messages but I can’t see the message content. The logger facility in HA is broken and no one seems to be trying to fix it. Can you make sure you have this in your configuration.yaml and try it again please

logger:
  default: info

@davesmeghead
home-assistant.newpy.yaml (25.0 KB)
home-assistant.oldpy.yaml (71.2 KB)
Well, I allway changes a lot of things but not anything to do with HA. Anyways I made new run with the new pyvisonic.py resulting in the .newpy.yaml file and then I switched back to the previous pyvisonic.py giving oldpy.yaml.

@davesmeghead
home-assistant.3.yaml (320.1 KB)
Problem was in the pysonic.py. Log level set to warning,

It seems to be getting in to Powerlink mode with the following sensors:

  Sensor id=1  dname=Z01  stype=Magnet   zname=Front door     ztypeName=Delay 1    bypass=0  enrolled=1  triggered=0 
  Sensor id=2  dname=Z02  stype=Camera   zname=Hall           ztypeName=Perimeter  bypass=0  enrolled=1  triggered=0 
  Sensor id=3  dname=Z03  stype=Motion   zname=Living room    ztypeName=Perimeter  bypass=0  enrolled=1  triggered=0 
  Sensor id=4  dname=Z04  stype=Magnet   zname=Back door      ztypeName=Perimeter  bypass=0  enrolled=1  triggered=0 
  Sensor id=5  dname=Z05  stype=Motion   zname=Play room      ztypeName=Perimeter  bypass=0  enrolled=1  triggered=0 
  Model PowerMaster10          PowerMaster Yes                    LastEvent None                   Ready   Yes          
  Mode  Powerlink              Status      Disarmed               Armed     No                     Trouble None              AlarmStatus None 

I have cut it down from how it appears in the log file. How does it appear in HA, does it look OK?

The exception doesn’t appear in this log file, perhaps you could leave it longer to see if it occurs later please, maybe give it 10 or 15 minutes and then upload the log file

Yes. Your checksum fails for some unknown reason, and I did see that much in the file. I just pointed out something additional that seemed unusual.

Thanks.

Can you also try arming the panel (either through HA or using the panel directly it doesn’t matter which) and then disarming

Good morning,
finally I have discarded hassio and I have installed HA in raspbian, to be able to have more control of the dependencies. But … surprise! I get the same error!
First of all I could not install python-datetime (I installed dateutil).
In the second place I checked the test.py and I connected with the module.
In third link, I have copied all the github files in the custom_components folder
Finally I still get the error message in HA.

Traceback (most recent call last): File “/srv/homeassistant/lib/python3.5/site-packages/homeassistant/loader.py”, line 166, in _load_file module = importlib.import_module(path) File “/usr/lib/python3.5/importlib/init.py”, line 126, in import_module return _bootstrap._gcd_import(name[level:], package, level) File “<frozen importlib._bootstrap>”, line 986, in _gcd_import File “<frozen importlib._bootstrap>”, line 969, in _find_and_load File “<frozen importlib._bootstrap>”, line 944, in _find_and_load_unlocked File “<frozen importlib._bootstrap>”, line 222, in _call_with_frames_removed File “<frozen importlib._bootstrap>”, line 986, in _gcd_import File “<frozen importlib._bootstrap>”, line 969, in _find_and_load File “<frozen importlib._bootstrap>”, line 958, in _find_and_load_unlocked File “<frozen importlib._bootstrap>”, line 673, in _load_unlocked File “<frozen importlib._bootstrap_external>”, line 673, in exec_module File “<frozen importlib._bootstrap>”, line 222, in _call_with_frames_removed File “/home/homeassistant/.homeassistant/custom_components/init.py”, line 14, in <module> import custom_components.visonic.pyvisonic as visonicApi # Connection to python Library ImportError: No module named ‘custom_components.visonic’

Let me see if I can be of some help.
First: dateutil is an extension of datetime so that should be OK, see here for more information
Second: It’s good that test.py works, does it connect to the panel correctly and in powerlink mode?
Third: I need to understand the exact layout of your custom_components directory

  • You seem to have a file called init.py in your custom_components directory, why? what is in it? I do not have any files in my custom_components directory, just subdirectories with the components I use.

  • I assume that /home/homeassistant/.homeassistant is your config directory.

  • The layout should be something like this:

    custom_components/visonic/__init__.py
    custom_components/visonic/pyvisonic.py
    custom_components/visonic/switch.py
    etc.
    

Does that help?

In agreement! I did not have the custom_component folder configured as you indicated.
Now I have done it as you say, but HA does not start when the configuration.yaml add the data from the visonic component.

I have reviewed the content of the configuration.yaml and it is correct.

I do not know what’s going on!

To leave doubts. Do you know if it definitely works with Hassio?

Thanks Dave

Hi, just to be certain, you do have an “s” on the end, it is custom_components
I do not run it in Hassio but I believe that others have done.
Have you looked at the log file (or loaded it in to HA using the web browser from the information page). What does it say?

I’m having similar problems with Hassio. When I try to validate the configuration, the activity indicator doesn’t go away. I’ve tried rebooting, but I’ve had to restore a prior configuration from the console; it broke the browser interface. I’m running version 0.90.1.

So, looking back through this thread there are only 1 or 2 people that seem to have it running in hassio. I exagerated when I said that “others” have done so. Since I do not run hassio and do not have any experience of it, I would not be able to be much help.

What I do know is that the validation of the configuration file has become very strict in recent HA releases and it needs to be very precise. If you want to show me your configuration entries (replace any secret data like codes and ip addresses with dummy ones) then I can help.

When you had it all working back in January, were you using hassio then?
Did you move to hassio and then to raspbian?
What are you using now?

I have it running in Hassio since the first release of this component…only in Standard mode though…

home-assistant.yaml (698.4 KB)
HA looks fine and seems to be working ok. I let it run for 20 minutes this time.
Thanks a lot for your help!

Same problems here…
Running one RPI on Hassio 0.89. No problems at all.
Running on another RPI, Hassio 0.90.1. I can’t get the visonic component working… I use the exact same config as on Hassio 0.89.

That’s good, we have made progress. However I’ve looked at the log and there are a couple of problems e.g. line 1886. It seems that the format of the Panel Status message (A7) has changed so I’ve made some adjustments to the code. I currently have no idea what this A7 message decodes as for your panel, this is the received packet

  Received message :   0d a7 ff 64 00 60 00 ff 00 0c 00 00 43 45 0a

Something to add to my “todo” list :slight_smile:

Yes! the folder is custom_components / visonic / …
As for the log file, now it does not let me see it, because when I add visonic to configuration.yaml it does not start.
I am also using the latest version of HA 0.91

visonic.xml (3.8 KB)

I’ve been alternating between hassio and raspbian, because unfortunately I do not have much programming knowledge, and all my training is self-taught. I’m still with raspbian.

I suppose it must be due to a change in the configuration.yaml structure as Dave says. It has become too strict!