Publishes a web server (golang) that intercepts the requests to weather forecast and mqtt.
2.7K
Publishes a web server (golang) with a path /weatherstation/updateweatherstation.php that intercepts the request to weather forecast and publishes info on mqtt.
Based on projects:
Using local golang:
//dependencies
go get -d -v
// build
go build -i -o bin/proxy
//execute
./bin/proxy
Using docker:
docker build -t glarfs/observerip-proxy-mqtt .
Requisites in your local network:
Run the following command remplacing the variables:
docker run -p 8080:8080 -e OBSERVER_MQTT_HOST=x.x.x.x -e OBSERVER_MQTT_PORT=1883 -e OBSERVER_MQTT_ENTRYPOINT=my/meteo glarfs/observerip-proxy-mqtt
Modify the endpoint on the observerip administration page(http://y.y.y.y) to go to http://[z.z.z.z]:8080/weatherstation/updateweatherstation.php
To test application connect the mosquitto client to your mqtt server:
mosquitto_sub -v -h x.x.x.x -t my/meteo/#
This will show the values pushed to proxy server
Content type
Image
Digest
sha256:5f5168a7c…
Size
8.4 MB
Last updated
about 3 years ago
docker pull glarfs/observerip-proxy-mqtt