lux4rd0 / kasa-collector

Kasa Collector provides a way of collecting real-time energy data from Kasa Smart Plugs. These Grafana dashboards offer visualizations for their Current, Voltage, Power, and Total Watt Hours.
https://labs.lux4rd0.com/kasa-collector/
GNU Affero General Public License v3.0
41 stars 5 forks source link

discovery of kasa devices #3

Open danktankk opened 1 month ago

danktankk commented 1 month ago

My unraid server is on a different VLAN than my the kasa devices. I would think this would be pretty much standard. Is there a way to specify the VLAN for the Kasa devices with respect to discovery or should it be able to find them anyway?

I am trying to just add the vlan to the network on unraid and see how that goes...

Welp, no luck. Could be user error, but I definitely won't be moving IoT devices out of an IoT network to see just to see something on grafana. This new version seems to be missing the ability to manually add devices? Is the only way to get devices added via discovery? I hope I am wrong about this and there is a way to manually add by assigning an IP address like before.

Thanks for any help

danktankk commented 1 month ago

would it be that difficult to add back the environment variable KASA_COLLECTOR_DEVICE_HOST?

then this would hopefully work for those of us that think its a terrible idea to run IoT on the same network as your compose stacks.

danktankk commented 1 month ago

lol must be abandoned again....

lux4rd0 commented 1 month ago

I'll add static devices back in. Not abandoned but still just a fun project I built and decided to share in my free time.

danktankk commented 1 month ago

I'll add static devices back in. Not abandoned but still just a fun project I built and decided to share in my free time.

oh cool! I thought it went down again lol I really like this project. thank you for adding that functionality back.

danktankk commented 3 weeks ago

I noticed you have some newer files in your github, do you think the addition of manually adding devices will be available in the next month or two?

zkhcohen commented 2 weeks ago

I noticed you have some newer files in your github, do you think the addition of manually adding devices will be available in the next month or two?

I just added this feature here: #6

I threw this up on Docker Hub, as well. Use at your own risk.

zkhcohen/kasa-collector:latest

danktankk commented 2 weeks ago

I dont have much experience with influxdb_v2 and all the panels have to be changed to use it. thank s anyway

lux4rd0 commented 2 weeks ago

I'm looking at the PR and will let you know shortly. I kept the InfluxDB measurements the same, so the Grafana dashboards still work. You must adjust your Grafana InfluxDB datasource to include the Authorization token in the header.

danktankk commented 2 weeks ago

Thanks for having a look. I looked for a while to figure out how to use influxdb with influxdb2 but I dont have a clear path for it. I didnt upgrade from 1.8 to 2.x, so linking databases foor me does not seem to be something I can do unless i missed something. I have them running separately because I still have a lot of of v1 data and v1 dashboards. Any help is appreciated.