roleoroleo / sonoff-hack

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

MQTT stopped working #69

Closed MaxicNenad closed 1 month ago

MaxicNenad commented 2 years ago

Many thanks for your work. Two days ago I have an issue with sending MQTT messages for detected motion to my HA installation. I didn't changed anything in, for about a year, working configuration, it just stopped sending messages. When turn on the cloud, the application receives notifications regularly. Version is 0.1.1, camera model GK-200MP2B. Thank you in advance.

roleoroleo commented 2 years ago

Check if mqtt-sonoff process is running.

MaxicNenad commented 2 years ago

It runs: 1078 1 root S 10140 27.6 0 0.0 /mnt/mmc/sonoff-hack/bin/mqtt-sonoff but receive folowing error /mnt/mmc/sonoff-hack/bin/mqtt-sonoff: can't load library 'libmosquitto.so.1'

40cal commented 2 years ago

@MaxicNenad I'm seeing the same behavior (/mnt/mmc/sonoff-hack/bin/mqtt-sonoff: can't load library 'libmosquitto.so.1') on the GK-200MP2B. What version of sonoff-hack were you using when MQTT used to work?

MaxicNenad commented 2 years ago

@40cal now I am running 0.1.1, on previous version runs ok without any issues. My camera is same model as yours.

roleoroleo commented 2 years ago

If you try to run mqtt-sonoff manually you have to source the env: . /mnt/mmc/sonoff-hack/script/env

darkxst commented 1 year ago

I am not getting any motion events either, testing on base firmware V5520.2053.0402build20220712. Not sure if related to the above however there does not seem to be any events written in the t_alarm_log table as is monitored by mqtt-sonoff server. (there are not any motion events reported with the yi-hack ha integration either)

This command returns nothing #sqlite3 /mnt/mtd/db/ipcsys.db 'select * from t_alarm_log;'

Only log of motion event I can find is in the db on the sdcard.

# sqlite3 /mnt/mmc/AVRecordFile.db 'select * from T_RecordFile;'

20220913|2022-09-13 10:29:08|2022-09-13 10:29:42|2|ARC20220913102908.mp4|/mnt/mmc/alarm_record/20220913/10/ARC20220913102908.mp4|0||2022-09-13 10:29:09|
20220913|2022-09-13 10:30:21|2022-09-13 10:30:56|2|ARC20220913103023.mp4|/mnt/mmc/alarm_record/20220913/10/ARC20220913103023.mp4|0||2022-09-13 10:30:24|
20220913|2022-09-13 10:31:06|2022-09-13 10:31:40|2|ARC20220913103108.mp4|/mnt/mmc/alarm_record/20220913/10/ARC20220913103108.mp4|1||2022-09-13 10:31:40|
20220915|2022-09-15 08:45:20|2022-09-15 08:45:55|2|ARC20220915084520.mp4|/mnt/mmc/alarm_record/20220915/08/ARC20220915084520.mp4|0||2022-09-15 08:45:21|

# sqlite3 /mnt/mmc/AVRecordFile.db '.schema T_RecordFile'

CREATE TABLE T_RecordFile (c_RecDate         INT4            not null,c_starttime          TIMESTAMP            not null,c_EndTime            TIMESTAMP            not null,c_RecType            INT4                 not null,c_FileName           VARCHAR(60)          not null,c_FullPath           VARCHAR(256)         not null,c_alarm_code         VARCHAR(32)          not null,c_EventName          VARCHAR(256)         null,c_alarm_time         TIMESTAMP            null,c_Remark             VARCHAR(256)         null,constraint PK_T_RECORDFILE primary key (c_starttime, C_EndTime));
darkxst commented 1 year ago

I will add that all the motion event files appear on sdcard and show up in the web ui also under the events page.

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.