zorruno wikki: history "USB Weather Station using Docker"

Revision history for WeatherStationDocker


Revision [5856]

Last edited on 2020-06-05 01:17:09 by ZorrUno [spelling]

No Differences

Revision [5855]

Edited on 2020-06-05 01:17:09 by ZorrUno [spelling]
Additions:
This USB rule allows full access to the device from docker, and with the docker-compose as above, it won't care which USB port it is plugged in to. Note there is a SYMLINK above too that I planned to map, but it appears Buster doesn't like symlink devices in docker according to some of the info I read.
Deletions:
This USB rule allows full access to the device from docker, and with the docker-compose as above, it won't care which USB port it is plugged in to. Note there is a SYMLINK above too what I planned to map, but it appears Buster doesn't like symlink devices in docker according to some of the info I read.


Revision [5854]

Edited on 2020-06-05 00:30:18 by ZorrUno [spelling]

No Differences

Revision [5853]

Edited on 2020-06-05 00:30:18 by ZorrUno [spelling]
Additions:
**Weather Station info**
Fine Offset Models info https://wiki.trixology.com/index.php?title=Fine_Offset


Revision [5852]

Edited on 2020-06-02 21:28:10 by ZorrUno [spelling]

No Differences

Revision [5851]

Edited on 2020-06-02 21:28:10 by ZorrUno [spelling]
Deletions:
CategoryMicrocontrol


Revision [5850]

Edited on 2020-06-02 21:12:01 by ZorrUno [spelling]

No Differences

Revision [5849]

Edited on 2020-06-02 21:12:01 by ZorrUno [spelling]
Additions:
- /dev/bus/usb:/dev/bus/usb%%
Deletions:
- /dev/bus/usb:/dev/bus/usb%%


Revision [5848]

Edited on 2020-06-02 21:11:46 by ZorrUno [spelling]

No Differences

Revision [5847]

Edited on 2020-06-02 21:11:46 by ZorrUno [spelling]
Additions:
#image: felddy/weewx
Deletions:
#image: felddy/weewx


Revision [5846]

Edited on 2020-06-02 21:11:33 by ZorrUno [tidyup of docker-compose layout and some spelling]

No Differences

Revision [5845]

Edited on 2020-06-02 21:11:33 by ZorrUno [tidyup of docker-compose layout and some spelling]
Additions:
%%version: "3.3"
#image: felddy/weewx
- /dockervolumes/weewx/data:/data
- /dockervolumes/weewx/html:/home/weewx/public_html
- TZ=Pacific/Auckland
Deletions:
%%version: '3.3'
#image: felddy/weewx
- /dockervolumes/weewx/data:/data-
- /dockervolumes/weewx/html:/home/weewx/public_html
- TZ=Pacific/Auckland


Revision [5844]

Edited on 2020-06-02 21:04:17 by ZorrUno [tidyup of docker-compose layout and some spelling]

No Differences

Revision [5843]

Edited on 2020-06-02 21:04:17 by ZorrUno [tidyup of docker-compose layout and some spelling]
Additions:
data:
#image: felddy/weewx
build: .
container_name: weewx
restart: unless-stopped
volumes:
- /dockervolumes/weewx/data:/data-
- /dockervolumes/weewx/html:/home/weewx/public_html
environment:
- TZ=Pacific/Auckland
devices:
- /dev/bus/usb:/dev/bus/usb%%
Deletions:
data:
#image: felddy/weewx
build: .
container_name: weewx
restart: unless-stopped
volumes:
- /dockervolumes/weewx/data:/data
- /dockervolumes/weewx/html:/home/weewx/public_html
environment:
- TZ=Pacific/Auckland
devices:
- /dev/bus/usb:/dev/bus/usb%%


Revision [5842]

Edited on 2020-06-02 21:00:33 by ZorrUno [tidyup of docker-compose layout and some spelling]

No Differences

Revision [5841]

Edited on 2020-06-02 21:00:33 by ZorrUno [tidyup of docker-compose layout and some spelling]
Additions:
This was the docker-compose file I ended up with:
Deletions:
This was the docker-control file I ended up with:


Revision [5840]

Edited on 2020-06-02 20:59:24 by ZorrUno [tidyup of docker-compose layout and some spelling]

No Differences

Revision [5839]

Edited on 2020-06-02 20:59:24 by ZorrUno [tidyup of docker-compose layout and some spelling]
Additions:
The docker-compose file above showed how I shared the entire USB bus with the docker container. That wasn't the entire story though, as permissions were still an issue.
I also looked at just running the container in privileged mode as many pages suggest, i.e. "privileged: true" in docker-compose, but as well as being very insecure, I don't think this works in debian buster
Deletions:
The docker-control file above showed how I shared the entire USB bus with the docker container. That wasn't the entire story though, as permissions were still an issue.
I also looked at just running the container in privileged mode as many pages suggest, i.e. "privileged: true" in docker-control, but as well as being very insecure, I don't think this works in debian buster


Revision [5838]

Edited on 2020-06-02 20:58:23 by ZorrUno [compose... not control]

No Differences

Revision [5837]

Edited on 2020-06-02 20:58:23 by ZorrUno [compose... not control]
Additions:
**docker**
Using "build: ." in the docker-compose file will look for a dockerfile in the local directory, rather than building an image directly. This allows the additional binaries to be installed.
Deletions:
**docker-control**
Using "build: ." in the docker-control file will look for a dockerfile in the local directory, rather than building an image directly. This allows the additional binaries to be installed.


Revision [5836]

Edited on 2020-06-02 12:53:19 by ZorrUno [minor tidyup]

No Differences

Revision [5835]

Edited on 2020-06-02 12:53:19 by ZorrUno [minor tidyup]
Additions:
secure_ftp = true
Deletions:
secure_ftp = true


Revision [5834]

Edited on 2020-06-02 12:52:20 by ZorrUno [minor tidyup]

No Differences

Revision [5833]

Edited on 2020-06-02 12:52:20 by ZorrUno [minor tidyup]
Additions:
# Set to True for an FTP over TLS (FTPS) connection. Not all servers
# support this.
secure_ftp = true
# To upload files from something other than what HTML_ROOT is set
# to above, specify a different HTML_ROOT here.
#HTML_ROOT = public_html
# Most FTP servers use port 21
port = 21
# Set to 1 to use passive mode, zero for active mode
passive = 1


Revision [5832]

Edited on 2020-06-02 12:49:53 by ZorrUno [minor tidyup]

No Differences

Revision [5831]

Edited on 2020-06-02 12:49:53 by ZorrUno [minor tidyup]
Additions:
Yes, this is the WH1080 weather station on bus 2:3 (and the ID is also a USB missile launcher). Potentially you could just allow access to that particular USB port, but this is unreliable as the port ID could possibly change and we may want to plug the station into another port, or a USB hub in future.
it will generate a default conf file for you by asking you a bunch of questions.
Deletions:
Yes, this is the WH1080 weather station on bus 2:3 (and the ID is also a USB missile launcher). Potentially you could just allow access to that particular USB port, but this is unreliable as the port ID could potentially change and we may want to plug the station into another port, or a USB hub in future.
it will generate a defaule conf file for you byt asking you a bunch of questions.


Revision [5830]

Edited on 2020-06-02 12:46:56 by ZorrUno [any excuse to use docker]

No Differences

Revision [5829]

Edited on 2020-06-02 12:46:56 by ZorrUno [any excuse to use docker]
Additions:
It was bought to replace my previous weather station model, a WH3081) The previous model tended to lock up regularly on the USB port, requiring it to be rebooted. This link shows some tips for the previous model: https://www.taverner-rich.com/fine-offset-wh3081-tips-tricks/ . Previously I was using a small Orange Pi zero to create a similar solution, but with the USB issues and a couple of SD card fails, I was looking for a more robust solution with less hardware. Oh, and any excuse to use docker.
Deletions:
It was bought to replace my previous weather station model, a WH3081) The previous model tended to lock up regularly on the USB port, requiring it to be rebooted. This link shows some tips for the previous model: https://www.taverner-rich.com/fine-offset-wh3081-tips-tricks/ . Previously I was using a small Orange Pi zero to create a similar solution, but with the USB issues and a couple of SD card fails, I was looking for a more robust solution with less hardware.


Revision [5828]

Edited on 2020-06-02 12:41:20 by ZorrUno [subsystem spelling]

No Differences

Revision [5827]

Edited on 2020-06-02 12:41:20 by ZorrUno [subsystem spelling]
Additions:
=====USB Subsystem access with Docker=====
Deletions:
=====USB Sybsystem access with Docker=====


Revision [5826]

Edited on 2020-06-02 12:40:29 by ZorrUno [added lastedit and categories]

No Differences

Revision [5825]

Edited on 2020-06-02 12:40:29 by ZorrUno [added lastedit and categories]
Additions:
{{lastedit show="3"}}
Deletions:
{lastedit show="3"}}


Revision [5824]

Edited on 2020-06-02 12:39:58 by ZorrUno [added lastedit and categories]

No Differences

Revision [5823]

Edited on 2020-06-02 12:39:58 by ZorrUno [added lastedit and categories]
Additions:
CategoryMQTT


Revision [5822]

Edited on 2020-06-02 12:39:16 by ZorrUno [added lastedit and categories]

No Differences

Revision [5821]

Edited on 2020-06-02 12:39:16 by ZorrUno [added lastedit and categories]
Additions:
CategoryHomeAutomation


Revision [5820]

Edited on 2020-06-02 12:38:53 by ZorrUno [added lastedit and categories]

No Differences

Revision [5819]

Edited on 2020-06-02 12:38:53 by ZorrUno [added lastedit and categories]
Additions:
CategoryLinux


Revision [5818]

Edited on 2020-06-02 12:38:18 by ZorrUno [added lastedit and categories]

No Differences

Revision [5817]

Edited on 2020-06-02 12:38:18 by ZorrUno [added lastedit and categories]
Additions:
CategoryFOSS


Revision [5816]

Edited on 2020-06-02 12:35:58 by ZorrUno [added lastedit and categories]

No Differences

Revision [5815]

Edited on 2020-06-02 12:35:58 by ZorrUno [added lastedit and categories]
Additions:
{lastedit show="3"}}
--
CategoryMicrocontrol
CategoryDocker


Revision [5814]

Edited on 2020-06-02 12:33:44 by ZorrUno [added lastedit and categories]

No Differences

Revision [5813]

Edited on 2020-06-02 12:33:44 by ZorrUno [added lastedit and categories]
Additions:
It appears that this docker setup was not intended to produce any html/graphs directly but just use MQTT. The image was missing a couple of python modules that are used to produce graphs etc, so I needed a dockerfile to get them in there. Also, it needed to expose the html/images outside the docker container. Reviewing the logs and having a play inside the console of the docker image I worked out what was missing.
Deletions:
It appears that this docker setup was not intended to produce any html/graphs directly but just use MQTT. The image was missing a couple of python modules if it can be used to produce graphs etc, so I needed a dockerfile to get them in there. Reviewing the logs and having a play inside the console of the docker image I worked out what was missing.


Revision [5812]

Edited on 2020-06-02 12:31:20 by ZorrUno [added lastedit and categories]

No Differences

Revision [5811]

Edited on 2020-06-02 12:31:20 by ZorrUno [added lastedit and categories]
Additions:
%%[FineOffsetUSB]
# This section is for the Fine Offset series of weather stations.
# The station model, e.g., WH1080, WS1090, WS2080, WH3081
model = WS2080
# How often to poll the station for data, in seconds
polling_interval = 60
# The driver to use:
driver = weewx.drivers.fousb
[[MQTT]]
server_url = mqtt://192.168.1.300:1883
topic = weewx
unit_system = METRIC
[[FTP]]
# FTP'ing the results to a webserver is treated as just another report,
# albeit one with an unusual report generator!
skin = Ftp
# If you wish to use FTP, set "enable" to "true", then
# fill out the next four lines.
# Use quotes around passwords to guard against parsing errors.
enable = true
user = weewx_user
password = 123456
server = mywebsite.example # The ftp server name, e.g, www.myserver.org
path = /web/weewxweather # The destination directory, e.g., /weather
Deletions:
[FineOffsetUSB]
# This section is for the Fine Offset series of weather stations.
# The station model, e.g., WH1080, WS1090, WS2080, WH3081
model = WS2080
# How often to poll the station for data, in seconds
polling_interval = 60
# The driver to use:
driver = weewx.drivers.fousb
[[MQTT]]
server_url = mqtt://192.168.1.300:1883
topic = weewx
unit_system = METRIC
[[FTP]]
# FTP'ing the results to a webserver is treated as just another report,
# albeit one with an unusual report generator!
skin = Ftp
# If you wish to use FTP, set "enable" to "true", then
# fill out the next four lines.
# Use quotes around passwords to guard against parsing errors.
enable = true
user = weewx_user
password = 123456
server = mywebsite.example # The ftp server name, e.g, www.myserver.org
path = /web/weewxweather # The destination directory, e.g., /weather


Revision [5810]

Edited on 2020-06-02 12:30:00 by ZorrUno [added lastedit and categories]

No Differences

Revision [5809]

Edited on 2020-06-02 12:30:00 by ZorrUno [added lastedit and categories]
Additions:
%%# docker-compose run weewx%%
Deletions:
%%# docker-compose run weewx##


Revision [5808]

Edited on 2020-06-02 12:29:31 by ZorrUno [added lastedit and categories]

No Differences

Revision [5807]

Edited on 2020-06-02 12:29:31 by ZorrUno [added lastedit and categories]
Additions:
Note as per the info at https://hub.docker.com/r/felddy/weewx shows if you run
%%# docker-compose run weewx##
it will generate a defaule conf file for you byt asking you a bunch of questions.
The config file at /dockervolumes/weewx/data/weewx.conf had some changes as below. (the whole config file isn't shown)
[FineOffsetUSB]
# This section is for the Fine Offset series of weather stations.
# The station model, e.g., WH1080, WS1090, WS2080, WH3081
model = WS2080
# How often to poll the station for data, in seconds
polling_interval = 60
# The driver to use:
driver = weewx.drivers.fousb

[[MQTT]]
server_url = mqtt://192.168.1.300:1883
topic = weewx
unit_system = METRIC

[[FTP]]
# FTP'ing the results to a webserver is treated as just another report,
# albeit one with an unusual report generator!
skin = Ftp
# If you wish to use FTP, set "enable" to "true", then
# fill out the next four lines.
# Use quotes around passwords to guard against parsing errors.
enable = true
user = weewx_user
password = 123456
server = mywebsite.example # The ftp server name, e.g, www.myserver.org
path = /web/weewxweather # The destination directory, e.g., /weather
Deletions:
the config file at /dockervolumes/weewx/data/weewx.conf had some changes as below. Note as per the info at
This is some of the settings I changed in


Revision [5806]

Edited on 2020-06-02 12:22:35 by ZorrUno [added lastedit and categories]

No Differences

Revision [5805]

Edited on 2020-06-02 12:22:35 by ZorrUno [added lastedit and categories]
Additions:
=====Weewx options=====
Finally, it was just left to set up weewx correctly. I added the following directories to store weewx config, the database and the hrml/graphs that weewx creates.
%%/dockervolumes/weewx/data
/dockervolumes/weewx/html%%
the config file at /dockervolumes/weewx/data/weewx.conf had some changes as below. Note as per the info at
This is some of the settings I changed in


Revision [5804]

Edited on 2020-06-02 12:17:57 by ZorrUno [added lastedit and categories]

No Differences

Revision [5803]

Edited on 2020-06-02 12:17:57 by ZorrUno [added lastedit and categories]
Additions:
This USB rule allows full access to the device from docker, and with the docker-compose as above, it won't care which USB port it is plugged in to. Note there is a SYMLINK above too what I planned to map, but it appears Buster doesn't like symlink devices in docker according to some of the info I read.


Revision [5802]

Edited on 2020-06-02 12:13:01 by ZorrUno [added lastedit and categories]

No Differences

Revision [5801]

Edited on 2020-06-02 12:13:01 by ZorrUno [added lastedit and categories]
Additions:
Low cost WH1080 USB Weather station, connected by USB to an intel NUC running docker (x86). The NUC is running Debian Buster as a base OS.
Weewx pushes data to a local MQTT server (on the same NUC) and also uses SFTP to push graphs and displays to my commercial webserver. At some stage I'll get it to push data to wunderground.com also which I have found useful previously.
Deletions:
Low cost WH1080 USB Weather station, connected by USB to an intel NUC running docker (x86).
It pushes data to a local MQTT server (on the same NUC) and using SFTP to push graphs and displays to a commercial webserver.


Revision [5800]

Edited on 2020-06-02 12:10:12 by ZorrUno [added lastedit and categories]

No Differences

Revision [5799]

Edited on 2020-06-02 12:10:12 by ZorrUno [added lastedit and categories]
Additions:
The Vendor ID is 1941 and the product ID is 8021. You can find more about the device and the USB system it is plugged into by using:
%%# udevadm info -a -n /dev/bus/usb/002/003%%
Deletions:
The Vendor ID is 1941 and the product ID is 8021.


Revision [5798]

Edited on 2020-06-02 12:07:42 by ZorrUno [added lastedit and categories]

No Differences

Revision [5797]

Edited on 2020-06-02 12:07:42 by ZorrUno [added lastedit and categories]
Additions:
I also looked at just running the container in privileged mode as many pages suggest, i.e. "privileged: true" in docker-control, but as well as being very insecure, I don't think this works in debian buster
Deletions:
I also looked at just running the container in privileged mode as many pages suggest, i.e. "priviledged: true" in docker-control, but as well as being very insecure, I don't think this works in debian buster


Revision [5796]

Edited on 2020-06-02 11:58:14 by ZorrUno [added lastedit and categories]

No Differences

Revision [5795]

Edited on 2020-06-02 11:58:14 by ZorrUno [added lastedit and categories]
Additions:
The Vendor ID is 1941 and the product ID is 8021.


Revision [5794]

Edited on 2020-06-02 11:55:52 by ZorrUno [added lastedit and categories]

No Differences

Revision [5793]

Edited on 2020-06-02 11:55:52 by ZorrUno [added lastedit and categories]
Additions:
[[https://groups.google.com/forum/#!topic/weewx-user/owhSpmklNlc https://groups.google.com/forum/#!topic/weewx-user/owhSpmklNlc]]
Deletions:
https://groups.google.com/forum/#!topic/weewx-user/owhSpmklNlc


Revision [5792]

Edited on 2020-06-02 11:53:48 by ZorrUno [added lastedit and categories]

No Differences

Revision [5791]

Edited on 2020-06-02 11:53:48 by ZorrUno [added lastedit and categories]
Additions:
I also looked at just running the container in privileged mode as many pages suggest, i.e. "priviledged: true" in docker-control, but as well as being very insecure, I don't think this works in debian buster
The process to find out the info for UDEV was to run #lsusb and see where the weatherstation appeared.
Yes, this is the WH1080 weather station on bus 2:3 (and the ID is also a USB missile launcher). Potentially you could just allow access to that particular USB port, but this is unreliable as the port ID could potentially change and we may want to plug the station into another port, or a USB hub in future.
Take this info and make a UDEV rule, I made it as /etc/udev/rules.d/99-weather-station.rules
Deletions:
The process to find this out was to run #lsusb and see where the weatherstation appeared.
then take this info and make a UDEV rule, I made it as /etc/udev/rules.d/99-weather-station.rules


Revision [5790]

Edited on 2020-06-02 11:47:03 by ZorrUno [added lastedit and categories]

No Differences

Revision [5789]

Edited on 2020-06-02 11:47:03 by ZorrUno [added lastedit and categories]
Additions:
then take this info and make a UDEV rule, I made it as /etc/udev/rules.d/99-weather-station.rules
%%root@panda:/root# cat /etc/udev/rules.d/99-weather-station.rules

# Weather Station
SUBSYSTEM=="usb", ATTRS{idVendor}=="1941", ATTRS{idProduct}=="8021", MODE="0666", GROUP="plugdev", SYMLINK+="weather-station"%%
Deletions:
then take this info and make a UDEV rule


Revision [5788]

Edited on 2020-06-02 11:41:47 by ZorrUno [added lastedit and categories]

No Differences

Revision [5787]

Edited on 2020-06-02 11:41:47 by ZorrUno [added lastedit and categories]
Additions:
The weather station uses the USB subsystem, not serial and it can be confusing looking at implementations of docker for other weatherstation setups. It does not appear to use a tty such as /dev/ttyUSB0, /dev/ttyACM0 etc or /dev/serial. It also does not show up in /dev/serial/by-id as some of my other USB devices do.
The docker-control file above showed how I shared the entire USB bus with the docker container. That wasn't the entire story though, as permissions were still an issue.
I plan to go back and tighten the permissions (assign the docker container tighter group access, and reduce perms to a 0660 mask should do it), but currently I have set UDEV rules so that the specific USB device has full read permissions to all, but this setup is working currently.
then take this info and make a UDEV rule
=====Additional Links & Info=====
**USB Docker & UDEV Links**
https://stackoverflow.com/questions/24225647/docker-a-way-to-give-access-to-a-host-usb-or-serial-device
http://marc.merlins.org/perso/linux/post_2018-12-20_Accessing-USB-Devices-In-Docker-_ttyUSB0_-dev-bus-usb-_-for-fastboot_-adb_-without-using-privileged.html
Deletions:
The weather station uses the USB subsystem, not serial and it can be confusing looking at implementations of docker for other weatherstation setups. The docker-control file above showed how I shared the entire USB bus with the docker container. That wasn't the entire story though, as permissions were still an issue.
I plan to go back and tighten the permissions (assign the docker container tighter group access, and reduce perms to a 0660 mask should do it), but currently I have set UDEV rules so that the specific USB device has full read permissions to all.
USB Docker & UDEV Links


Revision [5786]

Edited on 2020-06-02 11:31:18 by ZorrUno [added lastedit and categories]

No Differences

Revision [5785]

Edited on 2020-06-02 11:31:18 by ZorrUno [added lastedit and categories]
Additions:
RUN pip install cheetah3%%
%%root@panda: /root# lsusb
Deletions:
RUN pip install cheetah3**
root@panda: /root# lsusb


Revision [5784]

Edited on 2020-06-02 11:30:54 by ZorrUno [added lastedit and categories]

No Differences

Revision [5783]

Edited on 2020-06-02 11:30:54 by ZorrUno [added lastedit and categories]
Additions:
root@panda: /root# lsusb
Deletions:
%%root@panda: /root# lsusb


Revision [5782]

Edited on 2020-06-02 11:30:27 by ZorrUno [added lastedit and categories]

No Differences

Revision [5781]

Edited on 2020-06-02 11:30:27 by ZorrUno [added lastedit and categories]
Additions:
=====USB Sybsystem access with Docker=====
The weather station uses the USB subsystem, not serial and it can be confusing looking at implementations of docker for other weatherstation setups. The docker-control file above showed how I shared the entire USB bus with the docker container. That wasn't the entire story though, as permissions were still an issue.
I plan to go back and tighten the permissions (assign the docker container tighter group access, and reduce perms to a 0660 mask should do it), but currently I have set UDEV rules so that the specific USB device has full read permissions to all.
The process to find this out was to run #lsusb and see where the weatherstation appeared.
%%root@panda: /root# lsusb
Bus 001 Device 002: ID 8087:8000 Intel Corp.
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 003 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 002 Device 004: ID 2548:1002 Pulse-Eight CEC Adapter
Bus 002 Device 003: ID 1941:8021 Dream Link WH1080 Weather Station / USB Missile Launcher
Bus 002 Device 002: ID 0451:16a8 Texas Instruments, Inc.
Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
%%


Revision [5780]

Edited on 2020-06-02 11:19:26 by ZorrUno [added lastedit and categories]

No Differences

Revision [5779]

Edited on 2020-06-02 11:19:26 by ZorrUno [added lastedit and categories]
Additions:
It appears that this docker setup was not intended to produce any html/graphs directly but just use MQTT. The image was missing a couple of python modules if it can be used to produce graphs etc, so I needed a dockerfile to get them in there. Reviewing the logs and having a play inside the console of the docker image I worked out what was missing.
**dockerfile**
Using "build: ." in the docker-control file will look for a dockerfile in the local directory, rather than building an image directly. This allows the additional binaries to be installed.
%%FROM felddy/weewx
RUN pip install --upgrade pip
RUN pip install pillow
RUN pip install cheetah3**
Deletions:
It appears that this docker setup was not intended to produce any html/graphs directly but just use MQTT. The image was missing a couple of python modules if it can be used to produce graphs etc, so I needed a dockerfile to get them in there.


Revision [5778]

Edited on 2020-06-02 11:12:59 by ZorrUno [added lastedit and categories]

No Differences

Revision [5777]

Edited on 2020-06-02 11:12:59 by ZorrUno [added lastedit and categories]
Additions:
**docker-control**
- /dev/bus/usb:/dev/bus/usb%%
Deletions:
# privileged: true
# - /dev/bus/usb:/dev/bus/usb
- /dev/bus/usb:/dev/bus/usb
%%


Revision [5776]

Edited on 2020-06-02 11:09:09 by ZorrUno [added lastedit and categories]

No Differences

Revision [5775]

Edited on 2020-06-02 11:09:09 by ZorrUno [added lastedit and categories]
Additions:
%%version: '3.3'
volumes:
data:
services:
weewx:
# privileged: true
#image: felddy/weewx
build: .
container_name: weewx
restart: unless-stopped
volumes:
- /dockervolumes/weewx/data:/data
- /dockervolumes/weewx/html:/home/weewx/public_html
# - /dev/bus/usb:/dev/bus/usb
environment:
- TZ=Pacific/Auckland
devices:
- /dev/bus/usb:/dev/bus/usb
%%


Revision [5774]

Edited on 2020-06-02 11:06:49 by ZorrUno [added lastedit and categories]

No Differences

Revision [5773]

Edited on 2020-06-02 11:06:49 by ZorrUno [added lastedit and categories]
Additions:
Low cost WH1080 USB Weather station, connected by USB to an intel NUC running docker (x86).
It pushes data to a local MQTT server (on the same NUC) and using SFTP to push graphs and displays to a commercial webserver.
It was bought to replace my previous weather station model, a WH3081) The previous model tended to lock up regularly on the USB port, requiring it to be rebooted. This link shows some tips for the previous model: https://www.taverner-rich.com/fine-offset-wh3081-tips-tricks/ . Previously I was using a small Orange Pi zero to create a similar solution, but with the USB issues and a couple of SD card fails, I was looking for a more robust solution with less hardware.
Deletions:
Low cost WH1080 USB Weather station, connected by USB to an intel NUC running docker (x86) to push data to a local MQTT server (on the same NUC) and using SFTP to push graphs and displays to a commercial webserver.
It was bought to replace my previous weather station model, a WH3081) The previous model tended to lock up regularly on the USB port, requiring it to be rebooted. This link shows some tips for the previous model: https://www.taverner-rich.com/fine-offset-wh3081-tips-tricks/


Revision [5772]

Edited on 2020-06-02 11:03:51 by ZorrUno [added lastedit and categories]

No Differences

Revision [5771]

Edited on 2020-06-02 11:03:51 by ZorrUno [added lastedit and categories]
Additions:
Low cost WH1080 USB Weather station, connected by USB to an intel NUC running docker (x86) to push data to a local MQTT server (on the same NUC) and using SFTP to push graphs and displays to a commercial webserver.
This was the image chosen, based on how recently it had been updated and how popular it was. It also had the MQTT plugin already which I needed.
This was the docker-control file I ended up with:
Deletions:
Low cost WH1080 USB Weather station, using an intel NUC running docker (x86) to push data to MQTT and displays to a commercial webserver.
This was the image chosed, based on how recently it had been updated and how popular it was. It also had the MQTT plugin already which I needed.


Revision [5770]

Edited on 2020-06-02 11:00:38 by ZorrUno [added lastedit and categories]

No Differences

Revision [5769]

Edited on 2020-06-02 11:00:38 by ZorrUno [added lastedit and categories]
Additions:
This was the image chosed, based on how recently it had been updated and how popular it was. It also had the MQTT plugin already which I needed.
Deletions:
This was the image picked, based on how recently it had been updated and how popular it was. It also had the MQTT plugin already which I needed.


Revision [5768]

Edited on 2020-06-02 10:59:17 by ZorrUno [added lastedit and categories]

No Differences

Revision [5767]

Edited on 2020-06-02 10:59:17 by ZorrUno [added lastedit and categories]
Additions:
**USB reset tips for previous model**
Deletions:
USB reset


Revision [5766]

Edited on 2020-06-02 10:58:14 by ZorrUno [added lastedit and categories]

No Differences

Revision [5765]

Edited on 2020-06-02 10:58:14 by ZorrUno [added lastedit and categories]
Additions:
=====Intro=====
Low cost WH1080 USB Weather station, using an intel NUC running docker (x86) to push data to MQTT and displays to a commercial webserver.


Revision [5764]

Edited on 2020-06-02 10:55:06 by ZorrUno [added lastedit and categories]

No Differences

Revision [5763]

Edited on 2020-06-02 10:55:06 by ZorrUno [added lastedit and categories]
Additions:
It appears that this docker setup was not intended to produce any html/graphs directly but just use MQTT. The image was missing a couple of python modules if it can be used to produce graphs etc, so I needed a dockerfile to get them in there.
**Help with using dockerfiles via docker-compose**
Deletions:
The image was missing a couple of python modules so I needed a dockerfile to get them in there. This was a help re using dockerfiles


Revision [5762]

Edited on 2020-06-02 10:50:45 by ZorrUno [added lastedit and categories]

No Differences

Revision [5761]

Edited on 2020-06-02 10:50:45 by ZorrUno [added lastedit and categories]
Additions:
=====Docker image=====
This was the image picked, based on how recently it had been updated and how popular it was. It also had the MQTT plugin already which I needed.
=====Other Options=====
**Local Webserver for weewx**
This is a simple webserver setup for weewx if needed... I didn't want a local http engine on the docker box. My weewx implementation just pushes the html and graphics to a commercial server by sftp.
**Eliminate the USB receiver/display for more reliability**
Deletions:
Docker image used
Simple webserver for weewx (if needed... I didn't use one)
**Another option:**


Revision [5760]

Edited on 2020-06-02 10:46:11 by ZorrUno [added lastedit and categories]

No Differences

Revision [5759]

Edited on 2020-06-02 10:46:11 by ZorrUno [added lastedit and categories]
Additions:
=====Current Weather Station hardware=====
Current weather station model WH1080 (WA-1091-1, and it shows up in weewx as a WH2080)
https://www.aliexpress.com/item/801879857.html approx $200 incl shipping.
It was bought to replace my previous weather station model, a WH3081) The previous model tended to lock up regularly on the USB port, requiring it to be rebooted. This link shows some tips for the previous model: https://www.taverner-rich.com/fine-offset-wh3081-tips-tricks/
USB Docker & UDEV Links
https://www.weather-watch.com/smf/index.php?topic=33564.15
**Another option:**
Remove the USB Main display which may not be that reliable (hopefully my current model is more reliable than the last) and build a 433MHz receiver.
https://blog.mjwconsult.co.uk/wh1080-weatherstation-with-arduino-and-weewx/
Deletions:
Current weather station model WH1080 (WA-1091-1)
https://www.aliexpress.com/item/801879857.html
Approx $200 incl shipping
Previous weather station model tips (WH3081)
https://www.taverner-rich.com/fine-offset-wh3081-tips-tricks/
USB Docker


Revision [5758]

Edited on 2020-06-02 10:12:39 by ZorrUno [added lastedit and categories]

No Differences

Revision [5757]

Edited on 2020-06-02 10:12:39 by ZorrUno [added lastedit and categories]
Additions:
https://www.mail-archive.com/weewx-user@googlegroups.com/msg18376.html


Revision [5756]

Edited on 2020-06-02 10:11:45 by ZorrUno [added lastedit and categories]

No Differences

Revision [5755]

Edited on 2020-06-02 10:11:45 by ZorrUno [added lastedit and categories]
Additions:
USB Docker
https://www.losant.com/blog/how-to-access-serial-devices-in-docker


Revision [5754]

Edited on 2020-06-02 10:10:07 by ZorrUno [added lastedit and categories]

No Differences

Revision [5753]

Edited on 2020-06-02 10:10:07 by ZorrUno [added lastedit and categories]
Additions:
USB reset
https://groups.google.com/forum/#!topic/weewx-user/owhSpmklNlc


Revision [5752]

Edited on 2020-06-02 06:30:11 by ZorrUno [added lastedit and categories]

No Differences

Revision [5751]

Edited on 2020-06-02 06:30:11 by ZorrUno [added lastedit and categories]
Additions:
Docker image used
https://hub.docker.com/r/felddy/weewx
Simple webserver for weewx (if needed... I didn't use one)
https://hub.docker.com/r/mitct02/weewx
The image was missing a couple of python modules so I needed a dockerfile to get them in there. This was a help re using dockerfiles
https://docs.docker.com/compose/gettingstarted/


Revision [5750]

Edited on 2020-06-02 06:26:08 by ZorrUno [added lastedit and categories]

No Differences

Revision [5749]

The oldest known version of this page was created on 2020-06-02 06:26:08 by ZorrUno [added lastedit and categories]