Sign inSign up

glarfs/observerip-proxy-mqtt

By glarfs

Updated about 3 years ago

Publishes a web server (golang) that intercepts the requests to weather forecast and mqtt.

Image
0

2.7K

glarfs/observerip-proxy-mqtt repository overview

Docker Pulls license

docker-observer-proxy-mqtt

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:

Build

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 .

Run

Requisites in your local network:

  • observerip weather station (y.y.y.y)
  • mqtt server (x.x.x.x)
  • server with docker (z.z.z.z)

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

Test

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

Tag summary

Content type

Image

Digest

sha256:5f5168a7c

Size

8.4 MB

Last updated

about 3 years ago

docker pull glarfs/observerip-proxy-mqtt