Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fibaro plugin: Get power consumption from devices. #4273

Closed
mathiasahlen opened this issue Jun 12, 2018 · 9 comments
Closed

Fibaro plugin: Get power consumption from devices. #4273

mathiasahlen opened this issue Jun 12, 2018 · 9 comments
Labels
feature request Requests for new plugin and for new features to existing plugins
Milestone

Comments

@mathiasahlen
Copy link

mathiasahlen commented Jun 12, 2018

Fibaro plugin: Get power consumption from devices.

Proposal:

Implement functionality to gather power consumption from devices.

Current behavior:

Only collects power state (On/Off).

Desired behavior:

Read (and collect) data from the "power": field/variable for the devices in the Fibaro API.

Use case:

To build graphs based om power consumption.

@mathiasahlen
Copy link
Author

mathiasahlen commented Jun 12, 2018

@dynek, thanks for the work with the Fibaro plugin. Please let me know if I can help you to test some functionality if you decide to implement this.

@danielnelson danielnelson added the feature request Requests for new plugin and for new features to existing plugins label Jun 12, 2018
@dynek
Copy link
Contributor

dynek commented Jun 13, 2018

This definitely is possible and straightforward, let me find some time to work on this.

Note to self property name seems to be "energy" in "properties".

@mathiasahlen
Copy link
Author

Hi, that would be appreciated. But "energy" is the wrong field, it should be "power".

"energy" contains accumulated consumption (which is not particularly interesting).
"power" contains current load/consumption.

@danielnelson
Copy link
Contributor

Cumulative power use may end up being more useful actually, since when paired with the non_negative_derivative function you can calculate the change over any interval and it if there is a gap in data collection you don't lose track of how much energy was used. It also may be worth collecting both values.

Also, perhaps of interest, here is an example of a query to calculate kWh based on sampling the current watts:
https://community.influxdata.com/t/watt-per-day-week-month-extraction/5230/3

@dynek
Copy link
Contributor

dynek commented Jun 14, 2018

@mathiasahlen you are correct I missed the "power" property.

@mathiasahlen
Copy link
Author

Thanks for the tip @danielnelson, that looks really interesting and probably also very useful, I'll try it when I get home from my vacation.

@dynek
Copy link
Contributor

dynek commented Jun 24, 2018

Worked on this but I'm having a hard time getting deps updated to give build a try, I keep getting messages like:

package thrifttest: unrecognized import path "thrifttest" (import path does not begin with hostname)
package gen/stress: unrecognized import path "gen/stress" (import path does not begin with hostname)
package common: unrecognized import path "common" (import path does not begin with hostname)
package gen/thrifttest: unrecognized import path "gen/thrifttest" (import path does not begin with hostname)
package shared: unrecognized import path "shared" (import path does not begin with hostname)
github.com/Sirupsen/logrus (download)
package github.com/Sirupsen/logrus/formatters/logstash: cannot find package "github.com/Sirupsen/logrus/formatters/logstash" in any of:
        /usr/lib/go-1.8/src/github.com/Sirupsen/logrus/formatters/logstash (from $GOROOT)
        /home/pierrick/go/src/github.com/Sirupsen/logrus/formatters/logstash (from $GOPATH)

etc, etc, etc.

Used to work and I can't seem to understand what's wrong :-/

Edit:
Fixed it with rm -rf vendor

@dynek
Copy link
Contributor

dynek commented Jun 26, 2018

I guess this can be closed "in favor" of the PR

@danielnelson danielnelson added this to the 1.8.0 milestone Jul 2, 2018
@danielnelson
Copy link
Contributor

Closed in #4343

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature request Requests for new plugin and for new features to existing plugins
Projects
None yet
Development

No branches or pull requests

3 participants