homeassistant-powercalc icon indicating copy to clipboard operation
homeassistant-powercalc copied to clipboard

Add files via upload - Apple HomePod Gen 2

Open laplacacm opened this issue 1 year ago • 16 comments

Device information

This is an Apple HomePod Gen 2 as a smart speaker

Home Assistant Device information

Device info HomePod (gen 2) by Apple Firmware: 17.2

Checklist

  • [ x] I have created a single PR per device. When you have multiple submissions please create separate PR's.
  • [ ] For lights - I have only included the gzipped files (*.gz), not the raw CSV files.
  • [ ] For lights - I have provided a CSV file per supported color mode. Look that up in Developer Tools -> States

Additional info

laplacacm avatar Jan 05 '24 02:01 laplacacm

Quality Gate Passed Quality Gate passed

Kudos, no new issues were introduced!

0 New issues
0 Security Hotspots
No data about Coverage
No data about Duplication

See analysis details on SonarCloud

sonarqubecloud[bot] avatar Jan 05 '24 02:01 sonarqubecloud[bot]

I tried to create a second Pull Request for the Amazon Echo Show 5. However, it looks to have linked to Pull Request for the Apple HomePod Gen 2 PR. I am not sure if I did this correct or not. This has two new folders. One for the HomePod Gen 2 and one for the Amazon Echo Show 5. If you need me to change it somehow, please let me know.

laplacacm avatar Jan 05 '24 02:01 laplacacm

This is from the Device Info in Home Assistant for the Amazon Echo Show 5

Device info KNIGHT A4ZP7ZC4PI6TO by Amazon Connected via [Master Bedroom Echo Show] Firmware: 9698496644

laplacacm avatar Jan 05 '24 02:01 laplacacm

No big deals there 2 profiles are in one PR. Just leave it like this now.

To create multiple PR's you should create a new branch first, and create the PR from that branch. Any commits you do to that particular branch will update the corresponding PR. When you start working on a new profile you switch to master branch and create a new branch from that again and start working on that.

About this PR. Unfortunately, the measurements do not look good to me. Normally (as also seen on the other speaker profiles) the power consumption will be climbing each time the volume increases by 10. Also the standby_power should be way lower. Somewhere between 0 and 2 watts. In your submitted profiles the power consumptions are varying a bit, but all in approximately the same range regardless of volume level and "off", standby power.

The apple is around 5.5W And the Amazon around 3.1W

This is an example how it should look like: https://github.com/bramstroker/homeassistant-powercalc/blob/master/custom_components/powercalc/data/amazon/B7W64E/model.json

I am unsure what causes this, but I highly doubt these figures are correct. You are sure you selected the correct shelly plug which actually has the correct speaker connected? Could you take some manual measurements when the speaker is off, and also when the speaker is at 50% volume for example?

bramstroker avatar Jan 06 '24 14:01 bramstroker

You are absolutely right. These numbers are not correct. I just redid everything to confirm that it is the right plug. It is the right Shelly Plug but what's happening is weird. Maybe you will have some insight into this. When I run the script, it sends the noise to the speaker and I watch the shelly app Wattage go up. Then the noise stops, and then the script records the 8 values after the noise is off. It then increases the volume and the noise goes for another 20 seconds (no values are recorded when the noise is on.) Then again, when the noise is off, it records the 8 values and repeats. Do you have any idea on why it would be going this way? Could it be a setting in my .env file?

This is the terminal output: 2024-01-06 21:58:51,752 [INFO] Setting volume to 10 2024-01-06 21:58:51,860 [INFO] Start streaming noise 2024-01-06 21:59:26,568 [INFO] Measuring average power for 20 seconds 2024-01-06 21:59:26,702 [INFO] Measured power: 7.40 2024-01-06 21:59:29,791 [INFO] Measured power: 6.80 2024-01-06 21:59:33,200 [INFO] Measured power: 6.90 2024-01-06 21:59:36,417 [INFO] Measured power: 6.70 2024-01-06 21:59:39,499 [INFO] Measured power: 7.20 2024-01-06 21:59:42,549 [INFO] Measured power: 6.70 2024-01-06 21:59:45,618 [INFO] Measured power: 6.70 2024-01-06 21:59:48,619 [INFO] Average power: 6.91 2024-01-06 21:59:48,619 [INFO] Setting volume to 20 2024-01-06 21:59:48,685 [INFO] Start streaming noise 2024-01-06 22:00:22,776 [INFO] Measuring average power for 20 seconds 2024-01-06 22:00:22,852 [INFO] Measured power: 6.70 2024-01-06 22:00:25,935 [INFO] Measured power: 6.60 2024-01-06 22:00:29,017 [INFO] Measured power: 6.60 2024-01-06 22:00:32,116 [INFO] Measured power: 6.60 2024-01-06 22:00:35,250 [INFO] Measured power: 6.50 2024-01-06 22:00:38,442 [INFO] Measured power: 6.50 2024-01-06 22:00:41,631 [INFO] Measured power: 6.50 2024-01-06 22:00:44,632 [INFO] Average power: 6.57 2024-01-06 22:00:44,633 [INFO] Setting volume to 30 2024-01-06 22:00:44,710 [INFO] Start streaming noise 2024-01-06 22:01:18,803 [INFO] Measuring average power for 20 seconds 2024-01-06 22:01:18,930 [INFO] Measured power: 6.60 2024-01-06 22:01:22,008 [INFO] Measured power: 6.50 2024-01-06 22:01:25,075 [INFO] Measured power: 6.60 2024-01-06 22:01:28,249 [INFO] Measured power: 6.60 2024-01-06 22:01:31,317 [INFO] Measured power: 6.60 2024-01-06 22:01:34,458 [INFO] Measured power: 6.50 2024-01-06 22:01:37,632 [INFO] Measured power: 6.60 2024-01-06 22:01:40,633 [INFO] Average power: 6.57 2024-01-06 22:01:40,634 [INFO] Setting volume to 40 2024-01-06 22:01:40,719 [INFO] Start streaming noise 2024-01-06 22:02:14,844 [INFO] Measuring average power for 20 seconds 2024-01-06 22:02:15,014 [INFO] Measured power: 6.70 2024-01-06 22:02:18,075 [INFO] Measured power: 6.70 2024-01-06 22:02:21,139 [INFO] Measured power: 6.50 2024-01-06 22:02:24,420 [INFO] Measured power: 6.60 2024-01-06 22:02:27,630 [INFO] Measured power: 6.50 2024-01-06 22:02:30,716 [INFO] Measured power: 6.50 2024-01-06 22:02:33,770 [INFO] Measured power: 6.60 2024-01-06 22:02:36,771 [INFO] Average power: 6.59 2024-01-06 22:02:36,771 [INFO] Setting volume to 50 2024-01-06 22:02:36,832 [INFO] Start streaming noise 2024-01-06 22:03:11,326 [INFO] Measuring average power for 20 seconds 2024-01-06 22:03:11,427 [INFO] Measured power: 6.70 2024-01-06 22:03:14,506 [INFO] Measured power: 6.50 2024-01-06 22:03:17,678 [INFO] Measured power: 6.70 2024-01-06 22:03:20,772 [INFO] Measured power: 6.60 2024-01-06 22:03:23,823 [INFO] Measured power: 6.50 2024-01-06 22:03:26,912 [INFO] Measured power: 6.60 2024-01-06 22:03:30,369 [INFO] Measured power: 6.60 2024-01-06 22:03:33,370 [INFO] Average power: 6.6

This is my .env file settings:

# Set the power meter to use (hass, shelly, tuya, kasa, manual, tasmota)
POWER_METER=shelly

# Set the light controller to use (hass, hue)
LIGHT_CONTROLLER=hass

# Set the media controller to use (for measuring smart speakers).
MEDIA_CONTROLLER=hass

# Set the log level (CRITICAL, ERROR, WARNING, INFO, DEBUG)
LOG_LEVEL=INFO

# time between changing the light params and taking the measurement
SLEEP_TIME=3

# time between taking multiple samples for the same light setting
SLEEP_TIME_SAMPLE=3

# additional time to wait for each significant change in hue
SLEEP_TIME_HUE=2 

# additional time to wait for each significant change in saturation
SLEEP_TIME_SAT=2

# additional time to wait for each significant change in color temperature
SLEEP_TIME_CT=1

# Set to a value higher than 1 to take multiple samples to reduce noise
SAMPLE_COUNT=2

# Power Meter Nudging configuration (Useful if PM doesn't report a new reading if readings are unchanged)
# How many times should nudging the Power Meter be attempted?
MAX_NUDGES=0
# When Nudging, how long to hold the non-desired state for?
PULSE_TIME_NUDGE=2
# How long to wait for the Power Meter to settle on the desired measurement after nudging
SLEEP_NUDGE=10

# Brightness level (range 1-255) to start the measurements with.
# Some lights are turned off at 1 so you might need to increase this. Set this at the lowest level at which the light actually turns on
MIN_BRIGHTNESS=1

# Precision for the HS mode loop. You can increase it up to 4 to improve the precision
# of the profile by taking more measurements
HS_BRI_PRECISION=1.0
HS_HUE_PRECISION=1.0
HS_SAT_PRECISION=1.0

# Shelly
SHELLY_IP=10.35.1.244
SHELLY_TIMEOUT=60

# Tuya
TUYA_DEVICE_ID=aaaaaaaaad89682385bbb
TUYA_DEVICE_IP=x.x.x.x
TUYA_DEVICE_KEY=aaaaaaaae1b8abb
TUYA_DEVICE_VERSION=3.3

# Hue
HUE_BRIDGE_IP=x.x.x.x

# Home assistant
HASS_URL=(**url removed**)
HASS_TOKEN=(**token removed**)
# Set to true when you want to call update_entity service before requesting a power value. 
# This can help when your power sensor does not update frequently enough
HASS_CALL_UPDATE_ENTITY_SERVICE=false

# Tasmota
TASMOTA_DEVICE_IP=x.x.x.x

# Kasa
KASA_DEVICE_IP=x.x.x.x

# Predefine answers to questions
# COLOR_MODE=color_temp
# GENERATE_MODEL_JSON=true
# GZIP=true
# MULTIPLE_LIGHTS=false
# LIGHT_ENTITY_ID=xx
MEASURE_DEVICE=Shelly Plus Plug US
# NUM_LIGHTS=1
# LIGHT_MODEL_ID=xx
# MODEL_NAME=xx
# DUMMY_LOAD=true
POWERMETER_ENTITY_ID=sensor.family_room_tester_power
# RESUME=true

laplacacm avatar Jan 06 '24 22:01 laplacacm

That explains some things why the correct power is not measured. There should be 2 seconds between streaming the noise and the average measurements loop, but in your case it's more than 30 seconds. Could you try with MEDIA_CONTROLLER=dummy? That will not actually stream something, but then we can see if the time is will +30 seconds for you.

bramstroker avatar Jan 07 '24 08:01 bramstroker

changing MEDIA_CONTROLLER to dummy did bring it back to only 2 seconds from streaming the noise to the average measurements starting. Here is the output for all volume percentages. Obviously the values aren't correct, but the timing looks better. Is there anything I can do to get this corrected? Should I take manual measurements?

2024-01-07 18:11:38,426 [INFO] Setting volume to 10 2024-01-07 18:11:38,428 [INFO] Start streaming noise 2024-01-07 18:11:40,429 [INFO] Measuring average power for 20 seconds 2024-01-07 18:11:40,791 [INFO] Measured power: 1.10 2024-01-07 18:11:44,761 [INFO] Measured power: 1.10 2024-01-07 18:11:48,368 [INFO] Measured power: 1.10 2024-01-07 18:11:51,473 [INFO] Measured power: 1.10 2024-01-07 18:11:55,381 [INFO] Measured power: 1.10 2024-01-07 18:11:58,518 [INFO] Measured power: 1.20 2024-01-07 18:12:01,519 [INFO] Average power: 1.12 2024-01-07 18:12:01,519 [INFO] Setting volume to 20 2024-01-07 18:12:01,520 [INFO] Start streaming noise 2024-01-07 18:12:03,521 [INFO] Measuring average power for 20 seconds 2024-01-07 18:12:03,767 [INFO] Measured power: 1.10 2024-01-07 18:12:06,833 [INFO] Measured power: 1.10 2024-01-07 18:12:09,929 [INFO] Measured power: 1.10 2024-01-07 18:12:13,050 [INFO] Measured power: 1.10 2024-01-07 18:12:16,109 [INFO] Measured power: 1.10 2024-01-07 18:12:19,629 [INFO] Measured power: 1.20 2024-01-07 18:12:22,702 [INFO] Measured power: 1.10 2024-01-07 18:12:25,703 [INFO] Average power: 1.11 2024-01-07 18:12:25,703 [INFO] Setting volume to 30 2024-01-07 18:12:25,703 [INFO] Start streaming noise 2024-01-07 18:12:27,704 [INFO] Measuring average power for 20 seconds 2024-01-07 18:12:27,784 [INFO] Measured power: 1.10 2024-01-07 18:12:30,862 [INFO] Measured power: 1.10 2024-01-07 18:12:33,923 [INFO] Measured power: 1.20 2024-01-07 18:12:36,996 [INFO] Measured power: 1.10 2024-01-07 18:12:40,085 [INFO] Measured power: 1.10 2024-01-07 18:12:43,157 [INFO] Measured power: 1.10 2024-01-07 18:12:46,209 [INFO] Measured power: 1.10 2024-01-07 18:12:49,210 [INFO] Average power: 1.11 2024-01-07 18:12:49,210 [INFO] Setting volume to 40 2024-01-07 18:12:49,210 [INFO] Start streaming noise 2024-01-07 18:12:51,211 [INFO] Measuring average power for 20 seconds 2024-01-07 18:12:51,375 [INFO] Measured power: 1.10 2024-01-07 18:12:54,450 [INFO] Measured power: 1.20 2024-01-07 18:12:57,594 [INFO] Measured power: 1.20 2024-01-07 18:13:00,758 [INFO] Measured power: 1.20 2024-01-07 18:13:03,856 [INFO] Measured power: 1.10 2024-01-07 18:13:06,945 [INFO] Measured power: 1.10 2024-01-07 18:13:10,015 [INFO] Measured power: 1.20 2024-01-07 18:13:13,016 [INFO] Average power: 1.16 2024-01-07 18:13:13,017 [INFO] Setting volume to 50 2024-01-07 18:13:13,017 [INFO] Start streaming noise 2024-01-07 18:13:15,019 [INFO] Measuring average power for 20 seconds 2024-01-07 18:13:15,091 [INFO] Measured power: 1.10 2024-01-07 18:13:18,163 [INFO] Measured power: 1.10 2024-01-07 18:13:21,234 [INFO] Measured power: 1.10 2024-01-07 18:13:24,309 [INFO] Measured power: 1.20 2024-01-07 18:13:27,392 [INFO] Measured power: 1.10 2024-01-07 18:13:30,478 [INFO] Measured power: 1.10 2024-01-07 18:13:33,565 [INFO] Measured power: 1.10 2024-01-07 18:13:36,565 [INFO] Average power: 1.11 2024-01-07 18:13:36,566 [INFO] Setting volume to 60 2024-01-07 18:13:36,567 [INFO] Start streaming noise 2024-01-07 18:13:38,568 [INFO] Measuring average power for 20 seconds 2024-01-07 18:13:38,749 [INFO] Measured power: 1.10 2024-01-07 18:13:41,830 [INFO] Measured power: 1.10 2024-01-07 18:13:44,909 [INFO] Measured power: 1.10 2024-01-07 18:13:48,147 [INFO] Measured power: 1.10 2024-01-07 18:13:51,243 [INFO] Measured power: 1.10 2024-01-07 18:13:54,323 [INFO] Measured power: 1.10 2024-01-07 18:13:57,423 [INFO] Measured power: 1.00 2024-01-07 18:14:00,424 [INFO] Average power: 1.09 2024-01-07 18:14:00,425 [INFO] Setting volume to 70 2024-01-07 18:14:00,426 [INFO] Start streaming noise 2024-01-07 18:14:02,427 [INFO] Measuring average power for 20 seconds 2024-01-07 18:14:02,556 [INFO] Measured power: 1.10 2024-01-07 18:14:05,682 [INFO] Measured power: 1.10 2024-01-07 18:14:08,753 [INFO] Measured power: 1.10 2024-01-07 18:14:12,174 [INFO] Measured power: 1.10 2024-01-07 18:14:16,407 [INFO] Measured power: 1.10 2024-01-07 18:14:22,138 [INFO] Measured power: 1.10 2024-01-07 18:14:25,139 [INFO] Average power: 1.1 2024-01-07 18:14:25,140 [INFO] Setting volume to 80 2024-01-07 18:14:25,140 [INFO] Start streaming noise 2024-01-07 18:14:27,141 [INFO] Measuring average power for 20 seconds 2024-01-07 18:14:28,273 [INFO] Measured power: 1.10 2024-01-07 18:14:38,042 [INFO] Measured power: 1.10 2024-01-07 18:14:57,501 [INFO] Measured power: 1.10 2024-01-07 18:15:00,502 [INFO] Average power: 1.1 2024-01-07 18:15:00,502 [INFO] Setting volume to 90 2024-01-07 18:15:00,502 [INFO] Start streaming noise 2024-01-07 18:15:02,503 [INFO] Measuring average power for 20 seconds 2024-01-07 18:15:02,572 [INFO] Measured power: 1.20 2024-01-07 18:15:05,838 [INFO] Measured power: 1.10 2024-01-07 18:15:08,976 [INFO] Measured power: 1.20 2024-01-07 18:15:12,154 [INFO] Measured power: 1.10 2024-01-07 18:15:15,250 [INFO] Measured power: 1.10 2024-01-07 18:15:18,323 [INFO] Measured power: 1.10 2024-01-07 18:15:21,411 [INFO] Measured power: 1.10 2024-01-07 18:15:24,412 [INFO] Average power: 1.13 2024-01-07 18:15:24,413 [INFO] Setting volume to 100 2024-01-07 18:15:24,414 [INFO] Start streaming noise 2024-01-07 18:15:26,415 [INFO] Measuring average power for 20 seconds 2024-01-07 18:15:26,513 [INFO] Measured power: 1.10 2024-01-07 18:15:29,586 [INFO] Measured power: 1.10 2024-01-07 18:15:32,760 [INFO] Measured power: 1.10 2024-01-07 18:15:35,901 [INFO] Measured power: 1.10 2024-01-07 18:15:39,038 [INFO] Measured power: 1.10 2024-01-07 18:15:42,185 [INFO] Measured power: 1.20 2024-01-07 18:15:45,357 [INFO] Measured power: 1.10 2024-01-07 18:15:48,358 [INFO] Average power: 1.11 2024-01-07 18:15:48,359 [INFO] Muting volume and waiting for 5 seconds 2024-01-07 18:15:53,360 [INFO] Measuring average power for 20 seconds 2024-01-07 18:15:53,467 [INFO] Measured power: 1.10 2024-01-07 18:15:57,202 [INFO] Measured power: 1.10 2024-01-07 18:16:00,477 [INFO] Measured power: 1.20 2024-01-07 18:16:03,542 [INFO] Measured power: 1.10 2024-01-07 18:16:06,635 [INFO] Measured power: 1.10 2024-01-07 18:16:09,706 [INFO] Measured power: 1.10 2024-01-07 18:16:12,800 [INFO] Measured power: 1.10 2024-01-07 18:16:15,801 [INFO] Average power: 1.11 Summary of all average measurements: 10 : 1.12 20 : 1.11 30 : 1.11 40 : 1.16 50 : 1.11 60 : 1.09 70 : 1.1 80 : 1.1 90 : 1.13 100 : 1.11 0 : 1.11 2024-01-07 18:16:15,802 [INFO] Measuring standby power. Waiting for 20 seconds... 2024-01-07 18:16:55,244 [INFO] Measurement session finished. Files exported to /app/export/speaker

laplacacm avatar Jan 07 '24 18:01 laplacacm

Dummy means no media player is controlled, but it does nothing when asked to change volume, play audio etc.

So we know for sure it's some issue with the media controller code. Seems it is waiting until the streaming stops before continouing the measure logic. I don't have this behaviour on my machine. Need to think about how to further debug this issue.

bramstroker avatar Jan 09 '24 19:01 bramstroker

Could you try this from Developer Tools -> Services:

service: media_player.play_media
data:
  entity_id: media_player.hk_citation_multibeam
  media_content_id: https://assets.ctfassets.net/4zjnzn055a4v/5d3omOpQeliAWkVm1QmZBj/308d35fbb226a4643aeb7b132949dbd3/g_pink.mp3
  media_content_type: audio

Replace entity_id with your entity.

Does it stream the noise and return directly, or does it stream and wait / spinning until done. Or does it not stream at all?

bramstroker avatar Jan 09 '24 20:01 bramstroker

Sorry for the delay as I was out of town. I just tried this and it does not stream anything at all.

laplacacm avatar Jan 13 '24 17:01 laplacacm

I'm sorry, think my example was wrong.

Could you try this one?

service: media_player.play_media
data:
  media_content_type: music
  media_content_id: >-
    https://assets.ctfassets.net/4zjnzn055a4v/5d3omOpQeliAWkVm1QmZBj/308d35fbb226a4643aeb7b132949dbd3/g_pink.mp3
target:
  entity_id: media_player.myplayer

bramstroker avatar Jan 14 '24 08:01 bramstroker

This worked. When I hit "call service" after about 2 seconds, the noise played and played for approximately 30 seconds.

laplacacm avatar Jan 14 '24 15:01 laplacacm

I will have a further look next weekend.

bramstroker avatar Jan 17 '24 15:01 bramstroker

@laplacacm I did have another look and tested with both my HK Citation and Googe home speakers (two different HA integrations), but for me running the measure script starts the power meter measurements directly after starting to stream the noise.

I think somehow the integration you are using is behaving differently. Which integration are you using to integrate the Apple Homepod in home assistant?

It's very hard to debug this as I'm not able to reproduce.

An alternative approach would be to do the measurements manually.

  • Set to volume level (for example 10)
  • Start streaming the noise (using the service call)
  • Immediately start measuring average power. docker run --env-file=.env bramgerritsen/powercalc-measure:latest average 60. Make sure to set POWERMETER_ENTITY_ID parameter in .env, so it won't ask to select one each time.
  • Keep note of the measured power. You'll add that later in model.json manually.

Rinse and repeat for volume 20, 30 etc.

bramstroker avatar Jan 20 '24 08:01 bramstroker

I'm sorry for the long delay. I'm getting back to this today and ran into a snag. I am getting this error when I run the following in Terminal.

laplacacm@MacBook-Pro powercalc-measure % docker run --env-file=.env bramgerritsen/powercalc-measure:latest average 60 Powercalc measure: v1.10.3:docker

Input power measurement:2024-02-09 19:24:44,453 [INFO] Measuring average power for 60 seconds Traceback (most recent call last): File "/app/measure.py", line 333, in main() File "/app/measure.py", line 322, in main measure_util.take_average_measurement(duration) File "/app/util/measure_util.py", line 26, in take_average_measurement power = self.power_meter.get_power().power ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/app/powermeter/manual.py", line 11, in get_power power = input("Input power measurement:") ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ EOFError: EOF when reading a line

Here is the text of my .env file:

Set the power meter to use (hass, shelly, tuya, kasa, manual, tasmota)

POWER_METER=manual

Set the light controller to use (hass, hue)

LIGHT_CONTROLLER=hass

Set the media controller to use (for measuring smart speakers).

MEDIA_CONTROLLER=hass

Set the log level (CRITICAL, ERROR, WARNING, INFO, DEBUG)

LOG_LEVEL=INFO

time between changing the light params and taking the measurement

SLEEP_TIME=3

time between taking multiple samples for the same light setting

SLEEP_TIME_SAMPLE=3

additional time to wait for each significant change in hue

SLEEP_TIME_HUE=2

additional time to wait for each significant change in saturation

SLEEP_TIME_SAT=2

additional time to wait for each significant change in color temperature

SLEEP_TIME_CT=1

Set to a value higher than 1 to take multiple samples to reduce noise

SAMPLE_COUNT=2

Power Meter Nudging configuration (Useful if PM doesn't report a new reading if readings are unchanged)

How many times should nudging the Power Meter be attempted?

MAX_NUDGES=0

When Nudging, how long to hold the non-desired state for?

PULSE_TIME_NUDGE=2

How long to wait for the Power Meter to settle on the desired measurement after nudging

SLEEP_NUDGE=10

Brightness level (range 1-255) to start the measurements with.

Some lights are turned off at 1 so you might need to increase this. Set this at the lowest level at which the light actually turns on

MIN_BRIGHTNESS=1

Precision for the HS mode loop. You can increase it up to 4 to improve the precision

of the profile by taking more measurements

HS_BRI_PRECISION=1.0 HS_HUE_PRECISION=1.0 HS_SAT_PRECISION=1.0

Shelly

SHELLY_IP=10.35.1.244 SHELLY_TIMEOUT=60

Tuya

TUYA_DEVICE_ID=aaaaaaaaad89682385bbb TUYA_DEVICE_IP=x.x.x.x TUYA_DEVICE_KEY=aaaaaaaae1b8abb TUYA_DEVICE_VERSION=3.3

Hue

HUE_BRIDGE_IP=x.x.x.x

Home assistant

HASS_URL=http://10.35.1.13:8123/api HASS_TOKEN=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiI5YzUyYWEzYzZjZTM0ZmYxODk3NGNlOTdhNGU3NjM3ZSIsImlhdCI6MTcwNDM0MDMyMiwiZXhwIjoyMDE5NzAwMzIyfQ.TbbZ51T8PRF-4wG5t1afbN4uY_90OMcWH_DoZu3Q0pU

Set to true when you want to call update_entity service before requesting a power value.

This can help when your power sensor does not update frequently enough

HASS_CALL_UPDATE_ENTITY_SERVICE=false

Tasmota

TASMOTA_DEVICE_IP=x.x.x.x

Kasa

KASA_DEVICE_IP=x.x.x.x

myStrom

MYSTROM_DEVICE_IP=x.x.x.x

Predefine answers to questions

COLOR_MODE=color_temp

GENERATE_MODEL_JSON=true

GZIP=true

MULTIPLE_LIGHTS=false

LIGHT_ENTITY_ID=xx

MEASURE_DEVICE=Shelly Plus Plug US

NUM_LIGHTS=1

LIGHT_MODEL_ID=xx

MODEL_NAME=xx

DUMMY_LOAD=true

POWERMETER_ENTITY_ID=sensor.family_room_tester_power

RESUME=true

laplacacm avatar Feb 09 '24 19:02 laplacacm

No worries. Welcome back ;-). You still have power meter on manual, you'll need to set that to shelly again which you had in the beginning.

bramstroker avatar Feb 09 '24 19:02 bramstroker

No worries. Welcome back ;-). You still have power meter on manual, you'll need to set that to shelly again which you had in the beginning.

I changed it to Shelly and successfully got the average readings using the service code you provided before. My next step will be to fork this. Here are the measurements.

0: 1.01. (this is when the HomePod Gen 2 is not doing anything.) 10: 7.06 20: 7.14 30: 8.27 40: 11.74 50: 13.35 60: 15.29 70: 16.34 80: 18.84 90: 20.09 100: 27.08

I'll try and fork this in the next day or so. Thank you for your help!

laplacacm avatar Feb 29 '24 17:02 laplacacm

No worries. Welcome back ;-). You still have power meter on manual, you'll need to set that to shelly again which you had in the beginning.

I changed it to Shelly and successfully got the average readings using the service code you provided before. My next step will be to fork this. Here are the measurements.

0: 1.01. (this is when the HomePod Gen 2 is not doing anything.) 10: 7.06 20: 7.14 30: 8.27 40: 11.74 50: 13.35 60: 15.29 70: 16.34 80: 18.84 90: 20.09 100: 27.08

I'll try and fork this in the next day or so. Thank you for your help!

Ah great you were able to do the measurements!

bramstroker avatar Mar 01 '24 20:03 bramstroker

@laplacacm are you still able to create the profile?

bramstroker avatar Mar 16 '24 08:03 bramstroker

I just tried. Again, I am not the most proficient with GitHub, but I'm trying! I just added the Apple HomePod Gen 2 for now. If this is successful, then I will do the Amazon Echo Show 5.

laplacacm avatar Mar 17 '24 17:03 laplacacm

I just tried. Again, I am not the most proficient with GitHub, but I'm trying! I just added the Apple HomePod Gen 2 for now. If this is successful, then I will do the Amazon Echo Show 5.

Thanks. No worries, we all had to learn once.

bramstroker avatar Mar 17 '24 18:03 bramstroker

Hi @bramstroker, I wanted to let you know that the Apple HomePod Gen 2's are not found automatically after the release that added them. I am not sure if I may have done something in correct with regards to my submission? Should they have been auto-detected in home assistant? If so, we may need to look into why they have not. Thank you!

laplacacm avatar Apr 12 '24 15:04 laplacacm

Could you check device page which exact manufacturer and model are listed there? In the top left.

bramstroker avatar Apr 12 '24 15:04 bramstroker

The Decive info says “HomePod (gen 2)”Chris LaPlaca(630) 849-6802On Apr 12, 2024, at 8:16 AM, Bram Gerritsen @.***> wrote: Could you check device page which exact manufacturer and model are listed there? In the top left.

—Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you were mentioned.Message ID: @.***>

laplacacm avatar Apr 12 '24 19:04 laplacacm

The model name in the submitted profile is MQJ83. In your HA instance the homepod is recognized as HomePod (gen 2). To fix the autodiscovery and alias need to be added to model.json. I will add it.

bramstroker avatar Apr 14 '24 07:04 bramstroker

Should be fixed now, you can test it by installing latest beta v1.12.0-beta.4. Or wait for stable release of 1.12. Which will be next week or the week after probably.

bramstroker avatar Apr 14 '24 07:04 bramstroker

Hi @bramstroker,I installed beta 4 to test it and it still does not autodiscover.  I’m sorry this is causing so much difficulty for us.  This is a screenshot for one of the second generation HonePods.  Does the “by Apple” need to be included as well?Chris LaPlaca(630) 849-6802On Apr 14, 2024, at 2:38 AM, Bram Gerritsen @.***> wrote: Should be fixed now, you can test it by installing latest beta v1.12.0-beta.4. Or wait for stable release of 1.12. Which will be next week or the week after probably.

—Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you were mentioned.Message ID: @.***>

laplacacm avatar Apr 16 '24 11:04 laplacacm

Hello Bram,

I installed beta 4 and it is still not auto-discovering.

Here is a screenshot of the HomePod in Home Assistant.

On Apr 14, 2024, at 2:38 AM, Bram Gerritsen @.***> wrote:

Should be fixed now, you can test it by installing latest beta v1.12.0-beta.4. Or wait for stable release of 1.12. Which will be next week or the week after probably.

— Reply to this email directly, view it on GitHub https://github.com/bramstroker/homeassistant-powercalc/pull/1973#issuecomment-2053947893, or unsubscribe https://github.com/notifications/unsubscribe-auth/AOHGGAA6ZHMZ4TLFURDRBLTY5IW6JAVCNFSM6AAAAABBNZQUWGVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDANJTHE2DOOBZGM. You are receiving this because you were mentioned.

laplacacm avatar Apr 18 '24 19:04 laplacacm

Please enable debug logging for powercalc, and restart. share logs after restart. Than we can work out the issue.

bramstroker avatar Apr 18 '24 19:04 bramstroker