yuppity / unifi-video-api

Python API for UniFi Video
MIT License
59 stars 11 forks source link

Host IP Address? #27

Closed onezero1010101 closed 3 years ago

onezero1010101 commented 3 years ago

Do you have an option for the camera IP or HOST? I see the mac address, and am wanting to poll for devices that are stuck managing, and be able to reboot them via script if they get hung. I have found everything I need so far for this, except do not see a way to pull the HOST IP. Thanks

yuppity commented 3 years ago

At the moment, no. I have no objections to adding this whenever I push the next minor/patch update though.

Until then, you should get by on

from unifi_video import UnifiVideoAPI

UnifiVideoAPI(...).get_camera('Garage')._data['host']

but please don't consider accessing UnifiVideoCamera._data as more than a temporary solution.