Love it…
Just got mine and starting to get it setup, did anyone have any luck getting the results from channels 10 - 14 working in hass?
Worth mentioning on the CT clips - I ended up getting most of them from iotawatt (if you get ~ 10) you scrape into the cheaper shipping, anymore and it adds $10 more shipping, however on the IOTAwatt forums they highly recommend the one he selected to resell (I also couldn’t see much of a difference with the price on aliexpress for the potential headaches getting them configured / accurate. I did however get an extra 2 CT’s from ebay/aliexpress and I will report back with finding on them.
What is the recommendation of adding the raw inputs straight in or do you add them as a calculated output (with no calculation added)
Trying to debug this issue with channels 11-14 (doesn’t work for me either)
- platform: rest
name: IoTaWatt
json_attributes:
- inputs
- outputs
resource: http://192.168.0.194/status?inputs=yes&outputs=yes
value_template: '{{ value_json.inputs[0 ].Vrms }}v'
scan_interval: 5
I’m guessing it has something to do with the spaces and zero or maybe the V at the end? : ‘{{ value_json.inputs[0 ].Vrms }}v’
I can certainly see them in json
{
"channel": 10,
"Watts": " 0",
"Pf": 0,
"phase": 2,
"lastphase": 2
},
{
"channel": 13,
"Watts": " 0",
"Pf": 0,
"phase": 2,
"lastphase": 2
},
I can’t can’t figure out why 1-10 works and 13 doesn’t…
Forgot to mention - haven’t hooked it up to the circles yet thus the 0 watt reading, but it doesn’t come up on the front end.
Hi Stewface,
Don’t use channel 0, I think it is reserved for the AC voltage reference transformer.
This channel doesn’t report watts.
here is what my get request looks like,
{
"inputs": [
{
"channel": 0,
"Vrms": 125.6591,
"Hz": 59.98809,
"phase": 2.59
},
{
"channel": 1,
"Watts": " 0",
"Pf": 0,
"phase": 2,
"lastphase": -0.59
},
{
"channel": 2,
"Watts": " 0",
"Pf": 0,
"phase": 2,
"lastphase": -0.59
},
{
"channel": 3,
"Watts": " 0",
"Pf": 0,
"phase": 2,
"lastphase": -0.59
},
{
"channel": 4,
"Watts": " 0",
"Pf": 0,
"phase": 2,
"lastphase": -0.59
},
{
"channel": 5,
"Watts": " 0",
"Pf": 0,
"phase": 2,
"lastphase": -0.59
},
{
"channel": 6,
"Watts": " 0",
"Pf": 0,
"phase": 2,
"lastphase": -0.59
},
{
"channel": 7,
"Watts": " 0",
"Pf": 0,
"phase": 2.7,
"lastphase": 0.11
},
{
"channel": 8,
"Watts": " 0",
"Pf": 0,
"phase": 2.7,
"lastphase": 0.11
},
{
"channel": 9,
"Watts": "93",
"Pf": 0.599527,
"phase": 2.7,
"lastphase": 0.11
},
{
"channel": 10,
"Watts": " 0",
"Pf": 0,
"phase": 2.7,
"lastphase": 0.11
},
{
"channel": 11,
"Watts": " 3",
"Pf": 0.47105,
"phase": 2.7,
"lastphase": 0.11
},
{
"channel": 12,
"Watts": "56",
"Pf": 0.762302,
"reversed": true,
"phase": 2.7,
"lastphase": 0.11
}
],
"outputs": []
}
Thanks for the tip @Sebastien_Couture
Were you able to get channel 11-12 into hass? what’s your config code?
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:
- Have you used new ones or old ones?
- Do the 50 Amp CTs have sensitivity below 200W? What’s the limit? Are there <50A CTs?
- How good is the WiFi component? Do you need a router right next to it? Is there no Ethernet port?
- Have any of you compared this to TED?
- Do they provide / have any external software? Is it any good? Or does everyone just graft it onto their HA instances?
- If you have the 50A CTs in the US, but are monitoring 220V dryer or oven, you need 2 x CTs but can the firmware understand this is one unit?
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)