Tag Archives: Basic use of GroveStreams

Using GroveStreams

GrovestreamsNo sooner did I finish the blog on my new GroveStreams Node than I was faced with the question “how do I use GroveStreams?”

Well, that’s generally up to you – but I will start you off on how I use GroveStreams – and the ridiculously simple setup (once you know how).

So what I will describe here takes you from never having heard of GroveStreams to sending information to your own stream. This should take no more than minutes if you already have managed to get my NODE set up on your Node-Red installation as per my previous blog. If you are NOT using Node-Red, then read this anyway as the API call is trivial and you could organise this from just about any package.

First things first – head off to GroveStreams and get a new account. That is, register, receive a confirmation email, click the link and receive a welcome email. You are done.

garageYou will be asked to create an organisation. This confused the hell out of me until I realised they don’t necessarily mean a business organisation. For the purpose of demonstration I created one called “Garage”.

So now you have that. There are many ways to use GroveStreams, for me I wanted a simple means of looking at graphical logs of simple devices over time.. so for example my temperature sensor. GroveStreams does SO much more than simply log data, you can average over time, zoom into areas, you can even use graphical instruments for real-time monitoring – but let’s keep it simple for now.

api keyscomponentsIn my case having created “Garage” – click on it in your browser window. You are now in the “Observation studio”. You will see “components” on your left. Don’t do anything with it…

Top right is ADMIN in the menu – go there and go to API keys. Click on the one marked “Feed Put API Key (with auto-registration rights) – make sure you’ve picked the right one. Select “View Secret Key” above that and you will get your API key. Copy to the clipboard.

Now dump the API key in my NODE along with a sensible name, a component name (in my case for fun “GarageRoof” don’t use spaces.. and a stream called “temperature” – again – an arbitrary name in this case.

Click OK, send some numbers to the node from a device or the “inject” node to test.

If you are NOT using Node-Red then you are looking at a PUT – this should give you a clue as to the format.

var options = {
                  host: ‘grovestreams.com’,
                  port: 80,
                  path: ‘/api/feed?api_key=’ + node.api + ‘&compId=’ + node.component + ‘&compName=’ + node.component + ‘&’ + inmsg.payload,
                  method: ‘POST’

And that is that!!!

The component should appear magically along with the stream.


Now, what you DO with that is another matter. In my case right clicking GarageRoof opens a dialog and you can then select temperature, tell it what kind of data you are looking at, what averaging period if any you want to use etc. If you have several test values and want to see a quick average, in the image above, right window you will see below the tab “none” – you can drop that down and instantly see some averaging options – there is just SO much to this but my plan here was merely to get you started. I originally set up GroveStreams to take in data from an Arduino (with Ethernet card) and it did that a treat too – still today logs the temperature in my place in Spain every 15 mins and it’s been doing that for over a year – you can zoom in, overlay one reading over another etc.… time to go look at the documentation – have fun.