Looking to be able to read Thermostat Fan Speed in RM

Would it be possible for fan speeds (low, medium, high) to be added as options that can be read in Rule Machine?

Right now, only “auto”, “circulate” and “on” are available.

I have a HVAC that I need to set to “high” on some occasions and don’t want to send the command when it is already in that state. Being able to detect this would avoid me hearing the acknowledge beep every time the rule runs and sends the command.

1 Like

If HE is the only thing that changes the fan speed could you use a variable to independently track it in the mean time? Not as handy as being able to read it directly from the thermostat, but it might work temporarily.

Does your thermostat expose the speed as the thermostatFanMode attribute? If so, I assume this should be possible (for the app, not you...) by leveraging the supportedThermostatFanModes attribute, but I don't think any love has been given to that attribute until recently, and lots of apps just ignore it and assume the "standard" set you see above. Alternatively, I suppose it's possible it exposes the speed via the FanControl capability with the fanSpeed attribute, which has a similar supportedFanSpeeds attribute that can be used (but, again, I'm not sure it has ever been paid much attention).

I think RM and other apps have started to pay more attention to attributes like these recently (and it's why some have noticed what turned out to be problems with their thermostat drivers--though again, "problems" that didn't matter much before). Maybe Bruce will decide to leverage the additional information for the above attributes in the future as well, which could address your issue--assuming your thermostat exposes this information via standard attributes. [EDIT: I guess it already does and uses this default set if the driver doesn't supply any; see below.]

In the meantime, regardless, you should still be able to get this information by using "Custom Attribute" instead of any of the standard capabilities, assuming it's exposed via some attribute (standard or not), without the need for variables or any awkward workarounds.

1 Like

Rule pulls supportedThermostatFanModes from the driver. If that's missing, it has a default list that it uses. You've got the default list, so you probably have a defective driver.

@Sebastien show the Current States from the device page for this thermostat.

And, BTW, it's pretty easy to fix this once you show us what you've got.

2 Likes

If I can update the driver to make it work, that would definitely be my preference.

That might be an option! I’ll see if I can include that in the driver.

That one I tried - none of the currently available custom attributes provided me with the current fan speed…

That’s great! It’s from an old and no longer maintained driver, so as long as I know what to update, I’ll be more than happy to do so! :smiley:

1 Like

Yes, that is bad.

Temporarily change the driver to Virtual Thermostat, hit Save Device.

Then you need to give it setSupportedThermostatFanModes command with this string:

["auto","high","medium","low","quiet"]

You should probably do setSupportedThermostatModes as the same time with

["off","auto","cool","heat","fan","dry"]

Then change the driver back to what it was before, and hit Save Device.

After doing those steps, RM should offer the correct Thermostat Fan Modes (or Thermostat Modes).

3 Likes

I can do Groovy cut and paste pretty well, but adding something totally new is apparently not my strong point… I thought I could just add the line, but there must be some syntax I’m missing…

UPDATE: Looks like I was missing an “=“ sign… Good thing my son took some programming courses recently! :slight_smile:

1 Like

You didn't need to edit the driver, just zap the device from its device page.

Ah! I didn’t get that part. However, the device is generated by an app and the driver type field is locked… Will see what I can do…

Say what? The type field of the device isn't locked when it's a child device of an app. Show a screenshot of the device page where the Device Information is displayed.

Sure!

Odd, I don't see that, but then my hub isn't normal. I guess you're stuck having to update the driver. Put this in the updated method of the driver:

device.setSupportedThermostatFanModes(["auto","high","medium","low","quiet"])

1 Like

I added it here:

But the RM conditions aren’t showing new options. I checked the driver too and also only see:

I’m not sure what I’m missing, but will keep investigating…

1 Like

I wonder if the following is interfering or undoing that line of code…? Commenting it out didn’t seem to fix it…

No, that code is fine. Deselect the device in RM, and then select it anew. Also, show Current States from the device page.

1 Like

Still seeing the same as before in the curent rule, but will create a new rule with the device to see if the issue is in the rule.

No luck…

Will keep investigating…

I tried adding the FanControl attribute to see if that would work, but unfortunately, it doesn’t seem that the driver sets this attribute.

Your driver is still wrong.

Did you put that code in Updated and Hit Save Device? Maybe Save Preferences? It must show the quotes in the attribute value or it won't work.

1 Like

I didn’t save device or preferences. Will do that now!