Incorporate a Motorola WiFi Baby Monitor into Home Assistant

We recently purchased a Motorola WiFi baby monitor and i wanted to see if I could incorporate it into Home Assistant. Full disclosure–we ultimately were not happy with the monitor and returned it, but for anyone who uses it and enjoys it, this may be useful.

An internet search led me to this blog post about “hacking” a Motorola baby monitor. The author digs into the network traffic quite a bit, but for me the most useful information was the URL to fetch the temperature–http://<camera-ip>/?action=command&command=value_temperature.

I looked to another useful resource–iSpyConnect’s database of camera stream URLs–to get the actual video feed URL. Then I plugged those into my Home Assistant configuration.yaml file.

The camera portion was straightforward; I added an mjpeg camera with the appropriate URLs from the iSpyConnect database:

  - platform: mjpeg
    name: Nursery Camera
    mjpeg_url: http://<camera ip address>/-wvhttp-01-/video.cgi
    still_image_url: http://<camera ip address>/cgi/jpg/image.cgi

To view the temperature, I had to get a little more creative. I used a command_line sensor to fetch the temperature URL as text and then used a template to convert it to Fahrenheit and round to an integer (it is provided in Celsius):

  - platform: command_line
    command: python3 -c "import requests; print(requests.get('<camera ip address>/?action=command&command=value_temperature').text)"
    name: Nursery Room Temperature
    value_template: '{{ (value.split(": ")[1]|float * 1.8 + 32)|round }}'
    unit_of_measurement: °F

After that I had a camera.nursery_camera  entity and a sensor.nursery_room_temperature entity to incorporate into my UI and automations, etc. Home Assistant was even smart enough to render a thermometer icon for the temperature sensor automatically.

Leave a Reply

Your email address will not be published. Required fields are marked *