This is sleepless night induced pet project to restream Nanit Baby Monitor live stream for local viewing.
This is fork of long time not updated https://gitlab.com/adam.stanek/nanit.
- Restreaming of live feed to local RTMP server
- Retrieving sensors data from cam (temperature and humidity) and publishing them over MQTT
- Graceful authentication session handling
- Works as a companion for your Home-assistant / Homebridge setup (see guides below)
# Note: use your local IP, reachable from Cam (not 127.0.0.1)
# Login to your nanit account and check everything is working
docker run --rm -it \
-v ${HOME}/.nanit-data:/app/data \
-e NANIT_RTMP_ADDR=xxx.xxx.xxx.xxx:1935 \
-p 1935:1935 \
ghcr.io/gregory-m/nanit /app/bin/nanit -l
# Note: use your local IP, reachable from Cam (not 127.0.0.1)
# Run it normal mode
docker run --rm \
-v ${HOME}/.nanit-data:/app/data \
-e NANIT_RTMP_ADDR=xxx.xxx.xxx.xxx:1935 \
-p 1935:1935 \
ghcr.io/gregory-m/nanit
Open rtmp://127.0.0.1:1935/local/[your_baby_uid]
in VLC. You will find your baby UID in the log of running application.
Application is ready to be used in Docker. You can use environment variables for configuration. For more info see .env.sample.
- I wanted to learn something new on paternity leave (first project in Go!)
- Nanit iOS application is nice, but I was really disappointed that it cannot properly stream to TV through AirPlay. As anxious parents of our first child we wanted to have it playing in the background on TV when we are in the kitchen, etc. When AirPlaying it from the phone it was really hard to see the little one in portrait mode + the sound was crazy quiet. This helps us around the issue and we don't have to drain our phone batteries.
go run cmd/nanit/*.go
# On proto file change
protoc --go_out . --go_opt=paths=source_relative pkg/client/websocket.proto
# Run tests
go test ./pkg/...
For some insights see Developer notes.
I made this program solely for learning purposes. Please use it at your own risk and always follow any terms and conditions which might be applied when communicating to Nanit servers.
Original code used WTFPL 2 license, this fork available under MIT license.