[RELEASE] Sleep Number Controller - control your Sleep Number bed and use it for presence
Inspired by the SleepIQ App I was using and requests for new features in that thread, I created a new app + driver that allows more control of a Sleep Number bed.
This can be used to create up to 4 device types per bed side, optionally collected in a Virtual Container. Each device exposes the same basic commands but differs in how on/off/dim behave so that you can control the different parts of the bed using a voice assistant.
- Presence: This is assumed to be the basic type if you only install one and dimmer will set the Sleep Number value.
- Head: This allows controlling the head of the bed via dimmer.
- Foot: This allows controlling the foot of the bed via dimmer.
- Foot Warmer: This allows controlling the foot warmer of the bed via dimmer and on/off.
- Underbed Lighting: on/off
- Outlets (if your bed has them): on/off
In 1, 2 and 3, on/off toggles between a preset and flat (where preset is a preference for that device).
More details along with installation notes can be found here which describes how the different settings work as well as other supported commands like privacy mode.
Feel free to leave questions here or if you find bugs, you can note them here or in the github issue tracker and I'll do my best to answer (or fix) them as time permits.
- [FIXED] Updated refresh interval handling to fix bug changing from day to night.
- [FIXED] Removed bogus log line
- [UPDATED] Added ability to use modes instead of time to control refresh intervals.
- [UPDATED] Added ability to set a numeric value in minutes controlling how often an error log will be emitted during request failures.
- [UPDATED] Added a request queue for foundation adjustments so that multiple sequential requests won't clobber each other.
- [FIXED] Resolved but that was breaking sleep data.
- [UPDATED] Minor bug fixes and avoids untyped objects (mostly) in driver.
- [FIXED] Avoid errors when level isn't yet available on child devices.
- [FIXED] Internal cleanup
- [ADDED] Now supports variable refresh interval schedules (day/night) in order to reduce hub and SleepIQ load during the day.
- [FIXED] Improved error handling for outlet and lighting so that errors aren't repeated in a single update pass.
- [FIXED] Now uses head/foot device presence to determine when to poll for foundation status. Note if this emits errors for you and your bed has distinct head/foot controls in the SleepIQ app, please DM me so we can sort out details. If you do not have distinct head/foot then removing the devices will eliminate the errors.
- [UPDATED] No longer sends child events if the values have not changed. This avoids needless descriptionText logging.
- [FIXED] Fixed bug preventing sleep data collection
- [FIXED] Now always send events to child devices to make sure state is correct
- [ADDED] New parent/child driver structure leveraging HE Generic Component devices for simpler code. (Note: for now the old structure is also available).
- [ADDED] Ability to pause app.
- [ADDED] Outlet control
- [UPDATED] New device listing to show parent/child devices and also now link to devices
- [FIXED] fix from imnotbob to avoid using same method for schedule and runIn (apparently not good in HE)
- [FIXED] changed how cache works to (hopefully) avoid NPE when updating child data. For now this only resets cache if a preference (say refresh interval) is updated.
- [FIXED] no longer caches bed info when preferences are updated so that integrated bases and other changes are properly detected.
- [UPDATED] Added control of underbed lighting
- [FIXED] Now properly honors mode setting in app and won't automatically poll when modes are selected but the current mode is not in the selected list
- [FIXED] If the base is integrated, now skip foundation status (which apparently is unavailable on these bases)
- [UPDATED] Added
setSleepNumberFavoritecommand and favorite attribute to device.
- [UPDATED] Added status indicator to app label (for easy visibility in app list)
- [FIXED] Bug due to missing
setLevelwith duration argument
- [FIXED] Bug collecting sleep data when there are no sessions.
- [UPDATED] Added diagnostics support for arbitrary HTTP commands and there's now a device id per row in the bed summary section.
- [UPDATED] Added CSS selectors to sleep tiles
- [FIXED] Refreshed HTTP handling to try to avoid repeated failing calls
- [FIXED] Will now refresh sleep data attributes when preference is enabled
- [UPDATED] Changed sleep data tiles to rely on viewport size for font size and removed 2x wide preference. The font should now resize based on browser size being used.
- [ADDED] new ability to collect sleep data and present individual attributes as well as summary tiles. See documentation for more details and a sample tile.
- [FIXED] Now sets level per sleep number for presence device type
- [FIXED] Bug updating beds when there's no base/foundation.
- [FIXED] Actually set the sleep number when asked
- [FIXED] Login issues with some username/password variations
- [FIXED] app will reinitialize bed info state when new beds are added
- [ADDED] app now uses bed information to avoid processing foot warmer unless a warming component is present
- [ADDED] new diagnostics page in app to show bed information