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

Hey @Matthew, I managed to find a bit of time today to look at this and came up with a workaround. Please use HPM to grab the latest version and give that a shot.

1 Like

That seems to have worked. Thanks!

1 Like

I registered just to have a discussion in this thread.

First, thank you so much for creating this. I installed the Hubitat Package Manager and then your app here fairly easily.

I then connected it to my bed, created the devices and it actually worked. Amazing.

The whole point of me doing this however is that I'm a snorer and I'm keeping my wife awake. My ultimate goal would be to put some type of device to monitor sound next to my side of the bed and create a schedule that if between this time and this time, the DB detected is above a certain amount (my snoring) then to either lift the head of the bed or drop the head of the bed depending if it is already lifted.

My questions would be:

  1. Is this theoretically possible or should I stop right now?
  2. What type of sensor out there exists that could detect DB level and report back to hubitat?
  3. There's probably an automation in Rule machine that would allow me to do what I'm wanting.

All this to not have to buy a Smart Nora.

Thanks in advance.

1 Like

That's an interesting (and good) idea. I don't know if there's any such sensor that's zigbee or z-wave; I tried looking around and came up empty but maybe others know of something. I did find https://www.minut.com/ which seems to have the desired functionality but would have to be connected via IFTTT (possible but an extra cloud connection).

If you can find a sensor then it's definitely possible; you'd just set up a rule that, when the sensor triggers (or reports decibel level higher than X) would raise the bed head position.

1 Like

Love the idea. I have looked for ages to find a zwave or zigbee sound sensor and have had no luck other than ones specifically tuned to pick up CO or smoke detectors. Apparently, they use standard tones. But a general sound sensor would have tons of uses...

1 Like

If you are pretty to go the Hubduino route, this is definitely possible. I've linked to a relatively short thread where @ogiewon facilitated @signal15's building/integrating a Hubduino-based sound sensor into Hubitat.

1 Like

Also found this zigbee sound sensor from @iharyadi

He made it for SmartThings, but I suspect it should be possible to use it with Hubitat. Very impressive - multiplexed sound sensor!

1 Like

To make sure I follow, it would be:
Purchase an Arduino board.
Purchase a microphone board and attach to Arduino
Use Hubduino app in Hubitat

That correct?

I haven't built one myself. But I think that is accurate. And you'll have to use the Hubduino sketches that are in the thread I linked to.

I also also let either @signal15 or @ogiewon respond ....

Maybe this is normal but I wanted to make sure.

When I use Alexa to give the Head or Foot a command, the bed does what it is suppose to. Alexa however immediately says that the device isn't responding.

E.g. Command Given: "Alexa, set Bed Head to 50 percent".... Alexa replies: "Bed Head isn't responding". (meanwhile the bed works perfectly and moves Head to 50 percent.)

NOTE: This happens on Foot as well. I don't believe this happens on the Main Parent 'Bed' when I set pressure.

If this is normal behavior that is fine, I will live with it. If not what can I do to correct it.

Thank you for this awesome device driver and development. Donation was made and I plan to donate more in the future.

I've seen this as well and it always just seemed like the timeout for Alexa is shorter than the response from the device (I think it's faster to set pressure than to move the platform). That said, I didn't dig into it much so I may be off base. What I did to solve it was just tell the Alexa app to not wait for a reply:


If that doesn't work for you let me know and I'll try to investigate more. One thing I'm not doing but may improve this would be to see if there's a way to use an async call so it returns prior to the work being done - that would amount to the same behavior as that setting in the Alexa app but just for this device. If that's more appealing let me know and I'll try to put some time into it in the near future.

I'm glad you're enjoying the app and many thanks for the donation!

2 Likes

That resolved the issue. Thank you!

Now that you mention this I want to say I've seen Alexa do this with a few other devices on occasion. So I suppose this will keep that from happening on other devices as well.

It might be nice in the future (no rush) to improve this so there is feedback to Alexa. I can see with some devices where you would want confirmation for something you commanded/requested.

FYI: To others reading this, the setting is located in the Apps section for the 'Amazon Echo Skill'.

I added a small feature to fully disable polling based on a switch value (I use this if we're on vacation; now that we can actually travel a bit). Version in HPM should be updated (as well as release notes in the first post).

After the update I'm getting a API Error. I copy the log. It was working before I updated to the latest version?

When you do your next tweak can you add a switch to turn off info logging?

I'm not seeing this error; I suspect it's a coincidence (when it updates it tries to refresh). I did see a decent number of re-auth attempts from SleepNumber overnight so maybe they were having other issues? If you still see consistently after 24h let me know and I'll see what I can find but right now I can't reproduce that.

Do you want to turn off all info logging or are there particular lines you find noisy? What I'd probably do is remove the debug logging toggle and instead add a selection for verbosity.

I looked at this briefly and it seems like the servers are down. I can’t connect using their app either.

1 Like

They were. They are just back up again now.

All would be good.. showing only errors.

Ok, I just pushed 3.1.6 which has the ability to set the log level (so you'll get anything equal to or more severe than the level chosen). Let me know if that does what you want.

1 Like