MQTT control for Serta adjustable beds with Bluetooth, like the Serta Motion Perfect III, 'Glide' with the jiecang ble controller (Dream Motion app) and 'A H Beard' with the DerwentOkin ble controller ("Comfort Enhancement 2" aka "Comfort Plus" app).
Based upon code from https://github.com/danisla/iot-bed
See requirements.txt file. It now uses asyncio-mqtt and pygatt instead of a subprocess using gatttool. The DerwentOkin modules uses bluepy instead of the deprecated pygatt/gatttool.
pip install -r requirements.txt
hcitool will probably be needed, to find the address of your bed, which is part of bluez also.
$ hcitool lescan
LE Scan ...
61:61:61:4E:A0:B0 (unknown)
5F:E4:19:C4:13:CC (unknown)
6F:40:F7:4A:8E:23 (unknown)
7C:EC:79:FF:6D:02 (unknown)
7C:EC:79:FF:6D:02 base-i4.00000233
$
or if you have the Serta MP Remote app installed on your phone, you can find the mac address there.
Your bed will likely have a name starting with base-i4. That is the address you want to put in the config.py file.