Question about conditions

@bravenel

Bruce - any suggestions for solving my logic dilemma?

I've been trying to think about ways to translate a humidity reading to a virtual dimmer to act like a variable. I have an idea, but I'm not at home so can't test to see if it will work.

Trigger of humidity <= 100, action to make a web request that sends a setLevel command with %value% to the Maker API endpoint of a virtual dimmer. This would store your baseline value. Disable this rule by whatever method you want after the shower comes on to prevent it from updating further.

Another nearly duplicate setup to set a second virtual dimmer to your actual humidity level. This would be a real-time reading, so no disable necessary.

Then a third rule to compare the two and perform actions when actual exceeds baseline + 10%.

Maybe??

It is not possible to do so; see this thread answered by Bruce:

Bruce: "But it is not possible in general to grab a value of one device and set another from it. Maybe in the future..."

I now have 3 WebCore pistons left over; one of them is to account for exactly this inability.

J

Ah.... If only WebCore worked with Hubitat in a reliable way... :frowning:

Guess what...this works :slight_smile: You have to use the Maker cloud endpoint, hub can't http request itself (I tried hub IP address, 127.0.0.1 and localhost). Tested changing humidity levels on a virtual omni sensor and it updates the dimmer level on a virtual dimmer. There seems to be a problem with Maker API setLevel command, but proof of concept is positive.

Maker problem:

1 Like

Great work around to a point. Ultimately it would be nice to have this within RM.

I definitely have need to find a device level/value, and then perform math on it and write it back out. Definitely can't do that in RM in any supportable way.

I guess I'll have to get into the app writing business, which really kind of stinks from a time management standpoint - but I'll do it because I don't have any choice.

1 Like

I think you can do this with @bangali WATO app? I'm not sure as I've not used it yet but it sounds like something it's for?

For the trigger I think it would work, but for the action it wouldn't. For the action I would need something like "max(level - 10,5)".

How convoluted can we get? :smiley:

When one device changes value, use the method above to set a second. Have another trigger that when the second updates, reduce level by 10. Then have another rule that says if second device > 5 do one thing, else do another. Rules on top of rules on top of more rules! :scream_cat:

1 Like

I tried to do that with WATO but it doesn't control a dimmer. Only an on/off switch as far as I can tell. So, if humidity over a certain point, switch on, under switch off. But it won't match a dimmer to the humidity.

If they implement a fix for the issue with Rule Machine you found, most of my "variable" needs would be met though. Most of the ones I would like are single integers between 1 and 100. So, lets keep our fingers crossed for that soon. I was looking more into that though...does RM allow for passing of the trigger value out in an HTTP request? I don't see the same notes about %device% and %value% under http request that I do under notification. But i can't tell if it's just not listed or actually doesn't work there.

EDIT: Just tried it myself....IT DOES!!! :slight_smile:

1 Like

@Ryan780 Please share what you did....please!!

1 Like

You can use a virtual dimmer and an HTTP request and a cloud link from the Maker API to store a percentage in a virtual dimmer. Only issue is the maker API isn't passing the value to the device its controlling correctly. @destructure00 found this. But it has been confirmed as a bug and @patrick has put a ticket in. But I'm not 100% that it will work the way I'm hoping. Have to wait till it's fixed and see.
The ability to store an integer value between 1 and 100 would be REALLY useful. It could even be stored as a device to keep the existing structure of device subscriptions in Rule Machine. Maybe somebody can ask Santa for that for all of us.

I still have Packages of Rules available if you need extras.

$0.00, you pay shipping :smiley:

1 Like

WHAT?? FO FREE? I'll take as many as I can get!! :rofl:

1 Like

You already have more than anyone else :rofl:

I'm trying to catch up though.

1 Like

Hurry up! I seem to have stalled out at 212 :nerd_face:

1 Like

10 posts were split to a new topic: Using WATO for device commands

Well, it was the only thing that I changed and this is the first lockup I've ever experienced and it happened an hour after I added the new WATO to match the humidity of my thermostat to a virtual dimmer. I don't have any logs as I don't think WATO creates logs.