https://github.com/autodesk-platform-services/mqtt-publisher
https://github.com/autodesk-platform-services/mqtt-publisher
iot iot-device
Last synced: 12 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/autodesk-platform-services/mqtt-publisher
- Owner: autodesk-platform-services
- Created: 2024-01-16T06:56:39.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2024-02-23T07:10:31.000Z (over 2 years ago)
- Last Synced: 2025-03-31T11:29:25.001Z (over 1 year ago)
- Topics: iot, iot-device
- Language: JavaScript
- Homepage:
- Size: 16.6 KB
- Stars: 0
- Watchers: 10
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# MQTT Publisher Sample

[](https://nodejs.org)
[](https://www.npmjs.com/)
[](https://opensource.org/licenses/MIT)
[Autodesk Platform Services](https://aps.autodesk.com) application built to demonstrate publishing data to MQTT broker, which can be consumed by any subscriber.
## Development
### Prerequisites
- [Node.js](https://nodejs.org) (we recommend the Long Term Support version)
- Terminal (for example, [Windows Command Prompt](https://en.wikipedia.org/wiki/Cmd.exe)
or [macOS Terminal](https://support.apple.com/guide/terminal/welcome/mac))
- MQTT broker and publisher credentials
### Setup & Run
- Clone this repository
- Install dependencies: `yarn install` or `npm install`
- Setup environment variables:
- `APS_CLIENT_ID` - your APS application client ID
- `APS_CLIENT_SECRET` - your APS application client secret
- `MQTT_URL` - your mqtt broker connection url
- `MQTT_CLIENT` - your mqtt client id, this can be created dynamically as well
- `MQTT_USERNAME` - your mqtt publisher username
- `MQTT_PASSWORD` - your mqtt publisher password
- Run the server: `yarn install` or `npm start`
> When using [Visual Studio Code](https://code.visualstudio.com),
you can specify the env. variables listed above in a _.env_ file in this
folder, and run & debug the application directly from the editor.
## Troubleshooting
Please contact us via https://forge.autodesk.com/en/support/get-help.
## License
This sample is licensed under the terms of the [MIT License](http://opensource.org/licenses/MIT).
Please see the [LICENSE](LICENSE) file for more details.