+ // Rotary touches switch meaning of LEDs, this is handled inside display updates
+ if (rotary >= 4 && rotary < 8)
+ schedule_update();
+}
+
+static void notify_ir(const char *key)
+{
+ DBG("Received IR key %s", key);
+
+ // Lights
+ if (!strcmp(key, "preset+"))
+ update_lights_from_ir(1, 1);
+ else if (!strcmp(key, "preset-"))
+ update_lights_from_ir(1, -1);
+ else if (!strcmp(key, "tuning-up"))
+ update_lights_from_ir(0, 1);
+ else if (!strcmp(key, "tuning-down"))
+ update_lights_from_ir(0, -1);
+ else if (!strcmp(key, "band"))
+ update_lights_on_off_ir(1);
+ else if (!strcmp(key, "fm-mode"))
+ update_lights_on_off_ir(0);
+ else if (!strcmp(key, "dimmer"))
+ update_lights_temp_ir();
+
+ // Player
+ else if (!strcmp(key, "play"))
+ mpd_play();
+ else if (!strcmp(key, "stop"))
+ mpd_stop();
+ else if (!strcmp(key, "pause"))
+ mpd_pause(1);
+ else if (!strcmp(key, "prev-song"))
+ mpd_prev();
+ else if (!strcmp(key, "next-song"))
+ mpd_next();
+ else if (!strcmp(key, "rewind"))
+ update_sink_from_rotary(-2, PCH_SINK);
+ else if (!strcmp(key, "ffwd"))
+ update_sink_from_rotary(2, PCH_SINK);
+}
+
+void notify_mqtt(const char *topic, const char *val)
+{
+ const char blc[] = "burrow/lights/catarium/";
+ if (str_has_prefix(topic, blc))
+ {
+ topic += strlen(blc);
+ int ch;
+ if (!strcmp(topic, "top"))
+ ch = 1;
+ else if (!strcmp(topic, "bottom"))
+ ch = 0;
+ else
+ return;