Closed Joao-Sousa-71 closed 3 months ago
Hello, I have the same issues. My sensors and automations were written around the attributes that were available in version 0.8.5.2. Some of the attribute names have changed and I was able to figure out what I needed to do to update my logic. However, a lot of what I used was extracted from the 'Panel Last Event' attribute via "{{ state_attr('alarm_control_panel.visonic_alarm','Panel Last Event') }}". For example, battery problems, AC power failures, etc. I do not see this attribute anymore. Maybe you have another method to solve this. Could you share any sensor logic and automations that expose this? I also reverted back after a lot of effort expended to solve this. Thanks in advance.
Hi, To get many, but not all, of the old panel EPROM attributes, when you create a new panel then tick this
Note that these do not get updated and that is the problem I have with them, they are extracted from the EPROM download when the Integration starts. If you update these on your panel directly, the change is not reflected in HA until the Integration restarts to download the EPROM again. Thinking about it I should let the user change this rather than only setting it on creation.
For the Panel Last Event
attributes of the panel entity, rather than having an array as a state it is now a Home Assistant Event for each event (so we don't need a count). Instead of "Count", a standalone Event is sent on the HA Event Bus for each trigger. In fact you've probably never noticed but the older versions of the integration actually did both, they sent an event and kept it as part of the alarm panel state. The old setup was complicated as it tried to mix panel and zone updates, only if "Zone" was 0 did you know that it was a panel update. So I have separated panel and zone updates with 2 Home Assistant Events.
So let's break it down ....
Panel Last Event Data:
Zone: 0
Entity: null
Tamper: false
Siren: false
Reset: false
Time: "2020-01-01T00:00:00.0"
Count: 0
Type: []
Event: []
Mode: []
Name: []
Zone and Entity are part of the new Home Assistant Event visonic_alarm_sensor_state
, for more information please look at Note 4 on the wiki here.
Tamper is an attribute of each Sensor and the Panel Entities.
Siren
and Panel Siren Active
were the same thing. Looking at the new attributes of the Alarm Panel Entity
ready: true
tamper: false
memory: false
siren: false
bypass: false
alarm: None
trouble: None
siren
and tamper
are there, along with memory
.
Panel Alarm Status: None
and Panel Trouble Status: None
are the same as alarm
and trouble
.
For states like Panel Armed
you need to use the proper entity state.
So now on to
Type: []
Event: []
Mode: []
Name: []
Get your automation to look for the HA Event as follows:
Event name: visonic_alarm_panel_state
Look for the action
data being set to panelupdate
and then use data name
and event
This is all in "Note 3" on the wiki here
So name
and event
are the same as in the 0.8.5.2. The type
and mode
were just the raw integer versions so I removed them.
If you're having trouble with the above then I'm sure that you'll let me know here :) Or if there was a specific automation you had but are struggling to replicate then ask here. I think that I covered everything but I might have missed something.
Dave,
Thank you form your prompt answer. This is more clear now. From the atributes that I'm currently using I'm still missing the [Panel Last Event]:
Panel Last Event: Disarm / User 08
This attribute tipically combines the 'state / changed by' but also have key values like: Enter Installer / System Exit Installer / System Installer Programming / System General Restore / System
Which are key for my integration. Can you please be so kind and put back in the new version as an attribute? Otherwise will make my life harder since have all the logic and the translations already in place to be used.
About the [Panel Last Event Data], changing the actual template sensors to trigger sensors I believe that will make it. I'll be glad to share the changes since might be usefull to others visonic users. Looking foward to hear from you. Thanks, João
Hi,
I've just released 0.9.6.16 to Github and HACS. It adds 2 new Alarm Panel Attributes: lastevent
and lasteventtime
Although these come through as HA Events, I can see the logic of having the last settings as attributes.
I've given the attributes default values as "Startup/Startup" with the startup time.
Dave
I will make a snapshot of my installation and give it a try with the 0.9.6.16. For information, when I made the upgrade the upgrade to the version 0.9.6.24 using HACS two things happened:
Hi,
You're correct with your first bullet point, other users have had the same problem and I've looked through log files but everything in the log file indicates that it's panel 0 when the entity clearly looks like panel 2. The only thing I suggest is to remove and reinstall the integration and I can't think of anything else to do.
For your second bullet point, can you try release 0.9.6.17 please, it's available through HACS as well as zip file download.
Dave
Can you try release 0.9.6.20 please
Closing this issue, if the problem continues then either reopen or create a new issue please
@davesmeghead Dave,
My appologies for the delay on come back with a valuable feedback but I had some issues with the HA 2024.8.0 ( not related with with your integration and had to rollback versions, until upgrade again and finaly return to a more stable version. Here is the deserved status with the version 0.9.6.21. 1) The upgrade worked well but still has created a second entity "_2" something easy to workraround by deleting the previous one and renaming the new one, so I think this doesn't even deserve any further investigation. 2) The new version (0.9.6.21) was able to connect through Powerlink mode fully unnatended so this seems to be fixed :-) 3) So far it has been stable but have few days of use, and due summer vacations there is always people at home therefore the alarm arm only trigger at night and disarm in the morning. I'm following this closely to see if something unexpected show up. 4) There is only one minor bug with the attribute "changed_by". In the version 0.8.x it had values like: Fob 03, User 05, Pad 01 or Zone etc and with the new version it is always empty as shown here:
code_format: null
changed_by: ""
code_arm_required: false
mode: Powerlink
state: Disarmed
ready: true
tamper: false
memory: false
siren: false
bypass: false
alarm: None
trouble: None
lastevent: User 08/Disarm
lasteventtime: 25/08/2024, 19:05:17
Protocol Version: 1.3.6.6
Panel Model: PowerMax Pro Part
Power Master: "No"
Watchdog Timeout (Total): 0
Watchdog Timeout (Past 24 Hours): 0
Download Timeout: 0
Download Retries: 0
Panel Problem Count: 0
Last Panel Problem Time: ""
Client Version: 0.9.6.21
Exception Count: 0
panel: 0
friendly_name: Visonic Alarm
supported_features: 3
I'm surpised this was not yet reported anyway if you can fix for a future version I'll be thankfull. Keep you posted and thanks again.
Joao
Hi, I've just uploaded dev_B0 release 0.9.7.7, can you please give it a try. You can now go in to configure and change the language, try "Panel"
for your specific 4 questions 1) This I think is a HA problem that other users have had with other integrations https://community.home-assistant.io/t/how-to-prevent-same-entity-to-be-created-again-but-with-2-after-name/160683 https://community.home-assistant.io/t/entities-renaming-to-2/640228 https://www.reddit.com/r/homeassistant/comments/1djj8r7/nodered_renaming_all_entities_in_home_assistant/ https://community.home-assistant.io/t/why-do-my-entity-names-end-with-2-3-etc-and-how-do-i-fix-it/668308
2) OK, good 3) Let me know of any problems 4) Fixed in the 0.9.7.7 release
Dave,
Update to dev_BO 0.9.7.7 (since it is not on HACS I've delete all content from the custom component and copy the dowload from Github). My Panel language it is in Portuguese and I'm not sure if I want to try it ;-) . As soon I've this update working 100% I will do it.
New observations to report. When HA start I have now two entries on the HA log that were not before but the integration works...
2024-08-26 15:06:23.981 WARNING (MainThread) [custom_components.visonic.pyvisonic] Lookup of Visonic Zone Type Reference Invalid, 1 is not in the array
2024-08-26 15:06:23.981 WARNING (MainThread) [custom_components.visonic.pyvisonic] Lookup of Visonic Zone Type Reference Invalid, 0 is not in the array
Not sure if you need a complete debug log but please just let me know.
Also on HA start the alarm sensor gets these attributtes:
friendly_name: Visonic Alarm
supported_features: 3
code_format: null
changed_by: Startup
code_arm_required: false
mode: Powerlink
state: Disarmed
ready: true
tamper: false
memory: false
siren: false
bypass: false
alarm: None
trouble: None
lastevent: Startup/Startup
lasteventname: Startup
lasteventaction: Startup
lasteventtime: 26/08/2024, 15:35:43
Protocol Version: 1.4.1.0
Panel Model: PowerMax Pro Part
Power Master: "No"
Watchdog Timeout (Total): 0
Watchdog Timeout (Past 24 Hours): 0
Download Timeout: 0
Download Message Retries: 0
Panel Problem Count: 0
Last Panel Problem Time: ""
Client Version: 0.9.7.7
Exception Count: 0
panel: 0
And ~30 seconds later change to this:
friendly_name: Visonic Alarm
supported_features: 3
code_format: null
changed_by: System
code_arm_required: false
mode: Powerlink
state: Disarmed
ready: true
tamper: false
memory: false
siren: false
bypass: false
alarm: None
trouble: None
lastevent: System/Installer Programming
lasteventname: System
lasteventaction: Installer Programming
lasteventtime: 26/08/2024, 15:36:20
Protocol Version: 1.4.1.0
Panel Model: PowerMax Pro Part
Power Master: "No"
Watchdog Timeout (Total): 0
Watchdog Timeout (Past 24 Hours): 0
Download Timeout: 0
Download Message Retries: 0
Panel Problem Count: 0
Last Panel Problem Time: ""
Client Version: 0.9.7.7
Exception Count: 0
panel: 0
I trust this is the expected behaviour anyway I sense that you might want it to check by your own eyes.
Finally, I notice that you add on this version the "lasteventname" and "lasteventaction" that I was spliting before on the HA side but it is now much more straight. Please let me know waht I should do next to proceed with the tests of this or next versions.
Thank you, Joao
Dave,
I've been using this incredible integration since early times and this latest version destroy all the customization that I've built is the lastest years that allow me to indentfiy users (who made a certain actions) / devices (if was a fob, or code used) and many other usefull information that was exposed before, and it is not available anymore, with the version 0.8.5.2. This is what my PowerMax Pro was exposing:
After upgrading to 0.9.6.14 I have this:
Despite that powerlink doesn't even work (this need further investigation), attributes like:
changed_by Panel Last Event Panel Last Event Data Panel Status Panel Trouble Status
Where removed and all my template sensors based on attributes of the sensor [alarm_control_panel.visonic_alarm] stopped working! Had to rollback to the version 0.852 that is working flawlessy and the only reason that I have to update to a later version was to fix these warnings:
If you can share the changes to fix these warnings over the 0.8.5.2 version it would be awesome since my panel is quite old and will not have any evolution or change. Thank you, João