GroveStreams

Last sensor value dropped445

seckford private msg quote post Address this user
I've been sending temperature information to GroveStreams for a couple of years with an Arduino, using the strings:

http://grovestreams.com/api/feed?&compTmplId=temp&compId=AAA&org=BBB&api_key=CCC&therm1=+19.68&therm2=+19.68&therm3=+19.62 HTTP/1.1\r\n
Host: grovestreams.com\r\nConnection: close\r\n

GroveStreams gives me a '200 OK' in response, and the data is plotted on three dashboard widgets.

I've had to move to an ESP8266, running Lua, and I still get the same '200 OK' response, but the therm3 value isn't received (or plotted). I've checked the transmitted string, and it's correct. What is really odd is that if I drop the therm3 data, the therm2 value is no longer read, and if I add a therm4 value it isn't read, but the therm3 value is read, still with the response '200 OK'

In effect, the last value in the string is always dropped; has anyone seen this before, or knows why?

Thanks for any ideas - Will
Post 1 • IP   flag post
MikeMills private msg quote post Address this user
Engage API tracing and see what is actually arriving. To engage tracing, go into the API key manager.
Post 2 • IP   flag post
seckford private msg quote post Address this user
Well, the received string is apparently:

http://grovestreams.com/api/feed?&compTmplId=temp&compId=AAA&org=BBB&api_key=CCC&therm1=+10.06&therm2=+11.06&therm3=+9.25%20HTTP/1.1%5cr%5cn

(followed by a couple of headers) and it drops the last entry, whatever it is. Can anyone see how the string is misformatted?

In a couple of weeks I can try with a known-good Arduino to give a baseline, but I'd like to solve the problem before then

Thanks - Will
Post 3 • IP   flag post
MikeMills private msg quote post Address this user
You're saying therm3=+9.25 did not go into Component AAA stream therm3?

Is there a stream with ID therm3? If not, can you manually create one by right clicking on the component and editing it? Give the new stream ID therm3 and see if data flows into it.
Post 4 • IP   flag post
seckford private msg quote post Address this user
Thanks for the explanation of API tracing, which I've never got to work before. I tinkered with what was being sent, and what was being received, and finally dug into the internals of the NodeMCU library which was sending the requests.

It turns out that the library was helpfully attaching a number of useful (and undocumented) strings which for some reason didn't show up locally, or in the AP traces; once I'd got rid of them things started working again.

Thanks again - Will
Post 5 • IP   flag post
2543 5 5
Log in or sign up to compose a reply.
destitute