Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/ctron/hot
Command line test tool for Eclipse Hono
https://github.com/ctron/hot
amqp1-0 eclipse-hono http iot mqtt
Last synced: 4 days ago
JSON representation
Command line test tool for Eclipse Hono
- Host: GitHub
- URL: https://github.com/ctron/hot
- Owner: ctron
- License: epl-2.0
- Created: 2019-05-14T19:12:51.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2020-07-30T08:50:48.000Z (over 4 years ago)
- Last Synced: 2024-06-20T12:08:53.297Z (5 months ago)
- Topics: amqp1-0, eclipse-hono, http, iot, mqtt
- Language: Go
- Size: 1.72 MB
- Stars: 1
- Watchers: 3
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# HoT – Hono Test [![GitHub release](https://img.shields.io/github/release/ctron/hot.svg)](https://github.com/ctron/hot/releases)
This is a simple command line tool for testing Eclipse Hono™.
## Authentication
### Username and password
You can set the username and password for all operations using the `--username`
and `--password` parameters.When publishing data the username is normally a combination of `@`.
As you are already providing the tenant, you can use the `--auth-id` parameter
instead, which will internally generate the correct user name, by adding the
tenant suffix.
--auth-id,-a
- The username to use for authenticating with the backend.
--username,-u
- The full username to use for authenticating with the backend.
--password,-p
- The password to use for authenticating with the backend.
Assuming you have a tenant `foo` and an authentication id of `auth1`, then
you can use either:
--username auth1@foo
Or:
--auth-id auth1
### X.509 client certificates
It is possible to use X.509 client certificates, instead of
username/password authentication. For this you can use the parameters:
--client-key
- The path to an X.509 PKCS#8 encoded private key
--client-cert
- The path to an file containing a PEM encoded client certificate chain
## Start a test consumer
Fill in your connection information, and then execute the following command:
hot consume amqps://my.server:443 tenant
Or:
hot consume amqps://username@password:my.server:443 tenant
You can use the following flags:
--disable-tls
- Disable TLS negotiation on the AMQP connection
--insecure
- Set to true to enable Insecure TLS connection
--cert
- Path to the certificate bundle in PEM format (overrides system CA certs)
### Telemetry & event
Running `consume` will consume both *telemetry* and *event* messages and
output them on the console.
### Command & control
You can enable command and control handling, by using the switch
`-c, --command`. You can pass an optional value to the switch,
which is the command name, `TEST` is being used by default.
When this feature is enabled and a message containing the `ttd` property
is received, it will try to get the next command, and forward it to
the device.
The source of the command can be specified with the `-r,--reader` argument.
The following readers are available:
* `ondemand` – When a command is required, it will show a prompt on the
console, which can read the command payload. When the command requests
times out, the prompt will get canceled.
* `prefill` – A prompt on the console allows putting in the command payload
for the next command request.
* `static:` – Everything after the prefix `static:` will be used
as the command payload. No interactive prompt is being presented.
## Publish an HTTP message
Fill in your connection information, and then execute the following command:
hot publish http telemety https://my.server tenant device payload --username auth --password password
The following additional flags are supported:
--qos
- Set the "Quality of Service". Defaults to
0
. --ttd
- Set the "time till disconnect", the amount of seconds the HTTP call will
wait for a command to the device
## Publish an MQTT message
Fill in your connection information, and then execute the following command:
hot publish mqtt telemety ssl://my.server tenant device payload
The following additional flags are supported:
--qos
- Set the "Quality of Service". Defaults to
0
. --ttd
- Set the "time till disconnect", the amount of seconds the MQTT call will
wait for a command to the device
## Building
Building requires Go 1.13.x. You can build the binary by executing:
GO111MODULE=on go build -o hot ./cmd