UK Home Electricity Usage Monitor

(Wayne) #22

@Jon_Hope please share your code. I’d be interested to see if I can get this integrated.

(Jon) #23

Sure, I will send you a private message when I’m in front of my computer and can easily cut and paste.

(Paul) #24

Just wondering if you got any further with this? Or for that matter if anyone else has?

I’ve got an EU v2 and its reporting Volts at 89:

Current States
energy: 0.04 kWh
power: 1124.4 W
voltage: 89.034 V
current: 25.095 A
powerCost: 2.38586691672 £/day
lastReset: 2017/04/25 06:44:54
statsMode: Today
costOfEnergy: 0.00327117 £
energyToday: 2.486 kWh
costOfEnergyToday: 0.21978726 £
energy24Hours: 13.650 kWh
costOfEnergy24Hours: 1.20679650 £
energy7Days: 45.328 kWh
costOfEnergy7Days: 4.00744848 £
energyMonth: 45.221 kWh
costOfEnergyMonth: 3.99798861 £
energyYear: 45.221 kWh
costOfEnergyYear: 3.99798861 £
energyLifetime: 45.328 kWh
costOfEnergyLifetime: 4.00744848 £
dispPower: 1124.4 W
dispPowerCost: £2.39 per day
dispCurrent: 25.1 A
dispVoltage: 89.0 V
dispEnergy: 0.04 kWh
dispCostOfEnergy: £0.00
dispEnergyPeriod: 2.49 kWh
dispCostOfEnergyPeriod: £0.22

Are you all still using the DTH linked by @daleajones above.


(Tommy Haywood) #25

Ive got the mihome (Energinie) hub and whole house monitor. There is a smart app to hook that into smartthings.

Hub will also give you other connected device and swicth capability…

and here is the monitor

for smart app…

(Chris Irwin) #26

Hi Jon

I have a Wattson and Energyhive hub so would be grateful if you could share tyhe code you developed. I want to link my Wattson to Smartthings.

(Chris Irwin) #27

Hi Jon, please can you share your Wattson code. I have one and want to link it to Smartthings.

(Jon) #28

Hi, sorry I have not logged in for a while.

here is my code, though sadly im only here because my integration stopped working.


  • Wattson Energy Monitor
  • Copyright 2017 Jon Hope
  • Licensed under the Apache License, Version 2.0 (the “License”); you may not use this file except
  • in compliance with the License. You may obtain a copy of the License at:
  • Unless required by applicable law or agreed to in writing, software distributed under the License is distributed
  • on an “AS IS” BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License
  • for the specific language governing permissions and limitations under the License.

preferences {
input “token”, “text”, title: “Access Token”, required: true

metadata {
definition (name: “Wattson Energy Monitor v2”, namespace: “Jon Hope”, author: “Jon_Hope”) {
capability "Power Meter"
capability "Polling"
capability "Health Check"
capability "Refresh"
capability "Sensor"
capability “Actuator”

    attribute "curMonthName", "string"


// simulator metadata
simulator {
for (int i = 0; i <= 100; i += 10) {
status “power ${i} Wh”: new physicalgraph.zwave.Zwave().meterV1.meterReport(
scaledMeterValue: i, precision: 3, meterType: 0, scale: 0, size: 4).incomingMessage()

tiles (scale: 2) {
valueTile(“power”, “device.power”, width:6, height:4)
state “device.power”,
label: ‘${currentValue}W’,
icon: “”,
[value: 1, color: “#fff000”],
[value: 200, color: “#fff000”],
[value: 300, color: “#42db13”],
[value: 400, color: “#C3C300”],
[value: 600, color: “#ffce00”],
[value: 800, color: “#FFFB14”],
[value: 1000, color: “#FFA500”],
[value: 1500, color: “#ff7400”],
[value: 2000, color: “#ff5a00”],
[value: 3000, color: “#ff0000”]

    //graph tile goes here


  //last reading tile 
    valueTile("readingUpdated", "device.readingUpdated", width: 4, height: 2, decoration: "flat") {
            state "default", label:'Last Reading:\n${currentValue}'

//refresh tile
                    inactiveLabel: false,
                    decoration: "flat",
                    width: 2,
                    height: 2) {

// end of tiles

//end of metadata

// handle commands
def poll() {
log.debug "Executing ‘poll’"


// Get the sensor reading
private getReading() {
def today = new java.util.Date()
def strDateFormat = “MMMM”;
def sdf = new java.text.SimpleDateFormat(strDateFormat);
def curMonthName = sdf.format(today)
def curMonth = device.currentValue(‘monthName’)
def readingClosure = {
response ->
log.debug "result: $"
log.debug "last reading time: $"
log.debug "reading: $"
log.debug "Current Month: $curMonthName"
sendEvent(name: “power”, value:
def tf = new java.text.SimpleDateFormat(“MMM d, yyyy - h:mm:ss a”)
def readingUpdated = "${tf.format(}"
log.debug "Last Updated: $readingUpdated"
sendEvent(name: “readingUpdated”, value: readingUpdated)
sendEvent(name: “curMonthName”, value: curMonth)

def params = [
uri: “”,
path: “/mobile_proxy/getInstant”,
query: [“token”: token],
contentType: ‘application/json’
httpGet(params, readingClosure)

(Jon) #30

I’m currently pretty close to getting this to work with energyhive:

(Jon) #31

So just to update you I managed to get version 3 of the efergy device handler working with energyhive. I had to comment out lines 1052 and 528 from the code as written, because I think energyhive’s api is subtly different has has no support for the tarrif rate. Once those lines are gone it seems fine.

Good luck!

(Andrew) #32

Hey, do you know where I can buy the Aeon HEM you’ve mentioned? I’ve just set myself up on InfluxDB/Grafana using your guide and would love to pipe in the power consumption data for my whole home