This is to report that the solution described in @Confused’s tutorial “Bulb.co.uk SMETS2 Smart Meters to openHAB” is not unique to the “Bulb.co.uk” energy supplier. And in fact it seems to work with any SMETS2 smart meter installation that uses an IHD (In Home Display) manufactured by the company Chameleon.
The essential point is that the importation of the IHD into your SmartThings account is done based on the IHD device’s GUID, and so does not actually depend on the actual energy supplier account.
To do the importation into SmartThings you just need to “pretend” that Bulb is your supplier, so when you import the IHD into your SmartThings account, search for the STEC device type under the supplier name “Bulb” (even though your energy supplier is not Bulb), and follow the instructions on the Bulb Web-Site
@Confused described the configuration for openHAB v2, but for openHAB v3.x you do it a bit differently, with the HTTP URL v3.x binding. There seems to be a bug in the HTTP v3.x binding for configuration via a .things
file, but you can configure it in the Main UI as follows (where DEVICE_GUID
denotes the GUID of your IHD, and API_TOKEN
denotes the user token for your SmartThings account)…
UID: http:url:smartmeter
label: Smart Meter
thingTypeUID: http:url
configuration:
authMode: BASIC_PREEMPTIVE
headers:
- Authorization=Bearer API_TOKEN
ignoreSSLErrors: false
baseURL: https://api.smartthings.com/v1/devices/DEVICE_GUID/components/main/status
delay: 0
stateMethod: GET
refresh: 60
commandMethod: GET
timeout: 3000
bufferSize: 2048
location: Under Stairs
channels:
- id: electricityused
channelTypeUID: http:number
label: electricityused
description: ""
configuration:
stateTransformation: JSONPATH:$.energyMeter.energy.value
- id: gasused
channelTypeUID: http:number
label: gasused
description: ""
configuration:
stateTransformation: JSONPATH:$.gasMeter.gasMeter.value
And the respective .items
file is as follows…
Number:Energy Electricity_Meter_Energy_Used "Electricity Meter Energy Used [%.3f kWh]" <energy> {channel="http:url:smartmeter:electricityused"}
Number:Energy Gas_Meter_Energy_Used "Gas Meter Energy Used [%.3f kWh]" <gas> {channel="http:url:smartmeter:gasused"}