Xcel Energy ITron Gen 5 Riva

Mine came online this morning about 7:55 - that’s when my docker container stopped throwing errors.

The nmap now shows the port as open.

All looks to be working.

1 Like

Same, mine started working yesterday as well

I got my official enrollment email this morning.

I got my official enrollment email as well, and the Edit button still does nothing as far as actually allowing me to add the meter to my network. @rucknapucknavitz were you able to get your meter on your network?

I’m trying various browsers and even turning off my pihole trying to make this work and just nothing.

I had more success getting online with the Xcel mobile app than the website. Maybe give that a go?

Poking at it again today. I followed the steps to get logged into the main homeassistant container. The config folder is just at /config. :tada:.

So, if you are running the HassOS, and you want to use the command line sensors, make sure you are using /config, not /root/config. The /root/config works in the ssh terminal, but that runs in another container.

Here is the config I am using:

sensor:
  - platform: command_line
    unique_id: xcel_meter_power
    name: "Xcel Meter Power"
    command: "OPENSSL_CONF=/config/xcelcerts/openssl.conf /usr/bin/curl --ciphers ECDHE-ECDSA-AES128-CCM8 --insecure --url https://<ip address>:8081/upt/1/mr/1/r --cert /config/xcelcerts/cert.pem --key /config/xcelcerts/key.pem 2>&1 | grep -o '<value>.*</value>' | grep -Eo '[0-9]+'"
    unit_of_measurement: "W"
    value_template: "{{ float(value) if is_number(value_json) }}"
    device_class: 'power'
    scan_interval: 91
    command_timeout: 16

  - platform: command_line
    unique_id: xcel_meter_consumption
    name: "Xcel Meter Consumption"
    command: "OPENSSL_CONF=/config/xcelcerts/openssl.conf /usr/bin/curl --ciphers ECDHE-ECDSA-AES128-CCM8 --insecure --url https://<ip address>:8081/upt/1/mr/3/r --cert /config/xcelcerts/cert.pem --key /config/xcelcerts/key.pem 2>&1 | grep -o '<value>.*</value>' | grep -Eo '[0-9]+'"
    unit_of_measurement: "kWh"
    value_template: "{{ float(value) | multiply(0.001) | round(3) if is_number(value) }}"
    device_class: 'energy'
    state_class: 'total_increasing'
    scan_interval: 91
    command_timeout: 16

Now how do I make this show up as the “grid” in the energy panel?

1 Like

For what it’s worth, I got my Launchpad enrollment email on 2/21 and I have never had the edit button work on any browser I’ve tried. I’m out of ideas at this point.

Since I moved to my current place last November, I’ve never been able to see my usage on xcel’s website, but on demand reads do work. Unsure if that’s related or not. I’ve tried calling xcel and their responses range from confusion to accusing me of doing something dangerous/illegal/not allowed by trying to connect my meter to wifi.

@whit, do you have an add device button?

I do have an add device button which takes me to this add device page but I haven’t tried to actually add a device yet.

Even if I’m able to add a device, it wouldn’t be useful because I still can’t get my meter connected to my wifi. No matter what I try, I can’t click this edit button to add my network information.

That is a bummer. This has to be the weirdest way to setup wifi I have ever done. I am lucky I just went on a big journey with my router to make a new setup, or I would have lost my mind.

It’s weird that it says “ready to go” too. I remember mine having an error there, until it said it was connected.

I don’t want to mess around with my setup. It just started working for me. Otherwise, I would take more screenshots of what I did.

Have you tried in a different browser? I think I used firefox. But Chrome or edge might work better.

I’ve learned a few things. I might have cracked this, but I have to wait 2 hours.

  1. You can choose what sensors end up in your energy panel by going to settings->dashboards->energy and clicking on Add Consumption in the Grid Consumption area on the left.

screenshot-2023-04-26-1682539045

  1. When I did that with my command line sensor, it doesn’t show up. There is a not-very-helpful help message that says this:

Which links to here: Expected data source not listed - Home Assistant

Interestingly, the command line sensor also doesn’t show up in developer tools->statistics.

  1. I have device_class: energy, state_class: total (I tried total_increasing too), and unit_of_measurement: "kWh". These don’t show up in the developer tools->states:

  1. My guess is that has something to do with the command line sensor. In fact, in the template sensor description, it says:

Templating is a powerful feature that allows you to control information going into and out of the system. It is used for:

  1. So that is what I did. I added a template sensor that just copies the sensor from the command line version and adds the correct statistics:
template:
  - sensor:
      - name: Grid Energy
        unique_id: template_grid_energy
        unit_of_measurement: "kWh"
        device_class: energy
        state_class: total
        state: >
          {{ states('sensor.xcel_meter_consumption') | float }}

This new sensor (sensor.grid_energy) shows up in the statistics, and in the list in the Settings->Dashboards->Energy->Add Consumption menu. :tada:.

  1. Update: This solution, to add the classes to the sensor worked for me as well:
    Xcel Energy ITron Gen 5 Riva - #186 by mcblok

And, I have spent long enough typing this out, that the result is in the energy dashboard!

Alright. Now I just need to sit back and watch my data. I am already enjoying seeing things like my oven’s energy use, and the furnace’s and the “background” levels. They are all higher than I expected.

Thanks for everyone who poked and prodded at this to get a solution. Let’s see how long it lasts before the API breaks :smiley:

2 Likes

Yeah I think I’ve tried every browser known to man at this point, and the xcel app.

My smart meter usage doesn’t even show up on my Xcel account, so I think there’s a bigger Xcel issue with my account that’s leading to this problem.

1 Like

You can do this without creating another sensor. Just add the following in configuration.yaml:

homeassistant:
  customize:
    sensor.smart_meter_consumption:
      device_class: energy
      state_class: total_increasing
1 Like

Did anyone else lose their command line sensor in the latest HA update (2023.5.0)? It no longer writes data, but I still get a positive connection in the terminal using the curl command.

Edit: FIXED. See post 188. Had a bad path for the openssl.config that didn’t catch up with me until the latest upgrade.

1 Like

Whew, that made me nervious. But I just upgraded and mine is still working.

What curl command are you using on the terminal? Did you see my note about about using /config instead of /root/config to get the cert files correct in the command line sensor?

This did work for me. I am not sure how to do this in an included file, or why it wouldn’t work when added to the command line sensor itself. But this does work. Thank you.

EDIT: FIXED

Apparently I had an extra non-existent path in my openssl.conf. Looks like it didn’t catch up with me until the 2023.5.0 update. I deleted the /xcelcerts/ part of my path and works fine again.


Yeah, the only thing that changed was the upgrade. Odd.

# CLI Sensor for Xcel Meter
sensor:
  - platform: command_line
    unique_id: xcel_meter_power
    name: "Smart Electric Meter Power"
    command: "OPENSSL_CONF=/config/xcelcerts/xcel-openssl.conf /usr/bin/curl --ciphers ECDHE-ECDSA-AES128-CCM8 --insecure --url https://192.168.20.54:8081/upt/1/mr/1/r --cert /config/xcel-cert.pem --key /config/xcel-key.pem 2>&1 | grep -o '<value>.*</value>' | grep -Eo '[0-9]+'"
    unit_of_measurement: "W"
    device_class: 'power'
    scan_interval: 5
    command_timeout: 5

  - platform: command_line
    unique_id: xcel_meter_consumption
    name: "Smart Electric Meter Consumption"
    command: "OPENSSL_CONF=/config/xcelcerts/xcel-openssl.conf /usr/bin/curl --ciphers ECDHE-ECDSA-AES128-CCM8 --insecure --url https://192.168.20.54:8081/upt/1/mr/3/r --cert /config/xcel-cert.pem --key /config/xcel-key.pem 2>&1 | grep -o '<value>.*</value>' | grep -Eo '[0-9]+'"
    unit_of_measurement: "kWh"
    value_template: "{{ value | multiply(0.001) | round(3)}}"
    device_class: 'energy'
    state_class: 'total_increasing'
    scan_interval: 5
    command_timeout: 5

openssl config:

openssl_conf = openssl_init

[openssl_init]
ssl_conf = ssl_sect

[ssl_sect]
system_default = system_default_sect

[system_default_sect]
Options = UnsafeLegacyRenegotiation

This is all I’m seeing in the logs:

Logger: homeassistant.components.command_line.utils
Source: components/command_line/utils.py:54
Integration: command_line (documentation, issues)
First occurred: 11:33:21 (38 occurrences)
Last logged: 11:36:22
Command failed (with return code 1): OPENSSL_CONF=/config/xcelcerts/xcel-openssl.conf /usr/bin/curl --ciphers ECDHE-ECDSA-AES128-CCM8 --insecure --url https://192.168.20.54:8081/upt/1/mr/1/r --cert /config/xcel-cert.pem --key /config/xcel-key.pem 2>&1 | grep -o ‘.’ | grep -Eo ‘[0-9]+’
Command failed (with return code 1): OPENSSL_CONF=/config/xcelcerts/xcel-openssl.conf /usr/bin/curl --ciphers ECDHE-ECDSA-AES128-CCM8 --insecure --url https://192.168.20.54:8081/upt/1/mr/3/r --cert /config/xcel-cert.pem --key /config/xcel-key.pem 2>&1 | grep -o '.
’ | grep -Eo ‘[0-9]+’

1 Like

Was following along with this thread once I got my new Xcel iTron meter as well - thank you for the fantastic information and links; it got me pointed in the right direction. I don’t have Home Assistant set up (yet), but I leveraged the GitHub - zaknye/xcel_itron2mqtt: Broadcast your Xcel smart meter to MQTT project posted earlier in the thread and created a bit of a Frankenstein project that connects the meter to MQTT to Prometheus for analysis in Grafana. If anyone is just getting started with their xcel meter and wants to analyze their data, it might be worth checking out

It’s super rough around the edges (feedback is VERY welcome), but I know that I’m super excited to get real-time electrical use monitoring so hopefully it’ll help someone else out as well. I have additional SolarEdge monitoring as well that I plan to merge into this repo in the near future.

4 Likes

The integration was working fine until yesterday when I suddenly got the following error:

curl: (35) error:0A000412:SSL routines::sslv3 alert bad certificate

Anyone seen this error?

Removed the device, recreated the certs, added the device again, and now it works. Hope this is not a monthly exercise…