The plugin uses the standard service ID of “urn:micasaverde-com:serviceId:EnergyMetering1”. Perhaps AutHomationHD needs to recognize the device type (“urn:schemas-futzle-com:device:PowerArithmetic:1”) too. Garrett will know for sure.[/quote]
I added the device type to the energy meter portion of my app. So it should show up as an energy device and report the watt usage. Currently this will only be available in the alpha builds.
I just installed the latest files and created a power arithmetic device with a formula [tt]power(186) + 10[/tt] and it correctly displayed 10 more watts than device 186. The function name must be entered in lower case, so if you’ve written [tt]POWER[/tt], there is no such function.
I don’t use dataMine so I can’t offer any insight there.
No, the Ergy plugin won’t be involved in any way. You are IMO correct to not use it.
It might be the formula length. Try a shorter one and see if it works. Then expand it a bit with another term or two.
This plugin uses a recursive-descent parser so it’s not the most efficient in terms of CPU or memory use. It’s easily possible that your formula overflows a stack.
Edit: you can reduce the depth of the parse tree by using parentheses to halve the length of each bit being added.
Ok, sadly this was my fault. Narrowing it down based on your suggestion I found the problem entry.
One of the devices did not have the UserSuppliedWattage added yet…and I guess that causes the whole formula to fail if any of the devices don’t have the energy service ID’s.
For example, I’m using “300,1000,300” as I have natural gas heat (heat and fan only the same). Even though it’s included as power(46) in the arithmatic, nothing is shown in the HVAC cools.[/s]
PS - I use a Nest thermostat if that makes a difference.
[Update] I’ve traced it to the Nest device not providing the right values, nothing wrong with your plugin.
Thanks for a great plug in. I’m using it to along with a Gasmart device (reed switch) on a CurrentCost setup to convert the pulses from m3 at the meter to kW using the formula - power (110) * 1.02264 * 38.9 / 3.6 / 100
It works a treat.
One request, the CurrentCost device also reports a running total in KWH (which in reality is total m3 at the meter so also needs to be converted again). I’d like to use your plug in to convert this total, however your plugin only takes the Watt value. Would it be possible to enhance it to also take the KWH field ? (or a choice to select either, maybe like ‘KWH (110) * 1.02264 * 38.9 / 3.6 / 100’ )
Any ideas why the Power Arithmetic plugin which displays similar to any other Power monitoring device within Vera, is not picked up by Imperihome as a Power device ?
I’ve also got the author of Imperihome looking at this, but wondered if you’ve got any ideas ? It’s got to be something simple I feel
Power Meter: urn:schemas-micasaverde-com:device:PowerMeter:1
Power Arithmetic plugin: urn:schemas-futzle-com:device:PowerArithmetic:1
(They have to be different, otherwise I can’t attach the Lua code to the latter. It’s a consequence of the LuaUPnP design that MCV made. In their defence, MCV does recommend that control point applications look at the service ID (both have the urn:micasaverde-com:serviceId:EnergyMetering1 service) and not at the device type. Most apps don’t follow this advice. I’m not convinced that even MCV’s own apps do.)
Hi, I’m using a calculation which is using division. The module works great but the answer to my calculation has 11 trailing digits after the decimal point. Is there a way I can use an Integer type function to shave the digits off?
I have tried using Int() and Integer() without success.
Thanks, Doug
The plugin’s formula language doesn’t have a rounding function. I’ll try and remember to add one to the plugin in the next update. It’ll be something like round(expr, n) where n is the number of decimal places to keep.
I can’t get it running. I have Vera 3 with latest firmware 1.7.318 . Could that be the problem? I even didn’t use formula. I tried with putting a simple number in the formula field but still it shows Power:W and nothing else comes out. I tried with formula as well - I used power(8) where 8 is the id of my refrigerator which of course always has more than 0 watts (mine is between 1 and 150 watts). I use Fibaro wall plug to control the fridge.
I would really like to have this app cause i can’t use scenes for what I need. For example I want my aspirator in the kitchen to turn on when my hob starts using more than 0 watts but with the regular scene options I can’t do that.
vzhivkov, I did get this going on my Veralite (1.7.318) but I recall that it took at least one manual Luup restart and possibly one or more browser refreshes too. Keep in mind that this plugin updates its value only when the power on the devices it’s watching (8 in your case) changes. Persevere with it. At some point it’ll start working.