Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update MQTT topics for api-v2 #618

Open
Tracked by #613
brentru opened this issue Aug 19, 2024 · 1 comment
Open
Tracked by #613

Update MQTT topics for api-v2 #618

brentru opened this issue Aug 19, 2024 · 1 comment
Assignees

Comments

@brentru
Copy link
Member

brentru commented Aug 19, 2024

No description provided.

@brentru
Copy link
Member Author

brentru commented Aug 20, 2024

I've completed refactoring the device UID generation func. and the MQTT topic generation func. The MQTT topic generation func. is also updated to use the new MQTT topics for API v2.

Output:

13:57:28.436 -> Running Wippersnapper API Version: 2
13:57:28.436 -> api v2 instance::connect()
13:57:28.436 -> Adafruit.io WipperSnapper
13:57:28.436 -> -------Device Information-------
13:57:28.436 -> Firmware Version: 1.0.0-rc.1
13:57:28.436 -> API: Version 2
13:57:28.436 -> Board ID: feather-esp32s2
13:57:28.436 -> Adafruit.io User: abc
13:57:28.436 -> WiFi Network: fff
13:57:28.436 -> MAC Address: 7C:DF:A1:94:A0:3A
13:57:28.436 -> -------------------------------
13:57:28.436 -> ESP32 CPU0 RESET REASON: NO_MEAN
13:57:28.436 -> ESP32 CPU1 RESET REASON: POWERON_RESET
13:57:28.436 -> Generating device UID...
13:57:28.436 -> Calculating device UID length...
13:57:28.436 -> Allocating memory for device UID
13:57:28.436 -> Device UID: io-wipper-feather-esp32s258160148
13:57:28.436 -> Device UID generated successfully!
13:57:28.436 -> Setting up MQTT client...
13:57:28.436 -> Set up MQTT client successfully!
13:57:28.436 -> Generating device's MQTT topics...
13:57:28.436 -> Pre-calculating topic lengths...
13:57:28.436 -> Broker-to-device topic: abc/ws-b2d/io-wipper-feather-esp32s258160148
13:57:28.436 -> Device-to-broker topic: abc/ws-d2b/io-wipper-feather-esp32s258160148
13:57:28.436 -> Error topic: abc/errors
13:57:28.436 -> Throttle topic: abc/throttle
13:57:28.436 -> Generated device's MQTT topics successfully!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

When branches are created from issues, their pull requests are automatically linked.

1 participant