Fuel Stream Design Help


#1

1) Give a description of the problem
Hello- I’d like someone to explain how I create a fuel stream. Perhaps something basic, like logging the indoor temperature from a multipurpose sense or nest, against time. I’d like a nice graph showing me the temperatures.
Aother one I’d like is something to tell me how many minutes each of my either lights or room lights were on for…

Any help appreciated.


#2

Here’s a simple example of writing the current temperature every 30 minutes.


#3

OK thanks. So that will automatically create a fuel stream called ‘Temperature’?


#4

Yep, pretty simple. If I remember correctly, make sure you have data collection enabled in webcore. You can do that in the SmartThings app -> Webcore -> Settings -> Data Collection.


#5

Ah that’ll be why it wasn’t working probably. With the accu weather you suggested before- is that your local weather station? i.e. do I need to find out which one is mine?


#6

Yeah, it took me a minute to figure out why it wasn’t working when I first tried a fuel stream.
I just remembered that the Accuweather is a virtual device I have setup in SmartThings…
You can also use the built-in weather API… gimme a minute and I’ll get you an example.


#7

Ah just a zip/post code? Perfect (post code for me as I’m in the UK).

Do you have any idea how I could log Nest heating against indoor temperature from the Nest? So far I have a piston working to give me a graph of indoor temperature against time, but would also like to overlay the heating set point…


#8

Note the second variable ‘tempWeatherAPI’… that’s using the built-in weather feature which is documented at https://wiki.webcore.co/Weather#Temperature_-_Fahrenheit

Should be able to easily do it with your Nest as well. Create a variable, and as an expression, it’s probably something like “nestDevice : Temperature”


#9

Thanks for this- REALLY helpful.

How about logging cumulative time a light has been on for. Would this be a tile, or a fuel stream job?

I’d like a cumulative time for the day, i.e. ‘Back Lamp has been on for 124 minutes today’ which then resets at midnight…


#10

This is close to what you’re looking for, it just needs to be tweaked.

Remove variable timeLeft and timeLimit. Remove lines 32 and 33

Edit: Before line 44, you can insert a Log, SMS or Notification of the totalOn variable before it resets so you have a record of the daily total.


#11

Thanks for this. I’ll try it out. What do you mean by a log? As in write to a fuel stream?

This is what I’ve got…

What do you think? Will this give me a graph of daily use of the dimmer switch?


#12

That look like it’ll work just fine. You’re writing that datapoint (totalOn) to the fuel stream just before clearing out the {totalOn} variable.
There’s multiple ways to see the data, which I believe is what was suggested by “log”. You could log it to the console, set the piston state, text message it, email it, etc… or write data point to fuel stream.

Also, this may be a bit more advanced, but if you’re interested in visualizing data out of SmartThings, check out this thread on the ST forums: https://community.smartthings.com/t/smartthings-data-visualisation-using-influxdb-and-grafana/44946

I’m logging data to a local linux server on my network, looks like this:


#13

Nice one. I’ll have to have a play sometime. Maybe tomorrow :smiley: