A GroveStreams Node Red Node

One of the more obvious things to do with a home control system is to capture information like temperature and humidity – and to graph it.  For example I spent part of my time in the UK and part of it in Spain. When I’m not in Spain it is usually raining in the Northeast of England and so I take great delight in checking the weather back at base in Galera in Andalucía.

There are of course many online systems for logging your data and I have demonstrated elsewhere in this blog doing the job locally on a Raspberry Pi. One of my favourite online services is GroveStreams. They have both paid and free offerings and I have chosen the latter as I’m only logging the information out of interest.

I am using a setup in Spain which is about to be replaced… a series of Arduino type modules with either DS128b20 chips or the combined temperature/humidity devices, the DHT22. These talk by short range radio to a large Arduino (1284-based) which is connected to the Internet. These will soon be replaced by ESP8266 devices connected directly to WIFI and using MQTT as the protocol.

Accordingly I want to interrogate those devices and send off the information somewhere.

There are a number of ways of sending information to GroveStreams via their API – and as far as Node-Red is concerned there is an http response node – you could tie that to a function block but I thought it would be nice to have a dedicated GroveStreams node – and so here it is.

GroveStreams node by Peter Scargill

What you see above is an MQTT listener awaiting a regularly-sent value from a module – and firing it off to GroveStreams. What I like about their service is simplicity. I can tell it the name of a stream and if it does not exist, it will be created automatically.


GroveStreams setup

I made a nice simple dialog box. You can get an API key from your GroveStreams control panel and this is an example (a dummy example). As you can see I’ve given the node a meaningful name, the API key, the name of a “component” and the name of a “stream” under that component – a lot simpler than it looks. All the node needs is an incoming value and that’s it.


In the example below, neither RaspberryPi nor temperature existed initially – I put these in the dialog box, ran Node-Red and magically they appeared in the web interface for GroveStreams.  The API key is what you call a “Feed put API key with auto registration rights”. I won’t go into GroveStreams setup or we’ll be here all night.

And that is all there is to it.

sudo npm install node-red-contrib-grove

or depending how you set up your node-red

sudo npm install -g node-red-contrib-grove

(a quick restart of node-red and you should find the nice purple icon appear)

I hope this helps, if you do manage to get this working on any particular system do let us know what steps you took. Might save someone else some work.

Here’s that temperature graph from the sensor in Spain. GroveStreams does an excellent job of overlaying internal and external temperatures with humidity.



12 thoughts on “A GroveStreams Node Red Node

  1. Peter,
    The installation script for you node is “sudo npm –g install git+https://bitbucket.org/scargill/grove.git” I think the ‘-g’ needs to go after the ‘install’ instead of in front, it worked for me after I did that.

    Also, can you confirm that, in the terminal window, you don’t get the “socket hangup” message, I’m getting it constantly and I’ve noticed on a couple of occasions that just one of the three data streams I’m sending to GS stalls overnight, the other two carry on.


    1. I’ll give it a go – I completely gave up with the NPM installation as I could get it to work on one Raspberry Pi perfectly – but not another…but it is quite possible I’ve just made a simple mistake as you indicate above – I’ll give that a shot. I’ve not had the socket hangup issue ever.

  2. Peter,
    Using the GS node I’ve noticed in the CMD window that’s open after starting node-red I’ getting a message “problem with request: socket hangup” every time I send a value.

    Any ideas?


      1. Well I’ve now got both values upating ok so it’s working ok but still the websocket message, I suppose as long as it’s working….

        Thanks for the inspiration to finally get into node-red.

  3. Hi Peter,

    First of all thanks for the very informative blog-posts that you have put in your site. I have found them to be a great source of inspiration in building a similar system where I have a set of ESP8266 nodes registering temperature and humidity around the house. I Especially want to thank you for pointing me towards NodeRED, as this has made it so much easier to tie all the pieces of my setup together.

    Keep these great posts coming.


  4. Peter,
    Thanks for taking the time to do a GS node, after some trial and error I got it installed on my windows 7 PC by putting it in c:\Users\”userID”\AppData\Roaming\npm\node_modules\node-red\node_modules\grove

    I have an arduino sending ambient and Greenhouse temperature via 868MHz which I feed into the PC serial port and I’ve configured node-red to send it to GS. I got the Greenhouse temp recording fine but when I added a second GS node using the same API key, the same component name but different stream name the second stream didn’t appear like the first one did, have you tried two steams?


    1. Hi Phil. Well you had me worried for a second. So I added a second node and tried another component, same stream – sure enough the second component with it’s stream was added. So I tried changing that to the same component, different stream – that worked first time too. You sure you didn’t change the NAME by mistake as I did when testing.. the NAME is irrelevant and just there for your benefit.

      All seems to work.

      1. What I did think of this morning was that I’m sending both values at the same time so I put a 5 second delay in the second value and that fixed the issue.

  5. Hi Peter,

    Hello from sunny Arizona, USA. Another very interesting post. I’ve been following you for a couple weeks, since discovering the ESP8266. I’ve been working to build out something similar to what you’re building (NodeRED and MQTT on a Raspi, ESP8266 nodes, etc), so I thank you for all the detailed posts.

    I wanted to point you to an interesting platform (if you’re not already familiar with) called Octoblu, started by a developer here in Phoenix, AZ. Check them out at https://developer.octoblu.comhttps://www.octoblu.com At the moment they have free developer access; I don’t know what their end game might be however. Octoblu are doing some interesting integration work for all this stuff, I think.


    1. Thanks for that Brant (it’s not sunny here in the Northeast of England). Worth a read once I get some coffee…

Comments are closed.