elad-bar / Hassio-addons

10 stars 16 forks source link

Addon doesnt work #12

Open morpheus8888 opened 3 years ago

morpheus8888 commented 3 years ago

Hi, sorry for my poor english. I'm trying to use this addon but i get this:

The troykelly's addon works perfectly.

[s6-init] making user provided files available at /var/run/s6/etc...exited 0. [s6-init] ensuring user provided files have correct perms...exited 0. [fix-attrs.d] applying ownership & permissions fixes... [fix-attrs.d] done. [cont-init.d] executing container initialization scripts... [cont-init.d] 00-banner.sh: executing...

Add-on: DahuaVTO2MQTT Listens to events from Dahua VTO unit and publishes them via MQTT Message

Add-on version: 1.0.14 You are running the latest version of this add-on. parse error: Expected string key before ':' at line 1, column 4 [13:50:08] ERROR: Unknown HTTP error occured System: (aarch64 / raspberrypi4-64) Home Assistant Core: 2021.6.4 Home Assistant Supervisor: 2021.06.0

Please, share the above information when looking for help or support in, e.g., GitHub, forums or the Discord chat.

[cont-init.d] 00-banner.sh: exited 0. [cont-init.d] 01-log-level.sh: executing... [cont-init.d] 01-log-level.sh: exited 0. [cont-init.d] done. [services.d] starting services [services.d] done. [13:50:11] INFO: @@@@@@@@@@@@@@@@ /usr/bin/curl [13:50:11] INFO: @@@@@@@@@@@@@@@@ [13:50:11] INFO: FFS [13:50:11] INFO: Staring Dahua to MQTT 2021-06-13 13:50:12,616 INFO main Connecting 2021-06-13 13:50:12,621 INFO main Initializing MQTT Broker 2021-06-13 13:50:12,622 INFO main MQTT Broker is trying to connect... 2021-06-13 13:50:12,627 INFO main MQTT Broker connected with result code 0 2021-06-13 13:50:12,659 INFO main Get access control configuration 2021-06-13 13:50:12,661 INFO main Get version 2021-06-13 13:50:12,662 INFO main Get serial number 2021-06-13 13:50:12,664 INFO main Get device type 2021-06-13 13:50:12,665 INFO main Attach event manager 2021-06-13 13:50:12,690 INFO main Version: 4.410.0000000.4.R, Build Date: 2020-02-21 2021-06-13 13:50:12,693 INFO main Device Type: VTO2202F

Spartan-II-117 commented 3 years ago

can you share what you have in your configuration?

pollinolas commented 3 years ago

can you share what you have in your configuration?

I have the same error, but the addon ends up starting. this is my addon configuration:

intercom: host: 192.168.1.108 ssl: false username: admin password: REDACTED mqtt: host: core-mosquitto port: '1883' username: REDACTED password: REDACTED topic_prefix: DahuaVTO

and this is the supervisor's log

21-06-30 12:20:07 ERROR (MainThread) [aiohttp.server] Error handling request Traceback (most recent call last): File "/usr/local/lib/python3.9/site-packages/aiohttp/web_protocol.py", line 422, in _handle_request resp = await self._request_handler(request) File "/usr/local/lib/python3.9/site-packages/sentry_sdk/integrations/aiohttp.py", line 123, in sentry_app_handle reraise(_capture_exception(hub)) File "/usr/local/lib/python3.9/site-packages/sentry_sdk/_compat.py", line 54, in reraise raise value File "/usr/local/lib/python3.9/site-packages/sentry_sdk/integrations/aiohttp.py", line 113, in sentry_app_handle response = await old_handle(self, request) File "/usr/local/lib/python3.9/site-packages/aiohttp/web_app.py", line 499, in _handle resp = await handler(request) File "/usr/local/lib/python3.9/site-packages/aiohttp/web_middlewares.py", line 119, in impl return await handler(request) File "/usr/src/supervisor/supervisor/api/middleware/security.py", line 137, in system_validation return await handler(request) File "/usr/src/supervisor/supervisor/api/middleware/security.py", line 203, in token_validation return await handler(request) File "/usr/src/supervisor/supervisor/api/utils.py", line 65, in wrap_api answer = await method(api, args, kwargs) File "/usr/src/supervisor/supervisor/api/addons.py", line 406, in stats stats: DockerStats = await addon.stats() File "/usr/src/supervisor/supervisor/addons/addon.py", line 664, in stats return await self.instance.stats() File "/usr/local/lib/python3.9/concurrent/futures/thread.py", line 52, in run result = self.fn(self.args, self.kwargs) File "/usr/src/supervisor/supervisor/docker/interface.py", line 527, in _stats stats = docker_container.stats(stream=False) File "/usr/local/lib/python3.9/site-packages/docker/models/containers.py", line 422, in stats return self.client.api.stats(self.id, kwargs) File "/usr/local/lib/python3.9/site-packages/docker/utils/decorators.py", line 19, in wrapped return f(self, resource_id, args, kwargs) File "/usr/local/lib/python3.9/site-packages/docker/api/container.py", line 1141, in stats return self._result(self._get(url, params={'stream': False}), File "/usr/local/lib/python3.9/site-packages/docker/api/client.py", line 277, in _result return response.json() File "/usr/local/lib/python3.9/site-packages/requests/models.py", line 900, in json return complexjson.loads(self.text, **kwargs) File "/usr/local/lib/python3.9/json/init.py", line 346, in loads return _default_decoder.decode(s) File "/usr/local/lib/python3.9/json/decoder.py", line 337, in decode obj, end = self.raw_decode(s, idx=_w(s, 0).end()) File "/usr/local/lib/python3.9/json/decoder.py", line 355, in raw_decode raise JSONDecodeError("Expecting value", s, err.value) from None json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0) 21-06-30 12:20:29 INFO (SyncWorker_5) [supervisor.docker.addon] Starting Docker add-on 26703e67/amd64-addon-dahuavto2mqtt with version 1.0.14 21-06-30 12:20:30 WARNING (MainThread) [supervisor.api.middleware.security] 26703e67_dahuavto2mqtt missing API permission for /host/info 21-06-30 12:20:30 ERROR (MainThread) [supervisor.api.middleware.security] Invalid token for access /host/info

cagnulein commented 3 years ago

same error here

[s6-init] making user provided files available at /var/run/s6/etc...exited 0.
[s6-init] ensuring user provided files have correct perms...exited 0.
[fix-attrs.d] applying ownership & permissions fixes...
[fix-attrs.d] done.
[cont-init.d] executing container initialization scripts...
[cont-init.d] 00-banner.sh: executing... 
-----------------------------------------------------------
 Add-on: DahuaVTO2MQTT
 Listens to events from Dahua VTO unit and publishes them via MQTT Message
-----------------------------------------------------------
 Add-on version: 1.0.14
 You are running the latest version of this add-on.
parse error: Expected string key before ':' at line 1, column 4
[08:01:48] ERROR: Unknown HTTP error occured
 System:   (amd64 / qemux86-64)
 Home Assistant Core: 2021.1.5
 Home Assistant Supervisor: 2021.06.6
-----------------------------------------------------------
 Please, share the above information when looking for help
 or support in, e.g., GitHub, forums or the Discord chat.
-----------------------------------------------------------
[cont-init.d] 00-banner.sh: exited 0.
[cont-init.d] 01-log-level.sh: executing... 
[cont-init.d] 01-log-level.sh: exited 0.
[cont-init.d] done.
[services.d] starting services
[services.d] done.
[08:01:49] INFO: @@@@@@@@@@@@@@@@
/usr/bin/curl
[08:01:49] INFO: @@@@@@@@@@@@@@@@
[08:01:49] INFO: FFS
[08:01:49] INFO: Staring Dahua to MQTT
2021-07-02 08:01:49,694 INFO __main__ Connecting
jruibarroso commented 2 years ago

same problem here:

[s6-init] making user provided files available at /var/run/s6/etc...exited 0. [s6-init] ensuring user provided files have correct perms...exited 0. [fix-attrs.d] applying ownership & permissions fixes... [fix-attrs.d] done. [cont-init.d] executing container initialization scripts... [cont-init.d] 00-banner.sh: executing...

Add-on: DahuaVTO2MQTT Listens to events from Dahua VTO unit and publishes them via MQTT Message

Add-on version: 1.0.14 You are running the latest version of this add-on. parse error: Expected string key before ':' at line 1, column 4 [20:17:10] ERROR: Unknown HTTP error occured System: (amd64 / generic-x86-64) Home Assistant Core: 2022.3.3 Home Assistant Supervisor: 2022.03.3

Please, share the above information when looking for help or support in, e.g., GitHub, forums or the Discord chat.

[cont-init.d] 00-banner.sh: exited 0. [cont-init.d] 01-log-level.sh: executing... [cont-init.d] 01-log-level.sh: exited 0. [cont-init.d] done. [services.d] starting services [services.d] done. [20:17:10] INFO: @@@@@@@@@@@@@@@@ /usr/bin/curl [20:17:10] INFO: @@@@@@@@@@@@@@@@ [20:17:10] INFO: FFS [20:17:10] INFO: Staring Dahua to MQTT 2022-03-13 20:17:11,073 INFO main Connecting 2022-03-13 20:17:11,074 INFO main Initializing MQTT Broker 2022-03-13 20:17:11,074 INFO main MQTT Broker is trying to connect... 2022-03-13 20:17:11,075 INFO main MQTT Broker connected with result code 0 Exception in thread Thread-1: Traceback (most recent call last): File "/usr/lib/python3.8/threading.py", line 932, in _bootstrap_inner self.run() File "/usr/lib/python3.8/threading.py", line 870, in run self._target(*self._args, **self._kwargs) File "/usr/lib/python3.8/site-packages/paho/mqtt/client.py", line 3591, in _thread_main self.loop_forever(retry_first_connection=True) File "/usr/lib/python3.8/site-packages/paho/mqtt/client.py", line 1756, in loop_forever rc = self._loop(timeout) File "/usr/lib/python3.8/site-packages/paho/mqtt/client.py", line 1164, in _loop rc = self.loop_read() File "/usr/lib/python3.8/site-packages/paho/mqtt/client.py", line 1556, in loop_read rc = self._packet_read() File "/usr/lib/python3.8/site-packages/paho/mqtt/client.py", line 2439, in _packet_read rc = self._packet_handle() File "/usr/lib/python3.8/site-packages/paho/mqtt/client.py", line 3033, in _packet_handle return self._handle_publish() File "/usr/lib/python3.8/site-packages/paho/mqtt/client.py", line 3327, in _handle_publish self._handle_on_message(message) File "/usr/lib/python3.8/site-packages/paho/mqtt/client.py", line 3570, in _handle_on_message on_message(self, self._userdata, message) File "/app/DahuaVTO.py", line 169, in on_mqtt_message data = json.loads(payload) File "/usr/lib/python3.8/json/init.py", line 357, in loads return _default_decoder.decode(s) File "/usr/lib/python3.8/json/decoder.py", line 337, in decode obj, end = self.raw_decode(s, idx=_w(s, 0).end()) File "/usr/lib/python3.8/json/decoder.py", line 355, in raw_decode raise JSONDecodeError("Expecting value", s, err.value) from None json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0) 2022-03-13 20:17:11,103 INFO main Get access control configuration 2022-03-13 20:17:11,103 INFO main Get version 2022-03-13 20:17:11,103 INFO main Get serial number 2022-03-13 20:17:11,104 INFO main Get device type 2022-03-13 20:17:11,104 INFO main Attach event manager 2022-03-13 20:17:11,123 INFO main Version: 4.410.0000000.4.R, Build Date: 2020-02-21 2022-03-13 20:17:11,125 INFO main Device Type: VTO2202F 2022-03-13 20:17:11,126 INFO main Hold time: 15

jruibarroso commented 2 years ago

anyone solve this yet ?