Uni-T 181A an Raspi: Unterschied zwischen den Versionen
Zur Navigation springen
Zur Suche springen
(3 dazwischenliegende Versionen desselben Benutzers werden nicht angezeigt) | |||
Zeile 5: | Zeile 5: | ||
# sudo apt-get install libudev-dev libhidapi-dev | # sudo apt-get install libudev-dev libhidapi-dev | ||
# cargo install ut181a-cli | # cargo install ut181a-cli | ||
− | + | ===udev Regel:=== | |
− | + | SUBSYSTEMS=="usb", ATTRS{idVendor}=="10c4", ATTRS{idProduct}=="ea80", SYMLINK+="uni-t", GROUP="usb", MODE="666" | |
+ | ===Beispiel Temperatur auslesen und mit Date taggen=== | ||
+ | <pre> | ||
+ | ut181a-cli read cont|gawk '/[0-9\.]{2,}/ { print strftime(), $0; fflush() }' | ||
+ | </pre> | ||
+ | oder eben für das Schreiben in den Webserver | ||
+ | |||
+ | <pre> | ||
+ | ut181a-cli read cont|gawk '/[0-9\.]{2,}/ { print strftime(), $0; fflush() }'>/var/www/html/daten.txt | ||
+ | </pre> |
Aktuelle Version vom 2. Mai 2021, 22:23 Uhr
Installation[Bearbeiten]
- Rust installieren [1]
- RUSTUP_IO_THREADS=disabled
- RUSTUP_UNPACK_RAM=10000000
- sudo apt-get install libudev-dev libhidapi-dev
- cargo install ut181a-cli
udev Regel:[Bearbeiten]
SUBSYSTEMS=="usb", ATTRS{idVendor}=="10c4", ATTRS{idProduct}=="ea80", SYMLINK+="uni-t", GROUP="usb", MODE="666"
Beispiel Temperatur auslesen und mit Date taggen[Bearbeiten]
ut181a-cli read cont|gawk '/[0-9\.]{2,}/ { print strftime(), $0; fflush() }'
oder eben für das Schreiben in den Webserver
ut181a-cli read cont|gawk '/[0-9\.]{2,}/ { print strftime(), $0; fflush() }'>/var/www/html/daten.txt