Android IP Webcam as a camera plus sensors!

Hi
When I try go via url to camera I can see the stream video.
But when I try to create Ifram to see the stream video on card 24/7 I not see nothing

This my card config

type: iframe
url: http://192.168.1.17:8080/video
aspect_ratio: 100%

What the problem? 

Considering this. Is there a way to turn the camera on and off from Home Assistant automations? i would like to save some battery/power and only turn on the camera when being away.

Have you found a solution to turn on/off the camera stream? I would also like to use it on purpose only (audio detected in kids room → start stream video).

I also found out in the official release screenshot of IP Webcam integration that there was a switch “audio only”):

1 Like

I use the conditional card to hide the stream, thus not consuming the data when not needed. Is that what you’re looking for?

Yes, I do it like this for now. But the phone with app IP Webcam is still filming all the time with its camera (and getting hot + aging the battery). I would like to stop it to film video (and not only to stop the data transfer) with a switch or an automation in Home Assistant.

I don’t see a way of turning off the cams: Android IP Webcam - Home Assistant

There are a couple of switches you can play with. Is it true that none of those would kill recording?

I mailed the developer and he gave me the following hint which I am now using: in the IP camera app, under power management, tick stop camera when inactive. That the way the IP camera phone is not using the camera all the time (and doesn’t get warm and using battery the whole time). I also activate “deactivate display” and unticked “keep screen alive” to switch off the screen of the phone.

1 Like

is there a way to turn the camera and recording on via time automation?

Regarding the issue of the camera dying: I tried this with an LG G6 phone, using its front camera. The video server would stop quite often. It appears that the video server is a separate process from the front end of the app. (It would report a “crashed app”, but the front end was still running.) After starting the server from the app again, it would come up, but often crash soon after.
The solution in my case was to reduce the pixel resolution of the streamed video. I went down to 1280x960, and now, it runs stably for many days.

This is all done using the Android IP Webcam integration in Home Assistant. After first starting, it shows me about 10 different sensors or so, but sensors soon show up as “unavailable” in the Home Assistant interface. Luckily, the video stream runs stable, and that’s the thing I care about most. But I think there is a bug in the Home Assistant integration, because when I issue a command like http://AIP_IP:port/sensors.json?sense=motion_active, I do get a response. To me, this suggests the phone and the app are up and running, but the integration somehow thinks that the sensor is unavailable. (Where would I report this bug?)

Hey does anyone know how to trigger the ZOOM function from HA or url or something?
I have a phone plastered on my peep-hole acting as a doorbell with DOODS image recognition so as to turn the video on whenever the doorbell rigns but without the zoom, the peephole walls are covering a huge part of the screen. The server has to restart each day or else it lags out and becomes unavailable, so after each restart I am left without the zoom and am thus having to do it manually. It basically breaks my intended purpose because the recog doesnt work without it.

Also, is there a way to access the two way audio switch? Otherwise I might be forced to do it with AutoHotkey (via auto mouse click, lol)

edit: in the meantime I managed to trigger the zoom level using /ptz?zoom=100 and you can put this in a button if you like. Also, managed to make the server not restart as often using /settings/exposure?set=-3 which also makes the feed clearer and snappier. Moreover, I managed to avoid actually having the need for a constant video feed altogether by just snapping a photo via /photo.jpg everytime my doorbell rings and having DOODS run image recog on it via automation.

1 Like

hey, do you happen to know the endpoint for the audio_only switch? or some other way for ha to access it?
It would really save some power if I could only have the video on after the doorbell rang

One way to obtain all the settings for your camera is:

curl -X GET ‘http://<IP_Address:Port>/status.json?show_avail=1’

Enjoy…

Hello , do you have a idea to control the zoom cursor ?
thank you so much

Use your browser DevTools (usually F12) to see what’s going on. I’ve just done this, and see that you just need to issue a GET request:

http://IP:PORT/ptz?zoom=x

where x ranges from 0 to 8 on my setup.

This is documented in the very first post of the topic.

1 Like

Hello,

Thank you so much,
I checked the inspect of the page, but i didnt find the correct URL like you ! I will search better !

Hello,
I add the Zoom without probem like this

shell_command: set_zoom_control1: 'curl -X PUT http://192.168.1.69:8080/ptz?zoom={{ states("input_number.zoomandroid1") }}'

but unable to add the range like this :
shell_command: x_control1: 'curl -X PUT http://192.168.1.69:8080/settings/crop_x?set={{ states("input_number.xandroid1") }}'

In the terminal the command works fine, but not in shell_command integration. I think it’s a problem of variable type ?
Thank you

this doesn’t show the accelerometer though. Any idea how to get it to show up in HA? It’s supposed to be part of the integration, but I don’t know what to put in the config.yaml to get it to show. tried ‘accelerometer’ or ‘accel’ but to no avail

guys, the sensors on this integration don’t update every second anymore, what gives? I used to have it via yaml with scan_interval 1 but now the yaml version won’t work anymore, how can I go around this? tried forcing a sensor update every second via automation but it won’t do it, anyone know how to resolve this?

I have been using for months the native integration and just came across this thread.
Thanks for the findings on how to reach the rest json calls.
I’ve added a REST sensor with all curval parameters as atributes o I can track its status. With current zoom value as main sensor value, as I use it for my peephole and need to zoom in a bit to crop the surrounding.
Also, I also face the random disconnection from HA/wifi. The device is still powered on and within Wifi but i’m not sure if Android might be killing it for long running or what.
due to the old version of the Android I can’t use Tasker to force a restart of the device everyday.

Does anyone has any mitigation for these random disconnections?

Thanks.