Difference between revisions of "MQTT Import"
Grovkillen (talk | contribs) (Created page with "= Introduction = You might want to use MQTT to send commands or values to your ESP Easy unit. To do this you use the plugin MQTT Import. <span style="color: red>ONLY NUMBERS...") |
Grovkillen (talk | contribs) m (→ESP Easy) |
||
(3 intermediate revisions by the same user not shown) | |||
Line 5: | Line 5: | ||
= Hardware = | = Hardware = | ||
− | No hardware needed. | + | No hardware needed. (Except for a broker server, and that broker setup as active controller). |
= ESP Easy = | = ESP Easy = | ||
− | The | + | The '''Name''' is the name you use in rules etc. internally within ESP Easy. |
− | MQTT Topic 1-4 is the topics you want to listen to, one per imported value. | + | '''MQTT Topic''' 1-4 is the topics you want to listen to, one per imported value. |
− | Value Name 1-4 is the name of the VALUE that you use internally within ESP Easy. | + | '''Value Name''' 1-4 is the name of the VALUE that you use internally within ESP Easy. |
In general you wont need to use formula, and if no formula is needed you do not need to add any information to that box. | In general you wont need to use formula, and if no formula is needed you do not need to add any information to that box. | ||
Line 18: | Line 18: | ||
You may use the MQTT Import together with Rules as this: | You may use the MQTT Import together with Rules as this: | ||
− | [[File:MQTT_IMPORT.png]] | + | [[File:MQTT_IMPORT.png|520px]] |
Use the following rules to act on these imported values: | Use the following rules to act on these imported values: |
Latest revision as of 19:00, 20 July 2017
Contents
Introduction
You might want to use MQTT to send commands or values to your ESP Easy unit. To do this you use the plugin MQTT Import.
ONLY NUMBERS (float numbers to be exact) are allowed to be imported. Thus this guide's use of only integer.
Hardware
No hardware needed. (Except for a broker server, and that broker setup as active controller).
ESP Easy
The Name is the name you use in rules etc. internally within ESP Easy.
MQTT Topic 1-4 is the topics you want to listen to, one per imported value.
Value Name 1-4 is the name of the VALUE that you use internally within ESP Easy.
In general you wont need to use formula, and if no formula is needed you do not need to add any information to that box.
You may use the MQTT Import together with Rules as this:
Use the following rules to act on these imported values:
on sniff#cmdMQTT=1 do Publish %sysname%/IP,%ip% endon on sniff#cmdMQTT=2 do Publish %sysname%/Time,%systime% endon on sniff#cmdMQTT=3 do Publish %sysname%/status,Rebooting Reboot endon
Indicators (recommended settings)
Indicator | Value Name | Decimals | Extra information |
---|---|---|---|
MQTT Topic | Any... | Optional | You need to make sure that the value to import is a float variable (or a integer). This float number need to have a dot (.) as decimal sign in order for the import to work. Formula is in general not used, only visible to allow decimal reformation. |