Allrighty then… Here we go!
Auping Connect
The Auping Connect is a wireless module used to control Auping beds from a smartphone.
The module uses WIFI to communicate with the Auping Connect app, and uses Bluetooth to connect to the beds. If you have an Auping Royal, you would use 2 cables to connect the beds to the module using the 2 RJ45 ports on the device.
From the app you are able to control the motors, set alarms and activate a special anti-snore function, whereby your smartphone listens for snoring sounds, and adjusts the bed to give you a nudge, so you will turn on your side to prevent snoring.
Setup
To setup your Auping Connect, you’ll have to download the Auping Connect App first.
During initial setup, you will be asked to connect your phone to an Ad-Hoc unprotected Wifi hotspot broadcasted from the Auping Connect device itself.
From here, the app pairs with the device, and passes your normal Wifi credentials.
After setup, your phone returns to the normal Wifi ssid again.
The Auping Connect device will connect to that same Wifi ssid and starts normal operation.
Now you can use the app to control your bed from your smartphone.
Network Discovery
The Auping Connect device will broadcast it’s existence periodically using MDNS, advertising it’s services on port 80:
When starting the App, it will first query the device to discover it’s capabilities:
GET /api/config HTTP/1.1
X-Key: aabbccdd
Host: 10.50.1.151
Connection: Keep-Alive
Accept-Encoding: gzip
User-Agent: okhttp/3.14.9
HTTP/1.1 200 OK
Content-Type: application/json
Cache-Control: no-store, no-cache, must-revalidate, post-check=0, pre-check=0
Pragma: no-cache
Connection: Keep-Alive
Transfer-Encoding: chunked
{"name":"Auping Connect C12B","interface":"STA","hostname":"connect","ip":"10.50.xxx.xxx","wifi_configured":"1","stored_ap":"myssid","mac_address":"3C:E1:A1:xx:xx:xx","cbu_type":33,"sync":0,"bed_type":37,"alarm_a_utc":0,"alarm_b_utc":0,"utc":1617391756,"current_system_time":2956688,"time_last_command ":0,"cbu_a_command":0,"cbu_b_command":0,"firmware":"1.05.4"}
The device runs a simple HTTP server on port 80, and uses JSON as payload.
The app sends a not-standard HTTP-header: X-Key: aabbccdd with the request, probably as a pairing key (real value was obfuscated by me for security reasons).
It is assumed that this key is unique for every bed and/or pairing.
The device responds with the stored configuration like the SSID it’s connected to, the type of bed (how many motors, firmware version etc.).
Operating the bed
During operation of the bed, the same protocols are used for communication.
Within the app, you can select which half of the bed you want to control (left side, right side, or both in sync). By pressing and holding the buttons on the screen, the bed is operated just like you would with the normal remote.
Basic protocol breakdown
This operation translates into the following HTTP calls:
On button press:
POST /api/cbu/motor/extended HTTP/1.1
X-Key: pgxhhqsf
Content-Type: application/json
Content-Length: 121
Host: 10.50.1.151
Connection: Keep-Alive
Accept-Encoding: gzip
User-Agent: okhttp/3.14.9
{"CBU":1,"motor_1":{"Action":0,"TimeInMs":0},"motor_2":{"Action":1,"TimeInMs":30000},"motor_3":{"Action":0,"TimeInMs":0}}
HTTP/1.1 200 OK
Content-Type: application/json
Cache-Control: no-store, no-cache, must-revalidate, post-check=0, pre-check=0
Pragma: no-cache
Connection: Keep-Alive
Transfer-Encoding: chunked
{"success":true}
On button release:
POST /api/cbu/motor/extended HTTP/1.1
X-Key: aabbccdd
Content-Type: application/json
Content-Length: 117
Host: 10.50.1.151
Connection: Keep-Alive
Accept-Encoding: gzip
User-Agent: okhttp/3.14.9
{"CBU":1,"motor_1":{"Action":0,"TimeInMs":0},"motor_2":{"Action":0,"TimeInMs":0},"motor_3":{"Action":0,"TimeInMs":0}}
HTTP/1.1 200 OK
Content-Type: application/json
Cache-Control: no-store, no-cache, must-revalidate, post-check=0, pre-check=0
Pragma: no-cache
Connection: Keep-Alive
Transfer-Encoding: chunked
{"success":true}
The protocol looks very simple. On every button press, a JSON payload is posted in the form of:
{
"CBU": 1, --0=both bedsides in sync, 1=let side, 2=right side
"motor_1": { "Action": 2, "TimeInMs": 30000 }, --action 0, 1 or 2 (stop, up or down),
"motor_2": { "Action": 2, "TimeInMs": 30000 }, --time is used to set the time until stop.
"motor_3": { "Action": 2, "TimeInMs": 30000 }
}
The CBU determines which part of the bed is operated. It can be left side (1) , right side (2) or both in sync (0).
The motor properties sets the action per motor, and the time the motor should be running in ms.
Action 0 = stop, 1 = up and 2 = down.
So the above command would instruct the left side of the bed to go down with all 3 motors, and stop after 30 seconds.
The bed responds with a JSON payload on an HTTP 20 OK indicating success:
{"success":true}
On button release, an immediate STOP is issued, by sending action 0 to all motors:
{
"CBU": 1,
"motor_1": { "Action": 0, "TimeInMs": 0 },
"motor_2": { "Action": 0, "TimeInMs": 0 },
"motor_3": { "Action": 0, "TimeInMs": 0 }
}
Implementation proposal
My proposal would be to use cover controls (up/down) or separate buttons to control the beds.
Perhaps 1 cover control per motor (and maybe 1 for the sync function?)
Using the info above though, it should already be possible to control the beds using the build-in RESTful Command - Home Assistant (home-assistant.io).
You should be able to fairly easily create a button panel for the bed, or define ‘presets’ for watching TV.
When asking google for ‘good night’ it could lower your bed to sleeping positing, or wake you up in the morning by raising your bed.
No special integration is needed if you sniff the key from your beds and automate it right now using RESTful commands…
My own needs are covered with above investigation, so I will not create a special integration for it right now. Should there still be a high demand for such an integration, please upvote and share your thoughts on how it should work on a functional level.