openweather-influxdb-writer

command module
v0.2.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 27, 2022 License: MIT Imports: 11 Imported by: 0

README

openweather-influxdb-writer

A simple OpenWeather InfluxDB writer developed in Go.

Installation and usage

$ mkdir /opt/openweather-influxdb-writer
$ cd /opt/openweather-influxdb-writer
$ wget https://github.com/lneugebauer/openweather-influxdb-writer/releases/download/{tag}/openweather-influxdb-writer_{tag}_{os}_{arch}.tar.gz && https://raw.githubusercontent.com/lneugebauer/openweather-influxdb-writer/{tag}/.env.example
$ tar -xzf openweather-influxdb-writer_{tag}_{os}_{arch}.tar.gz
$ mv .env.example .env
$ vim .env
$ chmod +x openweather-influxdb-writer
$ crontab -e
# m h  dom mon dow   command
*/15 * * * * cd /opt/openweather-influxdb-writer && ./openweather-influxdb-writer

How to obtain geolocation data

You can use OpenWeather's geocoding API to get your city's geolocation data.

http://api.openweathermap.org/geo/1.0/direct?q={city name},{state code},{country code}&limit={limit}&appid={API key}

MQTT InfluxDB bridge

I've also developed a program to write weather data from MQTT devices to InfluxDB. Take a look at it in case you are interested.

Documentation

The Go Gopher

There is no documentation for this package.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL