Can't select device to get value from

I'm trying to create a rule to set a humidity level (in a variable with a humidity connector) when the humidity sensor in the bathroom changes. What I'm trying to do is set an on/off humidity level for the bathroom fan to the current humidity with an offset. So when the humidity changes and goes above that level (bath room is getting humid because someone is taking a shower), the exhaust fan will automatically turn on. Later when the humidity drops to this computed value, the exhaust fan will turn off.

So I'm creating the rule and get this far in defining the action:

However, when I click to select the humidity sensor, nothing happens -- no list of sensors even though I have two).

This used to work several builds ago but maybe broke when they made some recent changes regarding needing connectors for global variables. I've tried with the variable having and not having a connector to no avail.

What can I do to get this to work?

A couple of suggestions:

You may want to move the topic to the rule machine category
It may be useful for others to know what software version you are running on your hub, the version of rule machine you are using and the type of humidity sensor you are using

1 Like

There are also a couple of Community apps you may be interested in that could help you with this, but probably useful to still work through your issue first, if only for the benefit of others here.

1 Like

To add to the above, what kind of devices are these and (more to the point) what driver are you using for them? Particularly if it's a community driver, there could be something wrong with that. Also, what is the type of the variable?

2 Likes

I have it configured as a "Sonoff Zigbee Temperature/Humidity Sensor". Like I noted, it used to work but after a couple of recent hub updates, it has stopped. I wasn't happy with what I was doing before so I deleted the old rule and started over.

What specific driver are you using for this? A link to it would be best. I assume it is custom code, as Hubitat does not have a built-in driver with that specific name. The only community driver I can think of offhand, the one from Markus, also does not quite match that name. (EDIT: Nevermind, that is a system driver I missed. :smiley: )

Also, what is the type of this variable? Number or Decimal are two examples of what this could be (Settings > Hub Variables, or the Local Variables screen in the Rule if that's what this is, will tell you).

EDIT: for fun, I tried this with the Markus driver and was not able to make it fail (my device was shown in the selection box). I was using a Number variable, though I suspect something broader like Decimal should also work without trouble. This is unlikely to be related to connectors--you are using the variable itself, not the connector device--and the only thing I can think of that might make this happen is if the driver doensn't declare capability "RelativeHumidityMeasurement" (or if it's using a custom attribute with the wrong type, but this selector in RM should look for standard ones).

The driver is in the system list, it is not custom. It used to work about two weeks ago until I deleted the original rule and started over. Again, that was several hub updates ago. The variable is a number

Weird, it works for me with that driver, so I'm not sure what's going on. If you haven't tried creating a new rule (I know, again...) and seeing if it happens there too, that might be a good first step.

Also, from your screenshots, it doesn't appear to be the case, but just in case: unless you are actually using this feature (e.g., with a screen reader), I'd make sure you have the accessibility feature turned off at the top of the "Settings" page, as it is by default. That has caused problems for some point-and-click users before.

It "appears" the issue was related to having a variable name with a "/" in it. Replaced the "/" with an "-" and everything worked as it should. Seems a "/" is fine in a device name but not a variable. If that's the case, one shouldn't be allowed to create one that way.

1 Like

Actually, this issue only pertains to using such a variable in a context where RM is trying to select a device with a name based on the variable with a / in its name. That's an RM bug, and will be fixed in the next release. There are two contexts: "sensor value" and "device attribute".

1 Like

This would be my suggestion as well. It takes a fair amount of complexity to mimic what these apps can do. For example, the one app I use for bath fan uses rate of change as one way to turn on the fan. It also can use a percentage (max) or compare two sensors. It has about 1200 lines of code, I don't see how you would do this with a rule in any sane fashion.

But it looks like you might have found the solution to your question, so this might be a moot point.

2 Likes