sonoff-hack icon indicating copy to clipboard operation
sonoff-hack copied to clipboard

MQTT (Mosquito Broker) under Home Assistant doesn't detect camera

Open Dim3333 opened this issue 3 years ago • 18 comments

Hi,

Firmware Version | 0.1.1 Base Version | V0525.1.276build20201103 Model | GK-200MP2C

I enabled MQTT service but under Home Assistant the camera doesn't appears in the MQTT Broker. I well checked IP, login and password. I don't know where is the issue.

Thanks.

Dim3333 avatar Feb 16 '22 09:02 Dim3333

Open a mqtt client (like MQTT-Explorer), connect to the broker and check if you can see the topics configured in the cam. immagine

roleoroleo avatar Feb 17 '22 10:02 roleoroleo

I see that: image

Dim3333 avatar Feb 17 '22 14:02 Dim3333

Try to restart the cam while the broker is running and check again. Could you share your mqtt configuration (of the cam).

roleoroleo avatar Feb 17 '22 15:02 roleoroleo

image

Dim3333 avatar Feb 17 '22 16:02 Dim3333

The parameters are by default.

image image image

Dim3333 avatar Feb 17 '22 16:02 Dim3333

Try this binary. I fixed a bug when the alarms table is empty. mqtt-sonoff.gz

roleoroleo avatar Feb 17 '22 20:02 roleoroleo

It's seems better .... image

But under Home Assistant the camera still doesn't appears in the MQTT Broker.

Dim3333 avatar Feb 17 '22 22:02 Dim3333

If you mean MQTT Advertise & Homeassistant MQTT Discovery, it's not implemented. But you can try my custom integration: https://github.com/roleoroleo/yi-hack_ha_integration

roleoroleo avatar Feb 18 '22 07:02 roleoroleo

I use MQTT (Mosquito Broker) provided by HA image

I already used your integration. Perfect +1 image

So I can disabled MQTT service in cam parameters ?

Dim3333 avatar Feb 18 '22 17:02 Dim3333

No, if you want to use my integration, mqtt is required. But the cam does not appear in your mqtt broker because it doesn't use the discovery protocol.

roleoroleo avatar Feb 18 '22 18:02 roleoroleo

OK. I'm not a MQTT specialist but the HA mqtt broker discovered another MQTT client as my Octoprint server for example. I don't understand why the SonOff cam is not compatible. It 's just for my personnal understanding.

Thanks.

Dim3333 avatar Feb 18 '22 20:02 Dim3333

Discovery requires a special protocol to be implemented on the cam. I didn't write it.

roleoroleo avatar Feb 18 '22 20:02 roleoroleo

OK. Thanks for explanations and your work.

Dim3333 avatar Feb 18 '22 22:02 Dim3333

Next release will have initial support for HA Discovery of the Camera Device info and the motion sensor and motion Image Sensor. It does not however implement all the features available in the Yi Hack integration.

darkxst avatar Oct 25 '22 12:10 darkxst

I'm having trouble getting my camera to work with MQTT. It seems that the MQTT topic isn't being created. I've already verified the correctness of the user, login credentials, IP address, and even checked the camera's network connectivity.

bigsem89 avatar Sep 09 '23 21:09 bigsem89

Please post your mqtt configuration (cam side).

roleoroleo avatar Sep 20 '23 17:09 roleoroleo

Please post your mqtt configuration (cam side).

Thank you for response. i have managed to fix it by changing event location to 0, but now i've faced another issue:

#156

bigsem89 avatar Sep 21 '23 09:09 bigsem89

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

github-actions[bot] avatar Apr 03 '24 02:04 github-actions[bot]