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

Aus Wiki
Zur Navigation springen Zur Suche springen
Zeile 11: Zeile 11:
 
ut181a-cli read cont|gawk '/[0-9\.]{2,}/ { print strftime(), $0; fflush() }'
 
ut181a-cli read cont|gawk '/[0-9\.]{2,}/ { print strftime(), $0; fflush() }'
 
</pre>
 
</pre>
 +
Achtung: awk kann kein strftime.

Version vom 2. Mai 2021, 22:18 Uhr

Installation

  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:

SUBSYSTEMS=="usb", ATTRS{idVendor}=="10c4", ATTRS{idProduct}=="ea80", SYMLINK+="uni-t", GROUP="usb", MODE="666"

Beispiel Temperatur auslesen und mit Date taggen

ut181a-cli read cont|gawk '/[0-9\.]{2,}/ { print strftime(), $0; fflush() }'

Achtung: awk kann kein strftime.