Thingspeak installation

Posted on
Mon Feb 26, 2018 6:18 pm
SMUSEBY offline
Posts: 272
Joined: Sep 16, 2009

Thingspeak installation

Installation failure (Indigo does not show a channel).
I've created a channel on the thingspeak website, added the write api in the indigo thingspeak configuration page, left the log file path at the default value, local server is unchecked, and get the following error:
Thingspeak Please provide proper authentication details.

Below are more details -
1) Event log:
Traceback (most recent call last):
File "plugin.py", line 188, in runConcurrentThread
File "plugin.py", line 807, in encodeValueDicts
TypeError: string indices must be integers

Thingspeak Error plugin runConcurrentThread function returned or failed (will attempt again in 10 seconds)
Thingspeak Please provide proper authentication details.
Thingspeak Error Error in plugin execution runConcurrentThread:


All lines above are red with the exception of the line, "please provide...details". I am not certain which authentication details are missing.
2) "Update channel" does not list the channel I have attempted to create.
3) I have added a thingspeak device, but again the channel field is greyed out, and the state shows 'processing'.
4) I have also tried to create a channel from Indigo, in which it is noted that all fields are optional.

I'd be very grateful for what I need to do to clear this error.
Thank you,
Bob

Posted on
Mon Feb 26, 2018 7:21 pm
DaveL17 offline
User avatar
Posts: 5897
Joined: Aug 20, 2013
Location: Chicago, IL, USA

Re: Thingspeak installation

Hi Bob - sorry to hear that you're having trouble. Please make sure that the API key that you've entered into the plugin configuration is your User API Key and not your new channel key. The User API key can be found by going to the Thingspeak page --> Account --> My Profile.

The plugin should be able to determine the channel API key on its own.

If you're still having trouble, please let me know.

I came here to drink milk and kick ass....and I've just finished my milk.

[My Plugins] - [My Forums]

Posted on
Mon Feb 26, 2018 7:29 pm
SMUSEBY offline
Posts: 272
Joined: Sep 16, 2009

Re: Thingspeak installation

That was easy. Thanks.

Posted on
Mon Feb 26, 2018 7:33 pm
DaveL17 offline
User avatar
Posts: 5897
Joined: Aug 20, 2013
Location: Chicago, IL, USA

Re: Thingspeak installation

Super. Thanks for letting me know.

I came here to drink milk and kick ass....and I've just finished my milk.

[My Plugins] - [My Forums]

Posted on
Mon Feb 26, 2018 8:00 pm
SMUSEBY offline
Posts: 272
Joined: Sep 16, 2009

Re: Thingspeak installation

And very cool. Thank you for your plug-in contribution.
I was abandoned by Xively, and am very happy to have found Thankspeak and your plug in. - Thinkspeak is not only available but much better.
Bob

Posted on
Mon Feb 26, 2018 8:32 pm
DaveL17 offline
User avatar
Posts: 5897
Joined: Aug 20, 2013
Location: Chicago, IL, USA

Re: Thingspeak installation

SMUSEBY wrote:
And very cool. Thank you for your plug-in contribution.
I was abandoned by Xively, and am very happy to have found Thankspeak and your plug in. - Thinkspeak is not only available but much better.
Bob

Thanks for the kind words. If you see anything with the plugin that doesn't seem quite right, give me a shout.

I came here to drink milk and kick ass....and I've just finished my milk.

[My Plugins] - [My Forums]

Posted on
Mon Feb 26, 2018 9:31 pm
SMUSEBY offline
Posts: 272
Joined: Sep 16, 2009

Re: Thingspeak installation

When I was using the wrong API, your plugin produced an error message that said, paraphrasing, 'mouse over the red error text to provide the missing information'. There was no red text.
And for those of us for whom this sort of thing isn't second nature, documenting which API was required would also be useful.
Had I started with the right API, the project would have taken 5 minutes instead of several hours.
- at some point, it always comes down to documentation.

Posted on
Tue Feb 27, 2018 4:46 am
DaveL17 offline
User avatar
Posts: 5897
Joined: Aug 20, 2013
Location: Chicago, IL, USA

Re: Thingspeak installation

SMUSEBY wrote:
When I was using the wrong API, your plugin produced an error message that said, paraphrasing, 'mouse over the red error text to provide the missing information'. There was no red text.
And for those of us for whom this sort of thing isn't second nature, documenting which API was required would also be useful.
Had I started with the right API, the project would have taken 5 minutes instead of several hours.
- at some point, it always comes down to documentation.

Hi Bob - you raise great points.

With my plugins, if you hover your mouse over a particular control, a help bubble will pop up to give you tips on what sort of information is sought or advice on appropriate entries. The help bubble for the API control says "Please enter your Thingspeak API key (user key not your channel key)". I'm thinking that didn't pop up for you, or maybe the text could be written more clearly.

Also, by clicking on the question mark at the lower left corner of the same dialog box (or by selecting "About Thingspeak (version)" from the Indigo plugins menu), you'll be sent to the plugin documentation hosted on GitHub. The configuration page says,

  • API Key
    The API Key is your main Thingspeak API key found in your account settings on the Thingspeak website. This key is required in order for the plugin to communicate with Thingspeak and is used in constructing Thingspeak API calls (like uploading data and configuring Thingspeak Channels). This key is only retained locally and is not captured or transmitted anywhere but Thingspeak.

Which I can see needs to be clearer and I've beefed that up a bit.

If the control wasn't colored red, that's a bug which I'll be sure to fix. Lastly, the plugin should react to this situation much more gracefully than it did and I'll make an effort to do something about that, too. Most importantly, I'm sorry you spent so much time trying to figure out the error on your own. If you ever have trouble in the future, please consider reaching out on the forums sooner. I'm frequently around and can usually respond to something in a matter of a few hours depending on what's going in the real world.

Cheers!

I came here to drink milk and kick ass....and I've just finished my milk.

[My Plugins] - [My Forums]

Posted on
Wed Feb 28, 2018 5:06 pm
SMUSEBY offline
Posts: 272
Joined: Sep 16, 2009

Re: Thingspeak installation

Dave - you've been very responsive. - certainly no need to apologize.
As for your points,, I never saw anything pop up while hovering. Maybe a browser issue? - I believe I was using Safari and also tried Chrome. The documentation said all fields are optional, so one of my attempts was to look for hovering tips with nothing filled in the form. So the message was misleading.
I did follow the documentation link and read the paragraph you quoted - clearly too quickly to note the API documentation. Can't hold you accountable for that, but perhaps a sentence that mentions there are 3 api keys that...
Question: is there some way to control the time dimension on the x-axis in the thingspeak visualization graphs? - and is there a way to plot 2 values (which share the same units, e.g. temperature?) This is beyond Indigo, so no need to respond.
Thanks again,
Bob

Posted on
Wed Feb 28, 2018 6:42 pm
DaveL17 offline
User avatar
Posts: 5897
Joined: Aug 20, 2013
Location: Chicago, IL, USA

Re: Thingspeak installation

Hi Bob -

The pop-up text I'm speaking of is within the Indigo UI for plugin and device configuration dialogs (the pop-ups won't show up on the wiki documentation). I did find that there was a link that was showing the wrong image on the wiki and that should be fixed now.

There shouldn't be anything in the docs to suggest that all fields are optional--my recent revisions (I think) more clearly state that the API key is required and where to find it. I'm happy to make revisions to make the docs more readable (and accurate!) so if you see anything, please do let me know.

When viewing the graphs on the ThingSpeak website, you can click on the pencil graphic which will display the various chart options. There are timescale options there. As far as I know, there's no way to plot two values on one chart. I know they were planning to look into that, but I haven't seen anything more on that front.

I came here to drink milk and kick ass....and I've just finished my milk.

[My Plugins] - [My Forums]

Posted on
Wed Feb 28, 2018 7:14 pm
SMUSEBY offline
Posts: 272
Joined: Sep 16, 2009

Re: Thingspeak installation

We must be talking about different pages.
In the thingspeak plug in, when selecting, 'create a channel', the second sentence starts with "all the settings are optional;".
When inputting various values failed, I next tried to create a channel by simply clicking 'create' at the bottom with all fields blank. With both approaches, there was never any red text, and mousing over the page never produced any guidance. (I recall that somewhere there was mention of the presence of red text as an alert to missing information, but I can't find it now).
Suggestion: If the second part of that 'create a channel' sentence were edited to read, 'you must enter the user(?) API (not the read or write API)..., I think I would have been able to figure it out without troubling you.
I hope this is helpful.
Bob

Posted on
Wed Feb 28, 2018 7:29 pm
DaveL17 offline
User avatar
Posts: 5897
Joined: Aug 20, 2013
Location: Chicago, IL, USA

Re: Thingspeak installation

Aha! I've got it now. You are right that the settings fields for creating a new channel are all optional--at least that's what ThingSpeak say anyway. Because my instructions were unclear, you were working with the channel key instead of the API key, there was no way for the create a channel option to work. My latest updates to the plugin will validate the key with ThingSpeak before proceeding so hopefully that will cover it in the future.

I came here to drink milk and kick ass....and I've just finished my milk.

[My Plugins] - [My Forums]

Posted on
Wed Feb 28, 2018 7:37 pm
SMUSEBY offline
Posts: 272
Joined: Sep 16, 2009

Re: Thingspeak installation

Very nice.

Posted on
Fri Mar 02, 2018 8:49 pm
SMUSEBY offline
Posts: 272
Joined: Sep 16, 2009

Re: Thingspeak installation

I just installed the new version. Two thoughts:
1) I had been getting a lot of erros in my event log - 3 lines pasted here

Thingspeak Error 'int' object has no attribute 'get'
Thingspeak Error time data '2018-03-03T02:42:10+00:00' does not match format '%Y-%m-%dT%H:%M:%SZ'
Thingspeak Error 'int' object has no attribute 'get'
Thingspeak Error 'int' object has no attribute 'get'

The errors seem to have stopped with the new version.
2) I'm sure you know this, but trying to upgrade from the plug=in in indigo does not work.
Best,
Bob

Posted on
Sat Mar 03, 2018 8:16 am
DaveL17 offline
User avatar
Posts: 5897
Joined: Aug 20, 2013
Location: Chicago, IL, USA

Re: Thingspeak installation

SMUSEBY wrote:
I just installed the new version. Two thoughts:
1) I had been getting a lot of erros in my event log - 3 lines pasted here

Thingspeak Error 'int' object has no attribute 'get'
Thingspeak Error time data '2018-03-03T02:42:10+00:00' does not match format '%Y-%m-%dT%H:%M:%SZ'
Thingspeak Error 'int' object has no attribute 'get'
Thingspeak Error 'int' object has no attribute 'get'

The errors seem to have stopped with the new version.
2) I'm sure you know this, but trying to upgrade from the plug=in in indigo does not work.
Best,
Bob

Hi Bob - glad to hear that the errors have stopped.

With respect to #2, I need a little bit more information on what you're seeing. There is a plugin menu item "Check for Plugin Updates" which reaches out to see if you're running the most current version of the plugin. It reports back the answer, but there is no facility to actually upgrade the plugin if a new version is available. You have to do that manually in the Indigo Plugin Store.

There is also a menu item called "Upload Data Now" which is what I think you're referring to. This was set to only work for any device that was past its scheduled time to update (in other words, an update wouldn't occur more frequently than the time specified in the device configuration). I've rethought that and have changed the code to allow that option to upload data regardless of the timing of prior uploads. That change will be in the next version of the plugin.

Cheers,
Dave

I came here to drink milk and kick ass....and I've just finished my milk.

[My Plugins] - [My Forums]

Who is online

Users browsing this forum: No registered users and 1 guest