Uplift Desk Automation
Message Syntax
Transmit
A transmitted message has the following syntax.
0xF1, 0xF1, <cmd>, 0x00, <crc>, 0x7E
0xF1, 0xF1
indicates the message startcmd
is one of:0x01
- Up0x02
- Down0x2B
- Stop0x03
- Save preset 10x04
- Save preset 20x05
- Recall preset 10x06
- Recall preset 20x07
- Sync0x25
- Save preset 30x26
- Save preset 40x27
- Recall preset 30x28
- Recall preset 4
crc
is the sum of the bytes at index 2 and 3.0x7E
indicates the end of message.
Receive
A received message has the following syntax.
0xF2, 0xF2, <cmd>, <len>, <data...>, 0x0F, <crc>, 0x7E
0xF2, 0xF2
indicates the message startcmd
is one of:0x01
- Height value0x25
- Preset 1 height0x26
- Preset 2 height0x27
- Preset 3 height0x28
- Preset 4 height
len
indicates how many messages will be sent next, excluding the CRC and EOT.data
will contain the incoming data values, explained for height readings below.0x0F
- Unknowncrc
will be the sum of bytes at index 2 up to the CRC.0x7E
indicates the end of message.
Received Height Message
When a new height value comes in, the message will look something like this:
0xF2, 0xF2, 0x01, 0x03, 0x01, 0x1B, 0x0F, 0x2F, 0x7E
In this case, the desk was at 28.3". Here is how we can calculate that.
- First off, the command is
0x01
, so we know we're about to receive height data. - The next byte tells us to listen for 3 data bytes.
- The relevant data comes in as
0x01, 0x1B
. This will be converted to a height value later. - Then, we add all of the previous bytes (other than the header) to verify the CRC is correct.
0x01 + 0x03 + 0x01 + 0x1B + 0x0F = 0x2F
Height Calculation
To do. For now, see https://embedded-elixir.com/post/2019-01-18-nerves-at-home-desk-controller/.
Sources
- https://hackaday.io/project/4173-uplift-desk-wifi-link
- https://hackaday.io/project/164931-standing-desk-remote-control
- Height Calculation
- @justintout Spec Documentation
- FCC Listing
- Product Listing
- https://github.com/phord/Jarvis
/u/deadman96385
- https://github.com/deadman96385/uplift_desk_controller_app/blob/a58bcadfb77ac993751758465f1cf20f71d6d8fd/app/src/main/java/com/deadman/uplift/BluetoothHandler.java
- https://imgur.com/a/MUbXwnM
- https://i.imgur.com/DyMf3Ee.jpg
- https://i.imgur.com/KtsWpVQ.jpg
- https://i.imgur.com/BS62C1E.jpg
- https://i.imgur.com/woWoQMe.jpg
- https://i.imgur.com/Lta5Nab.jpg