|
JBWOPR
|
Functions | |
| bool | JBWoprMqttDevice::mqttPublishMessage (const std::string &topic, JsonDocument &jsonDoc, bool retain=false) |
| MQTT publish message. | |
| bool | JBWoprMqttDevice::mqttPublishMessage (const std::string &topic, const std::string &value, bool retain=false) |
| MQTT publish message. | |
| bool | JBWoprMqttDevice::mqttPublishMessage (const char *topic, const char *value, bool retain=false) |
| MQTT publish message. | |
| bool | JBWoprMqttDevice::_mqttStart () |
| Start MQTT. | |
| void | JBWoprMqttDevice::_mqttStop () |
| Stop MQTT. | |
| bool | JBWoprMqttDevice::_mqttReconnect () |
| Reconnect MQTT. | |
| virtual bool | JBWoprMqttDevice::_onMqttConnect () |
| Called when MQTT client get connected. | |
| void | JBWoprMqttDevice::_mqttCallback (const char *topic, const byte *payload, unsigned int length) |
| MQTT callback. | |
| virtual void | JBWoprMqttDevice::_handleCommand (const std::string &entity, const std::string &subEntity, const std::string &command, const std::string &payload) |
| Handle MQTT command message. | |
| virtual void | JBWoprMqttDevice::_handleDeviceCommand (const std::string &subEntity, const std::string &command, const std::string &payload) |
| Handle MQTT device command message. | |
| virtual void | JBWoprMqttDevice::_handleConfigCommand (const std::string &subEntity, const std::string &command, const std::string &payload) |
| Handle MQTT config command message. | |
| virtual void | JBWoprMqttDevice::_handleEffectCommand (const std::string &subEntity, const std::string &command, const std::string &payload) |
| Handle MQTT effect command message. | |
| virtual void | JBWoprMqttDevice::_handleDisplayCommand (const std::string &subEntity, const std::string &command, const std::string &payload) |
| Handle MQTT display command message. | |
| virtual void | JBWoprMqttDevice::_handleDefconCommand (const std::string &subEntity, const std::string &command, const std::string &payload) |
| Handle MQTT defcon command message. | |
| virtual std::string | JBWoprMqttDevice::_getTopic (const char *entityId, const char *subEntityId) |
| Get publish topic for specified entity. | |
| virtual std::string | JBWoprMqttDevice::_getTopic (const std::string &entityId, const std::string &subEntityId) |
| Get publish topic for specified entity. | |
| virtual std::string | JBWoprMqttDevice::_getSubscriptionTopic () |
| Get subscription topic. | |
| virtual std::string | JBWoprMqttDevice::_getAvailabilityTopic () |
| Get availability topic. | |
|
protectedvirtual |
Get availability topic.
|
protectedvirtual |
Get subscription topic.
|
protectedvirtual |
Get publish topic for specified entity.
| entityId | Entity ID |
| subEntityId | Sub entity ID |
|
protectedvirtual |
Get publish topic for specified entity.
| entityId | Entity ID |
| subEntityId | Sub entity ID |
|
protectedvirtual |
Handle MQTT command message.
This method will handle incoming MQTT command messages.
| entity | Entity name |
| subEntity | Sub entity name |
| command | Command |
| payload | Payload |
|
protectedvirtual |
Handle MQTT config command message.
This method will handle incoming MQTT config command messages.
| subEntity | Sub entity name |
| command | Command |
| payload | Payload |
|
protectedvirtual |
Handle MQTT defcon command message.
This method will handle incoming MQTT defcon command messages.
| subEntity | Sub entity name |
| command | Command |
| payload | Payload |
|
protectedvirtual |
Handle MQTT device command message.
This method will handle incoming MQTT device command messages.
| subEntity | Sub entity name |
| command | Command |
| payload | Payload |
|
protectedvirtual |
Handle MQTT display command message.
This method will handle incoming MQTT display command messages.
| subEntity | Sub entity name |
| command | Command |
| payload | Payload |
|
protectedvirtual |
Handle MQTT effect command message.
This method will handle incoming MQTT effect command messages.
| subEntity | Sub entity name |
| command | Command |
| payload | Payload |
|
protected |
MQTT callback.
This method is the callback for the MQTT client, and will handle incoming messages.
| topic | MQTT topic |
| payload | MQTT payload |
| length | MQTT payload length |
|
protected |
Reconnect MQTT.
This method will check if connection is lost and try to reconnect the MQTT client as needed.
|
protected |
Start MQTT.
This method will initialize the MQTT client.
|
protected |
Stop MQTT.
This method will stop the MQTT client.
|
protectedvirtual |
Called when MQTT client get connected.
This method will be called when the MQTT client is connected.
Reimplemented in JBWoprHADevice.
| bool JBWoprMqttDevice::mqttPublishMessage | ( | const char * | topic, |
| const char * | value, | ||
| bool | retain = false ) |
MQTT publish message.
This method will publish a message to the MQTT broker.
| topic | MQTT topic |
| value | MQTT payload value |
| retain | Retain message, default value is false |
| bool JBWoprMqttDevice::mqttPublishMessage | ( | const std::string & | topic, |
| const std::string & | value, | ||
| bool | retain = false ) |
MQTT publish message.
This method will publish a message to the MQTT broker.
| topic | MQTT topic |
| value | MQTT payload value |
| retain | Retain message, default value is false |
| bool JBWoprMqttDevice::mqttPublishMessage | ( | const std::string & | topic, |
| JsonDocument & | jsonDoc, | ||
| bool | retain = false ) |
MQTT publish message.
This method will publish a message to the MQTT broker.
| topic | MQTT topic |
| jsonDoc | JSON document |
| retain | Retain message, default value is false |