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

Enable energy tracking #139

Open
3 tasks done
yeppus opened this issue Jan 25, 2025 · 17 comments
Open
3 tasks done

Enable energy tracking #139

yeppus opened this issue Jan 25, 2025 · 17 comments

Comments

@yeppus
Copy link

yeppus commented Jan 25, 2025

Checklist

  • I have filled out the template to the best of my ability.
  • This only contains 1 feature request (if you have multiple feature requests, open one feature request for each feature request).
  • This issue is not a duplicate feature request of previous feature requests.

Is your feature request related to a problem? Please describe.

I would like to be able to follow energy usage of the spa in home assistant together with other high consumption devices

Describe the solution you'd like

A meter showing the amount of kWh used by the hot tub heater.

Describe alternatives you've considered

  1. Just a toggle showing if the heater is currently on or not so I can setup my own generic sensor based on this
  2. A config option where I can input the W used by the heater so that the library can show the W used on a sensor continuously
  3. The library itself showing the kWh used

Additional context

Since the hot tub is a large consumer of energy it would make sense to be able to separate the energy tracking from the daily usage, just as with EV chargers and heating systems.

@mwerkmeister
Copy link

mwerkmeister commented Jan 25, 2025

You should also consider the energy used by the blower and other components.

But in my opinion it is already possible, I have a powercalc sensor for ever single component and one combined to see the overall power usage.

The only thing is, when using a external heatingpump the real usage is a bit delayed, but it's only 1-2 min. So not a big issue.
With the internal heating there should be no delay between the heater status and the real consumption.

image

image

image

image

The 200w in idle are because of the the circulation pump that is not shown in the overview.

For the heater I have a state based povercalc sensor:

image

@JustinGrote
Copy link

Does the gecko API have a value for voltage/amperage usage (which you could calculate actual KVa from) or are we just going off on/off for the heater and going based on time for that?

I'm suspicious about whether my 208v 50a is actually running at 50a all the time, but I don't want to leave a multimeter hooked up to it for long term amperage monitoring (dangerous).

@mwerkmeister
Copy link

Does the gecko API have a value for voltage/amperage usage (which you could calculate actual KVa from) or are we just going off on/off for the heater and going based on time for that?

I'm suspicious about whether my 208v 50a is actually running at 50a all the time, but I don't want to leave a multimeter hooked up to it for long term amperage monitoring (dangerous).

I don't know, my implementation is only based on the sensor state + measured usage in a short time, so it is not 100% exact.

@gazoodle
Copy link
Owner

gazoodle commented Feb 6, 2025

Nice ideas! For now, I'll put a binary sensor for "Heating" mode while I think about the best way to provide energy usage/consumption data.

@JustinGrote
Copy link

All good, I'd be surprised if it's in the public API but I bet it has somewhere that there's a metric tracking the current amperage (to detect faults), so I figured it was worth asking.

@JustinGrote
Copy link

I didn't realize this repo doesn't actually contain the implementation, that's in geckolib, I filed an issue over there.
gazoodle/geckolib#59

@JustinGrote
Copy link

Looks like at least for the in.yj there's some current metrics available.
https://github.com/gazoodle/geckolib/blob/e561711495a3b0f10ac619365743d8343759bc64/src/geckolib/driver/packs/inyj-cfg-54.py#L405-L407

@gazoodle
Copy link
Owner

gazoodle commented Feb 6, 2025

That's a constant for the max current available to the spa.

It is used so that the spa won't do daft things and trip the breaker. For example, on a single phase tub when set to say 16A, the pack will normally refuse to run the heater and any of the high current pumps at the same time. On my spa which I've wired 3-phase with a 16A 3-phase breaker it is quite happy to run everything at the same time.

We need to find out what your setting is, but it won't help with current usage. Also, 50A would be a 12kW heater which I don't think they do. I've seen them up to about 3.8kW which would draw 16A.

@gazoodle
Copy link
Owner

gazoodle commented Feb 6, 2025

From my experience, the control pack doesn't implement any PWM on the heater, it's just driven by a big heatsunk triac (they have a temperature output for this in the declaration sometimes). What this means is that once we find out what rating the heater is we can do a simple calculation from the "heater is on" sensor anyway. I'm thinking of adding a set of configuration inputs for power settings of the heater and other accessories which the integration can then do simple arithmetic on to produce an estimate of the output power consumption. Would this work for you guys?

@JustinGrote
Copy link

Sounds reasonable, I can always implement that myself but it'd be handy as an additional sensor. I'm going to get a CT clamp sensor and see if I can verify the draw that way as well.

@mwerkmeister
Copy link

From my experience, the control pack doesn't implement any PWM on the heater, it's just driven by a big heatsunk triac (they have a temperature output for this in the declaration sometimes). What this means is that once we find out what rating the heater is we can do a simple calculation from the "heater is on" sensor anyway. I'm thinking of adding a set of configuration inputs for power settings of the heater and other accessories which the integration can then do simple arithmetic on to produce an estimate of the output power consumption. Would this work for you guys?

Keep the external heating source in mind.

@gazoodle
Copy link
Owner

gazoodle commented Feb 7, 2025

@mwerkmeister Would be useful to know if the "Heating" binary sensor gets enabled when the Heat Pump is set to "Eco Heat" and the spa needs to heat up.

@gazoodle
Copy link
Owner

gazoodle commented Feb 7, 2025

Actually, there seem to be two accessors 'LogStructure/DeviceStatus/MSTR_HEATER': 'OFF' 'LogStructure/DeviceStatus/SLV_HEATER': 'OFF' that might help us. I'm going to assume that MSTR heater is the internal electrical one and that SLV is the heat pump or InGrid control unit.

@karlg100
Copy link

karlg100 commented Feb 10, 2025

IMHO - if you want to know your energy consumption, get a main panel energy monitor. I have one for my panel, and the spa circuit is monitored independently.

I have an Emporia v2, and it's very accurate.

image

@JustinGrote
Copy link

Yeah I didn't realize CT clamps could measure current, for some dumb reason I thought they did voltage. I'm getting a cheapo Smart Life one for $20 to test with, I can put one on the main and one on the tub circuit. Good discussion all!

@karlg100
Copy link

because the spa pack doesn't have any way to directly provide current, that's the best and most accurate approach. My emporia gets my bill estimate to within ~$5 each month for the whole house. (plus if you integrate it with home assistant, you can have it calculate cost per circuit and track in your Energy panel. aka, your hot tub cost $xx today/this week/this month, etc)

As a side note, there is a current setting you can tweak on the spa pack depending on the size of the circuit you have installed, however, all this seems to do is make sure that too many accessories aren't running concurrently to trip the breaker.

The spa pack has a current setting for each accessory for which you can tweak as you add/remove/upgrade accessories.

So if you had a blower, heater, two pumps on a 20 amp circuit, it would prevent too many from running at once (or perhaps prioritize the pumps over the heat if that would exceed the current limitations of the main circuit)

@mwerkmeister
Copy link

@mwerkmeister Would be useful to know if the "Heating" binary sensor gets enabled when the Heat Pump is set to "Eco Heat" and the spa needs to heat up.

It is not enabled.

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

5 participants