       }
       cmd = ARILUX_CMD_NOT_DEFINED;
       break;
+      case ARILUX_CMD_WHITE_CHANGED:
+      snprintf(msgBuffer, sizeof(msgBuffer), "%d,%d", arilux.getWhite1Value(), arilux.getWhite2Value());
+      if (mqttClient.publish(ARILUX_MQTT_WHITE_STATE_TOPIC, msgBuffer, true)) {
+        DEBUG_PRINT(F("INFO: MQTT message publish succeeded. Topic: "));
+        DEBUG_PRINT(ARILUX_MQTT_WHITE_STATE_TOPIC);
+        DEBUG_PRINT(F(". Payload: "));
+        DEBUG_PRINTLN(msgBuffer);
+      } else {
+        DEBUG_PRINTLN(F("ERROR: MQTT message publish failed, either connection lost, or message too large"));
+      }
+      cmd = ARILUX_CMD_NOT_DEFINED;
+      break;
+      case ARILUX_CMD_PING:
+      snprintf(msgBuffer, sizeof(msgBuffer), "arilux/%s", chipid);
+      if (mqttClient.publish(TOPICPONG, msgBuffer, true)) {
+        DEBUG_PRINT(F("INFO: MQTT message publish succeeded. Topic: "));
+        DEBUG_PRINT(TOPICPONG);
+        DEBUG_PRINT(F(". Payload: "));
+        DEBUG_PRINTLN(msgBuffer);
+      } else {
+        DEBUG_PRINTLN(F("ERROR: MQTT message publish failed, either connection lost, or message too large"));
+      }
+      cmd = ARILUX_CMD_NOT_DEFINED;
+      break;
     default:
       break;
   }

  // handle Telnet connection for debugging
  handleTelnet();
#endif

  yield();

#ifdef IR_REMOTE
  // handle received IR codes from the remote
  handleIRRemote();
#endif

  yield();

  // handle commands
  handleCMD();

  yield();

  if (!mqttClient.connected()) {
    connectMQTT();
  }
  mqttClient.loop();

  yield();

  ArduinoOTA.handle();

  yield();
}


  MQTT topics and payloads:
    State:
      - State:    arilux/<deviceid>/state/state        ON/OFF
      - Command:  arilux/<deviceid>/state/set          ON/OFF
    Brightness:
      - State:    arilux/<deviceid>/brightness/state   0-255
      - Command:  arilux/<deviceid>/brightness/set     0-255
    Color:
      - State:    arilux/<deviceid>/color/state        0-255,0-255,0-255
      - Command:  arilux/<deviceid>/color/set          0-255,0-255,0-255
    White:
      - State:    arilux/<deviceid>/white/state        0-255,0-255
      - Command:  arilux/<deviceid>/white/set          0-255,0-255
  Configuration (Home Assistant) :
    light:
      - platform: mqtt
