cnstudio / Taipower-Bimonthly-Energy-Cost-homeassistant

Calculate Taipower (Taiwan Power Company) bi-monthly bill amount from kWh sensor on Home Assistant.
MIT License
66 stars 7 forks source link

[Question] Provide Monthly or Live Power Usage? #26

Open LunarstarPony opened 1 month ago

LunarstarPony commented 1 month ago

So I'm a little bit confused on this for some reason, what should I provide exactly?

Do I provide the live Energy data or? Currently I have a Total Energy, Total Power, and a Daily Energy that just combine ch1 and ch2. Do i need a New Sensor added on esphome for this? image

LunarstarPony commented 1 month ago

Tried to provide daily energy which doesn't seems to work since it will just reset back to 0 everyday, do I need a Specific Sensor that will reset itself every 2 month?

cnstudio commented 3 weeks ago

Sorry for feedback delay.

This program use "real time kWh" sensor, NOT the "normally accumulated kWh" sensor!

[Modified] In your case, you should follow document "Appendix II: How to convert from W to kWh", to convert your Ch1 or Ch2 "110V Power (W)" to "real time kWh" sensor, and use this real time kWh sensor as the program input. and follow "Appendix I" convert this kWh sensor to "Utility Meter" sensor as input sensor.

If you test and results are normal, then you can close this issue, or if about one week without any feedback, will close this issue also.

LunarstarPony commented 3 weeks ago

Everything seems to work correctly until I update to the latest version which doesn't seems to be providing value anymore?

LunarstarPony commented 3 weeks ago

image

Dis

LunarstarPony commented 3 weeks ago

This is after reconfigure the addon to remove old unavailable devices tho

cnstudio commented 3 weeks ago

Please try to uninstall, reboot Home Assistant and install (upgrade to v0.53.5) this program again?

LunarstarPony commented 3 weeks ago

Sadly it still provide nothing atm

cnstudio commented 3 weeks ago

May I know the status of below questions: 1) What HASS and HACS version you using now? 2) Did you setting input sensor and last bill start date (with setting UI)? 3) Remind input sensor must be "utility meter" sensor type, follow document "Appendix I" steps.

LunarstarPony commented 3 weeks ago

Core:2024.8.2 Supervisor: 2024.08.0 OS: 13.1 Frontend: 20240809.0 HACS 2.0.0 Everything should be the latest

Input Sensor is set yes

image image

I think this is correct maybe? Or did I did something wrong :v

LunarstarPony commented 3 weeks ago

image

cnstudio commented 3 weeks ago

First please upgrade to v0.53.7 for setup command repair. Then your sensor.bimonthly_energy is use the Appendix 1 step to convert to utility meter from your sensor.total_power?

LunarstarPony commented 3 weeks ago

So I should Convert the Wattage from my existing setup to kWh using Appendix 2 (sensor.total_power)first and then use the Appendix 1 to convert sensor.total_power into sensor.biomonthly_energy?

And Provide the sensor.biomonthly_energy to Taipower, Correct?

cnstudio commented 3 weeks ago

It's correct, and... If you wattage sensor is NOT update every second, than you can use normal kWh sensor (as your case is "CHx 110V Energy") for the utility meter input (Appendix 1), and use that utility meter as Taipower input (UI first row).

LunarstarPony commented 3 weeks ago

atm the 2 PZEM-004T is set to update every 6 second, I could probably decrease that?

cnstudio commented 3 weeks ago

Hmm... PZEM... so you coding ESPHOME program by yourself? :) If you can adjust that, I suggest you tune the wattage update time to every second for better accuracy and better automation control (like you can use wattage to judge air conditioner is running or stop than to trigger some other things).

But I think 5~6 seconds is meet "minimum requirements".

LunarstarPony commented 3 weeks ago

`

web_server:

port: 80

captive_portal: uart:

modbus:

time:

switch:

binary_sensor:

sensor:

Yeah I just change it to 1s here's the currect ESPHome Config xd

cnstudio commented 3 weeks ago

Ha, that's great! then you will got very accurate results. :)

LunarstarPony commented 3 weeks ago

I'll give it a go c: