DavidVentura / cam-reverse

64 stars 18 forks source link

Battery state? #29

Open nikto-b opened 3 months ago

nikto-b commented 3 months ago

Hello, is there any information about retrieving battery info from camera? There is "low battery" signal in an YsxLite app, but no info about percentage, or even state of charging

DavidVentura commented 3 months ago

there's support for it: https://github.com/DavidVentura/cam-reverse/blob/master/handlers.ts#L95

but it's not currently called / called on a schedule. to call it on startup, you could add a call to s.send(sendDevStatus(s)) here: https://github.com/DavidVentura/cam-reverse/blob/master/http_server.ts#L141