Oh sorry didn’t see that! Of course you already thought of that detail! Thanks again!
Thank you, that worked. Appreciate it.
Would you know how to track two SEM devices? My main and sub meter each have one, I have both pushing to MQTT but seems to overwrite each other when trying to configure. I made sure configs for both are set to different deviceIDs
edit: figured it out, I was duplicating the key for mqtt and sensor which broke a lot of stuff
Another question: I have my device defined in my YAML but don’t see it showing up in the MQTT section at all. Is that script the only way to create devices for the values to be assigned to?
How did you define the device in the yaml file? It must be part of the sensor entity. It cannot be defined alone.
@peterxian thank you. I created the daily kwh counter. is there a way to do this in the configuration.yaml file instead of using a helper?
@king1999 thank you for creating the config with unique id,s that makes a device in home assistant. that was very useful
Hi all, first post here. I installed the SEM-Meter this weekend following the instructions provided by Fusion Energy. I have it connected to HA via MQTT using their servers. Sometime soon I will be upgrading my script to the one provided by @king1999 but for now I have the configuration.yaml setup that Fusion Energy gave. I also think I need to install a grommet as my antenna threads are sitting against the breaker box metal.
I ended up using helpers through the Home Assistant UI to count the energy used, so I could reset it at the end of the month. I fed the SEM-Meter provided sensor.active_power (W) into a trapezoidal rule integral helper to create the energy metric (kWh), and then I used a Utility Meter helper to make sure it’s reset at the end of the month. I added the Mains electricity Utility helper (total) as the Grid Consumption in the Energy configuration in HA, and I added the breaker Utility helpers as Individual Devices in the Energy configuration.
My problem is this, there is a large amount of “Untracked Consumption” that mirror my consumption, further, appliances are using a lot more electricity than anticipated. For example in this screenshot, it shows the car charger (red) and stove (brown), these peaks are huge and when they fire up there is untracked consumption as well:
As a detailed example: At 5:00-6:00 Home Assistant is reporting that my car charger used 8.6kWh, but the SEM-Meter app is reporting only 0.37kWh. At 7:00-8:00 Home Assistant is reporting that my car charger used 12.5kWh, however in the SEM-Meter app it shows 0.094kWh.
If I use the SEM-Meter provided sensor.energyin (kWh) it seems to be the right number (instead of using the Utility helper). I added both my Car Charger using the utility helper and the car charger EnergyIn metric to HA’s Energy Panel “Individual devices total usage” bar plot, and it shows that the Utility meter use is huge compared to the EnergyIn metric (which is probably right).
What am I doing wrong? Why is Utility meter giving me weird numbers? What did I do wrong? Any help would be great! Thanks!
I have it in this format for each sensor:
# MAIN PANEL
mqtt:
sensor:
- name: "MAIN current"
state_topic: "SEMMETER/0000000000000/HA"
value_template: "{{ value_json.sense[16][1] | float | multiply(0.01) + value_json.sense[17][1] | float | multiply(0.01) + value_json.sense[18][1] | float | multiply(0.01) }}"
unit_of_measurement: "A"
icon: "mdi:current-ac"
suggested_display_precision: 2
device:
manufacturer: "Fusion Energy"
name: "SEM Meter"
model: "SEM-Meter"
model_id: "2A7LE-SEM-METER"
identifiers: ["SEM_00000000000"]
edit: I realized it might be because of the lack of unique_id
Your Utility Meter entities should be based on the energyIn of SEM Meter, not the active power. The active power varies in a wide range and cannot be translated into energy accurately using an HA template.
Trapezoidal rule integral requires high frequency sampling, not the 30 second or even the 2 second samplings from SEM meter can give you good results.
Try to use a good identifier for the device like this:
identifiers: “SEM_YOURSNINCAPS”
I have never tried to use […] for the identifiers. So, I don’t know its behavior.
Thanks, I will give that a try. Figure I need to delete out the old Utility helper and remake it, or could I just change the input sensor on the current utility helper?
I will delete all the integrals, guess they aren’t needed! Thanks!
Edit: Eh, I’ll just remake them to be sure.
Yup I have that for the device in identifiers
, I just blanked out my actual SN. My issue was not having the unique_id
per sensor, so it was not adding it to the device, therefore the device was not showing up. This format worked:
- name: "MAIN current"
state_topic: "SEMMETER/000000000/HA"
value_template: "{{ value_json.sense[16][1] | float | multiply(0.01) + value_json.sense[17][1] | float | multiply(0.01) + value_json.sense[18][1] | float | multiply(0.01) }}"
unit_of_measurement: "A"
icon: "mdi:current-ac"
suggested_display_precision: 2
unique_id: "main_current"
device:
manufacturer: "Fusion Energy"
name: "SEM Meter Main"
model: "SEM-Meter"
model_id: "2A7LE-SEM-METER"
identifiers: ["SEM_00000000000000000"]
Thanks for your help!
Yes, unique_id is a must. It allows you to freely modify the entity name in the yaml file or the friendly name on the web UI without affecting the entity and its existing data.
Yes, you need to remake them to delete the old inaccurate data.
You can also define the utility meter entities in the configuration.yaml file (or included through a separate file). I have dozens of such entities. One drawback of defining them in the yaml file instead through the Helper WebUI is that they don’t appear on the device page, but that’s not a big deal.
ch01_hourly_energy:
source: sensor.sem_meter_ch01_energy
name: "SEM Meter 01 Hourly Energy"
unique_id: SEM_AAAAAAAAAAA_ch01_hourly_energy
cycle: hourly
ch01_daily_energy:
source: sensor.sem_meter_ch01_energy
name: "SEM Meter 01 Daily Energy"
unique_id: SEM_AAAAAAAAAAA_ch01_daily_energy
cycle: daily
ch01_weekly_energy:
source: sensor.sem_meter_ch01_energy
name: "SEM Meter 01 Weekly Energy"
unique_id: SEM_AAAAAAAAAAA_ch01_weekly_energy
cycle: weekly
ch01_monthly_energy:
source: sensor.sem_meter_ch01_energy
name: "SEM Meter 01 Monthly Energy"
unique_id: SEM_AAAAAAAAAAA_ch01_monthly_energy
cycle: monthly
Hey there, I didn’t see this message until now, so I had redefined them already in the Helper WebUI. What is the point of keeping hourly, daily, weekly and monthly utility meters? Not criticizing, just trying to figure out what else I can do with this data I have now!
But that being said, I used your yaml code to define the sem-meter as it’s own device, and I remade all the meters, and it works great now! Thanks so much for your advice and work on this!
I found it useful when I want to check how much electricity a device or circuit uses during the last hour, today, this week, this month etc. If you want, you can add a few more cycles, such as quarter hourly, yearly etc. Frankly I use the SEM-Meter app to check energy usage most of the time, and seldom look at these utility meters. But they are there to silently collect data for future reference.
Just FYI. Although I didn’t ask for it, the firmware of my SEM-Meter has been updated to 03.00.04 which reduced the MQTT data publishing interval from 30 to 2 seconds. I do wish they could provide a setting to control the interval. I like it to be a bit longer, like 5 or 10 seconds, to reduce the traffic to HA.
May I ask if updating to 2Sec requires contacting the manufacturer to request the firmware?
Mine was updated automatically today even though I didn’t ask for it. You can email support to get it sooner.
Mine also got updated, and crushed my ApexChart card I had. Way too many data points and now all of HA is working at a snail’s speed. I disabled the card, and everything was good. Anyone have a good way for me to plot power use versus compressor frequency?
Thanks! I ended up using Mini Graph Card and it works great. The issue was with ApexCharts, apparently there’s some lag issue that the developer never solved. In Mini Graph Card I set my sampling to 1 point per minute, and it works great. Zero lag at all. Highly recommend Mini Graph Card for this energy meter. In fact, the energy meter has been great so far too.