[RELEASE] Sleep Number Controller - control your Sleep Number bed and use it for presence

@rvrolyk, updated to 3.0.5 today no issues, set variable pooling :slight_smile:

I do see this in the log now for both sides of the bed

I am using On when not in the bed to set each side to Flat
image

Will go back to using 100 as the value for Set Level in RM for now

Turning the parent on/off changes the SleepNumber bed preset value (it did this in the old one too); if you want on/off to change the bed levels then you need to use the head or foot devices (and toggle them on/off). Does that help?

edited to note preset vs. sleepnumber

Sorry, I wasnโ€™t thinking straight - on/off on the parent should set the bed to your preset and flat respectively. I tried and this works for me, can you confirm how youโ€™re using this?

well see, now you got me to thinking...

I seem to recall seeing that Flat meant 100% so I thought I could use that instead of setting Set Level value to 100. I may have mis-understood the Flat feature especially if it's related to head/foot settings which we do not have. I updated my RM Rule to Set Level to 100 when we are both not present

Next, I understand the Parent/Child concept however even after un-installing everything and re-installing/configuring... I still only have my bed and my wife's, don't see a parent/child relationship in devices or the Sleep Number app at all, what am I missing?

Flat means 0 (head and foot); it correlates to a preset that SleepNumber has in the app for the various head/foot settings (along with WatchTV, Read, etc). If you don't have an adjustable base then the on/off functionality along with setting the presets are meaningless.

You can use setLevel (on the parent) to set the SleepNumber value which sounds like what you are looking for?

Parent/Child does the following:

  1. Creates a parent using the custom driver. This parent device has all the custom commands necessary to change any bed setting and additionally exposes on/off for adjustable base preset levels (on = preset, off = flat) and level for SleepNumber values.
  2. Creates variable number of child devices depending on what you chose when you were setting it up. You can choose:
    • Head - on/off is the same preset as the parent (currently), level is head position
    • Foot - same as head but for foot
    • Foot Warmer - on/off turns on (or off) the foot warmer (if you have it) where on will set it at the preference specified level and duration (pref set in parent). Level will change the heat setting but is only valid as 1,2 or 3 (low, medium, high).
    • Underbed Lighting - on/off turns it on or off. Level will change the brightness (1, 2 or 3).
    • Outlet - on/off turns the outlet on or off (if you have it).

If you didn't choose any child devices from the list above when you set up the bed side, then you won't have anything but the single parent (per side). Hope that helps.

1 Like

TY now I understand the Parent/Child better. I don't have any bed features that would create the child devices

:slight_smile:

For folks that have this, where is this outlet on your bed?

On the pump.

Thanks again for the excellent work on this. With my bedroom now doubling as my office, I use the presence sensors to adjust lights, kill monitor power at the end of the day, and generally figure out what I'm doing with my room.

I just installed 3.06 on a C-4, and I'm getting this error:

Device 21 is the right side of the bed, 18 is the left side of the bed. I have an i8 split top Cal King, adjustable heads (2) and foot (1). No warmers, no outlets, no anything else.

It seems to be harmless in operation, but it clutters the log files significantly (though to be fair, far less than the app did on a normal day before your clean up work!) Is there an easy suggestion to fix this?

Sorry you're seeing those errors but glad it's working for you overall. That log line definitely represents a failure but it's possible you aren't needing that functionality; it's in a spot where I think it's trying to update one or more foot devices to the proper level (and failing). To help me get to the bottom of it, could you add a line to the driver?

On line 853, you'll see:

Integer currentValue = child.currentValue(name).toInteger()

Before that, can you add:

log.trace "Child: ${child.deviceNetworkId}  Name: ${name}"

And then provide me the output that emits? Name should be level (due to matching if above) and I'm guessing the network id will match a foot but not sure why it'd be failing to have a current value.

Also if you could provide a screenshot of the app home page where it lists all the devices that could prove helpful. If I can't see anything immediately off about it I may PM you to get more details; my bed has two distinct sides (no shared foot) so I may not be able to easily reproduce the problem.

Thanks for the quick response. Here's the result, and I'm glad to help test if I can.

Side note: My standard daytime interval is 30 minutes, but turned down to 5 here so I can get quick results.

Output:

Devices:

Oh I guessed wrong; it's the heads. Can you show me the output from the two head device pages? I'll try to look into it tomorrow and hopefully it'll be obvious.

I'm not sure of the ask? Screenshot the device pages?

Yeah, a screenshot of the device page for both head devices. I just want to see the states each device has so I can try to reproduce it.

I'm afraid there's not much to see, but sure:

Thanks. I'm wondering if the component dimmer doesn't allow accessing a level until it's been set once. Doesn't explain why nobody else has seen it but would certainly explain the bug. I'll do some testing and get it fixed up tomorrow. Thanks for reporting it.

FWIW I tested using presets and "on/off" to go to favorites or flat. I also set my head to "10" using the top level "David-In-Bed" component.

I did not try any sets from the head or foot components.

As I said, I'm currently working from the bedroom, so it's pretty easy if you want something tested. Thanks once again for the help!

Hey @david.wirths, can you try 3.0.7? I added some handling that should avoid this error when level isn't available.

Updated and it looks good, not getting any errors on updates. Thanks one more time!

Just got our i10 w/FF3 yesterday, connected up today and currently have it set to refresh every 30 but am getting this:

image

Is there a setting I am missing?

Thanks