Understanding serial gateway code



  • I want to use ESP8266+NRF24L01 combo to parse messages into serial output as per Serial API, but then I want to use the output internally (for posting to cloud MQTT server).
    I can't find a part of the Serial gateway scetch responsible for serial printing or creating serial string.
    Could you help me?


  • Admin

    Why aren't you using the MQTTClientGateway in development branch?



  • Because it requires creating topics in predefined format, e.g. "user/node/child_id/... etc", and I want to use adafruit.io that only allows "user/feedname" format


  • Admin

    Ok, then I suggest you create your own MyGatewayTransportMQTTClient.cpp transport which uses your custom topic layout.



  • 🙂 not very helpful. I don't want anybody to re-write the code for me, I just want to understand what part of Serial Gateway code (not MQTT client code) is responsible for creating serial output.
    If it's something secret, I'll use ESP+Arduino+NRF combo and read Arduino serial output with ESP, and then parse it


  • Admin

    Did you look at the file I pointed out? It is the one responsible for the MQTT communication. This is the file you should modify.

    I don't get why you'd need to bother with the serial output if you want to post MQTT data to adafruit.io?



  • I'm interested in what you learn here. I'm not much of developer (ok - I'm NOT a developer! haha!) but would like to do something similar and posted a thread about it a few months ago. I think I was in the wrong section as I never got a response.

    http://forum.mysensors.org/topic/2200/vera-mqtt-gateway


Log in to reply
 

Suggested Topics

  • 1
  • 1
  • 10
  • 6
  • 5
  • 1

0
Online

11.4k
Users

11.1k
Topics

112.7k
Posts