Ethernet/WiFi-Client Gateway enhancement


  • Hardware Contributor

    Today I was playing with MY_GATEWAY_ESP32. I like to use several ESP32 talking to node-red with a client connection (MY_CONTROLLER_IP_ADDRESS). To my understanding I have to open one port for every ESP32, to distinguish the different ESP32 gateways. This is not a nice solution.

    I suggest to add a define
    #define MY_API_PREFIX "example"
    and to send this prefix with every message.

    Are there better solutions?


  • Mod

    @fotofieber doyou know if controllers in general understand the suggested prefix? Or would all controllers need to be changed to support this feature?

    An alternative might be to use mqtt, where you can set one of these (or both)

    #define MY_MQTT_CLIENT_ID "mysensors-1" 
    #define MY_MQTT_PUBLISH_TOPIC_PREFIX "mygateway1-out" 
    

    Documentation https://www.mysensors.org/apidocs/group__GatewaySettingGrpPub.html


  • Hardware Contributor

    @mfalkvidd
    Yes, this could be a solution.

    When using gateways as 'nodes', I miss the automatic ID handling (I_ID_REQUEST...) and registration in the controller. I have to configure something in the controller for every new node.

    This could maybe solved by a new hal/transport/ip.

    As the ESP32 can act as AccesPoint and WifiClient at the same time, he could be a gateway offering his service to nodes via his AccessPoint on a separate WLAN.


 

373
Online

8.3k
Users

9.1k
Topics

96.7k
Posts