I need to do more testing (and post in the IoTaWatt forums) to see if I can nail down the root cause. Most of what I've "figured out" is just conjecture.
I think you're on the right track. The IoTaWatt is powered by a little ESP8266 microcontroller. It is already very busy sampling all of the CT's at a very high frequency, logging those results to the SD Card, and sending data to InfluxDB and/or Emoncms. Adding the additional querying could be the straw that breaks the camel's back.
Are you using InfluxDB with your IoTaWatt? If so, you can monitor the available amount of heap memory on the ESP8266. It might be interesting to see if heap is being exhausted when the errors start.
I presume I am too. As an old boss used to say "I'm not always right, but I rarely doubt myself."
Just the fact that a reboot clears it up really is telling that the issue is probably more resource exhaustion than anything else. I don't suppose, from my perspective, which resource it is really matters. I just hope to get a better idea of what the constraints should be.
Tell me more. I monitor all the things with Influx.
Take a look at this thread over in the IoTaWatt Community. I am not sure if this is the most up to date information on how to add the heap measurement or not... You may want to reach out to @overeasy in the IoTaWatt community. He is the genius behind the IoTaWatt device.
So, after setting up three instances...two instances of my driver and one of the other, I'm only intermittently getting the API errors. I think just rebooting the IoTaWatt hub after setting everything up and letting it settle down is the trick.
Still advise to only run one instance though.
What is the use case for having the parent device with a presence attribute and what triggers it?
Also, is there a way to remove the system total calculation? I'm trying to see the total via the two mains along with a few other clamped circuits. The app total included skews the final total because it's adding the sum of all ct clamps whereby the individual clamps are already in the two mains from the parent device.
In my version of the IoTaWatt driver, I included the presence capability to provide an indication of whether or not the IoTaWatt device was communicating with the Hubitat hub. Basically, it is a device health indicator. I then use the presence of the IoTaWatt device as a trigger to send a notification to my phone to let me know if there is an issue with the communications between the HE hub and the IoTaWatt. I also send a notification when the connection is reestablished.
I forgot to comment back the other day. After rebooting my Iotawatt those errors went away for me too.
I'm still running both, just as a test. Yours does seem a little more resource hungry, which makes sense because there's more data to process.
I'm not sure what you're referring to. The driver isn't doing any calculations, it's just pulling whatever you have configured in IotaWatt.
The presence attribute is residual code. I planned on pushing another update with some housekeeping changes but my last two days of free time were consumed by ZigBee issues.
I created a new instance with just a few devices, one of which is named "TOTAL". That is a calculated output in Iotawatt that is the sum of main 1 and main 2 or the entire house.
I am talking about the generated Total across the bottom of this graph. I am trying to build a graph that will allow me to monitor certain devices including my "TOTAL" calculated device.
In this graph the totals across the bottom are incorrect because it is calculating the devices above and in this case it is adding what I am giving it as my whole house plus the other devices.
The graph is adding correctly but giving me the unintended results. I guess what I am asking is there a way to disable the graph totaling maybe as a toggle.
Or, wrong thread, but to still answer your question. No, there's no way to remove it. You can easily spin up another Energy calc instance with just the Total device. Or just ignore the row.
I figured out a solution, the power of Iotawatt. I just created another calculated field taking the total and subtracting all other inputs. That now results in the graph totals being correct.
Looks like my driver is about a 30% increase in usage time over the other. Pretty much peanuts in the grand scheme of things though.
Version 0.1.1 Released
- Added error handling for invalid JSON responses in addition to failed API calls.
- Added presence and healthStatus attributes to the parent driver for alerting if connectivity to the IoTaWatt hub fails. healthStatus will allow the device to be monitored with [Project][BETA] Device Health Status
- Added the "Current Meter" capability to the child. I somehow missed doing that.
I am leaving Hubitat so this will no longer be maintained. Existing installations will continue to function as they do today, but I will not be providing support.
Feel free to copy/re-release the code. I will be locking the GitHub repo.
123 for spam detection.
Sorry to hear that.
How come you're leaving? You've been a big help in the community...