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
GNU General Public License v3.0
219 stars 32 forks source link

Required Camera Configuration? #132

Closed alexpomsft closed 1 year ago

alexpomsft commented 1 year ago

It's not clear from the documentation which service(s) on the camera need to be enabled. Currently I'm having a situation where the integration successfully connects to my yi-hack-MStar camera, but its status is always Disconnected and none of the entities work. I am able to view the camera's status webpage, view the stream via VLC, etc.

I guess that one or more of the MQTT services need to be enabled and configured. I do have the Home Assistant MQTT integration added and working, but I haven't connected my camera to it. Do I need to do that via the camera's settings?

Thanks for any guidance!

alexpomsft commented 1 year ago

I'm resolving this with some notes. Feel free to add comments.

It does seem that the MQTT camera settings need to be correctly set and for the camera to publish to some MQTT instance, probably the Home Assistant one. After correctly setting these, and ensuring that MQTT topics were being published from the camera I can see that the integration works.

roleoroleo commented 1 year ago

Yes. If you check the github page of the project, there is a requirements section where this problem is explained. https://github.com/roleoroleo/yi-hack_ha_integration

dskvr commented 11 months ago

@roleoroleo I don't see any notes about what the appropriate settings should be. When browsing source, it's also not clear if "topics prefix" is the "default" in yi-hack-v5 or it needs to be modified in one, or both places (yi-hack-v5 and the HA integration). The "requirements" section is generally unclear, as timidly mentioned by @alexpomsft:

"This component requires MQTT integration to be installed." ... MQTT is installed in HA

"Please be sure you added MQTT to you Home Assistant configuration." ... MQTT has been added to HA Config.

But there is no mentioned under requirements about the yi-hack config. Clearly, in (camera) yi-hack > MQTT needs to be enabled, the server and port need to be pointed at HA MQTT ~Integration~ broker, but anything else? ~If not, I'm stuck.~ I wan't connecting to the broker, works now.

Either way, some rewording under "Requirements" would be helpful. If I figure this out I'll submit a PR.

roleoroleo commented 11 months ago

Thank you for your pr. It's all pretty clear, the only thing I don't understand is: "When browsing source, it's also not clear if "topics prefix" is the "default" in yi-hack-v5 or it needs to be modified in one, or both places (yi-hack-v5 and the HA integration)." The integration reads topic prefix from your cam configuration. So you can set it as you want.