elad-bar / ha-blueiris

Integration with Blue Iris Video Security Software
179 stars 42 forks source link

i Get Multiple error Messages #210

Closed abeksis closed 1 year ago

abeksis commented 1 year ago

2023-06-08 17:49:55.199 ERROR (MainThread) [homeassistant.util.logging] Exception in state_message_received when handling msg on 'BlueIris/Gate/Status': '{ "type': "MOTION_A", "trigger": "ON" }' Traceback (most recent call last): File "/config/custom_components/blueiris/binary_sensors/main.py", line 57, in state_message_received self._state_message_received(message) File "/config/custom_components/blueiris/binary_sensors/main.py", line 70, in _state_message_received payload = json.loads(message.payload) ^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.11/json/__init__.py", line 346, in loads return _default_decoder.decode(s) ^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.11/json/decoder.py", line 337, in decode obj, end = self.raw_decode(s, idx=_w(s, 0).end()) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.11/json/decoder.py", line 353, in raw_decode obj, end = self.scan_once(s, idx) ^^^^^^^^^^^^^^^^^^^^^^ json.decoder.JSONDecodeError: Expecting ':' delimiter: line 1 column 12 (char 11)

kramttocs commented 1 year ago

You have a single quote after "type". Please correct that and retry.

abeksis commented 1 year ago

thank you for the answer.

I do not use TYPE. Here's my code, I think there's some bug.

`title: Securing path: securing icon: mdi:cctv type: custom:grid-layout cards:

2023-06-09 06:51:45.714 ERROR (MainThread) [homeassistant.util.logging] Exception in state_message_received when handling msg on 'BlueIris/Gate/Status': '{ "type': "MOTION_A", "trigger": "ON" }' Traceback (most recent call last): File "/config/custom_components/blueiris/binary_sensors/main.py", line 57, in state_message_received self._state_message_received(message) File "/config/custom_components/blueiris/binary_sensors/main.py", line 70, in _state_message_received payload = json.loads(message.payload) ^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.11/json/__init__.py", line 346, in loads return _default_decoder.decode(s) ^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.11/json/decoder.py", line 337, in decode obj, end = self.raw_decode(s, idx=_w(s, 0).end()) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.11/json/decoder.py", line 353, in raw_decode obj, end = self.scan_once(s, idx) ^^^^^^^^^^^^^^^^^^^^^^ json.decoder.JSONDecodeError: Expecting ':' delimiter: line 1 column 12 (char 11)

kramttocs commented 1 year ago

In Blue Iris go to your gate camera and check your mqtt configuration for motion. What I am referring to is this:

{ "type': "MOTION_A", "trigger": "ON" }

Notice that TYPE has mismatched quotes. Check out the Blue Iris manual here on GitHub if you need a refresher on this functionality. Let me know what you find. I believe this is a simple typo in your setup.

abeksis commented 1 year ago

Thanks for the response. This is the code I have under on on ALERT

https://imgur.com/nAs1w3h

and on resat:

https://imgur.com/PoYGfl0

kramttocs commented 1 year ago

Thanks for the screenshots. In those you have the single quote after TYPE typo. You need to fix that and all should be well. Closing as such.

abeksis commented 1 year ago

thank you for the answer.

Thanks for help and patience.

kramttocs commented 1 year ago

You bet! Please let me know if for some reason that doesn't fix it but I feel pretty good that it will :)