A couple of years ago I set up an Ubuntu Server 16.04 to monitor a cheap Android phone acting solely as an IP camera (with IP Webcam app)
The server I used was motion. (EDIT: good to see that the project is still alive)
At the time I wasn’t too worried about things like exposure, and the phone was sitting outside, at one corner of the window. But from I see now at their web page, it seems that it handles basic automatic scene brightness.
It fitted my needs at the time, and most issues came from getting the phone up and running 24x7.