roleoroleo / yi-hack_ha_integration

Home Assistant custom integration for Yi cameras: yi-hack-MStar, yi-hack-Allwinner, yi-hack-Allwinner-v2, yi-hack-v5 and sonoff-hack

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Camera dome u h52ga with hack yi-hack-Allwinner-v2 version 0.2.6 -camera off

majkers opened this issue · comments

After updating integration to latest version and hack to 0.2.6 I can't play stream in Home Assistant. In logs I see message that camera is off:

image

It was working OK with previous integration version. I can access last motion camera at the same time or use go2rtc integration.

Sensors also not showing real status, eg. Actually almost are all off...

image

image
image

One more question about those new sensors. Previously I had to disable face detection, humand deterction to make motion detection work. Now I can enable it all?

When restarting HA some more logs:
2023-02-23 17:28:16.588 ERROR (MainThread) [homeassistant.config_entries] Error unloading entry dome_u_1 for yi_hack Traceback (most recent call last): File "/usr/src/homeassistant/homeassistant/config_entries.py", line 533, in async_unload result = await component.async_unload_entry(hass, self) File "/config/custom_components/yi_hack/__init__.py", line 150, in async_unload_entry hass.data[DOMAIN].pop(entry.entry_id) KeyError: '255c97486a9155b7949a348dce198fc1' 2023-02-23 17:28:39.388 ERROR (SyncWorker_4) [custom_components.yi_hack.common] Failed to get status from device http://192.168.1.14/: error HTTPConnectionPool(host='http', port=80): Max retries exceeded with url: //192.168.1.14/:8080/cgi-bin/status.json (Caused by NewConnectionError('<urllib3.connection.HTTPConnection object at 0x7f4aee6860>: Failed to establish a new connection: [Errno -2] Name does not resolve')) 2023-02-23 17:28:52.381 ERROR (SyncWorker_0) [custom_components.yi_hack.common] Failed to get status from device http://192.168.1.14/: error HTTPConnectionPool(host='http', port=80): Max retries exceeded with url: //192.168.1.14/:8080/cgi-bin/status.json (Caused by NewConnectionError('<urllib3.connection.HTTPConnection object at 0x7f485f2950>: Failed to establish a new connection: [Errno -2] Name does not resolve'))

This url http://192.168.1.14:8080/cgi-bin/status.json is working OK but I think it might try to acces something like //192.168.1.14/:8080/cgi-bin/status.json and that is not OK

commented

If you restart ha, the status of the cam is not updated.
I need to add a force refresh to fix this problem.
Try to restart the cam and the camera should appear "on".

About the status.json error, I don't know...
What version of ha are you using?

It happended on HA version 2023.1.7. Maybe this is the cause?
Max retries exceeded with url: //192.168.1.14/:8080/cgi-bin/status.json
why there is an extra / before port number?

commented

I don't know.
Never seen before.
Did you try to remove the the cam from the integration and add it again?

Yes I did. Ok let's leave it for now. I will wait for your next release (with fix youe mentioned above) and check it then.

Just installled 0.4.5 version...camera is still offline... Restarted HA, then restarted camera and it is not helping... Going back to last working version 0.4.2

Cleaning browser cache did not help:

image

image

commented

Any message in the log?

Jus the one I mentioned above with a bottom picture.

commented

I got a doubt.
Is mqtt enabled in your ha installation?

Yes. I use zigbee2mqtt

commented

Ok, please run MQTT Explorer and check if you receive stat messages when you start the cam.

immagine

It look somewhat different in my explorer..
image

but....I once again updated to 0.4.5 version doing exactly the same thing as before and now it started to work...... sic! I will test it and leave this issue open for a while

commented

Sometimes OTA update doesn't work properly and a fresh install is necessary.
Let me know.