We have moved at community.getvera.com

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

Offline momanz

  • Newbie
  • *
  • Posts: 5
  • Karma: +0/-0
Re: ALTUI and Thingspeak integration
« Reply #15 on: October 29, 2015, 10:52:06 am »
Very nice feature thanks for the great work with this plugin and Thingspeak integration.

One question, is there a way to increase the data sampling. It looks like I'm uploading data every minute and I'd like to increase my resolution in time for my powermeter graphs. Is it possible to change the sampling interval to 10 or 15 sec?

there is no sampling interval, it is simply when the watch fires ( so wheenver the variable changes ) . increaseing the rate means you need to find a way to know more frequently about this ( maybe a polling config on the device ).  but from ALTUI & thingspeak, it is only at each change that it is reported to thingspeak

Ahh, you are correct sir, it looks like my power meter wasn't correctly configured. It was set at 15 sec but actually reporting every 60 sec. I've corrected the configuration and everything seems to be working. Thanks for the speedy reply.

Offline reneboer

  • Beta Testers
  • Hero Member
  • *****
  • Posts: 1574
  • Karma: +110/-31
Re: ALTUI and Thingspeak integration
« Reply #16 on: November 05, 2015, 05:31:56 am »
Hi amg0,

For some reason I am not getting the thinkspeak graphs. I do get them on their portal and the channel ID, field number and API keys check out. I tried local and remote same results. This is the HTML I see, nothing of even a hint of the URL of thingspeak.

Code: [Select]
<iframe width="100%" height="260" src="undefined" style="border: 1px solid #cccccc;" class="altui-thingspeak-chart">
<html><head><link title="Wrap Long Lines" href="resource://gre-resources/plaintext.css" type="text/css" rel="alternate stylesheet"></head><body><pre></pre></body></html>
</iframe>

Any idea?

Cheers Rene

2xVeraLite, VeraEdge, openLuup, ALTUI, 20 switches, 10 dimmers, 20 sensors, 10 scene controllers, 1 Harmony Hub, many plug-ins. Not enough time.

Offline amg0

  • Moderator
  • Master Member
  • *****
  • Posts: 3174
  • Karma: +210/-8
Re: ALTUI and Thingspeak integration
« Reply #17 on: November 05, 2015, 06:09:12 am »
Hi amg0,

For some reason I am not getting the thinkspeak graphs. I do get them on their portal and the channel ID, field number and API keys check out. I tried local and remote same results. This is the HTML I see, nothing of even a hint of the URL of thingspeak.

Code: [Select]
<iframe width="100%" height="260" src="undefined" style="border: 1px solid #cccccc;" class="altui-thingspeak-chart">
<html><head><link title="Wrap Long Lines" href="resource://gre-resources/plaintext.css" type="text/css" rel="alternate stylesheet"></head><body><pre></pre></body></html>
</iframe>

Any idea?

Cheers Rene

the pb is the src="undefined".
get the console javascript log extract. we should see an error here.
Also which version of ALTUI ? the older version ( people rolled back to becasue of the problem in the device variables edition ) had a pb with watches so that could be it.

please a) update to latest ALTUI b) verify the VariableToSend variable in ALTUI device and tell me what it is. verify that it containts the real device id for which you want the watches
also note that thingspeak & watches only work on controller 0 ( the main vera ) not the extra controller

Offline reneboer

  • Beta Testers
  • Hero Member
  • *****
  • Posts: 1574
  • Karma: +110/-31
Re: ALTUI and Thingspeak integration
« Reply #18 on: November 05, 2015, 08:31:38 am »
Hi Amg0,

The undefined comes from the Virtualization URL field. Does that need to have a value? I thought that was just to make it more fancy if you wanted. If not, what should its value be as I do not see it in the guide.

The ALTUI version is the latest (on both the Edge and Lite).

;urn:micasaverde-com:serviceId:EnergyMetering1#Watts#27#thingspeak#64071#..writekey..#key=..readkey..&field1=%s#undefined

In the JS console nothing is shown. Only the lu_status2 requests.

The graphs do show on my thinkspeak channel view so sending works (with some misses it seems, but that can be me)

Thx Rene
2xVeraLite, VeraEdge, openLuup, ALTUI, 20 switches, 10 dimmers, 20 sensors, 10 scene controllers, 1 Harmony Hub, many plug-ins. Not enough time.

Offline amg0

  • Moderator
  • Master Member
  • *****
  • Posts: 3174
  • Karma: +210/-8
Re: ALTUI and Thingspeak integration
« Reply #19 on: November 05, 2015, 10:03:10 am »
Hi Amg0,

The undefined comes from the Virtualization URL field. Does that need to have a value? I thought that was just to make it more fancy if you wanted. If not, what should its value be as I do not see it in the guide.

The ALTUI version is the latest (on both the Edge and Lite).

;urn:micasaverde-com:serviceId:EnergyMetering1#Watts#27#thingspeak#64071#..writekey..#key=..readkey..&field1=%s#undefined

In the JS console nothing is shown. Only the lu_status2 requests.

The graphs do show on my thinkspeak channel view so sending works (with some misses it seems, but that can be me)

Thx Rene
yes it must have a value, ALTUI puts it for you if you do not specify one ( normally ) but your VariableToSend variable does not seem good. Sorry for the inconvenience but can you please

0) verify you are on AltUI v0.95.875
a) go to ALTUI device
b) clear the variable VariableToSend
c) restart Luup & close ALTUI
d) reopen ALTUI
e) go to your device 0-27 , then variables Watts
f) open the bar graph, reenter the thingspeak integration values
g) close the bar graph
h) go to ALTUI device and give me VariableToSend value
i) reload Luup


Offline reneboer

  • Beta Testers
  • Hero Member
  • *****
  • Posts: 1574
  • Karma: +110/-31
Re: ALTUI and Thingspeak integration
« Reply #20 on: November 07, 2015, 07:10:01 am »
As always Amg0 came to the rescue. With version 880 it is now working like a charm  :D

Thanks Rene
2xVeraLite, VeraEdge, openLuup, ALTUI, 20 switches, 10 dimmers, 20 sensors, 10 scene controllers, 1 Harmony Hub, many plug-ins. Not enough time.

Offline simonclark

  • Full Member
  • ***
  • Posts: 147
  • Karma: +6/-9
Re: ALTUI and Thingspeak integration
« Reply #21 on: November 08, 2015, 06:19:29 am »
This is great. I might be missing something but is there a way to get a On/Off variable to plot on say a bar chart?  I would like to plot a thermostat temp vs set point vs whether it is calling for heat, which is either On or Off. 
Thanks

Offline amg0

  • Moderator
  • Master Member
  • *****
  • Posts: 3174
  • Karma: +210/-8
Re: ALTUI and Thingspeak integration
« Reply #22 on: November 08, 2015, 06:32:56 am »
This is great. I might be missing something but is there a way to get a On/Off variable to plot on say a bar chart?  I would like to plot a thermostat temp vs set point vs whether it is calling for heat, which is either On or Off. 
Thanks
Once your Data is in thingspeak you can a lot like that. Just go on their website and check the examples using Matlab or even google gauge. If they do Google gauge I think using google Barchart from the same library should not be an issue.
I also thug default charting includes an option to displays as Barchart. The principal is the same , you prepare the chart on thingspeak web site then you copy the visualization url and you store it in Altui.

Offline simonclark

  • Full Member
  • ***
  • Posts: 147
  • Karma: +6/-9
Re: ALTUI and Thingspeak integration
« Reply #23 on: November 09, 2015, 05:15:02 am »
Thanks. Yes the default option allows barcharts but the issue is converting the on or off data to 0 or 1 to be plotted. I think I need to look at the matlab code for that. i am currently trying to set up a few point calculation to see what can be done as an example.

There was talk of the large load that sending data to smart energy groups could put on the vera. Do you know what this does if I were to send data on 15 thermostats to thingspeak?

I hope people share their example visualisations here.

Offline amg0

  • Moderator
  • Master Member
  • *****
  • Posts: 3174
  • Karma: +210/-8
Re: ALTUI and Thingspeak integration
« Reply #24 on: November 09, 2015, 07:36:15 am »
Thanks. Yes the default option allows barcharts but the issue is converting the on or off data to 0 or 1 to be plotted. I think I need to look at the matlab code for that. i am currently trying to set up a few point calculation to see what can be done as an example.

There was talk of the large load that sending data to smart energy groups could put on the vera. Do you know what this does if I were to send data on 15 thermostats to thingspeak?

I hope people share their example visualisations here.
I must say I have no idea what it does , will be interested to hear your experienced with it after. in theory it is a simple http call from VERA box to thingspeak but then , 15 at once ... , no idea; Also thingspeak is probably throtling it on their side.


Offline simonclark

  • Full Member
  • ***
  • Posts: 147
  • Karma: +6/-9
Re: ALTUI and Thingspeak integration
« Reply #25 on: November 09, 2015, 07:05:00 pm »
So it turns out that they dont delete any data, and doesnt appear that they are throttling the data either.  I currently have 7 thermostat channels with 4 fields (although only temp is frequent;y updated) plus a couple of others.  I couldnt get into my vera remotely today, although not sure if that is coincidence.  A few of the fields do appear to get missed so will keep an eye on that too.

Offline greenberry

  • Sr. Newbie
  • *
  • Posts: 37
  • Karma: +0/-0
Re: ALTUI and Thingspeak integration
« Reply #26 on: November 30, 2015, 09:55:59 am »
Hi amg0,

First thanks for all the great work you've done (and Akbooer ofcourse) !
When you said:
Quote
also note that Thingspeak & watches only work on controller 0 ( the main vera ) not the extra controller

Are you talking about openLuup as the extra controller, and if so is this this the case in the latest openLuup (6)with latest altUI (I didn't find any mention in the release notes for 6)?
Because after a reload of openLuup the variablesToSend is empty again?
I would like to use AltUI on openLuup instead of having it run on my main Vera too.
I am running release 5 it seems.

Thnx,

Happy regards,

Berry.

Offline amg0

  • Moderator
  • Master Member
  • *****
  • Posts: 3174
  • Karma: +210/-8
Re: ALTUI and Thingspeak integration
« Reply #27 on: November 30, 2015, 12:48:52 pm »
Hi amg0,

First thanks for all the great work you've done (and Akbooer ofcourse) !
When you said:
Quote
also note that Thingspeak & watches only work on controller 0 ( the main vera ) not the extra controller

Are you talking about openLuup as the extra controller, and if so is this this the case in the latest openLuup (6)with latest altUI (I didn't find any mention in the release notes for 6)?
Because after a reload of openLuup the variablesToSend is empty again?
I would like to use AltUI on openLuup instead of having it run on my main Vera too.
I am running release 5 it seems.

Thnx,

Happy regards,

Berry.

@akbooer can help you but ALTUI + openluup without any VERA box in the middle is a configuration that works.


Regarding the watch statement, since V 0.98.895, that statement is not true any more. cf http://forum.micasaverde.com/index.php/topic,33308.msg256559.html#msg256559

The discussion is not related to vera or openluup.  ALTUI works with a number of backend controller which can either be a VERA under UI5, a VERA under UI7,  or whatever running openluup.  it just happens that using the ExtraController variable you can set up several backend controller and ALTUI offers a blended experience that shows you all the controllers in one single user interface. you see devices from all the vera and can edit scene in each respective controller. prior to v 0.98.895 you could only set watches on device variables where were managed by the first controller ( controller 0 ) but now this limitation is lifted ( partially and under the conditions explained http://forum.micasaverde.com/index.php/topic,33308.msg256559.html#msg256559 )


Offline greenberry

  • Sr. Newbie
  • *
  • Posts: 37
  • Karma: +0/-0
Re: ALTUI and Thingspeak integration
« Reply #28 on: November 30, 2015, 04:14:33 pm »
Hi,

Okay thanks for the fast reply.So It seems my issues with losing the Thinkspeak settings hasn't anything to do with this specifically.
I will post my original question in the OpenLuup section instead.

Keep up the good work !

grtz,
Berry

Offline tedp

  • Sr. Member
  • ****
  • Posts: 288
  • Karma: +6/-2
Re: ALTUI and Thingspeak integration
« Reply #29 on: December 09, 2015, 03:22:58 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?

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