Virtual Energy Meter

Posted on
Fri Dec 02, 2016 7:24 am
lindehoff offline
Posts: 80
Joined: Aug 08, 2015

Virtual Energy Meter

With this Indigo 7 plugin you can create virtual energy meters based on other devices.
The plugin will have two major features Virtual Device Energy Meter och Virtual Group Energy Meter

Virtual Device Energy Meter
If you have devices that have a static energy consumption when its on you can then create an child device that act as an energy meter for that device.
The engery device will also calculate accumulated energy uses in kWh. It supports all devices that support on/off and dimmers.

Virtual Group Energy Meter
Group other energy meters in to one device. You can for example group all energy meters in on room together to monitor the total usage in that room.
Or all one energy meter for the entire house.

Installation Instructions
1. Download latest release here
2. Follow standard plugin installation process

Legal Disclaimer
This plugin have been tested before release but you use the plugin at your own risk.
Last edited by lindehoff on Mon Feb 26, 2018 6:43 am, edited 2 times in total.

Posted on
Sun Dec 11, 2016 7:51 am
iblis offline
Posts: 75
Joined: Sep 16, 2014

Re: Virtual Energy Meter

Hi and thanks for this excellent plugin.

One question, it looks like the Virtual Energy Meter polls the linked device for status change every 5 minutes. Is there an option to change the poll intervall?

Posted on
Sun Dec 11, 2016 8:55 am
lindehoff offline
Posts: 80
Joined: Aug 08, 2015

Re: Virtual Energy Meter

iblis wrote:
Hi and thanks for this excellent plugin.

One question, it looks like the Virtual Energy Meter polls the linked device for status change every 5 minutes. Is there an option to change the poll intervall?


In this version it's not possible but it should also update as soon as the parent device get updated. The 5 min is mainly to update the total usage.

Posted on
Sun Dec 11, 2016 9:25 am
iblis offline
Posts: 75
Joined: Sep 16, 2014

Re: Virtual Energy Meter

It did not do that when I installed the plugin and added a On/Off switch. It only updated the states after the 5 min polling. But then I restarted the plugin to enable Debug logging, and now it suddenly works. So all I needed was to restart the plugin.

Thanks again for this excellent plugin :)

Posted on
Sun Dec 11, 2016 9:28 am
lindehoff offline
Posts: 80
Joined: Aug 08, 2015

Re: Virtual Energy Meter

Thank you, I will soon make a release with group energy meter support

Posted on
Sun Dec 11, 2016 11:01 am
iblis offline
Posts: 75
Joined: Sep 16, 2014

Re: Virtual Energy Meter

Excellent news!

That will make it easy to categorize energy usage on different rooms etc.

Posted on
Fri Dec 16, 2016 5:40 am
Asconasny offline
Posts: 161
Joined: Jan 16, 2015

Re: Virtual Energy Meter

Great plugin.

Feature request :)
would be nice if it was possible to have a ticker so we could choose what to display (total usage or current load) in the state display in Indigo

thanks for this plugin.

Regards
Asconasny

Posted on
Thu Jan 12, 2017 5:01 am
lindehoff offline
Posts: 80
Joined: Aug 08, 2015

Virtual Energy Meter 0.3.0

New release.
Added support for Virtual energy groups and bug fix.
You can upgrade via menu or download and install: https://github.com/lindehoff/Indigo-Vir ... /tag/0.3.0

Posted on
Sat Jul 01, 2017 2:08 pm
whmoorejr offline
User avatar
Posts: 530
Joined: Jan 15, 2013
Location: Houston, TX

Re: Virtual Energy Meter

I'm using your plugin for something a little different, but sorta the same?

I would like to automate the "Reset" part so I can get usage for just one day. (reset an energy meter nightly with a schedule)

My plan:
Training kids to turn off their lights in their rooms. I could use motion sensors and door sensors to automate it, but I still want them to learn without me performing indigo wizardry.

I've created virtual energy meters for all their devices (main light, closet light & fan) and then a group device per kid. Now it is a contest.... whoever has the lower number at the end of the day / week / whatever, gets a prize.

EDIT: Figured it out. Found the action to reset the meter under "Device Actions -> Universal Controls". Never used anything in that section before. Anyway, it's working great now and I'm able to see which kid uses the most or least electricity pr. day.

Bill
My Plugin: My People

Posted on
Fri Feb 23, 2018 6:48 pm
aldera offline
User avatar
Posts: 141
Joined: Aug 30, 2016
Location: Michigan, USA

Re: Virtual Energy Meter

I just started getting this error and it keeps repeating every 10 seconds in my log. Any ideas? It's been running fine for months. Thanks.

Code: Select all
 Reloading plugin "Virtual Energy Meter 0.3.0"
   Stopping plugin "Virtual Energy Meter 0.3.0" (pid 3374)
   Stopped plugin "Virtual Energy Meter 0.3.0"
   Starting plugin "Virtual Energy Meter 0.3.0" (pid 3530)
   Started plugin "Virtual Energy Meter 0.3.0"
   Virtual Energy Meter            Setting logging level to Normal
   Virtual Energy Meter Error      Error in plugin execution runConcurrentThread:

Traceback (most recent call last):
  File "plugin.py", line 91, in runConcurrentThread
  File "/Library/Application Support/Perceptive Automation/Indigo 7/Plugins/Virtual Energy Meter.indigoplugin/Contents/Server Plugin/ghpu.py", line 86, in checkForUpdate
  File "/Library/Application Support/Perceptive Automation/Indigo 7/Plugins/Virtual Energy Meter.indigoplugin/Contents/Server Plugin/ghpu.py", line 173, in _prepareForUpdate
  File "/Library/Application Support/Perceptive Automation/Indigo 7/Plugins/Virtual Energy Meter.indigoplugin/Contents/Server Plugin/ghpu.py", line 95, in getUpdate
  File "/Library/Application Support/Perceptive Automation/Indigo 7/Plugins/Virtual Energy Meter.indigoplugin/Contents/Server Plugin/ghpu.py", line 115, in getLatestRelease
  File "/Library/Application Support/Perceptive Automation/Indigo 7/Plugins/Virtual Energy Meter.indigoplugin/Contents/Server Plugin/ghpu.py", line 143, in _GET
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/httplib.py", line 1053, in request
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/httplib.py", line 1093, in _send_request
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/httplib.py", line 1049, in endheaders
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/httplib.py", line 893, in _send_output
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/httplib.py", line 855, in send
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/httplib.py", line 1274, in connect
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/ssl.py", line 352, in wrap_socket
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/ssl.py", line 579, in __init__
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/ssl.py", line 808, in do_handshake
SSLError: [SSL: TLSV1_ALERT_PROTOCOL_VERSION] tlsv1 alert protocol version (_ssl.c:590)

   Virtual Energy Meter Error      plugin runConcurrentThread function returned or failed (will attempt again in 10 seconds)
   Virtual Energy Meter Error      Error in plugin execution runConcurrentThread:

Posted on
Sat Feb 24, 2018 9:46 am
ELWOOD offline
Posts: 236
Joined: Feb 11, 2007
Location: Ramsey, NJ

Re: Virtual Energy Meter

Also started getting the same errors the other day, had to disable the plugin since the log was full of red. Have not made any changes to indigo( 7.1.1) recently
Did a OS security upgrade to 10.12.6 a week or so before the errors started .

Elwood

Posted on
Sat Feb 24, 2018 11:17 am
jens offline
Posts: 265
Joined: May 03, 2015
Location: Sweden

Re: Virtual Energy Meter

Get same errors :|

Posted on
Sat Feb 24, 2018 11:19 am
aldera offline
User avatar
Posts: 141
Joined: Aug 30, 2016
Location: Michigan, USA

Re: Virtual Energy Meter

lanbrown wrote:
As previously discussed in the forum, Github has disabled TLS 1.0 and TLS 1.1 from being supported. This was planned and announced. Apple shipped a very old version of OpenSSL (0.9.8 train) and it only supports TLS 1.0. So when Github disabled TLS 1.0 and 1.1, this means you can no longer check for updates. The workaround for Sierra (10.12.x) and lower is to use cURL to perform the check as Apple uses their own library called Secure Transport. in High Sierra (10.13.x) Apple replaced OpenSSL with LibreSSL which does support TLS 1.2. So anyone running High Sierra (some have had USB issues so be forewarned) will not see this error.

So either the developer needs to update their plugin with the cURL update or update with the API that Indigo has published for update checking.


Thanks for the explanation. I hope the developer will consider updating it. I'm on Sierra and unfortunately I don't know how to perform the workaround that you mentioned. Is it something that wouldn't be too hard to explain to someone in a step-by-step fashion?

Posted on
Sat Feb 24, 2018 11:26 am
aldera offline
User avatar
Posts: 141
Joined: Aug 30, 2016
Location: Michigan, USA

Re: Virtual Energy Meter

lanbrown wrote:
The workaround is either the developer updates the plugin, or you upgrade to High Sierra. Some have had USB issues with High Sierra. So the choice is yours, either wait for the developer to update the plugin, or take the risk and go to High Sierra.

Does the plugin allow you to disable update checking? if so, then you might want to turn it off for now until either of the two options above has been done.


I'm leaving on a trip next week and will be gone for 6 weeks so I don't want to upgrade to High Sierra. Unfortunately, there is no option to disable update checking. I guess I'll just have to disable the plugin for a while.

Thanks again for the information.

Posted on
Sat Feb 24, 2018 12:45 pm
lindehoff offline
Posts: 80
Joined: Aug 08, 2015

Re: Virtual Energy Meter

Hi, I am not at home at the moment. Will update the plugin as soon as possible.


Skickat från min iPhone med Tapatalk

Who is online

Users browsing this forum: No registered users and 1 guest