Uni-T 181A an Raspi: Unterschied zwischen den Versionen

Aus Wiki
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:
+
===udev Regel:===
##SUBSYSTEMS=="usb", ATTRS{idVendor}=="10c4", ATTRS{idProduct}=="ea80", SYMLINK+="uni-t", GROUP="usb", MODE="666"
+
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]

  1. Rust installieren [1]
    1. RUSTUP_IO_THREADS=disabled
    2. RUSTUP_UNPACK_RAM=10000000
  2. sudo apt-get install libudev-dev libhidapi-dev
  3. 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