Bad API Key/Unknown Device Name

I’m trying to understand how Node-RED connects to Groov. I set up a simple flow with a modbustcp node which connects to a modbus device I have. I can get data and display it in a debug node without a problem. Next I added a Groov Read node,gave it a tag name that matches the one in the datastore I created in Groov build, gave it the API key for the admin user per the Weather Underground tutorial that I found. So far, so good.

In my simplistic brain I figured I would take the output from my modbustcp node and stick it in my Groov Read node and it would display correctly on my Groov page. How easy is that? But it doesn’t work. As soon as I connect the two, I get an error (see below). I get Bad API Key followed by unknown device name. I’m thinking this may be because the modbustcp node is a different device it may need a certificate.

Any thoughts?

Thanks,

Dave

I believe you want to use a groov write node to send data to the groov. Also check what you entered for the groov address, if you are running node-red on the groov you are sending data to, then try localhost or 127.0.0.1

Thanks for the quick response. So I changed it and now I get this (see below). If I just wire the modbustcp node to a debug node I get the value I’m expecting. Not sure why I’m getting the Bad request error when it’s wired to the Groov write node. If I just use an injector I can write to the Groov gadget just fine. There must be something coming out of the Modbus node that the Groov node doesn’t like.

Thoughts?

Is it just a string in the msg? No other objects? What is the value set to in the groov write node?

Not sure what you mean by any other objects. It’s an integer value.

Here’s what I get when I go straight to the debug node (see below). It’s the value I would expect to get

I have three choices in the write node under value

  1. msg returns error
  2. message.payload returns bad request
  3. value that works. I can stick some number in there like 555 and it shows up in my Groov project

Your msg.payload is an array and the groov write node expects just a single number.

Add a Change node between the two and set msg.payload to msg.payload[0]

2 Likes

Hot dang! That did it. You’re a genius. I hope this helps some other poor soul wandering in the wilderness of Node-RED. ;-}

I can’t thank you enough.

Dave

2 Likes