adafruit / Adafruit_Wippersnapper_Arduino

WipperSnapper is a firmware for creating no-code IoT electronics projects.
https://io.adafruit.com/welcome
MIT License
27 stars 40 forks source link

Update network port/cert support for local testing #574

Closed tyeth closed 2 months ago

tyeth commented 2 months ago

Adds support for local dev machine testing, by allowing esp32 to specify port, and also disable mqtt security checking if not staging/production url

tyeth commented 2 months ago

Hey @brentru can you give this one a review please. Will allow me to do end to end testing locally

tyeth commented 2 months ago

We default it to 8883 but it is also possible to override via Json, which is what I need to do for the local testing on esp³², although the cert insecure should allow local 8883 to work (if ssl setup)

On Mon, 22 Apr 2024, 16:38 Brent Rubell, @.***> wrote:

@.**** requested changes on this pull request.

Looks like it addresses the cert issue, one question

In src/network_interfaces/Wippersnapper_ESP32.h https://github.com/adafruit/Adafruit_Wippersnapper_Arduino/pull/574#discussion_r1574973334 :

 }
 // Construct MQTT client
  • WS._mqtt = new Adafruit_MQTT_Client(_mqtt_client, WS._config.aio_url, 8883,
  • clientID, WS._config.aio_user,
  • WS._config.aio_key);
  • WS._mqtt = new Adafruit_MQTT_Client(
  • _mqtt_client, WS._config.aio_url, WS._config.io_port, clientID,

@tyeth https://github.com/tyeth is WS._config.io_port always the integer value 8883?

— Reply to this email directly, view it on GitHub https://github.com/adafruit/Adafruit_Wippersnapper_Arduino/pull/574#pullrequestreview-2015142432, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABTBZ45QFWVGLCQ26JKCLUDY6UVHFAVCNFSM6AAAAABGTAGJU6VHI2DSMVQWIX3LMV43YUDVNRWFEZLROVSXG5CSMV3GSZLXHMZDAMJVGE2DENBTGI . You are receiving this because you were mentioned.Message ID: @.*** .com>

brentru commented 2 months ago

We default it to 8883

Where do we do this?

tyeth commented 2 months ago

We default it to 8883

Where do we do this?

https://github.com/adafruit/Adafruit_Wippersnapper_Arduino/blob/f51d4ac2e8baa8424717ce2e3a724b7bb5b40289/src/provisioning/ConfigJson.cpp#L49