[Release] IoTaWatt Power Monitor Driver v0.1.20190915

community_driver

#1

[UPDATE] 2019-09-15 Added Capability Presence to indicate good communications status as "present" and broken communications as "not present". This can be used to notify the user of an issue.

I am pleased to share my integration for the IoTaWatt WiFi Energy Monitor system. The IoTaWatt can monitor up to 14 separate Current Transformers (CT) installed within your home's Main Electrical Panel. There is plenty of information available about the IoTaWatt at https://iotawatt.com/.
image

The IoTaWatt is open source and is designed and manufactured in the USA. I have one installed on my Electrical Sub Panel in my garage and it has been working great. It stores all data locally to its SD memory card, and has a built in web server for configuration and display. It can also export data to InfluxDB, and other systems. IoTaWatt has its own community at https://community.iotawatt.com if you'd like to do some reading.

I documented my first IoTaWatt installation below if you're curious to see what is involved. I am an Electrical Engineer, so I know enough to keep myself safe. Installation should be performed by a licensed electrician if you're not 100% comfortable inside an electrical panel. Remember, Safety is the Number 1 Priority!

Here is the Hubitat IoTaWatt Driver ReadMe. Please note that you'll need the "IoTaWatt Parent" Driver, along with my HubDuino "Child Power Meter" and "Child Voltage Sensor" drivers as well.

This driver simply issue httpGet() calls to the IoTaWatt device over your local LAN. There is no cloud dependency for this integration! :slight_smile: The Parent Composite Device Driver will create a child device for each configured channel of the IoTaWatt, plus the Voltage Reference device. You can change the Label of each child device to reflect the circuit(s) being measured by each current transformer.

Screenshot of my IoTaWatt devices in Hubitat

Since my home has two electrical panels, I have actually ordered a second IoTaWatt to be able to measure every circuit.

Please let me know if you have any questions. Also, the developer of the IoTaWatt (@overeasy in their community), is incredibly responsive. He is also continually improving the software and adding features based on community feedback. He reminds me a lot of the great team at Hubitat!


'Aeon HEM V1 Laundry Driver' is NOW working on Hubitat
I am desperate for ideas
Sense Energy Monitor
Washer / Dryer
Griddy. IFTT
How do you save in electric bills?
Help - Rule Machine Washer & Dryer notifications
EmonPi
Community Device Drivers (FKA Compatible Devices Wiki)
#2

This sounds right up my alley. :zap::sunglasses:


#3

Thanks for this. Another forum I follow just mentioned they are having a sale. I wondered if there was an easy hubitat integration and voila.


#4

There is a dearth of devices that let me monitor energy on 220v branch circuits. If I'm setting up to monitor multiple circuits, IoTaWat appears to quickly becomes the cheaper option vs individual Aeotec z-wave devices. The question is whether I want to add the complexity to HE. Either way, thanks for this.


#5

Nice! The only thing is I need 28 inputs, will it congestion my wifi network and HE hub?


#6

If you design your layout wisely, you can measure multiple branch circuits on a single current transformer. Also, you can infer the load on the remaining unmeasured branch circuits by creating a calculated input (I.e. total usage - all other circuits = what’s left over.)

I have this integration running on my second hub. It has never locked up or crashed.


#7

Fantastic work. I have two IoTaWatt units as well and looking forward to trying this!


#8

Got this all installed and working quite well. What type tile are you using to present this on a dashboard? The energy monitor template doesn't seem to use the power data presented.


#9

You said it, edit the tile to power instead energy


#10

Shucks, this doesn't work for me. How do you set the username/password for it to actually communicate to the IoTaWatt?


#11

What Username and Password? Neither or my two IotaWatt devices have a username/password enabled by default. Not much needed for the Parent driver except the IotaWatt IP address and the polling frequency.


#12

I just browsed one of my IotaWatts and it appears there is an optional admin and user password.

If you can figure out how to get the status via a curl command with the password, I should hopefully be able to modify the Parent driver to allow an optional password to be entered. This would most likely be transmitted in clear text, so if your worried about IotaWatt security, then passing its password in the clear might also be a concern.


#13

From what I read, they added the username/password feature in June 2018. I have the option for admin and user, users.

I access my unit via NAT, so I would not expose it without securing it in some manner. I'd think most people would elect to use a password as well, but maybe I'm the outlier. Looking through API docs to see how it can be done with user/pass. Seems most integrations use an API key-based access, where the IoTaWatt pushes to the specific service.


#14

I would strongly recommend you set up an OpenVPN server for a much more secure method of accessing your home network when on the road.

Please don't tell me you've also port forwarded your Hubitat hub as well? Neither the Hubitat hub, nor the IotaWatt devices are hardened enough to be exposed to the internet via port forwarding.

Are you even able to use https secure browsing to the IotaWatt? If not, you're already exposing its password to sniffers on the internet.


#15

I do also use OpenVPN, but it's rather inconvenient versus just clicking a link from any of my devices. Surely there's a way to secure the login to the device, and still access the API. hrmm


#16

I must say, that I don't see how anyone could use the Hubitat platform without port forwarding. I also doubt the majority of users have OpenVPN set up and always in-use from their mobile devices. Interesting to think about.


#17

Most likely. If you look at my Parent driver, you'll see that it simply issues a simple httpGet call to the IotaWatt Status page...

    def params = [
        uri: "http://${deviceIP}/status?inputs=yes&outputs=yes",
        contentType: "application/json",
        requestContentType: "application/json",
    ]

If you can figure out how to add a username and password to this call, I'll be happy to modify the driver. You may need to ask Bob on the IotaWatt forum.


#18

It's quite simple. OpenVPN is sitting squarely on the secure side of the line.

Port forwarding is firmly sitting on the not secure side of the line. It's dominantly: Security by Obscurity.

I've only ever used OpenVPN for Hubitat, and my cams. It takes a single click of the on/off slider on my phone, tablet or laptop, and a pause of about one second to have it working.

Edit... yes to what @ogiewon said below.


#19

The Hubitat Dashboards work great remotely. As does SharpTools, Alexa, Google Home, etc... There should be very little need to access the Hub's Admin web page remotely, IMHO. Turning on my OpenVPN client takes just a second, and I can leave it on all day when I am on the road. Actually helps avoid my company's restrictions on certain web sites. :wink:


#20

Yeah, I have no problem hopping on the VPN from my phone or laptop, etc, but what's especially annoying is I work primarily over VPN all day long for my job. The only way to access anything in my house is if they are exposed via NAT, since split-tunneling is not allowed.

Now you have me thinking, perhaps I can develop a script that modifies my firewall rules to only allow NAT from devices registering in to my godaddy DNS entries.