https://github.com/marcocanc/orthoplay-re
🔊 Reversing Orthoplay Websocket communication (Teenage Engineering OD-11)
https://github.com/marcocanc/orthoplay-re
notes protocol reverse-engineering teenage-engineering websocket
Last synced: 2 months ago
JSON representation
🔊 Reversing Orthoplay Websocket communication (Teenage Engineering OD-11)
- Host: GitHub
- URL: https://github.com/marcocanc/orthoplay-re
- Owner: Marcocanc
- Created: 2016-07-13T13:52:30.000Z (almost 9 years ago)
- Default Branch: master
- Last Pushed: 2016-07-13T14:30:44.000Z (almost 9 years ago)
- Last Synced: 2025-03-17T21:21:37.343Z (2 months ago)
- Topics: notes, protocol, reverse-engineering, teenage-engineering, websocket
- Homepage:
- Size: 66.4 KB
- Stars: 8
- Watchers: 2
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Reversing Orthoplay
*Tested on OD-11 running V0.9.11*
## EndpointsCommunication to the OD-11 goes through Websockets.
The OD-11 is running AutobahnPython 0.5.14 twice:- PROD: `http://od-11.local/ws`
- DEV: `http://od-11.local:8081`##Initiating communication
To start communicating with the device, send the `global_join` message along with the protocol version you are going to use.
At the time of writing this, 0.4 seems to be the newest.The message will look like this: `{"protocol_major_version":0,"protocol_minor_version":4,"action":"global_join"}`
##Registering/configuring your remote
Next you will need to register your remote with the following message:
``{"color_index":0,"name":"guest","realtime_data":true,"uid":"YOUR_REMOTE_UID","action":"group_join"}``In the js implementation, a unique ID for the remote is generated with the following code
```javascript
var uid = "uid-" + Math.floor(1e8 * Math.random());
```##Staying Connected
In order to stay connected, it is required to send a ping with a timestamp every once in a while (The web client does this every 5 seconds)
```javascript
var createPing = function() {
return {
value: (new Date).getTime() % 1e6,
action:"speaker_ping"
}
}
```
The ping message will look like this `{"value":913577,"action":"speaker_ping"}`###Changing the Volume
You can change the volume of your speaker group by sending the `group_change_volume` message along with the amount by which the volume should change`{"amount":-1,"action":"group_change_volume"}`