Hello all,
is there a tool which can read the total (power) usage (of each device) to be sent to an email address? It would be great to have it in an Excel readable file to do some statistics.
Thanks in advance for your help.
Best regards
Bildhauer
emailTo = "user@somedomain.com"
emailBody = u"Device Name, Device ID, Last Reset Timestamp, Current Power (Watts), Total Energy (kWh)\n"
for dev in indigo.devices.iter("props.SupportsEnergyMeter"):
emailBody += u"{}, {}, {}, {}. {}\n".format(dev.name, dev.id, dev.energyAccumBaseTime, dev.energyCurLevel, dev.energyAccumTotal)
indigo.server.sendEmailTo(emailTo, subject="Current Power Usage", body=emailBody)
DaveL17 wrote:I've used the XlsxWriter Python module at work, but wouldn't say I'm qualified to explain how to use it. As I remember though, the docs were pretty straightforward.
https://xlsxwriter.readthedocs.io
Users browsing this forum: No registered users and 5 guests