GithubHelp home page GithubHelp logo

ksya / smartbed-mqtt Goto Github PK

View Code? Open in Web Editor NEW

This project forked from richardhopton/smartbed-mqtt

0.0 0.0 0.0 404 KB

Add support for Galaxy Bed (STAR international)

License: MIT License

Shell 0.84% JavaScript 0.35% TypeScript 98.27% Dockerfile 0.54%

smartbed-mqtt's Introduction

Smart Bed MQTT

This project aims to enable remote control of adjustable smart beds from HomeAssistant.

Support is for:

Cloud based

  • Sleeptracker AI (Tempur Ergo/Extend, BeautyRest SmartMotion, and Serta Perfect Smart Base)
  • ErgoWifi [experimental]

Local Wifi

Local Bluetooth Low Energy (BLE)

NOTE: The following requires an ESPHome BLE Proxy

Installation

  • In HomeAssistant click Settings, Add-ons, and Add-on Store.
  • Click the 3 dot menu in the top right and select Repositories.
  • Paste https://github.com/richardhopton/smartbed-mqtt, click Add, and Close
  • Select the Smartbed MQTT add-on from the list, and click Install.
  • Wait patiently for the build to finish.
  • Click on Configuration and set type followed by the necessary configuration as described below.
  • Click on Info and click Start.

MQTT broker

An MQTT broker is required. The Mosquitto official Add-On is recommended. Go to Add-ons and search for MQTT, then follow the provided instructions.

BLE proxy

For BLE controlled beds a dedicated ESP32 running ESPHome's bluetooth proxy is required. Due to limitations in ESPHome, specifically since 2023.7 only one connection can use the bluetooth proxy of an ESP32 at a time, the BLE proxy will need to not be added (or disabled if already added) to HomeAssistant. Use the ESPHome Ready-Made Projects page to create an ESPHome bluetooth proxy and join it to your network.

Sleeptracker AI Support (Cloud)

Configuration

To use this you must set at least one email and password as shown in the sample configuration.

It is possible to configure multiple users for one or more sleeptracker beds. Although it is possible to configure two users for the same bed, it is necessary if the represent a split bed.

The default bed type is tempur, but can be adjusted by specifying beautyrest or serta using the optional type field on each user.

e.g.

 - email: [email protected]
   password: some strong password
   type: tempur

sleeptrackerRefreshFrequency is in minutes.

Current features include:

  • Buttons to trigger the presets
  • Buttons to program the presets
  • Switches to control Snore response
  • Environmental sensors (temperature, humidity, CO2 & VOC)
  • Switch for safety light
  • Sensors for Heat & Foot Angle
  • Buttons to step thru the massage strengths, patterns & timer (auto turn off massage)
  • Sensors for Massage strengths and patterns
  • Support for split beds, and multiple beds

Possible future features:

  • Buttons to control raising and lowering head/feet
  • Configuration of bed "alarm"
  • Service to trigger sleep summary email to be sent from Sleeptracker
  • Switches to control presets

Features that can't be done:

  • Presence detection

Notes

This uses the same api used by the iOS and Android apps, so it is possible that this will break if the apps are changed. I will attempt to maintain it where feasible, but also open to PRs.

ErgoWifi Support (Cloud)

This uses the Chinese cloud called xlink - there is no guarantees that this will work.

Current features include:

  • Buttons to trigger the presets
  • Button for under bed lights
  • Buttons to step thru the massage strengths for head & foot, massage mode, and toggle

ErgoMotion Support (Local TCP)

You must specify an ipAddress (or DNS name), friendlyName, and remoteStyle

Current features include:

  • Buttons to trigger the presets
  • Button for under bed lights
  • Buttons to step thru the massage strengths for head & foot, massage mode, and toggle

Notes

This uses local connection via tcp - please ensure the add-on has access to network devices.

Initial prototyping was only possible due to assistance from Wozman on Discord.

Logicdata Support (Local HTTP & UDP)

Configuring

You must specify at least one Logicdata controller with name and friendlyName, and optionally ipAddress. If an ipAddress is not specified UDP discovery will be used to get the ipAddress.

Current features include:

  • Buttons to trigger the flat preset
  • Buttons to trigger the user presets
  • Buttons to program the user presets
  • Controls for the head, lumbar & leg massage intesity & massage mode

Possible future features:

  • Buttons/Cover to control raising and lowering head/leg

Notes

This uses local connection via http and udp - please ensure the add-on has access to network devices.

Initial prototyping was only possible due to assistance from James on Discord.

Richmat Support (BLE)

Configuring

You must specify at least one bleProxy as demonstrated in the config defaults. You also need to supply at least one Richmat controller with name, friendlyName, remoteCode, and optionally stayConnected.

Current features include:

  • Buttons to trigger the presets
  • Buttons to program the presets
  • Button for under bed lights
  • Buttons to step thru the massage strengths for head & foot, massage mode, and toggle

Notes

Setting stayConnected to true will stop you from being able to use the app to control the bed if the bed only accepts one Bluetooth connection.

Support for this was only possible due to assistance from getrav on Discord. This was reverse engineered from a Sven & Son bed, so your mileage may vary.

Linak Support (BLE)

Configuring

You must specify at least one bleProxy as demonstrated in the config defaults. You also need to supply at least one Linak controller with name, friendlyName, and optionally hasMassage

Current features include:

  • Buttons to trigger the presets
  • Buttons to program the presets
  • Button & switch for under bed lights
  • Sensor to read the back & leg angles
  • Buttons to control massage strengths for head, foot or both, massage mode, and toggle/off

Notes

This remains connected to the bed controller and due to the bed only accepting one connection it will stop you from using the app or remote to control the bed.

Initial prototyping was only possible due to assistance from jascdk on Discord.

Solace Support (BLE)

Configuring

You must specify at least one bleProxy as demonstrated in the config defaults. You also need to supply at least one Solace controller with name and friendlyName.

Current features include:

  • Buttons to trigger the standard presets
  • Buttons to trigger the user presets
  • Buttons to program the user presets
  • Buttons to reset the user presets

Notes

This remains connected to the bed controller and due to the bed only accepting one connection it will stop you from using the app to control the bed.

Initial prototyping was only possible due to assistance from Bonopaws on Discord.

MotoSleep Support (BLE)

Configuring

You must specify at least one bleProxy as demonstrated in the config defaults. You also need to supply at least one MotoSleep controller with name, friendlyName, and optionally stayConnected.

Current features include:

  • Buttons to trigger the presets
  • Buttons to program the presets
  • Button to toggle under bed lights
  • Buttons to step thru the massage for head & foot
  • Buttons to turn off head or foot massage
  • Button to stop all motors & massage

Possible future features:

  • Buttons/Cover to control raising and lowering head/feet/lumbar/neck/tilt

Notes

Setting stayConnected to true will stop you from being able to use the app to control the bed if the bed only accepts one Bluetooth connection.

Initial prototyping was only possible due to assistance from waynebowie99 on Discord.

Reverie Support (BLE)

Configuring

You must specify at least one bleProxy as demonstrated in the config defaults. You also need to supply at least one Reverie controller with name and friendlyName.

Current features include:

  • Buttons to trigger the standard presets
  • Buttons to trigger the user presets
  • Buttons to program the user presets
  • Button to toggle under bed lights
  • Controls for the head & foot massage intesity & massage wave

Possible future features:

  • Buttons/Cover to control raising and lowering head/feet
  • Controls for the under bed light brightness

Notes

This remains connected to the bed controller and due to the bed only accepting one connection it will stop you from using the app to control the bed.

Initial prototyping was only possible due to assistance from Vitaliy on Discord.

Leggett & Platt Support (BLE)

Configuring

You must specify at least one bleProxy as demonstrated in the config defaults. You also need to supply at least one Leggett & Platt controller with name and friendlyName. This supports Gen2 (Richmat) and Okin variants that can be controlled by the LP Control app.

Current features include:

  • Buttons to trigger the standard presets
  • Buttons to trigger the user presets
  • Buttons to program the user presets
  • Light to control under bed lights
  • Controls for the head & foot massage intesity & massage wave

Possible future features:

  • Buttons/Cover to control raising and lowering head/feet

Notes

This remains connected to the bed controller and due to the bed only accepting one connection it will stop you from using the app to control the bed.

Initial prototyping was only possible due to assistance from MarcusW on Discord.

Support

For help with setup, or for sharing feedback please join the Discord server https://discord.gg/Hf3kpFjbZs

smartbed-mqtt's People

Contributors

richardhopton avatar dependabot[bot] avatar austinmroczek avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.