Open gsemet opened 3 years ago
You can't run the camera without using battery power, the reason is that we generate images from the camera stream for MJPEG streaming as well as motion detection. The application does reduce the number of images produced based on the FPS you set in the camera settings. I recommend you reduce your FPS to 5 or not use the application when running on battery, its not really meant to run on battery since its always in the foreground running. BTW, you need to use the latest version of WallPanel to have the camera battery saving feature.
Yes I have the latest version. My idea is to completely shutdown the camera when on battery
If you choose to run the application on a device that runs on battery, my recommendation is not to use the camera feature. Your other option is to monitory the sensor data and disable camera using MQTT commands when charge level drops below a certain amount. However, I think there is a bug reported on disabling the camera remotely and restarting it.
You mean by remote command ? That would be feasible but I would like something really smooth and I think this could be a nice feature for wallpanel:
I have updated the method we use to turn off/on the camera. Rather than a built-in feature, you will need to use the devices publish status to determine when to send a command to turn off/on the camera. This will disable all camera operations to conserve power. You can enable the camera again using the MQTT command as well. It should be noted that not all device report if they are on battery or their battery level. I will be putting out a new release for side loading and testing shortly.
Test version url: https://github.com/thanksmister/wallpanel-android/releases/tag/v0.9.4.3
Thanks a lot! I've configured mqtt devices in home assistant, and my Fire HD does well report the acPlugged property and the battery level. I'll test your version asap
Hello.
I have tested with the latest build and it does not seem to work:
$ mosquitto_pub -t 'wallpanel/mywallpanel/command' -u xxx -P xxx -h 192.168.0.8 -d -m '{"relaunch": true}'
# ==> restarts happens
$ mosquitto_pub -t 'wallpanel/mywallpanel/command' -u xxx -P xxx -h 192.168.0.8 -d -m '{"camera": false}'
# ==> nothing happens
# ==> movement can still be detected.
Don't know if this is related but in the menu, I cannot disable the camera as well (if i turn off the switch, i leave and go back to the camera menu the swich is enabled).
Would it is possible to send the state of the camera regularly :
wallpanel/mywallpanel/state
{"currentUrl":"http:\/\/192.168.0.8:8123\/lovelace\/default_view","screenOn":true,"brightness":29, "camera", true}
thanks
You can retest with https://github.com/thanksmister/wallpanel-android/releases/tag/v0.9.4.4
The camera still seems enabled:
Client (null) received PUBLISH (d0, q0, r0, m0, 'wallpanel/mywallpanel/command', ... (17 bytes))
{"camera": false}
Client (null) received PUBLISH (d0, q0, r0, m0, 'wallpanel/mywallpanel/connection', ... (7 bytes))
offline
Client (null) received PUBLISH (d0, q0, r0, m0, 'wallpanel/mywallpanel/connection', ... (6 bytes))
online
Client (null) received PUBLISH (d0, q0, r0, m0, 'wallpanel/mywallpanel/sensor/motion', ... (14 bytes))
{"value":true}
But now, when I go in the setting and disable the camera, it stays disabled
wallpanel/mywallpanel/state {"currentUrl":"http:\/\/192.168.0.8:8123\/lovelace\/default_view","screenOn":true,"brightness":29, "camera", true}
I added this to the application data and it will be in the next release.
There may still be issues, for example if the user has never turned on the camera and tries to start it using the MQTT command. I don't think it will work due to camera permissions and also the user has not setup the camera (front/rear).
Is your feature request related to a problem? Please describe. Battery drains fast when motion detection is enabled.
Describe the solution you'd like A new option in the "Motion Detection" menu: "Disable Motion Detection when running on battery"
When the power is disconnected, turn off motion detection (and maybe also other power hungry features) and let the user have to press the power button to awake the device.
When powered back, restore the "Motion Detection" state.
Thanks