co2 usb monitor
1.4K
Контейнер использую на Mikrotik ROS >= 7.20 с пробросом USB девайса
Протестировано на устройстве Даджет СО2 https://dadget.ru/catalog/datchiki_kachestva_vozdukha/detektor_uglekislogo_gaza/properties/
lsusb
Bus 001 Device 004: ID 04d9:a052 Holtek Semiconductor, Inc. USB-zyTemp
docker run -d -p 23123:80 --device=/dev/bus/usb/001/004 wiktorbgu/co2mon
http://192.168.254.25:23123/metrics
Чтобы заглушить вывод логов, используйте команду entrypoint:
sh -c "/app/co2mond -P 0.0.0.0:80 > /dev/null 2>&1"
После запуска открыть по адресу контейнера страницу, например, http://192.168.254.25/metrics
Пример вывода:
# HELP co2mon_temp_celsius Ambient temperature.
# TYPE co2mon_temp_celsius gauge
co2mon_temp_celsius 23.8500
# HELP co2mon_co2_ppm Concentration of CO2, parts per million.
# TYPE co2mon_co2_ppm gauge
co2mon_co2_ppm 686
# HELP co2mon_device_errors_total CO2 monitor device error counter.
# TYPE co2mon_device_errors_total counter
co2mon_device_errors_total 0
# HELP co2mon_heartbeat_time_seconds CO2 monitor heartbeat timestamp.
# TYPE co2mon_heartbeat_time_seconds gauge
co2mon_heartbeat_time_seconds 1748786183
Исходники взяты отсюда https://github.com/kuleshov-aleksei/co2mon-docker
Content type
Image
Digest
sha256:fc47490b7…
Size
3.2 MB
Last updated
over 1 year ago
docker pull wiktorbgu/co2mon