InfluxDB plugin

Posted on
Mon Jan 22, 2018 12:41 pm
vtmikel offline
Posts: 643
Joined: Aug 31, 2012
Location: Boston, MA

Re: InfluxDB plugin

You might want to try deleting the Influx plugins from your Plugins and Disabled Plugins folders in your Library, and try re-installing. You are correct that mine has a setting for Include or Exclude modes, so my configuration dialog is a bit larger. My plugin does not share a namespace with the prior plugin, so Indigo will not confuse your preferences or migrate them. However it could be confusing if you had both plugins enabled, as it would create two Influx plugins in the drop down menu.

EDIT: I bumped the version of my plugin fork. I corrected the label in the plugin config for Include/Exclude mode. I also updated to use the my new namespace for the plugin store. This does lose your preferences, so be careful to re-configure once installed.

Posted on
Sun Mar 04, 2018 4:50 pm
IndigoSam offline
Posts: 182
Joined: Apr 14, 2013

Re: InfluxDB plugin

I have a question on this general set up.

The Indigo built in SQL Logger plugin can output to PostgreSQL and Grafana has a built in PostgreSQL data source plugin.

Is there something extra that InfluxDB gives us that makes it desirable to use as an extra 'hop'? Or does Grafana to the Indigo PostgreSQL data source just not work?

Sam.

Posted on
Sun Mar 04, 2018 6:09 pm
vtmikel offline
Posts: 643
Joined: Aug 31, 2012
Location: Boston, MA

InfluxDB plugin

PostgreSQL isn’t a great time series database. Really that’s all. Since Influx is designed for this kind of IoT metric, you get visualizations in grafana that are easier with influx. Not to say it isn’t possible with PostgreSQL.

I’ve actually finally retired my PosgreSQL database after years of logging and near zero usage. The Influx / Grafana combo has been great for both dashboarding and debugging my house’s behaviors.


Sent from my iPhone using Tapatalk Pro

Posted on
Sun Mar 11, 2018 10:05 am
outsidenwnc offline
Posts: 24
Joined: Apr 20, 2014

Re: InfluxDB plugin

I have been using this initially for monitoring my HVAC and Solar Hot water system and it works great ! Thanks all for your contributions.

Posted on
Sun Mar 11, 2018 12:02 pm
dduff617 offline
Posts: 661
Joined: Jul 05, 2006
Location: Massachusetts, USA

Re: InfluxDB plugin

From what I know about Influxdb... It is open-source. It is relatively free of external dependencies. It is supported on MacOSX 10.8 and later (and also Linux, Windows, etc.). It can be installed easily on a Mac using brew (perhaps among other methods). It provides flexibility in terms of being deployed locally or remotely. It supports an SQL-like query language.

SQL Logger plugin already supports two database - Postgres and SQLite.

So my followup to IndigoSam's question: Is it plausible that InfluxDB could added as another option alongside Postgres and SQLite within SQL Logger plugin?

I have come to see having an ability to view history of device and sensor states (currently for me via Grafana) as an important feature for my HA system. Therefore, I would love to see a long term path for Indigo to adopt and support this in a more robust way.

Posted on
Sun Mar 11, 2018 3:55 pm
vtmikel offline
Posts: 643
Joined: Aug 31, 2012
Location: Boston, MA

Re: InfluxDB plugin

dduff617 wrote:
From what I know about Influxdb... It is open-source. It is relatively free of external dependencies. It is supported on MacOSX 10.8 and later (and also Linux, Windows, etc.). It can be installed easily on a Mac using brew (perhaps among other methods). It provides flexibility in terms of being deployed locally or remotely. It supports an SQL-like query language.

SQL Logger plugin already supports two database - Postgres and SQLite.

So my followup to IndigoSam's question: Is it plausible that InfluxDB could added as another option alongside Postgres and SQLite within SQL Logger plugin?

I have come to see having an ability to view history of device and sensor states (currently for me via Grafana) as an important feature for my HA system. Therefore, I would love to see a long term path for Indigo to adopt and support this in a more robust way.


What do you mean by “in a robust way”? What is the influx plugin not providing that are looking for?


Sent from my iPhone using Tapatalk Pro

Posted on
Fri Mar 23, 2018 9:06 am
nathanw offline
Posts: 153
Joined: Sep 05, 2011
Location: Boston, MA

Re: InfluxDB plugin

Just wanted to note that I'm using this plugin successfully (though having the filter stuff merged in would indeed be cool). Finding variables is kind of a challenge as the database ends up very, very wide, yes. And I'm not 100% loving InfluxDB+Grafana ("almost, but not quite, SQL"), but it's pretty good.

I'm monitoring both stuff from the Indigo world and some stuff from a Brultech GreenEye Monitor (GEM) on my breaker box.

Posted on
Sat Mar 24, 2018 8:43 pm
koensayr offline
Posts: 90
Joined: Jul 10, 2013

Re: InfluxDB plugin

I'm having similar problems with getting some odd messages in ym logs. I know there is a way to exclude certain devices using the other version of this plugin, but how do you find out which device is causing the issues?

Code: Select all
Mar 24, 2018, 7:41:31 PM
   InfluxDB Plugin Error           Error in plugin execution ServerReplacedElem:

Traceback (most recent call last):
  File "plugin.py", line 134, in deviceUpdated
  File "/Library/Application Support/Perceptive Automation/Indigo 7/Plugins/InfluxDB.indigoPlugin/Contents/Server Plugin/indigo_adaptor.py", line 151, in diff_to_json
  File "/Library/Application Support/Perceptive Automation/Indigo 7/Plugins/InfluxDB.indigoPlugin/Contents/Server Plugin/indigo_adaptor.py", line 140, in to_json
  File "<string>", line 1, in <module>
NameError: name 'boolean' is not defined

Posted on
Sun Mar 25, 2018 7:20 am
vtmikel offline
Posts: 643
Joined: Aug 31, 2012
Location: Boston, MA

Re: InfluxDB plugin

koensayr wrote:
I'm having similar problems with getting some odd messages in ym logs. I know there is a way to exclude certain devices using the other version of this plugin, but how do you find out which device is causing the issues?

Code: Select all
Mar 24, 2018, 7:41:31 PM
   InfluxDB Plugin Error           Error in plugin execution ServerReplacedElem:

Traceback (most recent call last):
  File "plugin.py", line 134, in deviceUpdated
  File "/Library/Application Support/Perceptive Automation/Indigo 7/Plugins/InfluxDB.indigoPlugin/Contents/Server Plugin/indigo_adaptor.py", line 151, in diff_to_json
  File "/Library/Application Support/Perceptive Automation/Indigo 7/Plugins/InfluxDB.indigoPlugin/Contents/Server Plugin/indigo_adaptor.py", line 140, in to_json
  File "<string>", line 1, in <module>
NameError: name 'boolean' is not defined


I’ve encountered this and have an update that ignores and suppresses the error. I may not have published the update so I’ll do so. Give me a bit and I’ll do that.

I never figured out what the root cause was, but suppressing it didn’t have any effects on my dashboard. Debugging is very chatty and could help identify the device that’s causing the problem. Honestly the debugging needs a re-write.


Sent from my iPad using Tapatalk Pro

Posted on
Sun Mar 25, 2018 9:50 am
vtmikel offline
Posts: 643
Joined: Aug 31, 2012
Location: Boston, MA

Re: InfluxDB plugin

I've decided that I'm going to go ahead and re-write the Influx plugin completely to one that will include InfluxDB and Grafana built into a single plugin. I'll make a few improvements to the debugging and configuration while I'm at it. I'll post when I'm ready for others to test.

Posted on
Mon Mar 26, 2018 11:14 am
koensayr offline
Posts: 90
Joined: Jul 10, 2013

Re: InfluxDB plugin

Is the idea that your plugin will write directly to Grafana's own datastore instead of Influx?

Meanwhile, if you have a patch to clear out that warning, let me know where it is and I'll pull it down to clean up my logs a bit.

Posted on
Tue Mar 27, 2018 7:26 am
vtmikel offline
Posts: 643
Joined: Aug 31, 2012
Location: Boston, MA

Re: InfluxDB plugin

The new plugin will have InfluxDB and Grafana included within the plugin. So it will run and manage both of these servers. My goal is to remove all external dependencies and reduce technical complexity. Influx is required, Grafana isn't meant to store data itself. I'll provide instructions on how to migrate from a prior Influx and Grafana installation if you previously set these up outside of Indigo so that you don't lose your historical data or dashboard. I have this part already built and tested, it's working well.

If you want to use the plugin to connect to an external InfluxDB, or to disable the included Grafana server, you can do that as well. Though I need to test it more to make sure I didn't break anything by adding the built-in servers.

I'm also working to have the filter mechanisms directly in the plugin's own config, removing the requirement for the Global Property Manager. This is proving complex, and is where I currently am focusing my time, but I should have it done soon. I'm also going to add a way to easily see the attributes of any given device that is being sent to Influx, eliminating the guessing that you previously had to do.

If anyone that is monitoring this thread is willing to help, I would like to include a generic Indigo Grafana dashboard in the plugin. Does anyone bandwidth to help with creating a generic dashboard?

Also, I could use assistance with building up more documentation on the new plugin wiki. Once I post a beta version of the plugin, perhaps someone can help with adding to the minimal documentation I've written so far.

koensayr wrote:
Is the idea that your plugin will write directly to Grafana's own datastore instead of Influx?

Meanwhile, if you have a patch to clear out that warning, let me know where it is and I'll pull it down to clean up my logs a bit.


Sorry to report that I've completely broken the plugin, so if you can wait a day or so more, I'll give you access to the beta to clean up your logs.

Posted on
Tue Mar 27, 2018 10:48 am
koensayr offline
Posts: 90
Joined: Jul 10, 2013

Re: InfluxDB plugin

This sounds like a great plan. I went down the route of including Influx and Grafana in the plugin as well but had significant issues with the system Pythons versus say the Python from Homebrew. Anyway kudos to you!

I’m very handy with Python and system level work so I’m happy to test/debug and contribute in anyway I can. If you’re working in gitHub let me know and I can file issues and contribute a few dashboards as we go along and as the schemas come together.

Posted on
Tue Mar 27, 2018 3:05 pm
nathanw offline
Posts: 153
Joined: Sep 05, 2011
Location: Boston, MA

Re: InfluxDB plugin

Hmm. I'll note that I'm explicitly using an external install of InfluxDB and Grafana - I spun them up on a cloud VM box, so that it's easy to access the dashboard when I'm not at home without doing yet more port-forwarding tricks. I have both Indigo and my GEM pushing data directly out to that box.

Posted on
Tue Mar 27, 2018 3:08 pm
vtmikel offline
Posts: 643
Joined: Aug 31, 2012
Location: Boston, MA

Re: InfluxDB plugin

nathanw wrote:
Hmm. I'll note that I'm explicitly using an external install of InfluxDB and Grafana - I spun them up on a cloud VM box, so that it's easy to access the dashboard when I'm not at home without doing yet more port-forwarding tricks. I have both Indigo and my GEM pushing data directly out to that box.


Updated plugin will still support external servers. I tested it with that today. I think it will still offer you some usability, stability improvements over the prior plugin.


Sent from my iPhone using Tapatalk Pro

Who is online

Users browsing this forum: No registered users and 1 guest