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

Sonoff power and library HLW8012 #178

Open
oremic opened this issue Feb 28, 2019 · 11 comments
Open

Sonoff power and library HLW8012 #178

oremic opened this issue Feb 28, 2019 · 11 comments

Comments

@oremic
Copy link

oremic commented Feb 28, 2019

hi.
There are ways to have the HLW8012 library to get the EVE power meter via apple homekit. for th10 and th16
thank you

@maximkulkin
Copy link
Owner

Ok, I guess this is a question, not a statement and it's about supporting power measurement on some Sonoff models (a good writeup by author of HLW8012 library for ESP8266 on ArduinoCore).
Although I couldn't find evidence that HLW8012 is installed on Sonoff TH10/TH16 models.

I checked the library and I think it can be easily ported to esp-open-rtos: you just need to replace digitalWrite() and always use interrupts instead of doing busy waiting counting pulse width in pulseIn() function.

As of Elgato EVE support for exposing that data, here is reverse engineered list of EVE custom characteristics.

@oremic
Copy link
Author

oremic commented Feb 28, 2019

Hello
There was a question.
It would be really nice to have consumption, for sonoffs.
Eve allows to have a series of information on consumption.
I could test it if you can make a port.
thank you.

@seritos
Copy link

seritos commented Sep 4, 2019

Hi @maximkulkin,

Many devices now have integrated this power meter. In example, the cost effective Houzetek AW7PL has the HWL8012 and the device is apparently great, as has several GPIOS free to add it aditional functionalities.

Would be possible to integrate it?

Many thanks!

@HomeKidd
Copy link

HomeKidd commented Nov 29, 2019

@maximkulkin I'm also interested in HWL8012 library for esp-open-rtos 😄

Also keep in mind that HWL8012 needs to be calibrated for proper measurements. 😄

@Kristian8606
Copy link

As Maximkulkin said, this library will be easily modified. The question is, did anyone manage to create custom features? @maximkulkin would you build these features for us users?

@HomeKidd
Copy link

Yes, i have but without the Eve characteristics and HomeKit data type it will not work. HomeKit data type is added to esp-homekit, but its not that easy to work with like an int/float based characteristic like Temp Sensor etc.😄 But i'm still working on it 😄

@Kristian8606
Copy link

Can you share the code? I think maximkulkin added the data type.

@HomeKidd
Copy link

HLW8012_BL0937_ESP-master.zip
As i've said, data type is added because i've requested it but currently on static data is working. But its way more complicated since other types......i'm working on this since december

@Kristian8606
Copy link

In another post you mentioned that you were able to show the story, can you share code?

@HomeKidd
Copy link

In another post you mentioned that you were able to show the story, can you share code?

I was not able to show any history with esp-homekit, only with HomeKit Accessory Simulator and only one time. So theres no code currently!

@maccoylton
Copy link

I already did a port.. it's here:- https://github.com/maccoylton/HLW8012_BL0937_ESP
Example of a device using it it here:- https://github.com/maccoylton/esp-homekit-gosund-up111

Feedback welcome

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants