Each chime is a "particle" in this system.
Generally, it should be as simple as:
- Clone the repo
- Run
cargo run
However, Paho Eclipse MQTT is actually a C library, so it has some dependencies of its own. If you find that the build fails, you might need to brew install openssh
and brew install cmake
(on MacOS).
If you're testing without an ArtNet device available, run with --artnet.broadcast
or the application may simply panic on startup. You can monitor output, if you like, with a tool such as ArtNetView.
- Nannou: creative coding framework
- Tween crate as per the OG Robert Penning ease functions (demo)
- Strum and Strum macros, specfically for dealing with enums in a way that is convenient for the GUI
- artnet_protocol for ArtNet/DMX output
- MQTT + MessagePack = Tether
By default, your custom settings will be saved to a file named settings.json
, and these are what will be loaded on startup.
Keep in mind that these settings apply when you are clicking on the light fixtures to test out various effects, and they will be used as defaults in "live" remote-controlled animations as well, but some aspects of specific animation effects can be overridden by incoming trigger messages.
For example, you may specify a (long) release duration of 9000ms, and this value will indeed be used if the LightTriggerMessage does not specify anything, e.g.:
{ id: 0, targetBrightness: 0.9 }
...but will be overridden to 1000ms if the incoming message specifies it:
{ id: 0, targetBrightness: 0.9, releaseDuration: 1000 }
Pass --help
to see the full list, e.g. cargo run -- --help
If testing locally, you may want to use ArtNet Broadcast mode and disable Tether, i.e.
--artnet.broadcast --tether.disable
Example:
tether-send --host localhost --topic dummy/dummy/lightTriggers --message=\{\"id\":7\,\"targetBrightness\":0.7\,\"attackDuration\":1000,\"finalBrightness\":0.2,\"transmissionRange\":0\}
Other than id
and targetBrightness
, all fields are optional. So the following also works:
tether-send --host localhost --topic dummy/dummy/lightTriggers --message=\{\"id\":0\,\"targetBrightness\":1.0\}
Example - all on to full brightness:
tether-send --host localhost --topic dummy/dummy/lightReset --message=\{\"targetBrightness\":1.0\}
To black:
tether-send --host localhost --topic dummy/dummy/lightReset --message=\{\"targetBrightness\":0\}
Optional duration - if not provided, the fade will be "instant". Here's an example with a 3 second duration, to half-brightness:
tether-send --host localhost --topic dummy/dummy/lightReset --message=\{\"targetBrightness\":0.5\,\"fadeDuration\":3000\}