Lovelace: Power wheel card

I have enlighten as well, however I obtain my consumption and production figures using a pulse counting Power meter connected to a device called a Flukso - https://www.flukso.net/about

The Flukso has in in-built mqqt broker, so it’s easy to just connect a sensor to its mqqt output. I have 3 x pulse counting power meters connected to the Flukso, 1) Solar Production, 2) House Power Consumption and 3) Hot Water heater consumption.

I am able to display however all the information from Enlighten - but there is a catch if you want the per panel details - you need the password for the installer account on your Envoy. If you have that password, this url has a ton of information (substitute the IP of your envoy: http://192.168.1.84/installer/setup/home#overview



To get your password, you need to download an Android app and enter the serial number of your envoy - it will then give you the password. If you don’t have an android phone, the app can be run on an Nvidia Shield or even an android emulator. This is the link to the (detailed) article ob how the guy wrote the app, look for the download link for the app just above where the comments start. https://thecomputerperson.wordpress.com/2016/08/28/reverse-engineering-the-enphase-installer-toolkit/

Here is the relevant sections from my configuration.yaml for obtaining the sensors for the envoy, flukso, and the value template for the power wheel. I have a value template for the solar production that farces a zero value after the sun sets as it will display incorrectly that it’s generating a few watts after sunset otherwise.

sensor 1:  
  - platform: enphase_envoy
    ip_address: your_envoy_ip_address_here
    username: installer
    password: your_password_here

sensor 2:
  - platform: mqtt    
    state_topic: "/sensor/your_consumption_sensor_id_here/gauge"
    name: "fluksoconsumption"
    qos: 0
    unit_of_measurement: "W"
    value_template: '{{ value_json[1] }}'
    
  - platform: mqtt    
    state_topic: "/sensor/your_Hot_water_consumption_sensor_id_here/gauge"
    name: "fluksoHWSconsumption
    qos: 0
    unit_of_measurement: "W"
    value_template: '{{ value_json[1] }}'    

  - platform: mqtt    
    state_topic: "/sensor/your_production_sensor_id_here/gauge"
    name: "fluksoproduction"
    qos: 0
    unit_of_measurement: "W"
    value_template: '{% if is_state("sun.sun", "below_horizon")%}0{%else%}{{ value_json[1] }}{%endif%}'
  
  - platform: template
    sensors:

      exporting:
        friendly_name: "Current Energy Exporting"
        value_template: "{{ [0, (states('sensor.fluksoproduction') | int - states('sensor.fluksoconsumption') | int)] | max }}"
        unit_of_measurement: 'W'
        icon_template: mdi:flash
      importing:
        friendly_name: "Current Energy Importing"
        value_template: "{{ [0, (states('sensor.fluksoconsumption') | int + states('sensor.fluksoHWSconsumption') | int - states('sensor.fluksoproduction') | int)] | max }}"
        unit_of_measurement: 'W'
        icon_template: mdi:flash
      solarpower:
        friendly_name: "Solar Power"
        value_template: "{{ states('sensor.fluksoproduction')}}"
        unit_of_measurement: 'W'
        icon_template: mdi:flash    
        

Hope that helps?

Further to this and looking at your original question - you need to access these enphase sensors - I’m not sure if you can get these without the installer password? You can use these instead of the Flukso sensors in my examples above by substituting sensor.fluksoproduction and sensor.fluksoconsumption with the following (except for the HWS so you can delete that from the sensor and value template)

          - sensor.envoy_current_energy_consumption
          - sensor.envoy_current_energy_production

EDIT - this isn’t going to give you real-time updates - These two envoy sensors are updated every 30 seconds, so might be useless for you? The Flukso is real-time with the mqqt data updating many times per second …

thanks, I have per panel access and also have access to the installer toolkit.

I’m using the current_energy_production and consumption sensors for my power distribution wheel, it’s just the energy distribution I can’t seem to get right. I do like your template to deal with the sun setting because it bothered me that the inverter consumption was still showing when they stopped producing.

I figured it out myself, in case anyone elese wonders, use this property as style: --mdc-icon-size

1 Like

@spudje - Do you mind sharing an example of how/where to set that property for icon size? Any idea how to change font size too? Thanks

Yes, sure, this is my power wheel configuration. Note that I also use card-mod, hui-element (and a bunch of others, required for this layout: A different take on designing a Lovelace UI ) But I honestly don’t exactly know what functionality comes with which custom component.

          - card_type: picture-elements
            type: custom:hui-element
            image: "data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 50 50' /%3E"
            style:
              top: 12%
              left: 85%
              width: 20.97%
              height: 1px
              font-size: 1vw
              "#root > hui-element > power-wheel-card":
                $: |
                  ha-card {
                    box-shadow: none;
                  }
                  #title {
                    font-size: 1.5vw !important;
                    padding-bottom: 0px !important;
                  }
                  .wheel {
                    padding-top: 1px !important;
                    padding-bottom: 2px !important;
                  }
                  .wheel > div {
                    padding-top: 2px !important;
                    padding-bottom: 2px !important;
                  }
                  #row {
                    height: 40px !important;
                  }
                  #toggle-button {
                    --mdc-icon-size: 1vw;
                  }
                  #cell-solar {
                    padding-left: 23% !important;
                  }
                  #icon-solar {
                    --mdc-icon-size: 2.6vw;
                  }
                  #icon-home {
                    --mdc-icon-size: 2.6vw;
                  }
                  #icon-grid {
                    --mdc-icon-size: 2.6vw;
                  }
                  #icon-solar2grid {
                    --mdc-icon-size: 2.6vw;
                    padding-right:10px;
                  }
                  #value-solar2grid {
                    padding-right:20px;
                  }
                  #icon-solar2home {
                    --mdc-icon-size: 2.6vw;
                    padding-left:10px;
                  }
                  #value-solar2home {
                    padding-left:20px;
                  }
                  #icon-grid2home {
                    --mdc-icon-size: 2.6vw;
                  }
                  #unit {
                    font-size: 1.3vw !important; 
                  }

Replace the lines such as

`           "#root > hui-element > power-wheel-card":
                $: |
                  ha-card`

with the DOM tree position of your power wheel card.

hi

I’m new around home assistant, I tried to integrate the power wheel, but it isn’t showing me the values like it should, I tried some workarounds described here but its not working, I have two shelly sensors one reading the solar production and the other reads what comes and goes to the grid.
when I integrated them on the power wheel the power wheel shows correctly the solar production, and what comes and goes to the grid on the arrow, but the grid shows 0 and the home shows the same numbers from the solar production, can anyone help me on this.

Thks

Hi, love this card! Been looking for something like this for a while so thank you!

Two questions relating to the Money view:

  1. Would it be possible to include a daily charge rate? I live in Australia and every day we get charged a flat rate ($0.94) for Grid power so it would be good to be able to include this rate into the card.

  2. More of a philisophical question, but should the amount of ‘money’ generated through solar power be subtracted from the amount of money generated through grid power to give you the total cost of power for the house? So in my example below, $0.80 would be subtracted from $1.08 to show the total cost of power being $0.28

Thanks!

1 Like

There wasn’t much philosophing going on when I implemented this view. :wink: It’s just the values of the Energy view multiplied by the rate. But the values will be hidden in future for users who have a different energy_consumption_rate vs energy_production_rate. See bug report.

For the feature request on the daily charge rate, could you post a feature request here on GitHub? Otherwise it gets lost in this topic.

It helps others helping you when you post also your configuration. But did you figure it out already?

Thx for you message.

  • Nr 1 is a nice feature request. Could you post it here on GitHub, so it won’t get lost?
  • Nr 2 is discussed here on GitHub.
  • Nr 3 is also a nice feature request. Could you elaborate a bit more on this (maybe an example) in a (separate, please) feature request on GitHub?
  • Nr 4 should be possible. Try omitting the title parameter in your config.

Thank you! I have raised two feature requests on Github!

1 Like

GoodEvening
I have a Shelly EM configured via MQTT to home assistant.
Shelly have 2 sensor, one to grid counter and one to photovoltaic counter.
how should i correctly configure power whell having only these two values?
thank u

If you have one sensor for the power that your solar panels deliver and you have a second sensor for what is imported from/exported to the grid then you should be able to set up a config reading the readme file: GitHub - gurbyz/power-wheel-card: An intuitive way to represent the power and energy that your home is consuming or producing. (A custom card for the Lovelace UI of Home Assistant.) Check the paragraph “Requirements for the power view” (point 1 and 2ii for you).

Check if the polarity of both sensor are exactly what the card is expecting. Otherwise fix that by making some template sensors or maybe better: reverse the polarity by using the production_is_positive parameter.

If it doesn’t work, please post here what you use as config.

This is my power wheel card config but I don’t think I am doing this right. I have an Eagle Legacy connected to my power meter and I have a solaredge inverter. Can anyone point me in the right direction?

grid_power_consumption_entity: sensor.eagle_200_total_meter_energy_delivered
grid_power_production_entity: sensor.eagle_200_total_meter_energy_received
solar_power_entity: sensor.solaredge_energy_today_kwh
title: Power wheel
type: ‘custom:power-wheel-card’

You 're supplying energy (kWh) sensors to power (W) parameters. That doesn’t work. Please start with supplying power (W) sensors to the parameters of the power view. If you’ve got the power view working, then start with the next view. What power sensors do you have at hand?

There is an improved version of the READme file (not yet released) here. It’s a bit more readable than the current documentation and has a better structure.

1 Like

AFAIK that’s for safety of the engineers in the field. Imagine there’s a power outage and the field engineers (probably Stedin or so) are trying to fix it while all the PV panels in this city or putting power back onto the grid. That would make their work extremely dangerous. (as if it wasn’t without this)

I am using the power wheel to monitor my home setup. I dont have a home battery, but I would love to monitor the energy/power going into my electric car. I thought I could use the beta battery feature for this.

Now for reasons I don’t understand, the current implementation of the battery feature does not have a kWh energy input, only a battery charge in %. To me this is weird. I would have expected to see the kWh also for this.

If I had the kWh entity, then I could use the (beta) battery feature to monitor how much energy is going to my car. Does any of this make sense to other users, and would it be feasible to have this added?

Thomas

I think you’re a bit confused here - each “input” requires a device to measure how much power/energy is being produced/consumed. For Solar generation, you get this either from your invertor or from a power meter or similar. For the Battery connected to your house that’s used as a storage device, you get it from the Battery controller. For Power consumed you get it from a power meter or similar device.

It seems you’re incorrectly thinking your car’s battery is the same as a storage battery connected to your house - that’s wrong. Think of your car’s battery as being an appliance such as a kettle - this is because it “consumes” energy and doesn’t “supply” energy back into the house. To measure how much power/energy your car battery is “consuming” from the house, you’ll need a dedicated power meter for the connection to the car’s charging circuit and a way to get that measurement into Home Assistant. One simple solution is to use a device like this - you’d connect the car’s charger to this which would then allow you to see how much power/energy the car is using. https://www.kasasmart.com/us/products/smart-plugs/kasa-smart-plug-energy-monitoring-hs110

I totally understand this. In fact, I have built a specific interface using an espWROOM which “listens” to the power & energy measurements of my NewMotion charging point and sends this to HA over mqtt. My charger has a built-in MDI certified power meter which communicates with the charger control over Modbus RTU (RS485). I listen to these Modbus messages and extract the useful information. (I don’t send anything so I don’t mess up how the charger works). So I have the measurement part covered. (I’ll post my setup on Github when I find some time to do so)

Right now the car battery indeed acts more or less as an appliance, only consuming energy. However the first bidirectional chargers are starting to appear which would allow the car to also work as a home battery. This makes sense in a lot of scenarios. For example: when I come home in the evening the leftover energy in the car battery could be used to compensate peaks in energy usage in the home. The battery is then recharged during the night.

The use case for me however is that I want to split off the energy usage of my car from the usage of my home. Why? The battery is 90kWh and charges at 11kW, that has a huge impact and completely obscures normal energy/power usage in the home.

Making it appear as a home battery is a simple way to do this. It actually works for the power sensor, unfortunately there is no way to link the energy sensor part as this is not possible in the power wheel. Adding a sensor input for energy (indicating how much energy has gone into / come out of the battery) would solve this. I agree this is not the intended use case, but for me this would make sense for other cases as well where you would rather display the available energy in a battery in kWh rather than in %.

Thomas