davesmeghead / visonic

Visonic Custom Component for integration with Home Assistant
Apache License 2.0
90 stars 20 forks source link

Receive "Panel Event Log - Failed to write XML file" when running service "visonic.alarm_panel_eventlog" #28

Closed haforme closed 3 years ago

haforme commented 3 years ago

Receive following "Panel Event Log - Failed to write XML file" when running service "visonic.alarm_panel_eventlog" in HA log.

Panel Event Log - Failed to write XML file 6:23:18 PM – Visonic Intruder Alarm (WARNING)

The "panel_log.csv" is created correctly.

I've installed your integration via HACS and it installed fine. Was able to test to both PowerMax Plus and Pro. Nice integration. I connected to my panels via existing ethernet to true RS232 connections that I had been using with the Remote Programmer. Worked fine.

BTW, How can I read the log once the XML file problem is corrected? Struggling with this. Thanks

haforme commented 3 years ago

Forgot to mention, I've been receiving a a communications timeout notification 8 out of 10 times I download the 250 line event log from the panel.

haforme commented 3 years ago

Here's the timeout message;

Communication Timeout - Perhaps there is a problem with the connection to the Alarm Panel

davesmeghead commented 3 years ago

You're asking for both a csv and an xml file, it creates the csv but not the xml. To create the xml file it uses a jinja2 template file called "visonic_template.xml" and it looks for it in the following directories (in this order) /config/templates /config/xml /config/www /config

There is an example template file in the integration directory after installation.

To read the generated event log csv or xml file, you will need to create your own "card" in the HA Frontend that reads the info from the file, other users have done this but I haven't. Ask on the main forum page and someone will hopefully help you.

As for the timeout notifications, the only way I'll be able to look at this is if you set up debug logging for this integration and upload a log file for me to look through.

haforme commented 3 years ago

Thanks. I read and read the docs but overlooked the folders that the xml file could be copied to. It works fine. Sorry. The timeouts stopped.