We have moved at community.getvera.com

Author Topic: ALTUI and Thingspeak integration  (Read 9758 times)

Offline amg0

  • Moderator
  • Master Member
  • *****
  • Posts: 3174
  • Karma: +210/-8
Re: ALTUI and Thingspeak integration
« Reply #30 on: December 09, 2015, 04:09:41 pm »
As I'm delving further into thingspeak, it appears that only a changed value will update a channel's field. This makes sense, but thingspeak inserts "nulls" for all the fields NOT updated for that same channel. This makes post-processing difficult. Would it be possible to update ALL values for a specific channel when ANY of that channel's fields changes?
tough, to be considered a bit later. note that I do not have the problem so can you maybe share more details regarding your configuration ? I use url with only one fieldn=v in the url and do not get nulls for other fields in the channel. maybe the url is not correct ?

yes , this is a global choice for all watches,  I only fire scene or thingspeak update when the new is different from old value. for all watches.

An aside: I notice that some data is lost (I can see the history in AltUI, but the data is not reflected in thingspeak). I'm not sure how the data is getting lost, but it does happen sporadically.

Thanks
Thingspeak impose a thresholding of 15s between calls. if you are unlucky a call could be ignored if several watches result in calls to thingspeak happening within the 15s threshold.

Code: [Select]
API Rate Limits
You can update a ThingSpeak channel every 15 seconds. Updating more frequently results in an error. To change settings to meet your application requirements locally, download the source code from GitHub.

Offline tedp

  • Sr. Member
  • ****
  • Posts: 288
  • Karma: +6/-2
Re: ALTUI and Thingspeak integration
« Reply #31 on: December 09, 2015, 05:55:56 pm »
note that I do not have the problem so can you maybe share more details regarding your configuration ? I use url with only one fieldn=v in the url and do not get nulls for other fields in the channel. maybe the url is not correct ?


I am updating a thingspeak channel with temperature readings from various sources. The readings change seldom, and when a certain temperature changes and fires the update, the others usually do not.

If I read my entire channel via: https://thingspeak.com/channels/62180/feeds?days=1&api_key=<myapikey>, I get something like:
{"channel":{"id":62180,"name":"UpUp","field1":"Main Temp","field2":"Main Setpoint","field3":"Kids Temp","field4":"Kids Setpoint","field5":"Master Temp","field6":"Master Setpoint","field7":"Outside Temp","created_at":"2015-10-24T18:09:28-07:00","updated_at":"2015-12-09T13:56:15-08:00","last_entry_id":5447},"feeds":[{"created_at":"2015-12-08T16:10:33-08:00","entry_id":5144,"field1":null,"field2":"55.01","field3":null,"field4":null,"field5":null,"field6":null,"field7":null},{"created_at":"2015-12-08T16:10:52-08:00","entry_id":5145,"field1":null,"field2":"55.01111","field3":null,"field4":null,"field5":null,"field6":null,"field7":null},{"created_at":"2015-12-08T16:11:28-08:00","entry_id":5146,"field1":null,"field2":"70.5","field3":null,"field4":null,"field5":null,"field6":null,"field7":null},{"created_at":"2015-12-08T16:12:23-08:00","entry_id":5147,"field1":null,"field2":"70","field3":null,"field4":null,"field5":null,"field6":null,"field7":null},{"created_at":"2015-12-08T16:16:34-08:00","entry_id":5148,"field1":"56","field2":null,"field3":null,"field4":null,"field5":null,"field6":null,"field7":null},{"created_at":"2015-12-08T16:21:24-..... and so on


If I read an individual field via https://thingspeak.com/channels/62180/field/1?days=1&api_key=<myapikey>, I get something like:
{"channel":{"id":62180,"name":"UpUp","field1":"Main Temp","field2":"Main Setpoint","field3":"Kids Temp","field4":"Kids Setpoint","field5":"Master Temp","field6":"Master Setpoint","field7":"Outside Temp","created_at":"2015-10-24T18:09:28-07:00","updated_at":"2015-12-09T11:56:15-08:00","last_entry_id":5438},"feeds":[{"created_at":"2015-12-08T14:18:40-08:00","entry_id":5140,"field1":"54"},{"created_at":"2015-12-08T14:22:28-08:00","entry_id":5141,"field1":"55"},{"created_at":"2015-12-08T14:26:16-08:00","entry_id":5142,"field1":"56"},{"created_at":"2015-12-08T14:33:07-08:00","entry_id":5143,"field1":"55"},{"created_at":"2015-12-08T16:10:33-08:00","entry_id":5144,"field1":null},{"created_at":"2015-12-08T16:10:52-08:00","entry_id":5145,"field1":null},{"created_at":"2015-12-08T16:11:28-08:00","entry_id":5146,"field1":null},{"created_at":"2015-12-08T16:12:23-08:00","entry_id":5147,"field1":null},{"created_at":"2015-12-08T16:16:34-08:00","entry_id":5148,"field1":"56"},{"created_at":"2015-12-08T16:21:24-08:00","entry_id":5149,"field1":null},{"created_at":"2015-12-08T16:21:54-08:00","entry_id":5150,"field1":null},{"created_at":"2015-12-08T16:24:56-08:00","entry_id":5151,"field1":"57"},{"created_at":"2015-12-08T16:30:16-08:00","entry_id":5152,"field1":"58"},{"created_at":"2015-12-08T16:35:35-08:00","entry_id":5153,"field1":"59"},{"created_at":"2015-12-08T16:40:55-08:00","entry_id":5154,"field1":"60"},{"created_at":"2015-12-08T16:47:00-... and so on.

If I'm not mistaken, wherever a field is uploaded TO thinkspeak, a record is created for ALL the fields in the channel, and thus will be NULL unless the fields are specified.

Thingspeak impose a thresholding of 15s between calls. if you are unlucky a call could be ignored if several watches result in calls to thingspeak happening within the 15s threshold.

That explains things. I guess there's not much to do about it unless it's possible to maintain an internal timer to hold looking for variable changes for 15 seconds after every write to thingspeak.




Offline Zooz

  • Jr. Member
  • **
  • Posts: 80
  • Karma: +1/-0
Re: ALTUI and Thingspeak integration
« Reply #32 on: April 19, 2016, 06:47:37 am »
Have been checking out AltUI every now and then. Noticed that my test Thingspeak integration had stopped working Jan 22. Incidently 4 months after I started it.

How can I delete the logging settings from the AltUI to start over? Cannot save any changes. (checking this out via outside login, btw)

Offline amg0

  • Moderator
  • Master Member
  • *****
  • Posts: 3174
  • Karma: +210/-8
Re: ALTUI and Thingspeak integration
« Reply #33 on: April 19, 2016, 01:16:02 pm »
Have been checking out AltUI every now and then. Noticed that my test Thingspeak integration had stopped working Jan 22. Incidently 4 months after I started it.

How can I delete the logging settings from the AltUI to start over? Cannot save any changes. (checking this out via outside login, btw)
go to More/ Watches. the second table is tables for configured data pushes. there is a trash icon here to delete one.
fyi, I checked my own variables using thingspeak integrations just to be sure and they do work normally.

Offline Zooz

  • Jr. Member
  • **
  • Posts: 80
  • Karma: +1/-0
Re: ALTUI and Thingspeak integration
« Reply #34 on: April 19, 2016, 01:24:30 pm »
Have been checking out AltUI every now and then. Noticed that my test Thingspeak integration had stopped working Jan 22. Incidently 4 months after I started it.

How can I delete the logging settings from the AltUI to start over? Cannot save any changes. (checking this out via outside login, btw)
go to More/ Watches. the second table is tables for configured data pushes. there is a trash icon here to delete one.
fyi, I checked my own variables using thingspeak integrations just to be sure and they do work normally.
Deleted all the data pushes and reloaded. Suckers don't disappear for some reason.
Write API key is a bit messed(?) having form of key=1234567890&field3=%s where 12345677890 is the actual key.

Offline amg0

  • Moderator
  • Master Member
  • *****
  • Posts: 3174
  • Karma: +210/-8
Re: ALTUI and Thingspeak integration
« Reply #35 on: April 19, 2016, 02:25:11 pm »
Have been checking out AltUI every now and then. Noticed that my test Thingspeak integration had stopped working Jan 22. Incidently 4 months after I started it.

How can I delete the logging settings from the AltUI to start over? Cannot save any changes. (checking this out via outside login, btw)
go to More/ Watches. the second table is tables for configured data pushes. there is a trash icon here to delete one.
fyi, I checked my own variables using thingspeak integrations just to be sure and they do work normally.
Deleted all the data pushes and reloaded. Suckers don't disappear for some reason.
Write API key is a bit messed(?) having form of key=1234567890&field3=%s where 12345677890 is the actual key.
ok, let's try this.


a) go to MISC DEBUG then Variable Search
b) then type VariablesTo in the text box and click run
c) give me the result by Private Mail