Scheduling Device States into InfluxDB?

Posted on
Mon Apr 16, 2018 5:41 pm
TwitchCaptain offline
User avatar
Posts: 104
Joined: Dec 13, 2016
Location: San Francisco

Scheduling Device States into InfluxDB?

Hello! I really dig the idea behind your plugin. It's something I've always wanted to do myself, but never had the time. Previously I was using a custom python script to suck the data out of psql and pump it into carbon. This method is much more viable. I'll admit: I'm not using your plugin. I'm still using the one smurfless1 wrote.

I have a question: Have you solved the problem where devices without a state change disappear from Grafana? I've looked for a trick in Grafana to make it honor the last value even if it's outside the time range, but I'm having a lot of difficulty figure out how to make that work. My other thought was to setup a schedule (in Indigo or the plugin) to dump all device states into influxdb every 5-10 minutes (whether they've changed or not). This will give us a lot more data points and keep devices from "disappearing". I'd love to hear your thoughts on this idea, and if you've already looked into it. It really bothers me, so if it's something you're not working on, I'll keep digging for a solution.

Thanks!
Last edited by TwitchCaptain on Mon Apr 16, 2018 6:04 pm, edited 1 time in total.

Posted on
Mon Apr 16, 2018 5:58 pm
vtmikel offline
Posts: 628
Joined: Aug 31, 2012
Location: Boston, MA

Re: Scheduling Device States into InfluxDB?

Yes, this is solved in the current plugin. This problem you outline was the precise reason why I originally deviated from smufless1's plugin. Your solution is correct, the only way is to send regular updates to Influx so that Grafana knows the state of infrequently updated devices/variables/whatever. I wish Grafana could answer this problem without adding unnecessary data to Influx when a state change did not occur.

I recommend migrating. It should be easy. You could migrate your servers to the included servers in the plugin, or keep them separate. At a minimum the new plugin will offer you the minimum update frequency setting that I implemented, and improved debugging for exploring a device or state.

Let me know if you have questions about migrating.

Mike

Posted on
Mon Apr 16, 2018 6:03 pm
TwitchCaptain offline
User avatar
Posts: 104
Joined: Dec 13, 2016
Location: San Francisco

Re: Scheduling Device States into InfluxDB?

rad. migrating now. thanks!

Posted on
Tue Apr 17, 2018 4:34 pm
TwitchCaptain offline
User avatar
Posts: 104
Joined: Dec 13, 2016
Location: San Francisco

Re: Scheduling Device States into InfluxDB?

This definitely works better, thanks for the improvements!

The only real problem I'm noticing is that InfluxDB nor Grafana start automatically when Indigo starts. Is there a special action I need to add to make that happen? To start the services manually, I go into the plugin config, put a check mark on "plugin and server debug" then click save. This triggers the services to start. Then I can remove the debug check mark without another restart taking place. I'm sure this is not the desired behavior.

Posted on
Tue Apr 17, 2018 4:43 pm
vtmikel offline
Posts: 628
Joined: Aug 31, 2012
Location: Boston, MA

Scheduling Device States into InfluxDB?

Odd. I’ll reboot myself a few times to see if I can reproduce. Would you mind turning on debug (top option only), and rebooting? The logs when the plugin starts would help. Be sure to give it a few minutes because I do run a function in the concurrent thread to check the server status and resolve issues. I’m curious why this doesn’t self resolve the issue for you.


Sent from my iPhone using Tapatalk Pro

Posted on
Wed Apr 18, 2018 11:49 am
vtmikel offline
Posts: 628
Joined: Aug 31, 2012
Location: Boston, MA

Re: Scheduling Device States into InfluxDB?

When you have details to report, please post them here: https://github.com/mlamoure/indigo-graf ... d/issues/4

So far I'm not experiencing the issue on my server.

Posted on
Fri Apr 20, 2018 12:36 pm
TwitchCaptain offline
User avatar
Posts: 104
Joined: Dec 13, 2016
Location: San Francisco

Re: Scheduling Device States into InfluxDB?

Issue updated.

Page 1 of 1

Who is online

Users browsing this forum: No registered users and 2 guests