roleoroleo / sonoff-hack

Custom firmware for Sonoff GK-200MP2B camera
GNU General Public License v3.0
200 stars 45 forks source link

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

Closed Dim3333 closed 1 month ago

Dim3333 commented 2 years ago

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.

roleoroleo commented 2 years ago

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

Dim3333 commented 2 years ago

I see that: image

roleoroleo commented 2 years ago

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

Dim3333 commented 2 years ago

image

Dim3333 commented 2 years ago

The parameters are by default.

image image image

roleoroleo commented 2 years ago

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

Dim3333 commented 2 years ago

It's seems better .... image

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

roleoroleo commented 2 years ago

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

Dim3333 commented 2 years ago

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 ?

roleoroleo commented 2 years ago

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.

Dim3333 commented 2 years ago

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.

roleoroleo commented 2 years ago

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

Dim3333 commented 2 years ago

OK. Thanks for explanations and your work.

darkxst commented 1 year ago

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.

bigsem89 commented 9 months ago

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.

roleoroleo commented 9 months ago

Please post your mqtt configuration (cam side).

bigsem89 commented 9 months ago

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

github-actions[bot] commented 2 months ago

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.