Discover Packages
github.com/chtzuehlke/simplistic-mystrom-mqtt-gateway
command
module
Version:
v0.0.0-...-f2f2866
Opens a new window with list of versions in this module.
Published: Jun 25, 2019
License: Apache-2.0
Opens a new window with license information.
Imports: 11
Opens a new window with list of imports.
Imported by: 0
Opens a new window with list of known importers.
README
README
¶
simplistic-mystrom-mqtt-gateway
This is a non-production-ready PoC to peridoically gather power information from mystrom switches and to publish the
values to an AWS IoT MQTT topic.
Steps
To compile the gateway: install golang
Required AWS IoT Core setup: create a thing with a certificate and an appropriate policy to publish MQTT messages. Also download the generated certificate and the private key. Figure out your AWS IoT endpoint.
Create a configuration file (conf.json)
{
"host": "YOUR-AWS-IOT-ENDPOINT-HERE-ats.iot.eu-west-1.amazonaws.com",
"port": 8883,
"caCert": "AmazonRootCA1.pem",
"clientCert": "YOUR-CERT-HERE-certificate.pem.crt",
"privateKey": "YOUR-PRIVATE-KEY-HERE-e7c08dd12d-private.pem.key"
}
Build the gateway
go build
macOS/experimental: detect mystrom switch IPs (requires nmap, ruby, curl, ifconfig):
SWITCH_IPS=$(./macos-experimental-mystrom-switch-detection.sh)
Run the gatweay
./simplistic-mystrom-mqtt-gateway.sh $SWITCH_IPS
Subscribe to topic "mystrom/power/testclient" in the MQTT client in the AWS IoT web console to see the messages produced by the gateway
Expand ▾
Collapse ▴
Documentation
¶
There is no documentation for this package.
Source Files
¶
Click to show internal directories.
Click to hide internal directories.