Driver peeve

I keep running into the issue of driver preferences I enter disappearing when I leave the page. For example, most motion sensors have a preference for setting a temp offset to get it to match up with a reference device. After I leave the device's page I have no way of knowing what the entered offset was. This is the case with all the motion sensors I use (Hue and Iris) and several other drivers as well (I don't want to call out code-share developers here).

The only solution I know of is to maintain a file on my computer with the entries I've made for each device. There should (must?) be a better way.

I found a related discussion here but I don't know if it is the solution in all the cases I've encountered.

Can you not store it in state. you will be able to see that when you go back into the driver

I don't see such a thing on a device page. Where is it?

Hubitat's built-in drivers do allow you to see the offset that is being applied to a temperature sensor...at least here is what one of my Iris v2 motion sensors looks like...

After entering in the reference temperature into the User Settings field, the driver calculates the necessary offset and applies it to the current sensorTemp. It shows these values as STATE variables if your REFRESH the web page.

1 Like

I suppose I could put it in the Device Label field but that would be ugly.

Yes, I forgot about that and you're right but it's going away at some point. Maybe it's Configure (after returning to the device page) that resets it.

In my custom drivers, the offset value for temperature is plainly visible in the user settings. I do not perform the magic math like the Hubitat drivers do.

:+1: Then you don't fall in the list of code-share developers I'm addressing. :wink:

1 Like

I haven't tried "Configure" specifically, but I do know that re-joining an existing Zigbee device (without deleting it from the Hubitat database) will cause this value to be reset. I'm guessing clearing this is part of some "initialization" process the driver performs. Maybe "Configure" does that, too. Or, at least, this was my experience with a couple lots of Generic Zigbee Motion Sensor devices (Iris v2, but that shouldn't matter) I attempted to calibrate last summer. :slight_smile:

I happen to prefer inputs like @ogiewon's where I can clearly see the offset and where this is unlikely to get overwritten or removed by anything other than me removing the device (or changing the preference), but I suppose there's no inherently "better" or "worse" way to do this. I guess the built-in Zigbee drivers' method eliminates the need for you to do arithmetic. :man_shrugging:

You quoted my post but my issue wasn't value persistence but actually not being possible to even store the value due to length.

In this instance I ended up storing in state as another user mention as there is no way to do it..

I am interested in your issue though, I wasn't even aware it was a thing, I assumed settings remained persistent? Is that not the case or actually are you talking about the commands you can send rather than persistent settings.. i.e. light level?

Edit:basically I think you are talking about preferences vs commands, I think I understand your issue now.

I wasn't very clear but I am fussing about preferences not being stored somewhere so they show the last setting when I return to the Device's page. They ARE remaining active in the Current States but that gets reset at some point too which I think is when I click the Configure button. It's a real PITA to again co-locate the device and the standard measuring device in a stable environment to get the offset again.

1 Like

I have just confirmed that this is indeed a BUG. I simply clicked CONFIGURE on my Iris v2 Motion Sensor, and the Temperature Offset was reset to Zero. This should not happen, IMHO.

I am tagging @mike.maxwell as I believe he can probably fix this issue quickly.

Here is what it looks like after clicking CONFIGURE and then refreshing the device web page.

and this is what is looked like BEFORE I clicked CONFIGURE

1 Like

Much appreciated.

yes configure clears out the offset, i wouldn't call this a bug since configure shouldn't be executed manually unless a driver is changed...

OK... can we please make a feature request to not clear out the temperature offset if Configure is called manually?

2 Likes

sure, but why?

Because, in general, clicking Configure has always been something users have done safely, with no ill repercussions. Clearing out a temperature offset, which is traditionally a user preference setting, seems like a little much for simply clicking the Configure button, IMHO.

Also, I am guessing that if I have a Zigbee sensor temporarily fall off the mesh for some reason, and I factory reset and re-join it to the hub without ever removing the original device... I am guessing that upon joining, and popping back into the original device, the temperature offset will also be cleared. Is that correct? If so, then without ever clicking configure, the offset is lost as well.

I realize that we're trying to solve 1st world problems here...:wink: But why not preserve the offset? Why clear it upon clicking Configure? If there is a good reason to clear it, I can live with it as is. If not, let's preserve it.

7 Likes

@mike.maxwell

I second this request (not to clear offsets when configure is pressed).

I have, on occasion, switched drivers to Basic ZWave Tool, changed a parameter that is irrelevant to the offset, then changed drivers back to the original and pressed configure.

Well, in the grand scheme of things, not having that temperature offset can take me from being an old man to a crotchety grumpy old man :grinning:

8 Likes

I agree, I would prefer not to have the offset cleared on Configure

2 Likes

Yeah, it's a super simple fix and I see the point!

6 Likes