Skip to content
  • MySensors
  • OpenHardware.io
  • Categories
  • Recent
  • Tags
  • Popular
Skins
  • Light
  • Brite
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Brand Logo
E

exblematique

@exblematique
About
Posts
3
Topics
1
Shares
0
Groups
0
Followers
0
Following
0

Posts

Recent Best Controversial

  • Problem with Mosquitto Topic
    E exblematique

    Thank you for your all answers.
    I have made some tests and even if I don't have results for the moment, the best solution for me seems using (in accordance with @bgunnarb):

    MY_MQTT_PUBLISH_TOPIC_PREFIX ESP-topic/ESP-number
    

    Yes, it's can be a good idea @mfalkvidd

    Troubleshooting

  • Problem with Mosquitto Topic
    E exblematique

    Thank you for your quick answers.
    I will try with this new information

    Troubleshooting

  • Problem with Mosquitto Topic
    E exblematique

    Hi everyone,

    I need to change serial communication for a Mosquitto on an existing project. There is one PC and 3 ESP32 without radio-frequency To put be simply, there is a PC which controls ESP32 by the network. On the current project, the node ID is the number of ESP between 1 and 3.
    0_1556451961142_ESP.png

    However, when a try to set up the MQTT gateway, the first topic is always 0. If I'm used message.setDestination(1), this message is not sending (return 0).

    I'm using this following code to my ESP32:

    #define MY_DEBUG
    #define MY_NODE_ID 2
    /**********************************************
    *     Ethernet Gateway Transport Defaults    */
    #define MY_GATEWAY_MQTT_CLIENT
    #define MY_GATEWAY_ESP32
    
    /** Configuration of WiFi */
    #define MY_WIFI_SSID "Test"
    #define MY_WIFI_PASSWORD "qwerty1234"
    #define MY_HOSTNAME "Boss2"
    
    /** MQTT Configuration **/
    #define MY_MQTT_PUBLISH_TOPIC_PREFIX "sendToPc"
    #define MY_MQTT_SUBSCRIBE_TOPIC_PREFIX "getToPc"
    #define MY_MQTT_CLIENT_ID "Boss2"
    #define MY_CONTROLLER_IP_ADDRESS 192, 168, 56, 101
    #define MY_PORT 1883
    /**********************************************/
    
    #include <MySensors.h>
    
    #define MY_BAUD_RATE 115200
    #define OPEN 1
    #define CLOSE 0
    #define CHILD_ID 1
    
    MyMessage msg;
    
    uint8_t value = OPEN;
    
    void presentation() {
      present(CHILD_ID, S_DOOR);
    }
    
    void setup(){
      Serial.begin(115200);
      msg.setType(V_TRIPPED);
      msg.setSensor(CHILD_ID);
    }
    
    void loop() {
      value = value == OPEN ? CLOSE : OPEN;
      send(msg.set(value));
      delay(1000);
    }
    
    

    And on serial terminal I have :

    20182 GWT:TPC:CONNECTING...
    20684 GWT:TPC:CONNECTING...
    20686 GWT:TPC:IP=192.168.137.160
    20691 MCO:BGN:STP(20693 MCO:REG:NOT NEEDED
    20695 MCO:BGN:INIT OK,TSP=NA
    20697 GWT:TPC:IP=192.168.137.160
    20700 GWT:RMQ:MQTT RECONNECT
    20723 GWT:RMQ:MQTT CONNECTED
    20725 GWT:TPS:TOPIC=sendToPc/0/255/0/0/17,MSG SENT
    20733 GWT:TPS:TOPIC=sendToPc/0/1/0/0/0,MSG SENT
    20740 GWT:TPS:TOPIC=sendToPc/0/1/1/0/16,MSG SENT
    21745 GWT:TPS:TOPIC=sendToPc/0/1/1/0/16,MSG SENT
    22751 GWT:TPS:TOPIC=sendToPc/0/1/1/0/16,MSG SENT
    

    Rather than

    20740 GWT:TPS:TOPIC=sendToPc/2/1/1/0/16,MSG SENT
    

    Do you have a solution?

    Thank you

    Troubleshooting
  • Login

  • Don't have an account? Register

  • Login or register to search.
  • First post
    Last post
0
  • MySensors
  • OpenHardware.io
  • Categories
  • Recent
  • Tags
  • Popular