Virtual power meter or simulated switch with power for aggregation logging?

virtual power meter or simulated switch with power for aggregation logging?

I am a longtime Smartthings hobbiest transitioning to Hubitat for 2-3 years now. I was using Webcore to subtotal multiple plugs (by now-broken method to update a simulated power meter I think) for an Actiontiles dashboard that I still use. I'd like to find a Hubitat simulated device to accept power calculated values pushed from Webcore, like I used to do for Smartthings plugs and sensors. I'm also trying to aggregate worse-case(maximum) value of several pressure sensors, by similar method.

I found 2-3 promising virtual devices in Hubitat (mine is C-4 and I have C-7 in reserve) like Virtual Switch and Virtual Omni Sensor, but my old-hammer-method is not able to nail in a large value like 640.3 (mbar) into the Omni Sensor which only accepts 0 to 100 in its "level" capability which I assume is typically light dimming control. So for now I can read a live-worst-case pressure value as "64", to demonstrate my limited coding capabilities.

I'd appreciate suggestions about how to achieve my ends to use webcore, to subtotal powers, and perform some simple calculations on large and small values.

1 Like

My app has an option to handle aggregating power devices:

If you can give me a device sample for pressure, I'm sure I could spin something up.

1 Like

the pressure sensor is built into the Aqara Temp and Humidity sensor, the rounded square one. The internal description somewhere says "weather" which probably refers to its undersold pressure capability


If you are suggesting to actually buy you one, I will consider that - no promises yet. Thank you for your advice.

FYI I'm using the device handler by veeceeoh, I think it worked for pressure also without modification.
definition (name: "Xiaomi Temperature Humidity Sensor", namespace: "veeceeoh", author: "veeceeoh", importUrl: "") {

No, I meant just the data, BUT, I have one of those :smiley:.

You're looking to aggregate this value, correct?

Yes, that is the intent. I have several pressure sensors in diff containers which leak vacuum, I use the millibar (mbar) range typically 1020 at sea level. So I want the containers to tell me if their pressure increases above about 600mbar (so I monitor the calculated maximum of all containers), to put on one tile of the dashboard.

This tile tells me when I should go pumpdown the containers. I might also put a check-digit-after-decimal-point, to tell me that 664.3 must be the #3 container needs pumpdown.

Looks like the Aqara (in Hubitat) reports in kPa instead of mbar. So 99.2 kPa is 992 mbar.

I can add an option to my app for pressure sensors. What I've done for temp/humidity is I give min reading, max reading, and average reading from all the sensors in the group. I think I could, relatively easily, add an attribute to show which sensor is reporting the min and which is reporting the max.

How's that sound?

1 Like

sounds pretty cool. Thank you. I don't expect anybody to do the goofy things that I do...

I'm looking forward to trying your method (mine is pretty weak).

FYI I'm using the device handler by veeceeoh
definition (name: "Xiaomi Temperature Humidity Sensor", namespace: "veeceeoh", author: "veeceeoh", importUrl: "") {

Sure thing. The app should already have what you need for the power aggregation, just let me know if you see something missing. I'd also recommend setting the app thread to Tracking or Watched so you'll see when I post an update.