This shows you the differences between two versions of the page.

Link to this comparison view

mqttlamp [2018/03/25 21:09]
sestst created
mqttlamp [2018/11/03 02:59]
Line 1: Line 1:
-{{::​server:​lamp64_off.png?​nolink|}} +
-====== MqttLamp ====== +
-This module is a part of the [[NetHomeServer]]. The MqttLamp behaves like a standard lamp, and controls a lamp/switch via MQTT. You configure the topic of the device you want to control and the messages used to turn the device on or off. The MqttLamp will also listen on that topic for those messages to update the state if it is changed from another source. Note that you need to have a MqttClient configured to connect to the MQTT broker you are using and that this MqttClient must subscribe for the lamps topic in order for the lamp to be able to update state. +
-===== Attributes ===== +
-  * **State** //[get] [set]// Current state of the lamp, "​On"​ or "​Off"​ +
-  * **Topic** //[get] [set]// The topic the messages will be sent to, the topic of the device you want to control +
-  * **OnMessage** //[get] [set]// Message to send to turn the device on +
-  * **OffMessage** //[get] [set]// ​ Message to send to turn the device off +
-  * **QOS** //[get] [set]// MQTT Quality of service level +
-  * **Retain** //[get] [set]// MQTT Retain flag +
-  * **MqttClient** //[get] [set]// Optional identity of MqttClient to use to send the messages. If this is left empty, the messages will be sent by all MqttClients in the OpenNetHome Server. +
-===== Actions ===== +
-  * **On** ​ Turn lamp on (send the on-message) +
-  * **Off** Turn lamp off (send the off-message)  +
-  * **Toggle** ​ Toggle state of the lamp +
-==== See also ==== +

Personal Tools