Skip to content
A wsdot travel times 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
wsdotTravelTime.go

README.md

wsdot2mqtt

Software License Travis CI Coverage Status Go Report Card

Installation

Via Docker

docker run -d --name="wsdot2mqtt" -e "WSDOT_SECRET=YOURSECRETAPIKEY" -v /etc/localtime:/etc/localtime:ro mannkind/wsdot2mqtt

Via Make

git clone https://github.com/mannkind/wsdot2mqtt
cd wsdot2mqtt
make
WSDOT_SECRET="YOURSECRETAPIKEY" ./wsdot2mqtt

Configuration

Configuration happens via environmental variables

WSDOT_SECRET            - The WSDOT API key
WSDOT_TRAVELTIMEMAPPING - [OPTIONAL] The mapping of TimeTravelIDs:TimeTravelNames, defaults to "132:seattle2everett,31:seattle2renton"
WSDOT_LOOKUPINTERVAL    - [OPTIONAL] The duration for which to lookup travel times, defaults to "3m"
MQTT_TOPICPREFIX        - [OPTIONAL] The MQTT topic on which to publish the collection lookup results, defaults to "home/wsdot"
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 "wsdot"
MQTT_CLIENTID           - [OPTIONAL] The clientId, defaults to "Defaultwsdot2MQTTClientID"
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.