yi-hack-Allwinner-v2
yi-hack-Allwinner-v2 copied to clipboard
MQTT: set and get functionality possible?
Is it possible to implement MQTT "set" and "get" topics functionality to send commands to and pull information from the cam?
At the moment there is MQTT Reporting only, which comes in very handy. Setting and getting could let us do even more cool things.
So I would like to control my cams or at least being able to set some things on/off through MQTT; e.g. Motion Detection, LED, IR, PTZ-Steps etc.
Example:
Publishing a message like this "mycamshostname/camera_setting/LED/set on
" could do the trick.
And via "get" topics we could retrieve information actively.
Example:
I can set up inside the cam's web interface the MQTT reporting time period of the settings states (e.g. 1/week). When I turn on LED its new state will only reported when the running time period ends - in worst case I have to wait a week. Yes I could set a shorter period - e.g. 5 min. - so states get reported more often, even where I never change something.
Therefore it would be great to set the reporting period at a long time range (or never send automatically) on one hand, and on the other hand being able to pull the needed states via MQTT (e.g. "mycamshostname/camera_setting/LED/get
"), when something was changed (via http or MQTT command).
Especially controlling the PTZ steps would imho be very useful.
What do you think about that?
Thank you very much and kind regards
Yes, it's possible. But it's a long task compared to the time available.
Yes, I agree. I would try to support you by pull requests etc., but I am afraid my skills in coding are not good enough. It would possibly cause more damage than help 😆