[ST Edge] Virtual Energy/Power Meter

I understand now. Sorry for the confusion!

That action is purely a mobile app action - it doesn’t result in any requests back to the driver.

Hi @TAustin,
If the profile and the VID have the refresh capability, then device:refresh() is executed in the driver and the capabilities attributes are read.

If it is a virtual device, a status refresh function must be implemented or it will do nothing.

@TAustin

Not exactly.
Upon user triggered refresh the app sends event to driver.
The default refresh handler in the stock library sends read attribute request for each registered attribute.
The device responds with attribute value and attribute handler processes the response by emitting event to capability.
This sends the update to the app through the cloud.

I suspect the app now expects this update event for each capability and shows broken cloud if it is not received within some period.

Ah ok but you probably need to be including the refresh capability in the device profile, yes? I don’t use it in any of my devices, so that’s probably why my drivers never receive any events.

2 Likes

Yea, I’ve never used it in any of my devices.

1 Like
1 Like

@TAustin

Correct

@TAustin Thanks for this driver plus your other great drivers. Been using ST for about 2 years now and starting to feel more comfortable and am making more sophisticated automations and adding more devices and that when I came across this driver … question about integration; I’m trying to monitor a lamp that has 3 bulbs in it. Each bulb is 7.2 watts, so the lamp draws a total of 21.6 watts. But this would be at full. When the lamp is dimmed (they are LEB bulbs) the power consumption (though, not 1:1), should in theory go down as well. I rarely have this lamp at full, so how do I tell the Power Meter to follow the the dimmer level of the lamp without writing a routine for every level between 0-100?

Does this make sense what I am asking?

Thanks

@BoyOfWonder I am using virtual power meter on all my lights. I have same case as you. Single dimmer with multiple lights (2, 3, 5, etc.). For dimmer to go down you need to use SmartLightning to mirror dimmer or smart bulb. It works great. You need to mirror only one of those 3 bulbs.

Couple ideas where you can use virtual meter:
On A/C my ecobee, turns dimmer on and off, and changes different load based on, if it’s heating or cooling (load can be found on furnace and condenser)
or any smartplug that has device with constant load like fans, humidifier, heaters

@TAustin is it possible to add 1 decimal point to load, to be able to enter 27.5W or in his case 21.6W?

Also another tip, set monthly reset on meter or all of them, with notification, and when reset is done you can get monthly usage for each load.

can you give me a real example with print that you use on how to use this driver?



@niquini
Create one virtual meter, and enter connected load in Watts. For multiple lights, multiply by amount of bulbs.

Go to Automations tab


And find SmartLightning

Add bew automation

Then mirror smartbulb or dimmer, and save

That’s all.
Now when you change light level or turn light on and off, meter will change load too

Perfect. I will install and test. Thanks for the screenshots and explanation. If you have any doubts, I’ll let you know.

You can also change load with routine. I am using that on my a/c unit with ecobee. If heat is on load is 1115W, and if cooling is on it’s 1875W. No mirror is needed for this one, as there is no dimming, just switching on and off

1 Like

Freaking brilliant! Thank you! Had no idea that was a thing! Works like a charm. I’m using trend setter, so I have all three bulbs in a group, so I just used the Smart Lighting routine on that group.

Just a thought about your AC example, remember that the load isn’t always fixed. Depending on the temperature you have your unit set at, the load might go up or down. So the energy meter for this (as with the lighting as I had to round my load up because you can’t enter decimals) is an approximation.

Either way, this was very appreciated!

My furnace (gas) is single stage, however load is only different when is heating (fan+gas) vs cooling (fan+condenser).
Also if you are not sure what full load is, just get one of those digital plugin meters, and measure connected device(s) once. They are $10-15 on amazon.

Gotcha! Makes sense. I was talking specifically about air conditioning units. Like window units, etc. Thanks again.

1 Like

Sure, but it may cause a problem with existing devices. It would have to be implemented as a new capability, meaning the field would get reinitialized to 0 and you’d have to re-set it for all your devices. Not sure there is another way around that, but I’ll look at it…

1 Like

Following up on your request: it turns out that there is a bug in the platform right now that prevents you from entering or displaying floating point numbers in custom capabilities. I’ve already reported the problem.

If and when this issue gets resolved, I will revisit this.

1 Like

Smart lighting is only available in select regions and is soon to be deprecated

Some options offered in Smartlighting are not available in automations

Will they be included in the future ? No one knows !