haruny / adt-pulse-mqtt

ADT Pulse Bridge for Home Assistant
MIT License
10 stars 5 forks source link

Logs filled with Errors from ADT Sensors #35

Closed RodneyCapron closed 4 years ago

RodneyCapron commented 4 years ago

Good Morning Haruny,

I have been using this ADT Pulse component for close to a year now and it has been working flawlessly (for Arming and Disarming the system through HomeKit), thank you for that! :)

I recently decided to add in my sensors (door, window and motion) to Home Assistant and HomeKit. Everything is working as expected but it seems to be throwing thousands (around 10k per day) of errors and filling up the error logs. Please see below for an example of what I am seeing:

9:03:33 AM – helpers/template.py (ERROR) - message first occurred at 7:38:14 AM and shows up 7536 times

2020-03-29 11:56:45 ERROR (MainThread) [homeassistant.helpers.template] Error parsing value: 'value_json' is undefined (value: devStatOK, template: {{ value_json.status }}) 2020-03-29 11:56:50 ERROR (MainThread) [homeassistant.helpers.template] Error parsing value: 'value_json' is undefined (value: devStatMotion, template: {{ value_json.status }})

Below is a copy of my configuration (running Home Assistant 0.107.7):

Enable ADT System Sensors

binary_sensor:

Any ideas on what might be causing this? I have replaced single quotes with double quotes, etc, etc. with no luck. I figure that I must have done something incorrectly with my configuration.

Thanks again for all your hard work on this, I really appreciate it! :)

All the best, Rodney

digitalcraig commented 4 years ago

I have similar errors message and looking at the MQTT Sensor documentation again, it seems like you (we) may not need the template entry. It is optional and it's used to extract or modify the value retrieved from the topic using a template. The value_json part tells it to extract the status key from a json payload.

Using an MQTT snooping app, I see that the value devstatOK is directly posted to the state topic and it's not in json format. You could try changing value_json.status to just value.status. Or, I think it can be removed altogether. I will have to try that myself.

There are several json_attributes configuration entries so this template entry may be a holdover from when the status was written as a json payload directly to the topic.

digitalcraig commented 4 years ago

Yes, I confirmed that removing value_template: "{{ value_json.status }}" from my configuration does not does not affect the operation of my door sensors. I also see no more errors related to value_json.

RodneyCapron commented 4 years ago

Hello @digitalcraig,

Awesome! Thank you so much for the quick response and the easy fix. :) Everything is working perfectly now.

Thanks again and I hope you and your family are safe and healthy.

All the best, Rodney