Giter VIP home page Giter VIP logo

powermonitor's Introduction

Welcome! โšก Key Projects

  • Build-OpenSSL-cURL - Build OpenSSL, nghttp2 and curl for MacOS (Intel & Apple Silicon), iOS and tvOS.
  • TinyTuya - Python PyPI module to interface with Tuya WiFi smart devices.
  • Powerwall-Dashboard - Dashboard for local monitoring of Tesla Powerwall using Grafana.
  • pyPowerwall - Python PyPI module to interface with Tesla Energy Powerwall Gateways.
  • TM1637TinyDisplay - Arduino library to display numbers and text on 4 and 6 digit 7-segment TM1637 display modules.
  • TinyStepper - Arduino library to drive stepper motors. Simple, small and easy to use.
  • Ender3-Filament-Digital-Scale - Digital filament scale for Creality Ender-3 3D Printer.
  • TinySplunk - Tools and instructions to build and use a free version of Splunk for home.
  • ATtiny85-Weather-Station - ATtiny85 based digital weather station for temp, humidity and pressure.
  • OpenGL-LIDAR-Display - Display realtime LIDAR point cloud data from Slamtec RPLIDAR via OpenGL.
  • GridBug - Simple visualization to show network connectivity between multiple nodes.
  • TinyLLM - Setup and run a local LLM and Chatbot using consumer grade hardware.

๐Ÿ’ฌ @jasonacox | ๐ŸŒŽ jasonacox.com | ๐Ÿ”— LinkedIn

powermonitor's People

Contributors

codeclinic avatar dotmaster avatar jasonacox avatar xinyic avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

powermonitor's Issues

Turns off switch?

Some users report some plugs turns off randomly after using plugpower.py to poll for power data. See: https://community.home-assistant.io/t/tuya-power-consumption-integration/106839/2

I have not been able to reproduce this. In order to change state on a device you need to send a valid KEY. The key in the plugpower.py script is a random/bogus key to prevent any state change on the device.

I updated the pytuya library in jasonacox/powermonitor to the latest version and also added PLUGKEY as a user defined environmental value if you need to change it. If you are seeing this behavior, I recommend pulling the latest and trying again. Please let me know your result.

unexpected status()

I have a plug which is joined to my tuya app on my iPhone and the device is being seen in Home Assistant. I wish to monitor power as well.

I grabbed the device ID and IP address and tried to run this script but am getting an error:

Polling Device ebf8372483a88daab4ckmy at 10.211.2.137 with key 0123456789abcde1 and protocol version 3.1
Unexpected status() payload=b'\xf1b\xe6\x13^\xcdc\xc3\x8f\xf4\xab\xfa\tB\xc7\xbb\xefxU\xd9g.,\xd2\xc6\xd8\xfc\xb3@A\x17%'
Dictionary b'\xf1b\xe6\x13^\xcdc\xc3\x8f\xf4\xab\xfa\tB\xc7\xbb\xefxU\xd9g.,\xd2\xc6\xd8\xfc\xb3@A\x17%'
Unexpected status() payload=b'\xf1b\xe6\x13^\xcdc\xc3\x8f\xf4\xab\xfa\tB\xc7\xbb\xefxU\xd9g.,\xd2\xc6\xd8\xfc\xb3@A\x17%'
Dictionary b'\xf1b\xe6\x13^\xcdc\xc3\x8f\xf4\xab\xfa\tB\xc7\xbb\xefxU\xd9g.,\xd2\xc6\xd8\xfc\xb3@A\x17%'

Please advise.

Doesn't work with these Tuya smart sockets

Both docker and native options didn't yield any information for me for this product:
https://www.aliexpress.com/item/32975898978.html?spm=a2g0s.9042311.0.0.27424c4dtPBf8A

My output is as follows:

PS C:\Users\...\Desktop\powermonitor-master> docker run -t -e PLUGID='44563025d8f15bc2f8b6' -e PLUGIP="<Device's Local IP Address>" jasonacox/powermonitor
Polling Device 44563025d8f15bc2f8b6 at <Device's Local IP Address> with key 0123456789abcdef
Unexpected status() payload=b''
Dictionary b''
Unexpected status() payload=b''
Dictionary b''
Unexpected status() payload=b''
Dictionary b''
ERROR: No response from plug 44563025d8f15bc2f8b6 [<Device's Local IP Address>].

I tried with my Global IP Address as well just to make sure I did not misunderstand and that's what the script expects:

PS C:\Users\...\Desktop\powermonitor-master> docker run -t -e PLUGID='44563025d8f15bc2f8b6' -e PLUGIP="<My Global IP Address>" jasonacox/powermonitor
Polling Device 44563025d8f15bc2f8b6 at <My GlobalIP Address> with key 0123456789abcdef
ERROR: No response from plug 44563025d8f15bc2f8b6 [<My Global IP Address>].

Docker Raspberry4

No work over docker in RPi4
Status: Downloaded newer image for jasonacox/powermonitor:latest standard_init_linux.go:211: exec user process caused "exec format error"
`docker version
Client: Docker Engine - Community
Version: 19.03.13
API version: 1.40
Go version: go1.13.15
Git commit: 4484c46
Built: Wed Sep 16 17:07:02 2020
OS/Arch: linux/arm
Experimental: false

Server: Docker Engine - Community
Engine:
Version: 19.03.13
API version: 1.40 (minimum version 1.12)
Go version: go1.13.15
Git commit: 4484c46
Built: Wed Sep 16 17:00:52 2020
OS/Arch: linux/arm
Experimental: false
containerd:
Version: 1.3.7
GitCommit: 8fba4e9a7d01810a393d5d25a3621dc101981175
runc:
Version: 1.0.0-rc10
GitCommit: dc9208a3303feef5b3839f4323d9beb36df0a9dd
docker-init:
Version: 0.18.0
GitCommit: fec3683`

Can it be integrated in Home Assistant?

Perhaps dockerized and/or as an alternative to the current Home Assistant Tuya integration: https://www.home-assistant.io/components/tuya/

This integration works good, obviously, but it misses the power metering feature and I believe your project can improve this integration a lot!

I bought some of these plugs and after discovering the firmware is locked and can't be tuya-flashed, I tried to use the integration above thinking that it would have worked anyway even if without MQTT.
Then I saw that also the power metering wasn't there.

Thank you

PyPi Release Version

Hi Jason,

I'm thinking that this library would be a lot more useful if people could find it on PyPi as this would make it easier to install but also mean it could be used directly in Home assistant and probably other system without the need for the user to install/setup.

I'm just glancing at the process and I've already noticed that it would require removing all "print" statements and removing the dockerfile. So, I'm just wondering if you have any thoughts on the best way to proceed. The last thing I want to do is just fork this and create a separate PyPi version without seeing if you have any preferences/ideas on the best way to go.

Request KWh reading

Thanks. Work great. Is it possible to add KWh? It will be great to capture total power used over time. Thanks.

did not work on Gosung SP1 v2.4

after the first run with docker i got this messages:

9b5ca1b7ed17: Pull complete Digest: sha256:a9c34fdb540a2d042197028cf3886123b7cc5e517359f4f6844b7275d78e122c Status: Downloaded newer image for jasonacox/powermonitor:latest ERROR:pytuya:Unexpected status() payload=b'3.3\x00\x00\x00\x00\x00\x00\x00\x0f\x00\x00\x00\x01\x19\xf9\xa2\x17%\xe6\xfek\xe8v-\x11\x86\x04@\xb5K\x866\x19\x97Oce\x8b+x\x88\xd6\x187\x8cI\xa7\x15(\x86/\xd0L\xc54\xf8\x92N+#z\xdf2V\xfea\xb4\x82n\x9f"\xea%\xc4\xd6\x89\x1din8\xfb\x8d\x0b\x92G\x93\xb3\xadq\x1f\xa3\x11l' ERROR:pytuya:Unexpected status() payload=b'3.3\x00\x00\x00\x00\x00\x00\x00\x10\x00\x00\x00\x01\x19\xf9\xa2\x17%\xe6\xfek\xe8v-\x11\x86\x04@\xb5K\x866\x19\x97Oce\x8b+x\x88\xd6\x187\x8c>(\x97\xf7\xbb1\x9d\x81\xb8\x96\xafb\xc7[\xec\xca3\x1a\xd2\xadN\xbe\xbf\x82\xf5\xfc-\xc4\x1a\xa1\xc1\x1fin8\xfb\x8d\x0b\x92G\x93\xb3\xadq\x1f\xa3\x11l' Polling Device 60020372840d8e6fa9d2 at 192.168.2.38 Dictionary b'3.3\x00\x00\x00\x00\x00\x00\x00\x0f\x00\x00\x00\x01\x19\xf9\xa2\x17%\xe6\xfek\xe8v-\x11\x86\x04@\xb5K\x866\x19\x97Oce\x8b+x\x88\xd6\x187\x8cI\xa7\x15(\x86/\xd0L\xc54\xf8\x92N+#z\xdf2V\xfea\xb4\x82n\x9f"\xea%\xc4\xd6\x89\x1din8\xfb\x8d\x0b\x92G\x93\xb3\xadq\x1f\xa3\x11l' Dictionary b'3.3\x00\x00\x00\x00\x00\x00\x00\x10\x00\x00\x00\x01\x19\xf9\xa2\x17%\xe6\xfek\xe8v-\x11\x86\x04@\xb5K\x866\x19\x97Oce\x8b+x\x88\xd6\x187\x8c>(\x97\xf7\xbb1\x9d\x81\xb8\x96\xafb\xc7[\xec\xca3\x1a\xd2\xadN\xbe\xbf\x82\xf5\xfc-\xc4\x1a\xa1\xc1\x1fin8\xfb\x8d\x0b\x92G\x93\xb3\xadq\x1f\xa3\x11l' ERROR: No response from plug 60020372840d8e6fa9d2 [192.168.2.38].

after that, i got no message from the script. testet on a synology docker and a raspi4 in python.
greetz Stefan
Gosung SP1 v2.4 arendst/Tasmota#5323

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.