InfluxDB plugin

Posted on
Tue Mar 27, 2018 3:52 pm
koensayr offline
Posts: 90
Joined: Jul 10, 2013

Re: InfluxDB plugin

Really looking forward to testing it. It doesn’t have to be perfect but I’m happy to give it a go when you’re ready

Posted on
Wed Mar 28, 2018 6:06 am
vtmikel offline
Posts: 643
Joined: Aug 31, 2012
Location: Boston, MA

Re: InfluxDB plugin

I plan to post a beta today. Stay tuned.

Posted on
Wed Mar 28, 2018 8:56 pm
vtmikel offline
Posts: 643
Joined: Aug 31, 2012
Location: Boston, MA

Re: InfluxDB plugin

Public beta is available. Please read below and proceed cautiously. Please post feedback to this thread so I can track it.

Release: https://github.com/mlamoure/indigo-grafana-dashboard/releases
Wiki in development: https://github.com/mlamoure/indigo-grafana-dashboard/wiki

Major new features:
  • Built-in InfluxDB and Grafana servers
  • Latest Influx client libraries
  • Included filtering configuration, no dependencies on Global Property Manager
  • Utility functions to output the JSON of any device, or to investigate which devices are publishing any particular property. Takes the guessing work out of your Grafana queries.
  • Impoved error handling, logging

Known open items:
  • The InfluxDB Retention Policy config option is not yet implemented.
  • Once you have the plugin fully configured and if you are using both included servers, it can take a few seconds before you can enter the configuration screen due to the loading that is occurring in the background. If this happens to you, you should cancel the config dialog without changing anything and re-enter.
  • Devices should not be allowed in the Include and Exclude lists, but they are.
  • Exclude list is not yet implemented, though you can configure it
  • Grafana doesn't come pre-configured to use the included InfluxDB as a data source. This must be set up manually. I plan to try to implement this
  • There is no default dashboard. I'd appreciate some help in building one that is generic and applies to the standard properties for most Indigo setups.

For those that will use the included Influx and Grafana servers and wish to migrate:
  1. BACKUP. This plugin is beta and I do not want to be responsible for losing your historical data or dashboard.
  2. Read the wiki on how to migrate your historical data and dashboards: https://github.com/mlamoure/indigo-graf ... board/wiki

For those that will use the plugin to connect to a external InfluxDB, I think you'll still find the update to be valuable to you. A couple of notes:
  • The plugin size is large because of the included servers, but those will not run if you configure the plugin to use an external InfluxDB Server and/or disable the Grafana server.

Posted on
Thu Mar 29, 2018 7:50 am
vtmikel offline
Posts: 643
Joined: Aug 31, 2012
Location: Boston, MA

Re: InfluxDB plugin

v0.0.3 has been posted to Github.

Once you have the plugin fully configured and if you are using both included servers, it can take a few seconds before you can enter the configuration screen due to the loading that is occurring in the background. If this happens to you, you should cancel the config dialog without changing anything and re-enter.

This is mitigated by a message to the Event Log when the plugin is fully initialized.

Devices should not be allowed in the Include and Exclude lists, but they are.

This is now fixed.

Exclude list is not yet implemented, though you can configure it

This is now implemented.

I also fixed/added:
  • I introduced a bug on the minimum frequency that was causing errors to the log.
  • The device log option is now improved
  • The states list will now update every 15 minutes without requiring a restart of the plugin
  • Expanded the default states to include more that should be typical for most Indigo device types

Posted on
Thu Mar 29, 2018 2:08 pm
blysik offline
Posts: 213
Joined: Jan 06, 2015

Re: InfluxDB plugin

Awesome idea! I went ahead and installed 0.0.3. I ran into an issue with "illegal string for list ID (ignoring)" in the plugin state config.

Opened an issue in github: https://github.com/mlamoure/indigo-graf ... d/issues/1

Posted on
Thu Mar 29, 2018 8:59 pm
vtmikel offline
Posts: 643
Joined: Aug 31, 2012
Location: Boston, MA

Re: InfluxDB plugin

V0.0.4 is posted.


Sent from my iPad using Tapatalk Pro

Posted on
Fri Mar 30, 2018 10:24 am
Colly offline
Posts: 535
Joined: Jan 16, 2016
Location: Ireland

Re: InfluxDB plugin

Hi vtmikel,
I've just successfully installed your new plugin and looking forward to creating some dashboards. I hit my first minor problem.. I don't seem to be able to login to Grafana using grafana/grafana user/pass. Any suggestions?

Posted on
Fri Mar 30, 2018 10:28 am
vtmikel offline
Posts: 643
Joined: Aug 31, 2012
Location: Boston, MA

Re: InfluxDB plugin

Doh, silly me.

The default is admin/admin. Make sure you change the pass once you log in. I'll update the docs. Sorry!

Posted on
Fri Mar 30, 2018 10:29 am
Colly offline
Posts: 535
Joined: Jan 16, 2016
Location: Ireland

Re: InfluxDB plugin

:D no problem at all..

Posted on
Fri Mar 30, 2018 10:40 am
Colly offline
Posts: 535
Joined: Jan 16, 2016
Location: Ireland

Re: InfluxDB plugin

Another typo (I will help out with Wiki once I figure how to use the plugin!).
"Database: Indigo (or whatever you changed it to in the advanced config)
User: influx (or whatever you changed it to in the advanced config)
Password: influx (or whatever you changed it to in the advanced config)"
Database is indigo (lower case i), User is indigo and Password is indigo by default.

Posted on
Sat Mar 31, 2018 1:23 pm
vtmikel offline
Posts: 643
Joined: Aug 31, 2012
Location: Boston, MA

Re: InfluxDB plugin

Thanks for the feedback thus far.

v0.0.8 has been posted to github. Please send any bug reports and feedback.

As we get closer to a 1.0 release I will shut down this thread and start a new one.

Posted on
Sat Mar 31, 2018 3:01 pm
Colly offline
Posts: 535
Joined: Jan 16, 2016
Location: Ireland

Re: InfluxDB plugin

Just updated to latest version.
Getting this error:
Code: Select all
  Grafana Home Dashboard Error    error while connecting to InfluxDB, will continue to try silently in the background.
Everything had been working well.

Posted on
Sat Mar 31, 2018 3:02 pm
vtmikel offline
Posts: 643
Joined: Aug 31, 2012
Location: Boston, MA

Re: InfluxDB plugin

Can you turn on the plugin debugging (first one) and report the output around the connection error?


Sent from my iPhone using Tapatalk Pro

Posted on
Sat Mar 31, 2018 3:05 pm
Colly offline
Posts: 535
Joined: Jan 16, 2016
Location: Ireland

Re: InfluxDB plugin

As requested:
Code: Select all
   Reloading plugin "Grafana Home Dashboard 0.0.8"
   Stopping plugin "Grafana Home Dashboard 0.0.8" (pid 63622)
   Grafana Home Dashboard Debug    Received StopThread
   Grafana Home Dashboard          shutting down the InfluxDB Server...
   Stopped plugin "Grafana Home Dashboard 0.0.8"
   Starting plugin "Grafana Home Dashboard 0.0.8" (pid 63817)
   Started plugin "Grafana Home Dashboard 0.0.8"
   Grafana Home Dashboard          starting the InfluxDB Server...
   Grafana Home Dashboard Debug    starting the InfluxDB Server using command: /Library/Application\ Support/Perceptive\ Automation/Indigo\ 7/Plugins/Grafana\ Home\ Dashboard.indigoPlugin/Contents/Server\ Plugin/servers/influxdb/influxd run -config /Library/Application\ Support/Perceptive\ Automation/Indigo\ 7/Plugins/Grafana\ Home\ Dashboard.indigoPlugin/Contents/Server\ Plugin/servers/influxdb/influxdb.conf
   Grafana Home Dashboard          InfluxDB server started...
   Grafana Home Dashboard          connecting to InfluxDB... localhost:8086 using user account: indigo
   Grafana Home Dashboard Debug    error while connecting to InfluxDB: 403: {"error":"error authorizing query: create admin user first or disable authentication"}

   Grafana Home Dashboard Error    error while connecting to InfluxDB, will continue to try silently in the background.
   Grafana Home Dashboard Debug    not currently connected to any InfluxDB, so will not start the Grafana Server
   Grafana Home Dashboard Debug    not currently connected to any InfluxDB
   Grafana Home Dashboard Debug    starting BuildConfigurationLists()
   Grafana Home Dashboard Debug    running ValidateConfigLists()
   Grafana Home Dashboard Debug       validated included device: Sitting Room
   Grafana Home Dashboard Debug       validated included device: Living Room
   Grafana Home Dashboard Debug       validated included device: Dining Room
   Grafana Home Dashboard Debug       validated included device: Kitchen
   Grafana Home Dashboard Debug       validated included device: Guest Room
   Grafana Home Dashboard Debug       validated included device: Guest Ensuite
   Grafana Home Dashboard Debug       validated included device: Entrance
   Grafana Home Dashboard Debug       validated included device: Back Toilet
   Grafana Home Dashboard Debug       validated included device: Sitting Room - Motion Sensor
   Grafana Home Dashboard Debug       validated included state: state.onOffState
   Grafana Home Dashboard Debug       validated included state: onState
   Grafana Home Dashboard Debug       validated included state: energyCurLevel
   Grafana Home Dashboard Debug       validated included state: energyAccumTotal
   Grafana Home Dashboard Debug       validated included state: sensorValue
   Grafana Home Dashboard Debug       validated included state: heatSetpoint
   Grafana Home Dashboard Debug       validated included state: batteryLevel
   Grafana Home Dashboard Debug       validated included state: batteryLevel.num
   Grafana Home Dashboard Debug    completed ValidateConfigLists()
   Grafana Home Dashboard Debug    completed BuildConfigurationLists
   Grafana Home Dashboard Debug    starting concurrent tread...
   Grafana Home Dashboard          fully initialized and ready...

Posted on
Sat Mar 31, 2018 3:21 pm
vtmikel offline
Posts: 643
Joined: Aug 31, 2012
Location: Boston, MA

Re: InfluxDB plugin

I have instructions on how to manually correct your situation.

The back story is that my implementation of the way I managed the admin user for Influx (not grafana) had bugs. Previous to this release your Influx server was incorrectly set to not needing any authorization. This isn't good, so I built a check for this and corrected it in this latest release. However, now that the authorization is enabled, it seems that your admin account that is configured in the plugin doesn't exist. We need to trigger a simple refresh of the config file to fix.

I could tell you how to do it manually, but I'd prefer to build a check for this situation automatically in case others experience it too. If you are willing to test my quick fix, please Grab 0.0.9 which I'm posting now. I can't really test this scenario very easily, so I'm programming blind. Let me know how it goes.

Mike

Who is online

Users browsing this forum: No registered users and 1 guest

cron