BCHydro component - where did it go?

Mine just arrived! I’m going to work on duplicating your setup!

A tip for anyone setting their Energy Bridge device… Place it as close to the meter as possible and leave it alone during the pairing process. I was expecting mine to pair within an hour - it can take much longer. I ended up trying the “Remove Smart Meter Bind” and “Complete Factory Reset” options with no pairing changes. Don’t try any of those options - there’s no need.

Support told me to leave it overnight and if it fails to pair that they’ll manually issue a bind request.

My Energy Bridge settings tab is currently stuck with a red X with a rotating circle around it and no ability to enter the “Smart Meter Connectivity” menu. My Energy Bridge ZigBee Install Code stayed the same even after a “Remove Smart Meter Bind”.

I’ve passed on the tip to “just leave it alone to pair” to my friends who are receiving their hubs any day now.

I’ll move it to my server rack and put it on Ethernet after it’s paired.

So the Rain Forest isn’t open API to HA?

FortisBC NG intergration would be awesome.

Doesn’t Fortis still do manual readings though? Don’t think their meters transmit anything

2 Likes

I just joined the HydroHome trial and set up my Energy Bridge recently. I am able to see my power usage in the “HydroHome” app, but I really want to integrate the Energy Bridge with Home Assistant.

I saw the sample config @Courtenay_Watson , but I couldn’t get Home Assistant to pick up the Energy Bridge. I see the sensor.bchydro_energy_bridge entity in Home Assistant (I had to add a unique_id: entry because HASS complained about that entity), but it shows no useful information.

Was anyone else get the power readings from the Energy Bridge into Home Assistant working? Any tips or pointers would be greatly appreciated :slight_smile:

Here is what I did to get the HydroHome gateway working on my config. (Using some info from here: DTE (Powerley) Energy Bridge Endpoint error - #83 by eddyg)

  1. Assign HydroHome gateway a static IP.
  2. Install the MQTT broker from the Add-on Store.
  3. Configured the mosquito broker as follows:
certfile: fullchain.pem
customize:
 active: true
 folder: mosquitto
keyfile: privkey.pem
logins: []
require_certificate: false
  1. Create a file in /share/mosquitto/bchydroenergybridge.conf with the contents:
connection bchydroenergybridge
address 192.168.0.60:2883
clientid homeassistant-1
try_private false
start_type automatic
topic # both 0

where 192.168.0.60 is the static IP assigned in step 1.

  1. Start the MQTT broker.
  2. Install the MQTT broker integration (MQTT - Home Assistant)
  3. Under the configure menu of the integration, listen to # and start listening. You should get messages like { "time": 1643912882895, "demand": 2675 } every second or so. If you are not getting messages, something is wrong with your above config.
  4. Add two new sensors to your config.yaml:
sensor:
    #bchydro energy bridge
  - platform: mqtt
    name: "BCHydro Electricity Consumption"
    icon: mdi:transmission-tower
    state_topic: "event/metering/summation/minute"
    unit_of_measurement: 'kWh'
    # the Energy Bridge returns "Watt-minutes" every minute in the "value"; convert it to kilowatt-hours
    value_template: "{{ value_json.value | float / 60000 }}"
    # the "time" in the message is a Unix-like timestamp (in milliseconds) of the start of the last reading
    last_reset_value_template:  "{{ now().fromtimestamp(value_json.time / 1000).replace(tzinfo=now().tzinfo) }}"
    device_class: energy
    state_class: total
  - platform: mqtt
    name: "BCHydro Instantaneous Demand"
    icon: mdi:transmission-tower-export
    state_topic: "event/metering/instantaneous_demand"
    unit_of_measurement: 'kW'
    # the Energy Bridge returns watts, convert it to kilowatts
    value_template: "{{ value_json.demand | float / 1000 }}"
    device_class: power
    state_class: measurement
  1. Add BCHydro Electricity Consumption as your Grid Consumption value in the Energy dashboard.
  2. If you want a card for instantaneous demand, I am using the custom mini graph card with this config:
type: custom:mini-graph-card
align_state: center
animate: true
card: null
entities:
  - entity: sensor.bchydro_instantaneous_demand
    index: 0
font_size: 175
graph: line
line_width: 1
height: 150
hour24: true
name: Demand
points_per_hour: 4
hours_to_show: 24
show:
  extrema: true
  icon: true
  name: true
style: |
  ha-card {
   transform: scale(0.95);
   background-size: 100% 100%;
   border-style: dotted;
   border-width: 1px;
  }

You could also do something with the statistics cards:

type: vertical-stack
cards:
  - type: statistics-graph
    entities:
      - sensor.bchydro_instantaneous_demand
    chart_type: line
    stat_types:
      - mean
      - min
      - max
    title: Instantaneous Electricity Demand Daily
    days_to_show: 1
  - type: statistics-graph
    entities:
      - sensor.bchydro_instantaneous_demand
    chart_type: line
    stat_types:
      - mean
      - min
      - max
    title: Instantaneous Electricity Demand Weekly
    days_to_show: 7
2 Likes

Hello, I also have a BC Hydro HydroHome hub as part of their trial. I will try the tips above to see if I can connect it to Home Assistant.

The hub/trial also includes some Sinope Zigbee smart thermostats that interface with the HydroHome hub. I’m just wondering, has anybody else been able to successfully interface HydroHome-connected Sinope thermostats to Home Assistant?

Did you ever manage to get the two step rates integrated?

Just to build off of tfox’s work.

I have solar power along with the Hydro home so I had to makes changes to the entities to handle the scenario of sending power back to BC Hydro.

My sensors look like:

# bc hydro energy bridge
- platform: mqtt
  name: "BC Hydro Electricity Consumption"
  icon: mdi:transmission-tower
  state_topic: "event/metering/summation/minute"
  unit_of_measurement: "kWh"
  # the Energy Bridge returns "Watt-minutes" every minute in the "value"; convert it to kilowatt-hours
  #value_template: "{{ value_json.value | float / 60000 }}"
  value_template: "{% if value_json.value | float > 0 %}{{ value_json.value | float / 60000 }}{% else %}{{ 0 | float }}{% endif %}"
  # the "time" in the message is a Unix-like timestamp (in milliseconds) of the start of the last reading
  last_reset_value_template: "{{ now().fromtimestamp(value_json.time / 1000).replace(tzinfo=now().tzinfo) }}"
  device_class: energy
  state_class: total
- platform: mqtt
  name: "BC Hydro Electricity Return"
  icon: mdi:transmission-tower
  state_topic: "event/metering/summation/minute"
  unit_of_measurement: "kWh"
  # the Energy Bridge returns "Watt-minutes" every minute in the "value"; convert it to kilowatt-hours
  value_template: "{% if value_json.value | float < 0 %}{{ value_json.value | abs | float / 60000 }}{% else %}{{ 0 | float }}{% endif %}"
  # the "time" in the message is a Unix-like timestamp (in milliseconds) of the start of the last reading
  last_reset_value_template: "{{ now().fromtimestamp(value_json.time / 1000).replace(tzinfo=now().tzinfo) }}"
  device_class: energy
  state_class: total
- platform: mqtt
  name: "BC Hydro Instantaneous Demand"
  icon: mdi:transmission-tower-export
  state_topic: "event/metering/instantaneous_demand"
  unit_of_measurement: "kW"
  # the Energy Bridge returns watts, convert it to kilowatts
  value_template: "{{ value_json.demand | float / 1000 }}"
  device_class: power
  state_class: measurement

This makes it so one sensor only handles positive numbers and another for negative numbers (selling power.)

Then you can set it up like this on the energy panel:
image

2 Likes

I just signed up for the HydroHome trial (had never heard of it before seeing it on this HA forum, shouldn’t BC Hydro be telling us about these things? :stuck_out_tongue: ) but no data seems to be populated yet.

Is it better to get a HydroHome Hub ($50) instead of the Rainforest Eagle 200 ($120) to get live data into HomeAssistant? How do the apps compare? Or would it be better to just get clamps for the breaker panel?

You’re using solar in BC? Are you based in the interior or Metro Vancouver? Wondering if we get enough sun here to make it worth it? (Especially with the cheap electricity here)

Do you guys live one detached/town houses?

Per my understanding, the hub needs to be in range of the meter. I live in the 28th floor, do you know if they install the meters on the unit floor or in some power cabinet down in th ground floor or sub floors? Where I used to live before (outside Canada), the common practice was to have metering in the ground floor / sub-floors of the build, if so, there is no way a multi-story build will benefit of the hub.

BRs,
Jose

I’m in a detached house, it’s a panhandle lot with a long driveway and the meter is at the end of the drive. I have the hub in the closest corner of the house which is about 150’ from the meter and it was able to connect and maintain 3/4 bars of signal.

That’s through one exterior wall and then open air, so not sure how that would compare to transmitting through a building.

Depends on the radio technology used. Since you guys reported there is some paring process, I believe it is based on zigbee or other kind of mesh network radio layer. With repeaters/routers in the way it may travel long distances, but I hardly believe a point-to-point connection between hub and meter passing through 28 concrete slabs, furniture, people, etc.

I will investigate more, first try to discover where is the meter in my building.

Thanks for sharing!

Hey folks, figured I’d stop by and provide a 2022 update on the Python and HASS component for extracting BC Hydro account data.

Bad news: They implemented a hidden captcha on the login page. A couple of users reported auth issues a few weeks back, turns out the library wasn’t filling captcha values during login.

Good news: it appears that a headless browser can get past the captcha.

Bad news: that means this library is (once again) a step away from being dysfunctional. This is more fragile than being at BCHydro’s dev team whim, because the captcha machine learning can adjust quickly and without human intervention.

I’m in the middle of a library rewrite at WIP: Feat/headless rewrite by emcniece · Pull Request #25 · emcniece/bchydro · GitHub for the curious. Still frustrated with BCHydro’s corporate shell and lack of API access. I wish they would realize that exposing an API would let the community do the dev team’s work for them.

2 Likes

Yes I am in BC, but I am in the interior. My house gets a massive amount of sunlight for a good portion of the year.

With the Greener Home Grant my ROI period is 12 years or so, but if get an electric car in the next few years it’ll be much faster.

1 Like

That is really annoying actually. Thanks for keeping up with the project though. I’ll continue using it and hopefully someday they will provide a public API so this isn’t such a messy solution.

1 Like

I had left this for a bit due to … gestures broadly … but I just got a smart thermostat and am back on the “HA train” now so will likely be diving into this again soon!

1 Like

Has everyone gotten on OK with updating their MQTT sensors to deal with this coming change / warning?

Your manually configured MQTT sensor(s) needs attention
Manually configured MQTT sensor(s) found under platform key sensor.
Please move the configuration to the mqtt integration key and restart Home Assistant to fix this issue. See the documentation, for more information.

Original (what I have today in configuration.yaml):

sensor:
  - platform: mqtt
    name: "BCHydro Energy Bridge"
    state_topic: "event/metering/instantaneous_demand"
    #state_topic: "event/metering/summation/minute"
    unit_of_measurement: 'W'
    value_template: "{{value_json.demand}}"
  - platform: integration
    source: sensor.bchydro_energy_bridge
    name: "energy_used"
    unit_prefix: k
    round: 2

What I need to move to for the coming MQTT Sensor changes and where I’m stuck:

mqtt:
    sensor:
      - name: "BCHydro Energy Bridge"
        state_topic: "event/metering/instantaneous_demand"
        #state_topic: "event/metering/summation/minute"
        unit_of_measurement: 'W'
        value_template: "{{value_json.demand}}"
#I'm not sure what to do for the "- platform: integration" part below.  I forget where I copied this from / why I did this...
     - platform: integration
        source: sensor.bchydro_energy_bridge
        name: "energy_used"
        unit_prefix: k
        round: 2