Hello guys, after longer pause I decided to release new version - 0.6. The connection recovery could still use some improvement, but it has been running solid for 2 weeks for me so I decided to publish it to wider audience.
This is the first release with integrated RTMP server. You don’t have to rely on NGINX anymore. It was rather problematic since the beginning. It was hard to ensure it is up and running during the initial streaming request and because we couldn’t handle any connection drop outs that way. With integrated RTMP server it should be much leaner setup.
Also in this release you can plug it to your MQTT server for sensors read out.
I have decided to drop the HLS streaming and focus on local RTMP streaming only. That is the only way how to get decent latency which is crucial for baby monitor. If you want HLS streaming, you should stick to v0_4.
But I do notice that I have to disable 2fa/mfa for been able to use docker right?
Nanit will enforce 2fa in the future for all users (found that on Nanit website).
Thanks for your continued efforts on this integration! I’m trying to run the new application, but it hangs on “fetching babies list”. I have 2 cameras fwiw.
The 2FA is currently not supported. It is generally problematic for headless applications, because it requires additional input form the user. I haven’t look at it yet. Hopefully they provide some form of persistent tokens after the initial auth. challenge. But yes, it will be a complication.
Hmm… That is strange. There was no change to this step between releases. Does it happen even after restart? The only reason I can think of is a network issue.
This is brilliant. Just read the whole read after receiving a marketing sample of the Nanit Pro. Seems to be similar to the Plus version. Will give this a go shortly! Would be really cool to have as an addon. I think the delay is from the home assistant processing and I had something similar with unifi cameras. Shooting it over to motion eye first and then grabbing that stream url makes it instant. I’ll have to try with this stream too.
Hello! I was able to get everything working once I switched to Docker on my Pi. This is such a huge help and it worked the first try. Brilliant!
Couple questions… again, I’m newer to the docker side of things.
I am using the new v0.6 version. Still getting a 4 second(ish) delay… any tips to get it faster? Wifi is great where the camera is and Pi is hardwired.
How can I activate the MQTT side of things? I have Mosquitto installed on the same pi, but wondering how to get this module to publish to it.
How can I get this to auto run on boot with the pi? Right now, I have to open terminal and run it… then leave that terminal window open for it to continue.
Running latest Homebridge on same Pi. Any and all help is greatly appreciated! Thanks!
seems a lot of you guys are starting out with docker, so I have written quick setup guide with docker-compose which should contain the info you need (regarding the auto-start).
The sensor setup is vaguely described here: https://gitlab.com/adam.stanek/nanit/-/blob/master/docs/sensors.md. If you have Mosquitto already up and running, you are half way there. Just pass the additional MQTT options to the app and it will start publishing the sensor data to it.
The RTMP streaming itself isn’t exactly low-latency protocol, it usually gets about 1-2s (you see it even on your phone app). If you are reprocessing the stream for HomeKit or something, you get that twice (3-4s).
That message means that you are trying to play the stream, but cam is not streaming to the app. Probably due some failed streaming request attempt. Check the log for errors at start, this line itself is pretty much meaningless.
e[90m03 Feb 21 09:47 ASTe[0m e[32mINFe[0m Application started e[36mgitversion=e[0m62fc318f
e[90m03 Feb 21 09:47 ASTe[0m e[32mINFe[0m No .env file found. Using only environment variables e[36mpath=e[0m/app/.env
e[90m03 Feb 21 09:47 ASTe[0m e[32mINFe[0m Setting log level to info
e[90m03 Feb 21 09:47 ASTe[0m e[32mINFe[0m Authorizing using user credentials e[36memail=e[0m***************** e[36mpassword=e[0m****************
e[90m03 Feb 21 09:47 ASTe[0m e[32mINFe[0m Authorized e[36mtoken=e[***************************************************
e[90m03 Feb 21 09:47 ASTe[0m e[32mINFe[0m Fetching babies list
e[90m03 Feb 21 09:47 ASTe[0m e[32mINFe[0m RTMP server started e[36maddr=e[0m:1935
e[90m03 Feb 21 09:47 ASTe[0m e[32mINFe[0m Connected to websocket e[36murl=e[0mwss://api.nanit.com/focus/cameras/************/user_connect
e[90m03 Feb 21 09:47 ASTe[0m e[32mINFe[0m Requesting local streaming e[36mtarget=e[0mrtmp://***.***.***.***:1935/local/********
e[90m03 Feb 21 09:47 ASTe[0m e[32mINFe[0m Local streaming successfully requested
e[90m03 Feb 21 09:47 ASTe[0m e[31mWRNe[0m No stream publisher registered yet, closing subscriber stream e[36mbaby_uid=e[0m******* e[36mclient_addr=e[0m***.***.***.***:******
The log says that the streaming was requested, but does not contain message that it was initiated => the cam most likely failed to reach the application. Check if the app is reachable at that RTMP address from the camera. Have you exposed that port?