Diferència entre revisions de la pàgina «MQTTS y NodeRED»

De binefa.com
Salta a la navegació Salta a la cerca
Línia 8: Línia 8:
 
  #define TOPIC_LED_Y "/ledY"
 
  #define TOPIC_LED_Y "/ledY"
 
  #define TOPIC_LED_G "/ledG"
 
  #define TOPIC_LED_G "/ledG"
  #define TOPIC_LATCHING_RELAY "/latchingRelay"
+
  #define TOPIC_LATCHING_RELAY "'''/latchingRelay'''"
 
  #define TOPIC_BT_IO0 "/btIO0"
 
  #define TOPIC_BT_IO0 "/btIO0"
 
  #define TOPIC_BT_I34 "/btI34"
 
  #define TOPIC_BT_I34 "/btI34"
Línia 14: Línia 14:
 
  #define TOPIC_LATCHING_RELAY_STATE "/latchingRelayState"
 
  #define TOPIC_LATCHING_RELAY_STATE "/latchingRelayState"
 
  #define TOPIC_REQUEST_LATCHING_RELAY_STATE "/latchingRelayStateReq"
 
  #define TOPIC_REQUEST_LATCHING_RELAY_STATE "/latchingRelayStateReq"
  #define TOPIC_REQUEST_LDR "/ldrReq"
+
  #define TOPIC_REQUEST_LDR "'''/ldrReq'''"
  #define TOPIC_LDR "/ldr"
+
  #define TOPIC_LDR "'''/ldr'''"
 
  #define TOPIC_REQUEST_T "/tempReq"
 
  #define TOPIC_REQUEST_T "/tempReq"
 
  #define TOPIC_T "/temp"
 
  #define TOPIC_T "/temp"
 
  #define TOPIC_SMALL_TEXT "/10pxTxt"
 
  #define TOPIC_SMALL_TEXT "/10pxTxt"
 
  #define TOPIC_MEDIUM_TEXT "/16pxTxt"
 
  #define TOPIC_MEDIUM_TEXT "/16pxTxt"
  #define TOPIC_BIG_TEXT "/24pxTxt"
+
  #define TOPIC_BIG_TEXT "'''/24pxTxt'''"

Revisió del 19:39, 20 maig 2020

Temas (topics)

Tal y como vimos en el dia anterior en Conexión entre la placa IoT-02 y Snap! mediante MQTT (recordar hacer la cancelación de subscripción después de recibir la MAC), podemos usar estos temas con el último firmware ( IoT-02_mqtts_09 en GitHub ):

#define TOPIC_REQUEST_MAC "/macReq"
#define TOPIC_MAC "/mac"
#define TOPIC_LED_W "/ledW"
#define TOPIC_LED_R "/ledR"
#define TOPIC_LED_Y "/ledY"
#define TOPIC_LED_G "/ledG"
#define TOPIC_LATCHING_RELAY "/latchingRelay"
#define TOPIC_BT_IO0 "/btIO0"
#define TOPIC_BT_I34 "/btI34"
#define TOPIC_BT_I35 "/btI35"
#define TOPIC_LATCHING_RELAY_STATE "/latchingRelayState"
#define TOPIC_REQUEST_LATCHING_RELAY_STATE "/latchingRelayStateReq"
#define TOPIC_REQUEST_LDR "/ldrReq"
#define TOPIC_LDR "/ldr"
#define TOPIC_REQUEST_T "/tempReq"
#define TOPIC_T "/temp"
#define TOPIC_SMALL_TEXT "/10pxTxt"
#define TOPIC_MEDIUM_TEXT "/16pxTxt"
#define TOPIC_BIG_TEXT "/24pxTxt"