roleoroleo / yi-hack-MStar

Custom firmware for Yi 1080p camera based on MStar platform
GNU General Public License v3.0
850 stars 112 forks source link

Expose settings through MQTT #316

Closed MoiZie closed 5 months ago

MoiZie commented 3 years ago

Maybe I'm overlooking things, but is there a way to disable video recording through MQTT? Use case: when I'm home, I don't need recordings of my rooms, nice privacy feature. It also saves wear on the SD card and reduces the WiFi usage.

MoiZie commented 3 years ago

For an example of MQTT control integration see the Dafang Hacks: https://github.com/EliasKotlyar/Xiaomi-Dafang-Hacks/blob/master/firmware_mod/scripts/mqtt-control.sh

roleoroleo commented 3 years ago

At the moment it's possible only through web services. But I could do this.

Smosia commented 3 years ago

Any news about this feature? I found "Topics Prefix for remote configuration" in MQTT web page. What is it?

roleoroleo commented 3 years ago

Yes, there are 2 methods: 1 - Check this pr: https://github.com/roleoroleo/yi-hack-Allwinner-v2/pull/114

2 - You can also use the "Topics Prefix for remote configuration" with the following syntax: PREFIX/file_to_update/parameter_to_update Example: kitchen-cam-config/system/onvif Payload: yes/no

Smosia commented 3 years ago

Thank you. I will test 2 method.

Maybe you could add that info to Readme.md? It would be helpful for new users.

roleoroleo commented 3 years ago

Yes.

lesensei commented 3 years ago

I'm sorry I'm feeling pretty dumb, but I don't get it :-(

What does the "file_to_update" reference points to ? Where can I find a list of these files and the parameters they each host ?

roleoroleo commented 3 years ago

Read the configuration files with the web service:

http://IP-CAM:8080/cgi-bin/get_configs.sh?conf=system
http://IP-CAM:8080/cgi-bin/get_configs.sh?conf=mqtt

system is the content of the file system.conf mqtt is the content of the file mqtt.conf So "file_to_update" can be system, mqtt, etc...

github-actions[bot] commented 6 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.