I got most of this working but the camera card still not showing anthing.
The secrets.yaml contains the correct url with the token and I can use the url with rtmpdump and vlc but the card does not show anything and I get the following error:
This was super simple to follow and setup from scratch. I didnāt have Scrypted before, and now itās feeding the Nanit RTSP stream into HomeAssistant and through to HomeKit as well. This is so awesome.
For anyone interested in this, I finally had some time to set up a MITM proxy and look at some of the traffic here. It looks like to turn the camera on and off, the app actually starts and stops the remote video stream. If stopped, there are a couple of other API requests and the camera turns off. When restarted, the camera turns on. I donāt have the camera itself going through the MITM proxy, so I donāt know what happens on its side when that stream stops, but Iāll work on that next.
I am getting this error even after login in with the npx
TypeError: Cannot read properties of undefined (reading āusernameā)
at getLogin (C:\Users\The Surge\Git\scrypted-nanit\node_modules@scrypted\sdk\bin\index.js:35:25)
at C:\Users\The Surge\Git\scrypted-nanit\node_modules@scrypted\sdk\bin\index.js:86:20
at new Promise ()
at exports.deploy (C:\Users\The Surge\Git\scrypted-nanit\node_modules@scrypted\sdk\bin\index.js:57:12)
at Object. (C:\Users\The Surge\Git\scrypted-nanit\node_modules@scrypted\sdk\bin\scrypted-deploy.js:16:10)
at Module._compile (node:internal/modules/cjs/loader:1226:14)
at Module._extensionsā¦js (node:internal/modules/cjs/loader:1280:10)
at Module.load (node:internal/modules/cjs/loader:1089:32)
at Module._load (node:internal/modules/cjs/loader:930:12)
at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:81:12)
Authorization required. Please log in with the following:
npx scrypted login [ip]
Is this published such that I can install it from within an existing HAOS > Scrypted (as an add on) workflow? Iām guessing not, since I donāt see it listedā¦ perhaps this super cool idea isnāt ready for that level of prime time, though?! Super cool work, nonetheless!
Oh nice! Can you maybe screenshot what youāre referring to? Iām unable to find Scrypted-Nanit here (as you can see filtering for the substring ānanā shows no results; Iāve also just read the whole list and thereās no nanit, no Zone999, or anything else even similar, actually):
Youāll need VS Code, node and npm installed. Youāll also need to create a nanit user in scrypted (with admin).
Once youāve installed those three items, download/clone the repo, open that downloaded folder in VSCode and type the commands into the terminal. You will need to run the authentication command mentioned. Use the creds from your new nanit user you created earlier in scrypted.
Not sure whatās going on. If the login worked you wouldnāt see this. Have you checked scripted forums? Feel free to pm me and Iāll do my best to help!
Took inspiration from this to implement a simple schedule to update permissions.
E.g. give a nanny access only Mon-Fri from 9 to 5
Since nanit has not implemented the following
Using loging and headers mentioned above you can enable/disable users with
Method PUT
URL https://api.nanit.com/babies/(babyID)/users/(userID)/permissions/enable
Or
https://api.nanit.com/babies/(babyID)/users/(userID)/permissions/disable
No Body
Thanks for this! It works great. After cobbling together my own hacked together solution earlier this year that was quite janky (slow to load stream using ffmpeg, issues refreshing token occasionally)- I was able to install this remotely to my HA OS and replace my implementation completely. I have been using it for a couple days and it is solid.
The only note I would add to the readme (perhaps Iāll put in a PR to help newcomers) would be to ensure both ffmpeg and Rebroadcast Plugin are installed into Scrypted. It doesnāt seem to be mentioned anywhere they are needed, and I ended up with a black screen when trying to view the stream.
Good call on the ffmpeg plugin being required. I had installed the Rebroadcast plugin but had missed that one.
Iād love to be able to grab the MQTT-offered values from the previous integration for things like humidity, temperature and āis nightā. Has anyone found another way of obtaining these?