Nest Real-time Event Streaming to SmartThings NST Manager
Versions:
Install Script: 0.9
Service Package: 2.0.1
FYI:
While the events are received near Real-Time there is a still minor processing delay between receiving the Nest Event and it reflecting in ST (~3 seconds).
Requirements to Use:
Try to contribute in some way to the Nest Manager or NST Manager Project documentation!
Have a Raspberry Pi/Linux machine running in there home. (This will install on windows but will require manual starting. Please do some searchingā¦)
User is good at installing a simple bash script.
An Internet Connection
Device running any Linux Distribution: Install has been tested on the following distributions:
Ubuntu
Rasbian (Raspberry Pi)
Mint
TurnKey Linux
Just about any Debian based distribution
Installing the Service
Run the following Commands in Console (In this Order):
Download the latest script to the local user folder
Wait while the script performs the following: 1. Ensures all of your packages are up to date. 2. Makes sure you are running the latest version of NodeJS 3. Install the NST-Streaming service node package and pre-requisite packages
That completes the service portion of the install. It should be up and running silently in the background
Enabling in NST-Manager
Open NST-Manager SmartApp under SmartThings Mobile App
Tap on Application Preferences
Tap on Device | Structure Polling Preferences
Turn on Enable Rest Streaming
Tap on Auto-Discover Local Service
Let the discovery run until the service is found
(The page will refresh automatically and discovery may take 60 seconds)
Tap Local NST Services and select the discovered item and press Done
Press Done Until you get back to the Main smart apps list.
You can verify the service is working by watching the logs in the IDE for HAS Changed (Stream):
11:32:29 AM: info ||| API Device Data HAS Changed (Stream)
View Streaming Logs for Debugging
You can view the logs in the console window with this command:
journalctl -f -u nst-streaming.service
Getting Updates
To make sure you are running the latest script always pull in the latest script by running these two commands:
Smartthings doesnāt support WebSockets for receiving real-time changes from Nest so we are required to request data from Nest Every 1-2 minutes. So the point is to allow you to subscribe to events on your nest devices and send them to ST so you can trigger actions
@tonesto7 Does this help with getting around the rate limits? It seems like Nest has recently gotten more strict about how many you can send in a period of time.
I doesnāt really change that but our queuing mechanism in the smartapp is pretty advanced to where you will never hit the rate limit. The real-time events are about subscribing to the nest events and sending them to ST within 2-3 seconds of them happening.
@tonesto7 thanks for all your work on this. Im trying to trigger a porch light on a nest cam motion event. Will this work for that or will the delay be to long?
HI every one. I had a hell of a time trying to get just the app to work. I am at another predicament. When I try to sign into my nest account to configure the app, it responds with something went wrong. I am using the most recent version and the nest prmary account. Any suggestions?
@tonesto7 got the fix installed for the state manager and it rocks! Thanks. Now that I can get in my SmartApp again, Iāve moved on to the REST service. Been looking forward to this feature. My journalctl log is saying that a token is missing on the SmartThings side of things.
Canāt send Status back to SmartThings because the enpoint url or access token are missingā¦
Iām guessing this is where the donation only part comes in. (Gladly sent one your way). Take your time and thanks again for the great work.
Update: following the GitHub instructions for the token. Canāt seem to figure out what redirect URI I should be using. Iām trying https://graph.api.smartthings.com/oauth/authorize or ./oauth/callback ⦠Is either right? It takes me to login and I select my location but then I get: