Files
project-vesper/vesper/commands.json
bonamin 101f9e7135 MAJOR update. More like a Backup before things get Crazy
Added Websocket Support
Added Universal Message Handling for both MQTT and WS
Added Timekeeper Class, that handles Physical Clock and Scheduling
Added Bell Assignment Settings, Note to Bell mapping
2025-09-05 19:27:13 +03:00

203 lines
2.8 KiB
JSON

####################################
## DOWNLOAD MELODY ON DEVICE:
####################################
{
"cmd": "download_melody",
"contents": {
"download_url": "http://url.com/SDFJDLS9043FM3RM1/binaries/melody.bin",
"melodys_uid": "SDFJDLS9043FM3RM1"
}
}
melodys_uid >> The Reference UID of the Melody in the database
{
"status": "OK",
"type": "Download",
"payload": "null"
}
####################################
## SET RELAY TIMERS:
####################################
{
"cmd": "set_relay_durations",
"contents": {"b1":100, "b2":200}
}
no reply system implemented yet
####################################
## SET RELAY OUTPUTS:
####################################
{
"cmd": "set_relay_outputs",
"contents": {"b1":1, "b2":2}
}
no reply system implemented yet
####################################
## START PLAYBACK:
####################################
{
"cmd": "playback",
"contents": {
"action": "play",
"name": "esperinos",
"uid": "01DegzV9FA8tYbQpkIHR",
"url": "https://firebasestorage.googleapis.com/v0/b/bs-vesper.firebasestorage.app/o/melodies%2F01DegzV9FA8tYbQpkIHR%2Fbinary.bin?alt=media&token=f63bfc48-de0e-44cb-a2cc-4880c675558b",
"speed": 200,
"loop_duration": 5000,
"pause_duration": 30000,
"total_duration": 200,
"continuous_loop": false
}
}
{
"status": "OK",
"type": "play",
"payload": "null"
}
####################################
## STOP PLAYBACK:
####################################
{
"cmd": "playback",
"contents": {
"action": "stop"
}
}
{
"status": "OK",
"type": "stop",
"payload": "null"
}
####################################
## LIST MELODIES
####################################
{
"cmd": "list_melodies"
}
{
"status": "OK",
"type": "list_melodies",
"payload": ["jdslkfj09823jvcm", "cj2309jcvscv32", "csdvn02dsffv48nvm"]
}
####################################
## SYNC TIME
####################################
{
"cmd": "sync_time",
"contents": {
"timestamp": 16546416
}
}
{
"status": "OK",
"type": "time_set_response",
"payload": "Time updated successfully"
}
{
"status": "ERROR",
"type": "time_set_response",
"payload": "Missing timestamp parameter"
}
####################################
## REPORT_TIME
####################################
{
"cmd": "report_time"
}
{
"status": "OK",
"type": "time_response",
"timestamp": 2438543431, (UNIX TIME)
"datetime": "2025-05-18T16:54:12"
}
####################################
## PING
####################################
{
"cmd": "ping"
}
{
"status": "OK",
"type": "pong",
}
####################################
## REPORT STATUS
####################################
{
"cmd": "report_status"
}
{
"status": "OK",
"type": "current_status",
"is_playing": true,
"time_elapsed": 78850
}