This application is meant as a proof of concept to let multiple Nuimos work with multiple apps running on multiple devices. It removes the limitation of not being able to control the music on your phone while your computer is connected to it.
A demo video can be seen at https://vimeo.com/162261040.
This is not worked out in the application yet since I had no devices to test with, but the protocol is prepared for it.
Note: these are ideas, but not all use cases are implemented
A proposal for a user interface is shown below:
A system overview is shown below.
There are three types of channels (MQTT topics):
nuimo
Command sent by an app to let the nuimo-mqtt daemon
{
"command": "register",
"id": "idOftheApp",
"name": "Display name of the app",
"icon": "string of 81 characters representing an icon"
}
Command sent by an app to let the nuimo-mqtt daemon
Format:
{
"command": "unregister",
"id": "idOfTheAppThatWantsToBeUnregistered"
}
nuimo/<nuimo-uuid>/<appId>
Nuimo events are only sent to the app that is currently 'active' on a Nuimo so that there will not be unintended input to other apps. Apps can still request to become active by publishing a listenPlease
command on their channel.
The listenPlease message is to tell an app that the user selected it so that the app is expected to start listening. The app's icon will be shown shortly.
(Not implemented yet)
Command to shortly show an icon, for example to respond to user input or to show some notification.
icon
should consist of 81 elements in total (string of 81 characters, or a string[] or number[] of 81 elements in total). The allowed values are 0 or 1.brightness
is a value between 0 and 1; optionalduration
is a number in seconds; optionalFormat:
{
"command": "showIcon",
"icon": "string, array of strings or array of numbers representing an icon",
"brightness": 0.3,
"duration": 0.3
}
Command to shortly show an icon, for example to respond to user input or to show some notification.
iconName
should be a name of one of the predefined icons from ledMatrices.tsbrightness
is a value between 0 and 1; optionalduration
is a number in seconds; optionalFormat:
{
"command": "showNamedIcon",
"iconName": "iconName",
"brightness": 0.3,
"duration": 0.3
}
Command to shortly show a progress bar icon, for example to respond to user input or to show some notification.
value
is a number between 0 and 1 style
should be either "VerticalBar" or "VolumeBar"brightness
is a value between 0 and 1; optionalduration
is a number in seconds; optionalFormat:
{
"command": "showProgressBarIcon",
"value":0.77,
"style": "VerticalBar",
"brightness": 0.3,
"duration": 0.3
}
Gesture event from Nuimo. The apps should listen to this event.
Nuimo events are only sent to the app that is currently 'active' on a Nuimo so that there will not be unintended input to other apps.
gesture
is an enum defined in nuimoMqttMessages.ts
.value
is a number used for the FlyUpdate (for its speed) and for TurnUpdate (for its offset)Format:
{
"command": "nuimoEvent",
"gesture": "RotateRight", //one of the gesture types like ButtonPress etc
"value": 24 //depends on gesture type
}