Тёмный

Use Utility Meter integration to Track gas, power and water 

BeardedTinker
Подписаться 37 тыс.
Просмотров 67 тыс.
50% 1

Опубликовано:

 

21 окт 2024

Поделиться:

Ссылка:

Скачать:

Готовим ссылку...

Добавить в:

Мой плейлист
Посмотреть позже
Комментарии : 95   
@jesusist
@jesusist 4 года назад
This time you did a mistake. You should use the energy consumption sensor (kWh) and not the power sensor (kW), as source. You are doing a great job with your Channel. I've learned many things with you. Thanks :).
@BeardedTinker
@BeardedTinker 4 года назад
Good catch - you are right! Here I used current usage and not total usage (Wh) - thanks for pointing out the mistake. In the description is correct name of the sensor since I used the one I have at my home setup :)
@Qatium
@Qatium 2 года назад
Great job BeardedTinker - thanks for sharing👏
@BeardedTinker
@BeardedTinker 2 года назад
Thank you Qatium!!!
@b1nuzz
@b1nuzz 3 года назад
Great video. Thanks. How have you got Mini graph card to group by month for the monthly view?
@BeardedTinker
@BeardedTinker 3 года назад
Thank you Ben for your comment!!! For this, I'm using additional sensors I created - sensor.monthly_energy_peak (offpeak). This is created through utility_meter integration: github.com/BeardedTinker/Home-Assistant_Config/blob/master/integrations/utility_meter.yaml
@b1nuzz
@b1nuzz 3 года назад
@@BeardedTinker Thanks for the reply. Any chance you could share your YAML for the mini graph card setup? This seems to be my stumbling block.
@BeardedTinker
@BeardedTinker 3 года назад
@@b1nuzz sure, here it is: entities: - sensor.monthly_energy_peak font_size: 75 line_color: blue line_width: 8 name: Monthly Peak type: 'custom:mini-graph-card' I'm using here horizotnal stack card, so I can fit 2 graphs in one space"
@b1nuzz
@b1nuzz 3 года назад
@@BeardedTinker Awesome. Thank you!
@Phelper99
@Phelper99 Год назад
I wonder if things have changed in the time since this video was created. I'm strug-a-ling with this, massively. Even after many reboots, I never got an entity "utility_meter.daily_energy" and the only services I can call in automation are for utility_meter.calibrate and utility_meter.reset. This seems like such a straightforward process to get up and running, but here in 2023 I'm having a hard time. I'm using the cumulative kWh totals as the source.
@BeardedTinker
@BeardedTinker Год назад
Yes, it did change. If I remember correctly, this integration has been moved to UI and can be configured there. But you should still be able to add it via YAML to, here is example from documentation: utility_meter: daily_energy: source: sensor.energy name: Daily Energy cycle: daily tariffs: - peak - offpeak monthly_energy: source: sensor.energy name: Monthly Energy cycle: monthly tariffs: - peak - offpeak
@fabriziomarchetta758
@fabriziomarchetta758 3 года назад
Hi I needed help and I have some questions:the first :my shelly Em in HA see also the sensor current consumption,but the total is always zero and then with the utility meter I must use always total or current sensor Many thanks
@BeardedTinker
@BeardedTinker 3 года назад
Hi Fabrizio! Can you check if you are using latest firmware for Shelly EM. Also, are you using internal HA integration or ShellyForHass. I had similar problem with internal HA Shelly integration, after new Shelly EM firmware was release, but never with ShellyForHASS. For Utility Meter, I'm using sensor.shelly_em_total_consumption not current consumption.
@migcrpt
@migcrpt 3 года назад
One tricky question for you. There is a way to integrate Goodwee inverter with Grafana or Home Assistant? If so, any feedback about the product?
@BeardedTinker
@BeardedTinker 3 года назад
I've found this github.com/mletenay/home-assistant-goodwe-inverter - it allows you to pull data into home assistant. After that if you already have Grafana setup, data should be visible there.
@typxxilps
@typxxilps 3 года назад
Just one question regarding the maths: where is the formula that multiplies each measurements Watt x time to get the Wh right. If I arrive in my office I put the lights on first that will stay on. 30 W are running for 20 minutes and then I need hot water for tea so 2000 W running for 5 minutes before my desktop PC and monitor follow with 500 W for 35 minutes 20 / 60 h x 30 W + 5 / 60 h x 2030 W + 35 / 60 h x 530 W = 488 Wh in the first hour of work. I have seen that you were taking the Watt Sensor and therefore I am asking where the maths are done - or is that part of the sensor ? thx Yes, I am intested in local tuya and getting a nice dashboard abouit the consumption. thanks.
@BeardedTinker
@BeardedTinker 3 года назад
There exists internal sensor for this, that would convert W to Wh - haven't used it in a while so forgot how I had it set: www.home-assistant.io/integrations/sensor/ It should handle the conversion based on your usage. Before I started using Shelly devices (and Shelly EM to monitor my apartments overall power usage) - I created template sensors for each light group - but that was inaccurate and also very complex.
@typxxilps
@typxxilps 3 года назад
@@BeardedTinker no, that can not be right. There is no conversion from W to Wh. There are 2 measurements happening: W x time And the sensor is not the right point for sure. Shelly is doing the measurements itself inside the device and adding those Wh figures daily, weekly, monthly, yearly. But there are lots of tuya users which only provides Watt where home assistant has to deliver the math like getting the Watts every 5 seconds and then multiplying W x 5 / 3600 cause an hour has 3600 s ... 3000 W running 60 seconds would mean 50 Wh I am asking cause I am struggling like all the other users that do not have shelly plugs with Wh sensors. Therefore might be usefull to have a video on that topic too. Here is a dissusion just over 600 coments long where one had pointed out that the integration has to run via the riemann formula And there I am struggling how to get it together right. community.home-assistant.io/t/tuya-local-with-energy-monitoring-and-without-tuya-convert/173564/30
@typxxilps
@typxxilps 3 года назад
UPDATE: here is the solution, at least part 1 for all those who have plugs that do not Watt measure over time aka Wh or Watt hour I have a tuya plug next to the couch which I have integrated with local tuya Integration. The switch.couch has the attribute current_consumption (beside Voltage and Ampere too) ... First I had to create a sensor that tracks the current_consumption = Volt x Ampere And then the important part is the measuring of time and computation which is done by the integration: I struggled a lot a that point to find the right term and then it seems that nothing was happen - cause the usual templates use round (2) which means they will show from 10 Wh on as 0,01 kWh in the display. So to see your success you need a high power consumer like a mikro wave or you simply round (4) to get behind that it is running well much earlier . In my test it took an hour and then I saw a 0,01 cause the light and Amzaon Show is not using much power. sensor: - platform: template sensors: power_couch: value_template: "{{ state_attr ('switch.couch', 'current_consumption') }}" - platform: integration name: energy_spent_couch source: sensor.power_couch unit_prefix: k round: 4 And this is just the first part, cause now I need the daily, monthly and yearly counter on top ... And I do not know how to make the code look nicer below integration cause I have tons of these sensors. Right now each sensor gots its owen - platform line
@typxxilps
@typxxilps 3 года назад
Final Part utility meter: be aware that the - for testing purposes - usefull cycle quarter-hourly is no longer supported or at least stopped my code from working cause every sensor afterwards had been ignored. utility_meter: kwh_couch_hourly: source: sensor.energy_spent_couch cycle: hourly kwh_couch_monthly: source: sensor.energy_spent_couch cycle: monthly the cycles for daily and weekly do work
@BeardedTinker
@BeardedTinker 3 года назад
Yeah, this part adds a lot of code lines and new sensors, but is needed to have all data you need.
@maciejmizgalski6112
@maciejmizgalski6112 2 года назад
Great! How to add weekend to offpeak? My offpeak starts from 22:00 Friday -> 6:00 Monday How to do that? Thanks for another great material! :)
@BeardedTinker
@BeardedTinker 2 года назад
Thank you!!! Do you also have peak/offpeak during the week? Day/Night? If yes, then just create 2 automations One that will cycle to peak at 6 AM and other one that would trigger off-peak at 22:00. And have That one run only on Monday to Friday. (use it as condition) - that way it would trigger on Friday, skip weekend and continue on Monday.. If tariff doesn't change over workdays, than have one automation run on Friday at 22:00 to switch to peak, and one on Monday at 6:00 to start peak.
@maciejmizgalski6112
@maciejmizgalski6112 2 года назад
@@BeardedTinker Thank you very much - i will try it as you told. Looking forward for some more great videos from you :) Thanks for sharing your experience.
@lpkitson
@lpkitson 2 года назад
Hi. great and informative video, just 1 question. Everything goes well up to the point of creating the tariff automation. I cannot find the utility_meter_next_tariff option. I can only see the rest and calibrate. I am running 2022.9 I wonder has the functionality changed in the latest release???Thanks
@BeardedTinker
@BeardedTinker 2 года назад
This integration changed a while back - it now doesn't have that service, but instead uses nice call - select.select_service and that specific option you want to use: www.home-assistant.io/integrations/utility_meter/#advanced-configuration
@lpkitson
@lpkitson 2 года назад
@@BeardedTinker Hi, thanks for the reply. I followed up your advice but I am still struggling to get the tariff to change per my times listed in the automation. My automation looks like this id: '1663770151469' alias: New Automation description: '' trigger: - platform: time at: 08:00:00 - platform: time at: '23:00:00' variables: tariff: offpeak condition: [] action: - service: select.select_option target: entity_id: sensor.daily_energy data: option: '{{ tariff }}' - service: select.select_option target: entity_id: sensor.monthly_energy data: option: '{{ tariff }}' But it does not change over at 8:00am or 11:00pm, any idea where I am going wrong? Thanks
@BeardedTinker
@BeardedTinker 2 года назад
You are missing for 08:00 part with variable: variables: tariff: "peak" Not sure that anything else is missing but that's the most obvious thing I can see. Without it it at morning does nothing, and in the evening changes to offpeak - so it's in a fact always off-peak.
@philippelejeune8586
@philippelejeune8586 3 года назад
Hi there, great video as usual. Thanks - My meter is 3 x220volts (three-phases + neutral) how should I adapt my config file to sum the three consumption value ? Thanks
@BeardedTinker
@BeardedTinker 3 года назад
Thanks for the comment Philippe. Unfortunately, I'm not sure. Was thinking that there is one combined sensor containing total value. If not, you could use platform template sensor and create new sensor that is sum of 3 individual sensors.
@typxxilps
@typxxilps 3 года назад
@@BeardedTinker I have the same questions cause if you track consumptions you usually have different areas in the house, some are rock solid regarding consumption other move around. Is there a video shows that trick of aggregating those consumption figures ? thanks.
@EsotericArctos
@EsotericArctos 3 года назад
Apparently, if your provider can supply it, Home Assistant can automatically sense peak and off-peak using a REST sensor. Unfortunately here in Australia we do not have that feature as far as I know. Do you have that feature at all?
@BeardedTinker
@BeardedTinker 3 года назад
No worries, you're not the only one. :D Haven't seen it for any utility here - power, gas, water... And adoption of digital/wireless readers is so low that it's frightening.
@EsotericArctos
@EsotericArctos 3 года назад
@@BeardedTinker I think people are scared of change.... I like the idea of smart metering, but I am a bit of an automation junkie lol
@BeardedTinker
@BeardedTinker 3 года назад
@@EsotericArctos here it's problem utility companies, they are just not willing to make changes or are making them very slowely.
@geoffreycoan
@geoffreycoan Год назад
hi there. I have created a utility meter using the new UI screens with multiple tariffs and an automation to sawp between them, all works great. but now my electricity provider has introduced a new extra tariff period but the UI doesnt let you amend the tariffs. The utility meter isnt in configuration.yaml so i dont know how to add the extra tariff and not lose the existing history I’ve built up Any ideas ? Help !
@BeardedTinker
@BeardedTinker Год назад
Thanks for sharing! Tried now on test system and couldn't find a way. Asked devs, but still waiting for response...
@geoffreycoan
@geoffreycoan Год назад
@@BeardedTinkerthank you for investigating and following up with devs. I’d got as far as creating another dummy electricity utility meter with tariffs and was leaving it to populate some history for a few days. Going to try adding the extra tariff manually in configuration.yaml and see if that hybrid approach works?
@BeardedTinker
@BeardedTinker Год назад
Ok, got semi-reply. Long term statistics should be bound to entity_id, not some random id. Because of that, if you delete current utility meter and tariffs and than recreate new utility meter with SAME name + tariffs with same name plus one new, it should keep long term statistics. Just take note of "should", they didn't test it, so while it should work, there could of course be issues and you could lose statistics.
@geoffreycoan
@geoffreycoan Год назад
@@BeardedTinker thank you *so much* for looking into this and asking the HA dev team for a view, this worked perfectly. I was a bit nervous about it, did a trial with another test utility meter first to check it worked, and it did. Deleted and created again the utility meter with the same named tariffs plus one more and they all retained their history with no issues. I did get an error in developer tools about the new tariff entity’s unit of measurement changing from ‘’ to ‘kWh’, but “fix and retain historical values” resolved this specific error 👍
@BeardedTinker
@BeardedTinker Год назад
That's great! Awesome that everything is working ok.
@LordGeva
@LordGeva 4 года назад
Thanks for the video! How do you access historical data of a, for example, monthly utility meter to make comparations? Suscribed!
@BeardedTinker
@BeardedTinker 4 года назад
Ole thank you for your comment! So far I haven't tried it. That's something that I've left for the future. But after you asked I've looked a bit and there are in each of the created sensors (daily and monthly) two fields - on called last_period and second called last_reset. You can pull that data an compare values or use them to calculate previous month electricity cost or usage.
@tuffelhinni
@tuffelhinni 4 года назад
@@BeardedTinker How can I add the "last_period" value to a lovelace card? I cannot find any details on that. Anyway thanks for your tutorials! BTW: This topic is very interesting. I would like videos for visualizations of energy consumptions over the year, calculation of costs etc.
@reloadfast
@reloadfast 4 года назад
Amazing video! keep them coming! they are very much appreciated.
@BeardedTinker
@BeardedTinker 4 года назад
This means a lot to me - thank you!!!! 😄
@MrSpaceMuffins
@MrSpaceMuffins 4 года назад
Keep up the good vids!, really helped me a lot with my setup.
@BeardedTinker
@BeardedTinker 4 года назад
Thank you very much for your comment Li!!!
@arriewarrie
@arriewarrie 3 года назад
Thanks for a great video. Where does the integration find the information if you are in PEAK or OFFPEAK`?
@BeardedTinker
@BeardedTinker 3 года назад
It doesn't - for that you have to create automation as per video that switches from peak to offpeak and vice-versa at predefined time. It works OK, but you must not restart HA at this time as it would then skip change. I also have exposed satatus and from time to time just check if all is ok. If not, I just execute automation by hand. But, THB I haven't done that more then 1-2 times in a year.
@lixxus-m
@lixxus-m 3 года назад
hey can you do an updated video of this regarding the new release of energy tracker built in with new release of home asssitant ?
@BeardedTinker
@BeardedTinker 3 года назад
Hi and thanks for the comment! I will do video on it. Currently on vacation, so next week will be video I prerecorded 3 weeks ago, but in 10 days, there will be new video on Utilities and 2021.8 Energy tracker
@lixxus-m
@lixxus-m 3 года назад
@@BeardedTinker great thank you. I was also thinking how shelley EM would work with new release and including that info on the energy tab by default. it will open up new doors these feature release from HA
@BeardedTinker
@BeardedTinker 3 года назад
Shelly EM works out of box. I didn't have to do anything with it when upgrading to 2021.8 But I did end up using utility meter sensors as source for data.
@denveronly
@denveronly 4 года назад
if HA gets rebooted in night time, Utility meter will be loaded in peak tariff beacuse it is first in order right?
@BeardedTinker
@BeardedTinker 4 года назад
No, then it will be start with last value (that's how it should be if recorder is working correctly). The only problem there could be that you restart HA at exactly the time tariffs change - then it would skip the change.
@denveronly
@denveronly 4 года назад
@@BeardedTinker thanks for explanation
@javiermitchell7073
@javiermitchell7073 4 года назад
Hi , I love your videos, in fact it was your video which help me decided to get the shelly EM. I got a couple of questions for you: - I tried to implement the automation and after adding the action "utility_meter.next_tariff"I don't see a "name of entities to reset", what am I missing? - my tariff starts at 05:30 and ends at 00:30 next day, will HA figure out this? on another issue, I am using the second shelly em transformer to measure my Solar production, but is negative, I have tried changing the unit to -1, so the graph is right, but it reverts back to 1, how can you resolve that? Thanks, and keep to the good work
@BeardedTinker
@BeardedTinker 4 года назад
Hi Javier! Thank you for your comment - it really means a lot to me!!! 1) Did you restart Home Assistant? Can remember but I think you need to restart home assistant for those options to become available after adding Utility Meter. Also, did you create daily tariffs? utility_meter: daily_energy: source: sensor.shelly_em_total_consumption cycle: daily tariffs: - peak - offpeak monthly_energy: source: sensor.shelly_em_total_consumption cycle: monthly tariffs: - peak - offpeak After you create that and restart, when you create automation, this option should be available as ACTION there. Just select Call service, type/select utility_meter.next_tariff - and it should contain utility_meter.daily_energy (and/or monthly_energy too). 2) Well, I think that will not be an issue - system is "stupid" so it only knows when to trigger, not really if it's triggering correctly. So you would create one trigger at 00:30 changing tariff (with next_tariff), and next will be automation at 05:30 again switching to next tariff. If it gets out of sync, or you see wrong tariff active, you can just by hand trigger automation and from that point, all should be ok. 3) In regard to negative values - try removing transformer and turning it 180 degrees - there is a small barely visible arrow on it that should point in direction of current flow.
@javiermitchell7073
@javiermitchell7073 4 года назад
@@BeardedTinker Thanks , I appreciate your help - I think I did not restart HA, but can't be sure, however you can still add those options editing automations.yaml. Just checked now and showing correctly - I will try your your suggestion with next tariff - regarding current flow, I did now about it, but prefer negative number as the shelley web app do deduct this from the consumption and calculates the "real" consumption, trying to replicate it on HA
@BeardedTinker
@BeardedTinker 4 года назад
Ok, I've been thinking about this a bit (on vacation so a bit of spare time)... I would still make it in normal (positive) value. And then I would create a new sensor that would deduct power used with power produced. Here is example of binary sensor (but you need normal not binary sensor) that could help you with this. binary_sensor: - platform: template sensors: surplus: friendly_name: Power Surplus value_template: > {{ (states('sensor.production') | float - states('sensor.consumption') | float) > 0 }} You can use template part as guide on what to do. You would then get new sensor with values that would be positive if you use more then you produce or negative values if you produce more energy then use. Edit: here is the link to post where I copied code from. community.home-assistant.io/t/calculate-amount-of-free-solar-power-that-can-be-taken-back-from-the-grid-at-any-time/125104
@javiermitchell7073
@javiermitchell7073 4 года назад
@@BeardedTinker thanks for your tip However, i got two issues: i MUST leave it negative if i want shelly cloud to deduct instead of add both figures - unless i decide to dump shelly cloud ( but not for now) The other one is that it must be in real time, as not always i'm consuming all i am generating. No good if it deducts total energy consumed from total energy produced I will look at the details of your code Thanks again
@BeardedTinker
@BeardedTinker 4 года назад
I think that Shelly has 2 or 5 minute delay with integration via MQTT, not sure about cloud or when using custom component for HA.
@carnage84ad
@carnage84ad 3 года назад
This is great! helped me. Can you provide me with a simple understanding on how to have this outside my Config.yaml? i want to keep these seperate as config.yaml gets kinda messy
@BeardedTinker
@BeardedTinker 3 года назад
That's not as simple to explain :) I use packages for that, to load each integration from separate file. Have a look at this: github.com/BeardedTinker/Home-Assistant_Config/tree/master/integrations These are all of my integrations. And they are loaded by configuration.yaml file - only this in is in file, to load everything from there: github.com/BeardedTinker/Home-Assistant_Config/blob/master/configuration.yaml I hade a video on this if you are interested - Splitting my configuration.
@denveronly
@denveronly 4 года назад
Is there any way to set a value offset, beacuse monthly peak offpeak are collected, and now automation has started and values need to be adjusted
@BeardedTinker
@BeardedTinker 4 года назад
Answer is both yes and no - you can do it by hand using using developer tools and setting state for sensor. But there is no additional UI unless you use input_number field and try doing it that way. I would recommend that you use developer tools - it's much more simple.
@denveronly
@denveronly 4 года назад
@@BeardedTinker Thank you for this idea, didnt know i could do that. Well i done that, it appeared , and after reboot it is not 67000 it is 10 again
@BeardedTinker
@BeardedTinker 4 года назад
@@denveronly ok - hmm. Thought that it would retain the value... What is your utility meter? Maybe there you can create offset. Are you trying to get same numbers here as the ones your utility meter shows? I never did that, I was only interested in getting numbers for my usage.
@denveronly
@denveronly 4 года назад
@@BeardedTinker my electric meter counts tariffs 67k and 33k and total consumption 100k. My smart meter counts only how much energy it has consumed totaly 100k So i ended up making the offset in sensor template like -33000 and that started working.
@piotrw1373
@piotrw1373 3 года назад
how can I set initial value of my water flow meter different than zero?
@BeardedTinker
@BeardedTinker 3 года назад
You can use service call for that - check here: www.home-assistant.io/integrations/utility_meter/#service-utility_metercalibrate
@ShrikantNimbalkarD
@ShrikantNimbalkarD 4 года назад
Not able to see any text on black background on my mobile
@BeardedTinker
@BeardedTinker 4 года назад
Sorry to hear that. But you can always check video description for any code I add.
@sindbadoo
@sindbadoo 3 года назад
What about adding condition to exclude weekend?
@sindbadoo
@sindbadoo 3 года назад
condition: - condition: time weekday: - mon - tue - wed - thu - fri
@BeardedTinker
@BeardedTinker 3 года назад
@@sindbadoo exclude as in don't change tariff? That can probably be done in Automation as you written here with condition. Never tried it as we are not that lucky to have it like that :)
@fred7flinstone
@fred7flinstone 3 года назад
I have iota watt up and running, but as far as I can see it only exports watts (power) and not kWh (energy). Can I use utility meter? Does anyone know how to convert watts to kWh in HA so it can be used for utility meter?
@BeardedTinker
@BeardedTinker 3 года назад
You can try looking at this thread here. There is a way to create custom sensor that would calculate kWh. Some time ago HA had internal integration that would do that automatically, but I think it's been removed.
@fred7flinstone
@fred7flinstone 3 года назад
@@BeardedTinker I used the integration sensor to change power into energy and feed that into utility meter. Seems to be working. Would love to see a video on charting energy use if you ever get around to it. Thanks for the information.
@dartfrogdk
@dartfrogdk 4 года назад
Thank you for this setup, but can you help me, my sensors are resetting everytime i restart homeassistant?
@BeardedTinker
@BeardedTinker 4 года назад
Hmm . this is very strange. Utility meter should be persistent and resetting shouldn't clear current values. What type of the "input" sensor are you using for utility_meter?
@dartfrogdk
@dartfrogdk 4 года назад
@@BeardedTinker Hi im using a Tasmota POW device the tasmota sensors saves data but everytime i restart HA they start from 0
@dartfrogdk
@dartfrogdk 4 года назад
@@BeardedTinker it is a Sonoff esp flashed with tasmota
@dartfrogdk
@dartfrogdk 4 года назад
@@BeardedTinker utility_meter: pow1_daily_energy: source: sensor.pow_1_total cycle: daily pow1_monthly_energy: source: sensor.pow_1_total cycle: monthly pow1_hourly_energy: source: sensor.pow_1_total cycle: hourly pow1_yearly_energy: source: sensor.pow_1_total cycle: yearly
@BeardedTinker
@BeardedTinker 4 года назад
@@dartfrogdk just to make sure - sensor.pow_1_total gives you value in kWh? I don't think that this could/should be issue, but better to ask then forget :)
Далее
Monitoring ENERGY and TARIFFS in Home Assistant
21:24
COMPLETE power monitoring for your home!
17:38
Просмотров 25 тыс.
Tracking Utility Meters with SDR // MeterMon & RTL-SDR
27:19
Automatic water main shut-off with Home Assistant
25:21