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

VerneMQ and Watson IoT should use same MQTT Client ID convention #32

Open
johnwalicki opened this issue Jun 16, 2021 · 1 comment
Open

Comments

@johnwalicki
Copy link
Member

The firmware only knows the unique WiFi MAC Address of the ESP32. The device does not have a "human identifiable name". This MAC address is the unique Device ID.

The firmware uses this MAC address / DeviceID as part of the MQTT Client ID when subscribing to commands / publishing data to the MQTT broker.

The MQTT ClientID follows a set of conventions defined by Watson IoT Platform.
d:orgId:deviceType:deviceId
eg d:7p7wxk:OpenEEW:A8032A4DCC99
See https://www.ibm.com/docs/en/watson-iot-platform?topic=devices-communicating-mqtt

To keep the firmware consistent across multiple MQTT brokers, we could potentially use d:vernmq:OpenEEW:A8032A4DCC99 (vernmq without the "e" to keep it to a six character orgid - the firmware is written in C and has very specific string buffer sizes)

The firmware subscribes to MQTT command topics specifically for this device. It should only receive command messages that it should act on.

When the device seismic edge processing algorithm detects acceleration exceeding the STA/LTA threshold, it starts to publish event data with its MQTT ClientID.

We need to research how the VerneMQ MQTT broker handles MQTT topic spaces.
We will want to subscribe the seismic detection python scripts to /+/ all the OpenEEW device Client IDs.

@andygrillo
Copy link
Member

can we close this issue given that we are moving away from complicated MQTT systems ?

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

No branches or pull requests

2 participants