BCHydro component - where did it go?

Pity this stopped working, but as you said, its a web-scraping API so will constantly be breaking.

I guess the best bet for now is to get one of the official Rainforest Automation devices from BC Hydro itself - looks like there are already components for those that allow realtime live power usage monitoring, so can be stored in HA with full history etc too.

Thanks for all your work on this everyone!

I just joined the hydro home trial and ordered the hub thing. It looks like Ohio rolled out the same hub and some people there got it integrating with HA maybe, so that could be a path. Something is accessing data to come into the hydro home app, so that could be a thing too …

I just ordered my HydroHome gateway a couple days ago, looking forward to integrating it into HA as well.

Signed up for the “trial” app account. Waiting for data to be populated. Looks as if without the hardware ( hub ) the app will show day based stats 1 day in the past. With hub looks like real time is able to be accomplished

Got my hub and had to go back and forth with support to get it working but it’s connected. Now to figure out the HA stuff… :slight_smile:

1 Like

I added:

utility_meter:
  energy:
    source: sensor.energy_used
    cycle: hourly
shell_command:
  wake_energy_hub: mosquitto_pub -h <<localip>> -p 2883 -t '_zigbee_metering/request/is_app_open' -m 'ha-monitor' -i powerley-energybridge-homecontrol
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

And set up an automation to run the shell command every 5 minutes (actually I just checked and its only running once an hour, so I’m fixing that now!)

I still haven’t figured out how to get the rates in, with the step 2 and daily minimum and stuff, but it’s getting there.

Rates (from Residential Rates):

Charge Rate
Basic Charge: A small, daily amount that partially recovers fixed customer-related costs, including customer service channels, metering, billing, payment processing, collections, and distribution system costs that are customer-related (electrical lines and transformers). $0.2077 per day.
Energy Charge Step 1 $0.0939 per kWh for first 1,350 in an average two month billing period (22.1918 kWh per day).
Energy Charge Step 2 $0.1408 per kWh over the 1,350 Step 1 threshold.
Minimum Charge $0.2077 per day. Equal to the Basic Charge.
2 Likes

On a side note, does anyone have interest in a Fortis integration? For gas (I don’t get power through fortis, though I think some places do?)

1 Like

I’d be interested. I get gas from fortisBC

1 Like

Once you have the home bridge set and you binded to your meter, pretty much what @Courtenay_Watson has works!
I did it a bit different, I have Node-Red, so used Node-Red to update the live usage in an input_number helper, then pretty much did what is above also you need to add utility_meter sensors.
Anyway not sure if anyone is interested, but I can put a guide if anyone likes! feel free to tag me if you need more help.

Cheers,

1 Like

Awesome! Registering for the trial now!

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?