Using Virtual Inputs


Just ordered an IoTaWatt. I would like to integration the consumption and production kW from my existing PV/grid monitoring setup. Is there any way (i.e. a REST API) to push the data into to IoTaWatt currently? Ideally, I would like to have the PV and grid data show up as if they were natively collected. Figured I would ask before hacking around in the firmware.


There is no way to do that. It would be far simpler to just collect that data natively.

Understood. I haven’t decided where I will try to aggregate the data, so it might not matter. I already have the consumption/production numbers feeding into Home Assistant, but it might be fun to try to push the data back into IoTaWatt as well.

I can’t imagine that it would be difficult to build a virtual input and feed data in via JSON, but I also haven’t looked that closely at how the IoTaWatt code is structured.

Had a chance to dig into the code a bit over the weekend. My initial thought was to extend the HTTP REST endpoint to accept production/consumption numbers and handle the transformation of Sun Power JSON into a stripped down generic JSON schema somewhere else (probably a Node.js service that would run on a separate system).

Another option, which would be easier for other people to use, would be to build a service that consumes the Sun Power JSON directly without the need for a proxy.
The first approach is more flexible, and should have a lower compute demand on the system, but won’t be usable OOTB. The second would be rigid, would only work with Sun Power systems, but could be a simple as entering the IP of the Sun Power management console proxy.

Which would be preferable?