The windsonic 2d anenometer is connected through a serial to usb converter to my linux machine. For the usb port, we first find out where the device is connected. To do that, we first look up all the devices connected through USB
lsusb
Now, we need to find out where our device PL2303 is connected. To find out, we can do the following
dmesg | grep tty
To get the data, we can listen to /dev/ttyUSB0. On some machines, we need to change the owner on /dev/ttyUSB0
to avoid using super user.
For testing, we need to first setup a docker container. To setup a docker container, I used the step described for virtual waggle.
To ease the setup, I have added a Makefile which simplifies the usage. The steps to setup and test the plugin are:
make build
make deploy
make interactive
If everything goes correctly, we should be able to test the plugin.
Note, we needed to expose /dev/ttyUSB0 to docker container to read the data inside the docker container.