Graphing Presence


#15

Can’t attach it here, seems to only accept image files. Here’s the text of the JSON. I have only one dashboard for SmartThings. Other dashboards are network (router scripts + sabnzb), raspberry pi (collectd), and thermostat (ecobee scripts). I can attach those if there is interest, as well.

I’ve never tried to use someone else’s Grafana dashboard, am curious how useful it is.

Published snapshots here, too. It’s a shame the discrete panels don’t work on the snapshot. They’re my favorite. Nor do the time overrides - I have several panels that are month-to-date.

https://snapshot.raintank.io/dashboard/snapshot/Wtu0EM4EJ1lH11BMAeJcnOzypK1OKIlO
https://snapshot.raintank.io/dashboard/snapshot/NdGYNUZjP7j1bqawDOy1arIUM0KQ41mg
https://snapshot.raintank.io/dashboard/snapshot/FAJXxKuhhH6b3JqSeKeSfBxRm5a50Jui

Let me know if you’d like more detail. As I said, happy to give you a read login if you PM me.

milhouse

edit: removed the badly formatted JSON. Here’s a link on my gdrive:
https://drive.google.com/file/d/1TgssuLdKEpFZ-BSwTtYmZcj7ZYukZRVV/view?usp=sharing


#16

Thanks @Milhouse, I’ve assembled a few things, looking at what you’ve done too.


#17

@milhouse - the forum did a number on the JSON file. I tried to fix it by hand but there were hundreds of issues.

Could you send it via https://send.firefox.com ?

Or maybe escaping the text with a markdown triple-` would work?

like so


#18

Edited post above - just shared from my Google drive. Firefox share didn’t seem to work, and would expire in 24 hours anyway.

Hopefully this version will work better!

milhouse


#19

Awesome, I was able to use that and a few panels I hadn’t thought of. Thanks for turning me onto the InfluxDB logger (makes me want to learn how to build my own smartapps), saved me a lot of pain and manual work, @milhouse


#20

Glad it’s of use to you! Yeah, that InfluxDB Logger smartapp is really easy to use.

Post some pics of your graphs when you’ve got them, especially if you’ve got any unique ones I haven’t thought of. Mine are all a bit of a dumping ground to see what I can do with Grafana and the data I’ve got. Not all are useful.

Let me know if you are curious about any of my WebCore pistons that actually post the annotations to Grafana.

milhouse


#21

Are you able to POST directly to Grafana via your pistons or is there something in between? How do you do the Auth without headers support? And which of the annotations API do you use? I think there is a Grafana native one and a Graphite compatible one? @milhouse


#22

Posting directly using Grafana API. Here’s the red snapshot so you can see the address. Below that is an image of the details so you can see how the Auth works.


#23

If you are interested in a ragne annotation, here’s my piston that does that:

One note: you cannot do any tagging this way. Annotation tags have to be wrapped in brackets, even if there’s just one, and you just can’t do that through WebCore.


#24

@milhouse @ferik Grafana runs on pi3? what type NAS do you have(&cpu/ram?), been wanting to get 2 drive Synology, but cant justify price yet, especially since diskless. i do have pi3 (quad 1.2GHz/1GB)only running Ubiquiti controller so far thx!


#25

Runs perfectly on a pi3.


#26

Good blog post at http://blog.mike-greene.com/trending-analyzing-smartthings-devices-part-1/

Not relevant to webcore, but may be useful to this thread. Gives all the basics of getting influxdb/grafana setup, and also how to generate your first graphs from ST devices.


#27

Very cool! I use contact switches to monitor the house temps and send to influx via InfluxDB Logger too … got a little carried away with the lowes $9.95 sales. Also pull data into grafana from my ambient weather station and Blue Iris manages Cameras


#28

How do you pull the Ambient weather station stuff into Grafana and what model do you have?


#29

Hi,

I tried to download the json but I couldn’t find it (link expired). Would you mind posting it again?

Thank you for the great work.

Regards


#30

This is great but how do you do “Who’s Home” and “Lights Usage”? I can’t work out how to replicate this in Grafana. Thanks.


#31

I’ll start with the assumption that you’ve install the plugin “Discrete Panel” by Natel Energy.

I’ll also assume that you’ve gotten your SmartThings data already flowing into InfluxDB (e.g. through the InfluxDB Logger smart app).

The Who’s Home panel is pretty easy - get the presence values (metric tab in Grafana) and pretty it up with remapping (Mappings tab):

image

The Lights Usage is just a little trickier, and that’s just because I may have more than 1 light in a room. So the metric uses the max(binary value). in other words, if any light is on, the room is on.

Hope this helps!
milhouse


#32

I’ve just setup InfluxDB and grafia and have my first dashboard from InfluxDB smartapp, so thanks for this info its been great.

I’m now trying to send data about my spa pools current temperature from a webcore piston to graphia and have setup the Api key and the variables as per your example; only problem is I don’t know where to find a panelID and dashboardID? Also do I need to setup something specific in graphia for it to collect this data sent to it?

Many thanks again for your help


#33

I don’t think you need to do anything in grafana. It should just accept the annotation. You might have to turn on annotation display at the top of the dashboard to make them visible.

For the dashboard and panel IDs: go to your dashboard, click the “share dashboard” at the top. Export tab, view JSON button. Look for “id”: 1 near the top. That’s the dashboardID. For the panel ID, go to the panel menu, more->panel JSON and look for the “id”: 1 there.

But is that what you are trying to do - show an annotation? That’s the little blue arrow or blue region. Or are you wanting to log data to InfluxDB and show a chart of the spa temperature? If that’s what you want, then the InfluxDB logger smart app will log data from Smartthings devices to InfluxDB.


#34

yeah its data I want to get in…
As I pull the data for my spa via webcore, I can’t really use the existing smartapp for that, is there something in webcore I could do to send the data?

I essentially need to send the variable in a POST similar to this…

curl -XPOST “http://192.168.33.22:8086/write?db=smartthings” -u username:password --data-binary “temperature,deviceName=“DaynaSpa” value=$VArIABLE”