[2.4.1.164] Bug: Built-in Virtual Outlet caps "power" values to 4800W

I was using a set of devices using the built-in Virtual Outlet to store the results of basic Solar calculations (total gen, total consumption)

... but any power values set on the Device, using setPower commands, that are above 4800W will not be set.

Here's a copy of recent Device's Event log to show this in action. Once the values exceed the limit, the Device's setPower calls stop propagating through:

The changes are applied using the setPower method of it's PowerMeter capability, via this simple RM rule:

This behavior seems a bit dodgy :wink:

I can't find this limit documented, so I'm assuming it's a bug in the Virtual Outlet implementation.

Work-around
Switch the Device Type from Virtual Outlet to Virtual Omni and the values coming through won't be filtered anymore from the underlying power field.

Here's the Device Events after changing the type to a Virtual Omni:

@interrobang Seth, probably relevant for your [RELEASE] Simple MQTT Client Driver - both the limit, as well as the Virtual Omni Device type.

1 Like

Here's the relevant line of code from the Virtual Outlet driver:

if (power < 0 || power > 4_800) return

I don't know why the upper limit was put there, that doesn't make sense for a virtual driver. I'll put in a fix for that...

4 Likes

Awesome, thanks!

I was about to compute the Solar values as -ve... so I would have tripped over the other end of the range limit :wink: