Code Monkey home page Code Monkey logo

iot-mqtt-client's Introduction

Test client for processing protocol buffers messages with AWS IoT Core

This is the client for sending protocol buffers messages to the AWS IoT Core MQTT endpoint.

Usage

Will send a protocol buffers message to MQTT endpoint every 10 seconds. This example code comes with an .env file. You need to supply following values (see blog article chapter "Configure environment variables " for further reference)

  • IOT_ENDPOINT - enter the device endpoint supplied by AWS IoT (see “Get your endpoint”). Looks something like this .iot.eu-central-1.amazonaws.com
  • CA_CERT_PATH - the absolute path of the downloaded AWS Root certificate e.g. AmazonRootCA1.pem
  • DEVICE_CERT_PATH - absolute path for the device certificate e.g. -certificate.pem.crt
  • DEVICE_KEY_PATH - the private key for the certificate e.g. -private.pem.key
  • TOPIC - the topic you want to send the protobuf messages to and where the IoT Core rule should listen to (use the one we configured in the policy, see “Create policy”)

Build and run

  • go build cmd/iot-prototype/main.go build main
  • ./main execute main

iot-mqtt-client's People

Watchers

 avatar Daniel Hill avatar

Forkers

damienfr666

iot-mqtt-client's Issues

Invalid Go import path

Out of curiosity, after making sure I put the protoc-gen-go binary in my path, I ran:

protoc --proto_path=/home/me/iot-mqtt-client/ --go_out=/home/me/iot-mqtt-client/ /home/me/iot-mqtt-client/proto/device.proto

I got this error:

protoc-gen-go: invalid Go import path "proto" for "proto/device.proto"
The import path must contain at least one period ('.') or forward slash ('/') character.
See https://developers.google.com/protocol-buffers/docs/reference/go-generated#package for more information.
--go_out: protoc-gen-go: Plugin failed with status code 1.

Any ideas?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.