I am able to use channel 11-12 but I’m using appdaemon.
I have never really tried in hass.
I can share my appdaemon code if you want.
I am able to use channel 11-12 but I’m using appdaemon.
I have never really tried in hass.
I can share my appdaemon code if you want.
power_get_request.py
import appdaemon.plugins.hass.hassapi as hass
import datetime
import requests
class IotaWattGet(hass.Hass):
dish_washer_old="0"
stove_old="0"
kitchen_island_old = "0"
washing_machine_old = "0"
dryer_old= "0"
stove_counter_old = "0"
coffee_counter_old = "0"
bonus_room_furnace_old = "0"
fridge_old = "0"
ensuite_old= "0"
garage_old = "0"
panel_plug_old = "0"
def initialize(self):
now = datetime.datetime.now()
self.run_every(self.get_request,now, 10)
def get_request(self,*args):
r = requests.get('http://192.168.68.160/status?inputs=yes&outputs=yes')
response=r.json()
dish_washer=response['inputs'][1]['Watts']
stove=response['inputs'][2]['Watts']
kitchen_island=response['inputs'][3]['Watts']
washing_machine=response['inputs'][4]['Watts']
dryer=response['inputs'][5]['Watts']
stove_counter=response['inputs'][6]['Watts']
coffee_counter=response['inputs'][7]['Watts']
bonus_room_furnace=response['inputs'][8]['Watts']
fridge=response['inputs'][9]['Watts']
ensuite=response['inputs'][10]['Watts']
garage=response['inputs'][11]['Watts']
panel_plug=response['inputs'][12]['Watts']
if dish_washer!=self.dish_washer_old:
self.set_state("sensor.dish_washer_power", state=dish_washer)
self.dish_washer_old=dish_washer
if stove!=self.stove_old:
self.set_state("sensor.stove_power", state=stove)
self.stove_old=stove
if kitchen_island!=self.kitchen_island_old:
self.set_state("sensor.kitchen_island_power", state=kitchen_island)
self.kitchen_island_old=kitchen_island
if washing_machine!=self.washing_machine_old:
self.set_state("sensor.washing_machine_power", state=washing_machine)
self.washing_machine_old=washing_machine
if dryer!=self.dryer_old:
self.set_state("sensor.dryer_power", state=dryer)
self.dryer_old=dryer
if stove_counter!=self.stove_counter_old:
self.set_state("sensor.stove_counter_power", state=stove_counter)
self.stove_counter_old=stove_counter
if coffee_counter!=self.coffee_counter_old:
self.set_state("sensor.coffee_counter_power", state=coffee_counter)
self.coffee_counter_old=coffee_counter
if bonus_room_furnace!=self.bonus_room_furnace_old:
self.set_state("sensor.bonus_room_furnace_power", state=bonus_room_furnace)
self.bonus_room_furnace_old=bonus_room_furnace
if fridge!=self.fridge_old:
self.set_state("sensor.fridge_power", state=fridge)
self.fridge_old=fridge
if ensuite!=self.ensuite_old:
self.set_state("sensor.ensuite_power", state=ensuite)
self.ensuite_old=ensuite
if garage!=self.garage_old:
self.set_state("sensor.garage_power", state=garage)
self.garage_old=garage
if panel_plug!=self.panel_plug_old:
self.set_state("sensor.panel_plug_power", state=panel_plug)
self.panel_plug_old=panel_plug
Thanks @Sebastien_Couture
I haven’t yet ventured into appdeamon code as of yet, but I might have to as a last resort. I’ll start some research on this simple implementation first.
Other option was to import via Emoncms which I wanted to play with too.
Hi Stewface,
I gave it a try in hass and it is working perfectly for me,
here is code in configuration/sensor I used.
- name: IoTaWatt1
platform: rest
json_attributes:
- inputs
- outputs
resource: http://192.168.68.160/status?inputs=yes&outputs=yes
value_template: '{{value_json.inputs[1].Watts}}w'
scan_interval: 5
- name: IoTaWatt2
platform: rest
json_attributes:
- inputs
- outputs
resource: http://192.168.68.160/status?inputs=yes&outputs=yes
value_template: '{{value_json.inputs[2].Watts}}w'
scan_interval: 5
- name: IoTaWatt3
platform: rest
json_attributes:
- inputs
- outputs
resource: http://192.168.68.160/status?inputs=yes&outputs=yes
value_template: '{{value_json.inputs[3].Watts}}w'
scan_interval: 5
- name: IoTaWatt4
platform: rest
json_attributes:
- inputs
- outputs
resource: http://192.168.68.160/status?inputs=yes&outputs=yes
value_template: '{{value_json.inputs[4].Watts}}w'
scan_interval: 5
- name: IoTaWatt5
platform: rest
json_attributes:
- inputs
- outputs
resource: http://192.168.68.160/status?inputs=yes&outputs=yes
value_template: '{{value_json.inputs[5].Watts}}w'
scan_interval: 5
- name: IoTaWatt6
platform: rest
json_attributes:
- inputs
- outputs
resource: http://192.168.68.160/status?inputs=yes&outputs=yes
value_template: '{{value_json.inputs[6].Watts}}w'
scan_interval: 5
- name: IoTaWatt7
platform: rest
json_attributes:
- inputs
- outputs
resource: http://192.168.68.160/status?inputs=yes&outputs=yes
value_template: '{{value_json.inputs[7].Watts}}w'
scan_interval: 5
- name: IoTaWatt8
platform: rest
json_attributes:
- inputs
- outputs
resource: http://192.168.68.160/status?inputs=yes&outputs=yes
value_template: '{{value_json.inputs[8].Watts}}w'
scan_interval: 5
- name: IoTaWatt9
platform: rest
json_attributes:
- inputs
- outputs
resource: http://192.168.68.160/status?inputs=yes&outputs=yes
value_template: '{{value_json.inputs[9].Watts}}w'
scan_interval: 5
- name: IoTaWatt10
platform: rest
json_attributes:
- inputs
- outputs
resource: http://192.168.68.160/status?inputs=yes&outputs=yes
value_template: '{{value_json.inputs[10].Watts}}w'
scan_interval: 5
- name: IoTaWatt11
platform: rest
json_attributes:
- inputs
- outputs
resource: http://192.168.68.160/status?inputs=yes&outputs=yes
value_template: '{{value_json.inputs[11].Watts}}w'
scan_interval: 5
- name: IoTaWatt12
platform: rest
json_attributes:
- inputs
- outputs
resource: http://192.168.68.160/status?inputs=yes&outputs=yes
value_template: '{{value_json.inputs[12].Watts}}w'
scan_interval: 5
Thanks @Sebastien_Couture i’m testing it now.
Patiently waiting out the reboot to see if I got it…
Looks like you have implementing in a different way, so I kept my original configuration for all the working inputs and added you way of doing it for channel 14.
Helps if I get the IP address right… 3rd time the charm right.
I hope it works for you,
here is a better way of doing this.
- platform: rest
name: IoTaWatt
json_attributes:
- inputs
- outputs
resource: http://192.168.68.160/status?inputs=yes&outputs=yes
value_template: '{{ value_json.inputs[0].Vrms }}v'
scan_interval: 5
- platform: template
sensors:
iotawatt_channel_1:
friendly_name_template: 'Channel {{ states.sensor.iotawatt.attributes["inputs"][1].channel }}'
unit_of_measurement: 'Watts'
value_template: '{{ states.sensor.iotawatt.attributes["inputs"][1].Watts }}'
iotawatt_channel_12:
friendly_name_template: 'Channel {{ states.sensor.iotawatt.attributes["inputs"][12].channel }}'
unit_of_measurement: 'Watts'
value_template: '{{ states.sensor.iotawatt.attributes["inputs"][12].Watts }}'
That way it doesn’t hit the rest api so much.
I only have 12 CT at the moment so I didn’t test 13 and 14.
Let me know if it works!
I never thought about using the rest API on this, I’ve been using the emoncms software to record the data.
I use this along with appdaemon to trigger some input boolean switch.
whenever the power change within a certain range then it turns on the input boolean, like stove, kettle, washing machine and dryer.
Then I get notifications whenever the washing machine has finished its cycle
or whenever the stove is on and there is no motion in the kitchen for 1 hour.
I also track my energy usage in Grafana.
Excellent thanks @Sebastien_Couture
I attempted it with a combination of the original method that got all sensors except 14 (I am not using 11-13 currently)
I will get this eventually i’m sure
I have been using it for about 6 months now. I have an EMONCMS server. and push all the data from the Iotawatt to the EMONCMS server and Home Assistant has an EMONCMS component
Some IoTaWatt questions:
Thanks,
Ambi
You can configure the inputs and power monitoring to allow for multi-phase circuits.
https://docs.iotawatt.com/en/02_04_02/threePhase.html#reporting-power
They can sense 0.15W that my dryer light uses when the door’s open.
It runs an ESP8266 so the wifi is fine. As long as you can get signal where the device is to be placed you’re fine. No ethernet.
No you can have it report to EmonCMS which you can install in a docker container or use the online version. You can also poll the device for data via RESTful sensors in HA.
I use 1 CT on my dryer circuit and in the IotaWatt set the output to 2x since it’s the same as using 2 CTs.
I haven’t installed in my panel yet but I’ve hooked up the 50A, 100A split and an aliexpress 200A split CT to a test jig.
The 50A and 100A both measure the same as the power meter the jig is plugged into when my test heater is on fan only (24W) The 200A (a sct-019) can’t see the 24W but can (mostly) see the 800W when the heater is on low. Can’t blame it too much, seems it has a burden resistor built into it and that messes things up a bit. Not a bit deal though, it’ll be on the house mains.
It’s fine, my AP is 30ish feet from where the test jig is and no issues at all. Just don’t try and install the IotaWatt in the panel.
From what I’m reading, you don’t need 2x CTs, you can use one and flip the second wire through the one CT (that’s what I’ll be doing)
https://buildmedia.readthedocs.org/media/pdf/iotawatt/master/iotawatt.pdf
(check 14.7.2 120/240V circuits)
I got one installed yesterday through a university of Queensland trial, effectively they install an iotawatt and give you a year of cloud storage in exchange for your consumption data and a few surveys on how your usage habits change in that time. If you don’t want to keep it after the trial they will remove it free of charge.
There are still some spots on the trial if you are interested and live near Brisbane (Queensland, Australia).
I haven’t logged into the system yet but I am keen to get it integrated into hass, unfortunately I have just moved to Brisbane and I haven’t gotten around to installing home assistant yet (too many dumb things to sort out first)
I’ve got mine integrated both through the rest json endpoint, and emoncms. They give basically the same numbers, so I’ll remove the rest version at some point.
The only automation I’ve got is around stove being on and no one is home.
I keep a small rest JSON sensor for this information:
I’m curious, when you all install these, where did you put the unit and how did you run the wires?
If you put the “brain box” inside the main panel, I assume the thick metal panel blocks all WiFi signal.
I assume the sensor wires aren’t long enough to run all the way down and out of the panel, then over and back up to an electrical box in the adjacent stud bay?
Do you just screw the cover down on the wires coming out and accept that there’s a gap where the panel cover pinches the wires against the panel enclosure box?
I’m very interested in a cost-effective way to ingest current draw for a number of things into HomeAssitant to monitor stuff like washer/dryer, stove, oven, fridge/freezer, dual zone furnaces, and a handful of other things. So far this sounds like the easiest way to get a large number of circuits in without the cloud nor extensive DIY construction
I mounted a box below my breaker box and that’s where the wires run to, in a conduit of course.
Your breaker box should have knock outs for you to attach conduit onto.