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

Tasmota driver #8

Open
flaviut opened this issue Jun 1, 2022 · 5 comments
Open

Tasmota driver #8

flaviut opened this issue Jun 1, 2022 · 5 comments

Comments

@flaviut
Copy link
Collaborator

flaviut commented Jun 1, 2022

Copied from #1 (comment)

Hello

I'm writing a driver for Berry's Emporia32. I read everything about the topic. I dumped the i2c bus. I reviewed cpp
and h files for ESPHome. Things are working out for me. But I have a few questions:

  1. What are the indications for "Power data" used for in the accounts?
  2. When I take the bytes of the data for "Current data" in the file "emporia_vue.cpp" it is commented that they are not multiplied by a factor, but the data I receive are: 69, 77, 82 ..... The reports are constantly floating up and down . The load I measure is 44W. In order to get the above statements true, I have to multiply by a coefficient: 0.0022. How do you consider the consumption if you do not apply a coefficient for the indication? If all goes well, I'll draw a Tasmota "C" driver.

Greetings Blagovest.

@flaviut
Copy link
Collaborator Author

flaviut commented Jun 1, 2022

Hey, it's cool to see other people working with this hardware too! I'd be happy to help out however I can.

What are the indications for "Power data" used for in the accounts?

The power readings published come from the power data section of the message. I'm not sure if there's any difference between:

  • multiplying voltage & current
  • using the power readings section of the message

At some point during development, there might have been some attempt to capture real vs. apparent power? I'm not really sure.

When I take the bytes of the data for "Current data" in the file "emporia_vue.cpp" it is commented that they are not multiplied by a factor,

Can you show me where you see that? Here is the latest version of that file: https://github.com/flaviut/esphome/blob/emporia-vue-2022.4.0/esphome/components/emporia_vue/emporia_vue.cpp

But that's right, you do need to do that multiplication. And 0.022 isn't always the right coefficient, the right coefficient depends on which clamps are attached to which phases, in a way I don't understand: #1 (comment)

I'm writing a driver for Berry's Emporia32

I'm not familiar with that, but if it's not a typo, I'd appreciate a link!

@BlagovestKambarev
Copy link

Thanks for the quick reply. I will be happy to help each other.

I'm not familiar with that, but if it's not a typo, I'd appreciate a link!

I apologize for what I wrote :)! But it came from rushing.
I wanted to say that I am writing a driver for Tasmota32 on Berry (console) for the device. And if all goes well
I will also write a "C" driver.

At some point during development, there might have been some attempt to capture real vs. apparent power? I'm not really sure.

I want to understand from the answer that this data is currently unnecessary. I can ignore them.

Can you show me where you see that? Here is the latest version of that file: https://github.com/flaviut/esphome/blob/emporia-vue-2022.4.0/esphome/components/emporia_vue/emporia_vue.cpp

We are talking about the data of the reports for "Current data" = "I".

if (this-> current_sensor_) {
uint16_t raw_current = sensor_reading.current [this-> input_port_];
// we don't know how this sensor is calibrated by the original firmware
this-> current_sensor _-> publish_state (raw_current);
}

You don't calibrate it at all, at least here.
So I ask how do you get the values for "I" in "Amperes" to calculate consumption?
I tested and determined that for my device I have to adjust it with a factor of 0.0022 to get the readings in amperes.
But also the values float a lot. Is that right with you?

@flaviut
Copy link
Collaborator Author

flaviut commented Jun 2, 2022

I wanted to say that I am writing a driver for Tasmota32 on Berry (console) for the device. And if all goes well
I will also write a "C" driver.

Ah, I see! I didn't know that Tasmota had Berry, that's very cool.

You don't calibrate it at all, at least here.

I see what you mean. I'm remembering more now.

This is not a sensor that I suggest people use. People have tried to make sense of the current reading, but have eventually just given up: https://gist.github.com/flaviut/93a1212c7b165c7674693a45ad52c512?permalink_comment_id=4062299#gistcomment-4062299

It exists in the code, but is not documented.

I want to understand from the answer that this data is currently unnecessary. I can ignore them.

For the above reason, I'd suggest the opposite conclusion.

Ignore the current readings, and just use the power readings.

I tested and determined that for my device I have to adjust it with a factor of 0.0022 to get the readings in amperes.
But also the values float a lot. Is that right with you?

I don't recall investigating how this works, so unfortunately I can't help here :(

If you experiment and figure it out, please share and I'll update my code.

@BlagovestKambarev
Copy link

Thanks for your time. I do not use in HA ESPHome. I'm using Tasmota for now. I will continue to test. Then I will share my result and everything. :)

@pkkrusty
Copy link

Any update on this? I haven't seen a native emporia driver come up in the Tasmota PRs, but did you get to a good point with the berry driver?

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

3 participants