1. Install an MQTT broker, for example on the Raspi
sudo apt-get install -y mosquitto mosquitto-clients
2. Send MQTT messages from trivum to the broker
-
go into the trivum web configuration by typing
<trivumip>/beta
into your web browser,
which also enables Beta features.

-
enable MQTT under: Automation / MQTT


Enter the IP of your broker (Raspi). Keep the topic prefix. (trivum)
-
create a Macro under: Configuration / Macros with a step: send MQTT message

-
create a zone action under: Configuration / zones / first zone / define actions
With action: run a macro, then select the above macro.

-
open a web visualization:
In your web browser, open a new tab. Type the IP of trivum. Now you have a web visualization.

On first use it will control the first zone. At the right, the macro action appears.
-
click or touch on the macro action. It will send the MQTT message.
Test receive directly on the Raspi like:
mosquitto_sub -h localhost -v -t "light/#"
which will show:
light/living/1/status/set 1
3. Control trivum by MQTT messages
In the trivum web configuration, a device topic prefix can be configured, which is trivum by default.
3.1. trivum MQTT topics
The trivum device listens to or sends these topics:
topic |
function |
values |
|
set or get the status of a zone |
0 = off |
|
play a favourite by number |
1 = first favorite |
|
play a line input by number |
1 = first line input |
|
set zone volume, |
0 to 100 |
|
run a numeric multi command |
see multi command codes below |
3.2. trivum multi command codes
These are the same as documented in the trivum HTTP API
For example, when sending 1
to topic trivum/zone/1/run/command
,
the first zone is switched off.
ZONECMD_POWER_OFF 001 ZONECMD_MUTE 002 toggle mute ZONECMD_POWER_TOGGLE 006 ZONECMD_POWER_ON 007 ZONECMD_MUTE_ON 680 ZONECMD_MUTE_OFF 681 ZONECMD_VOLUME_INC 003 ZONECMD_VOLUME_DEC 004 ZONECMD_VOLUME_INC2 009 ZONECMD_VOLUME_DEC2 010 ZONECMD_VOLUME_INC5 011 ZONECMD_VOLUME_DEC5 012 ZONECMD_ALLOFF 015 ZONECMD_SNOOZE 017 ZONECMD_USE_PREV_SOURCE 029 see Zones / zone / KNX/HTTP sources ZONECMD_JOIN 030 ZONECMD_UNJOIN 031 ZONECMD_USE_NEXT_SOURCE 041 see Zones / zone / KNX/HTTP sources ZONECMD_DEFAULT_LINEIN 048 play default line input of zone ZONECMD_DEFAULT_STREAMING 050 play default streamer of zone ZONECMD_DEFAULT_TUNER 051 play default tuner of zone ZONECMD_VOLUME_DEC_1 080 ZONECMD_VOLUME_DEC_10 089 ZONECMD_VOLUME_INC_1 090 ZONECMD_VOLUME_INC_10 099 ZONECMD_START_MACRO_1 200 ZONECMD_START_MACRO_100 299 MULTIKEY_BASIC_FORWARD 400 skip to next track, preset MULTIKEY_BASIC_BACKWARD 401 skip to prev. track, preset MULTIKEY_BASIC_FASTFORWARD 402 MULTIKEY_BASIC_FASTBACKWARD 403 MULTIKEY_BASIC_PLAYPAUSE 406 MULTIKEY_PLAY 431 MULTIKEY_PAUSE 432 MULTIKEY_STOP 433 MULTIKEY_STATION_DOWN 490 MULTIKEY_STATION_UP 491 MULTIKEY_NEXT_ALBUM 493 MULTIKEY_PREVIOUS_ALBUM 494 MULTIKEY_NEXT_PLAYLIST 495 MULTIKEY_PREVIOUS_PLAYLIST 496 ZONECMD_START_PAGING_1 500 (use 500 + paging id) ZONECMD_START_PAGING_32 531 ZONECMD_STOP_PAGING_1 550 ZONECMD_STOP_PAGING_32 581 ZONECMD_STOP_PAGING_ALL 599 ZONECMD_PRESET_1 600 ZONECMD_PRESET_7 606 ZONECMD_GROUP_START_1 621 ZONECMD_GROUP_START_8 628 ZONECMD_GROUP_STOP 630 ZONECMD_GROUP_STOP_1 631 ZONECMD_GROUP_STOP_8 638 ZONECMD_GROUP_STOP_ALL 639 ZONECMD_STREAMING_NOPLAY 641 ZONECMD_VOLUME_00 900 ZONECMD_VOLUME_99 999 ZONECMD_ROOM_VOLUME_00 1000 ZONECMD_ROOM_VOLUME_99 1099