Skip to content
A darksky to mqtt bridge process
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
.gitignore
.travis.yml
Dockerfile.template
LICENSE.md
Makefile
README.md
bridge.go
client.go
config.go
go.mod
go.sum
interfaces.go
main.go
mqttClient.go
wire.go
wire_gen.go

README.md

darksky2mqtt

Software License Travis CI Coverage Status Go Report Card

Installation

Via Docker

docker run -d --name="darksky2mqtt" -e "DARKSKY_APIKEY=1234567890" -v /etc/localtime:/etc/localtime:ro mannkind/darksky2mqtt

Via Make

git clone https://github.com/mannkind/darksky2mqtt
cd darksky2mqtt
make
DARKSKY_APIKEY="1234567890" ./darksky2mqtt

Configuration

Configuration happens via environmental variables

DARKSKY_APIKEY              - The api key for darksky
DARKSKY_LATITUDE            - The latitude for darksky, defaults to "47.100000"
DARKSKY_LONGITUDE           - The longitude for darksky, defaults to "-122.100000"
DARKSKY_UNITS               - The units for darksky, defaults to "auto"
DARKSKY_LOOKUPINTERVAL      - The duration to wait before looking up the weather again
DARKSKY_HOURLYFORECAST      - The list of hours (0-48, 0 = current hour) to receive datao on, defaults to ""
DARKSKY_DAILYFORECAST       - The list of days (0-7, 0 = current hour) to receive datao on, defaults to ""
MQTT_TOPICPREFIX            - [OPTIONAL] The MQTT topic on which to publish the lookup results, defaults to "home/darksky"
MQTT_DISCOVERY              - [OPTIONAL] The MQTT discovery flag for Home Assistant, defaults to false
MQTT_DISCOVERYPREFIX        - [OPTIONAL] The MQTT discovery prefix for Home Assistant, defaults to "homeassistant"
MQTT_DISCOVERYNAME          - [OPTIONAL] The MQTT discovery name for Home Assistant, defaults to "darksky"
MQTT_CLIENTID               - [OPTIONAL] The clientId, defaults to "DefaultDarkSky2MQTTClientID"
MQTT_BROKER                 - [OPTIONAL] The MQTT broker, defaults to "tcp://mosquitto.org:1883"
MQTT_USERNAME               - [OPTIONAL] The MQTT username, default to ""
MQTT_PASSWORD               - [OPTIONAL] The MQTT password, default to ""
You can’t perform that action at this time.