Barometer Trending Rise, Fall Steady

Can anyone advise as to how to take a Barometer reading, and then if it falls or rises, change a virtual device to indicate Rise, Fall or Steady?
In Webcore, I tried writing a piston(s) to gauge for if rises if drops, but the devices would not update. I have a personal weather station that gives me data through HPM Ambient Weather App. So I have the data, just can't figure out a rule or piston to compare last reading to next current reading to determine if barometer is rising, falling, or steady. Any help is appreciated.

This should get you most of the way there in Rule Machine...:

where the local vars are of type Decimal and String respectively. The dual Triggers (as shown below) fire the rule whenever Pressure changes, or every hour of the day regardless:

1 Like

OK I did the rule as you have posted, except How do I pass the Pressure_Trend to a Device? I have a Virtual Temperature Sensor Device set up to pass the value to, but I can't figure out what Action to use to pass the value from Pressure_Trend to the Virtual Device. The Virtual Temperature Device is a number because it's looking for a number, so can it accept a String? If Not, what kind of a Virtual device can I pass the Pressure_Trend to?

If the goal is to use the resulting (text) value of Pressure_Trend – which I arbitrarily declared as a local variable within RM – outside of RM, either as an attribute in a virtual device, or as a tile on a dashboard, you'd be better off having Pressure_Trend be a hub variable.

Then, from Settings > Hub Variables, you can quickly and easily create a "Variable Connector" which will be automatically updated to reflect the underlying variable's current value (e.g. "Steady"). That's useful if your ultimate endpoint is a dashboard tile.

I'm unsure how else you could "send" or "pass" the value to a device attribute, nor what kind of virtual device makes sense for your purposes. What is your ultimate goal?

The ultimate goal is to have a tile for either Sharptools Dashboard or Actiontiles. I have both Sharptools and Actiontiles. I ave a Home Weather Station that gives data on barometer, so I would like to add a tile that indicates which way the barometer is moving.
OKay I set up a Hub Variable as a string and set it as initial value to Steady.

I am trying to use the variable to create a tile in Sharptools or Actiontiles. I have a home weather station.

Very good. Just be sure to click Settings > Hub Variables > CREATE (next to Pressure_Trend > "String") to establish the requisite "Variable Connector" that can represent these text values over in Dashboard. Likewise, be certain to include that new Connector device with the Dashboard in question, so you can place a new tile for it.

Now I somehow created a Variable Connector named PressureTrend and it appears in Devices as:
Variable Connectors Variable Connectors ....System
PressureTrend .... Connector Variable System
Is that correct, or should I have named it something else other than PressureTrend?
If all that is above what do I do next to make the Rule populate the correct status of the barometer?

1 Like

Do that part :point_up: so you get it on your db.

How about a Barometer plot in your Sharptools dashboard. A visual indication of where its at and where it been and heading.

2 Likes

I've been really impressed with the direction charting and graphing is going these days, what with several community apps now available, and the ability of several major dashboard apps to provide graphical front-ends to such data.

Sharptools Area plot custom tile using Hubitat

Area Plot, Custom tile, Hubitat only - Community Projects - SharpTools Community

2 Likes

PressureTrend
Variable Connectors
I have the Pressure Trend as a Variable Connector, but I have no clue what to do with it, nor where to include it in the rule, or how to Set that Variable to an existing device.
I also tried to authorize the PressureTrend connector as a device in Sharptools and Actiontiles and neither Dashboard authorization list displays PressureTrend as a device to authorize.
Sorry for my lack of knowledge here, but any further direction like you displayed in the first response showing what the rule should look like would be extremely helpful. This may help other people trying to assign a numeric device with a string.

Is your Pressure trend variable connector is built in settings as a string then that rule above seems legit to say Rising, Falling, etc..

The trigger is checking my weather station Humidity if stays >than 0 for x seconds, then the actions,
I just don't understand where a device that I can use to populate a tile comes into this scenario. I mentioned in a reply above in this topic, the PressureTrend connector variable does not appear in the authorization list of devices in Sharptools or Actiontiles

Click on sharptools app in hubitat, hit next at bottom. On the Additional devices page, click the additional sensors and check the box of the variable connector device. Hit Update, Hit Done.
Look for it on Sharptools "things"

2 Likes

This post has some screenshots describing the manual authorization approach for SharpTools that @kampto mentioned:

OK the Tile shows up in a test Dashboard, BUT it only populates Steady on the tile, not one of the 3 possibilities, Rising, Falling or Steady, and I have checked that the rule is running and it has shown each of the options, but the tile is stuck on only Steady (and I refresh the browser so that's not it)

On Hubitat, open the connector variable device from Device menu. Enter a new value in Set Variable, click Set button. See if it shows up on dash, If it does then the rule is messed up and connector variable and sharptools is working fine

By the way, I see that rule is using integers, pressure changes usually use 2 decimal places because its so slow, so maybe 'Steady' is legit outcome if not using decimals.


Here is the Rule. I tried what you said about going into the Set Variable and typed test. The Tile in Sharptools displayed test. I do see however, that I am getting different readouts if I press Run Actions, so the Pressure New and PressureOld are working, in addition the PressureTrend seems to change also based on the Rule

1 Like