Bin Heute leider nicht sehr viel weiter gekommen.
- der BME280 läuft schon mal.
- die DS18B20 ebenfalls
mit dem DS18B20 gibt es ein Problem. Hat mit dem OS oder dem Pin zu tun. Ich bekomme ihn einfach nicht zum laufen.(hat aber definitiv nichts mit Terkin zu tun)
- für den HX711 sind anscheinend keine Treiber verfügbar
2021-07-28 22:27:07,368 [root ] INFO : Setting up CPython compatibility layer
2021-07-28 22:27:08,514 [root ] INFO : Starting bootloader
2021-07-28 22:27:08,532 [root ] INFO : Loading modules
2021-07-28 22:27:08,855 [root ] INFO : Loading settings from "src/settings.raspberrypi-basic.py"
2021-07-28 22:27:08,884 [root ] INFO : Setting up Terkin
2021-07-28 22:27:08,887 [terkin.datalogger ] INFO : Starting Terkin datalogger
2021-07-28 22:27:08,893 [terkin.configuration ] INFO : Starting TerkinConfiguration on path "/home/pi/terkin-datalogger"
2021-07-28 22:27:08,900 [terkin.configuration ] INFO : User settings: None
2021-07-28 22:27:08,920 [terkin.device ] INFO : Reset cause and wakeup reason: {'reset_cause': {'code': 0, 'message': 'PWRON'}, 'wakeup_reason': {'code': 0, 'message': 'PWRON'}}
2021-07-28 22:27:08,924 [terkin.watchdog ] INFO : Skipping watchdog timer (WDT)
2021-07-28 22:27:08,928 [terkin.device ] INFO : Start curating the garbage collector
2021-07-28 22:27:08,943 [terkin.device ] INFO : Collecting garbage
2021-07-28 22:27:08,956 [terkin.device ] INFO : Curating the garbage collector finished. Free memory: 79.03671141305335
2021-07-28 22:27:08,960 [terkin.device ] INFO : Turning off Bluetooth
2021-07-28 22:27:08,985 [terkin.datalogger ] INFO : Starting Terkin Datalogger 0.11.4
2021-07-28 22:27:09,036 [terkin.device ] INFO :
========================
Terkin Datalogger 0.11.4
========================
Device id 3131353636
CPU freq 1000.0 MHz
Python : 3.7.3 (default, Jan 22 2021, 20:04:44) [GCC 8.3.0]
platform: linux
machine : armv6l
nodename: raspberrypi
release : 5.10.17+
sysname : Linux
version : #1414 Fri Apr 30 13:16:27 BST 2021
2021-07-28 22:27:09,045 [terkin.device ] INFO : Starting networking
2021-07-28 22:27:09,050 [terkin.device ] INFO : [WiFi] Interface not enabled in settings.
2021-07-28 22:27:09,055 [terkin.network.core ] INFO : Starting mode server on 0.0.0.0:666
2021-07-28 22:27:09,079 [terkin.device ] INFO : [LoRa] Interface not enabled in settings.
2021-07-28 22:27:09,084 [terkin.device ] INFO : [LTE] Interface not enabled in settings.
2021-07-28 22:27:09,090 [terkin.device ] INFO : [GPRS] Interface not enabled in settings.
2021-07-28 22:27:09,094 [terkin.device ] INFO : Starting telemetry
2021-07-28 22:27:09,086 [terkin.api.udp ] INFO : Starting UdpServer on 0.0.0.0:666
2021-07-28 22:27:09,100 [terkin.telemetry.core ] INFO : Telemetry channel topology: MqttKitTopology
2021-07-28 22:27:09,109 [terkin.telemetry.core ] INFO : Telemetry channel URI: mqtt://01D8V8B3AS97FZJ9C3HJ1TTGT2:Mubofmew@swarm.hiveeyes.org/hiveeyes/01D8V8B3AS97FZJ9C3HJ1TTGT2/Oering/ZeroPi-Test-mqtt-json
2021-07-28 22:27:09,113 [terkin.telemetry.core ] INFO : Starting Terkin TelemetryClient
2021-07-28 22:27:09,118 [terkin.datalogger ] INFO : Setting up sensors
2021-07-28 22:27:09,123 [terkin.sensor.core ] INFO : Starting buses: ['bus-i2c-1', 'bus-onewire-0']
2021-07-28 22:27:09,432 [terkin.sensor.core ] INFO : Scan I2C with id=1 bus for devices...
2021-07-28 22:27:09,493 [terkin.sensor.core ] INFO : Found 1 I2C devices: [118]
2021-07-28 22:27:09,496 [terkin.sensor.core ] INFO : Registering bus "i2c:1"
2021-07-28 22:27:09,512 [terkin.sensor.linux ] INFO : Starting LinuxSysfsOneWireBus on /sys/bus/w1/devices/w1_bus_master1/
2021-07-28 22:27:09,518 [terkin.sensor.core ] INFO : Found 0 1-Wire (DS18x20) devices: []
2021-07-28 22:27:09,521 [terkin.sensor.core ] INFO : Registering bus "onewire:0"
2021-07-28 22:27:09,525 [terkin.datalogger ] INFO : Registering sensors
2021-07-28 22:27:09,530 [terkin.datalogger ] INFO : Setting up sensor with id=system.memfree and type=system.memfree on bus=None with address=None
2021-07-28 22:27:09,545 [terkin.datalogger ] INFO : Importing module "terkin.driver.system.memfree_sensor"
2021-07-28 22:27:09,552 [terkin.datalogger ] INFO : Setting up sensor with id=scale-1 and type=hx711 on bus=None with address=None described as "Waage 1"
2021-07-28 22:27:09,556 [terkin.datalogger ] INFO : Importing module "terkin.driver.hx711_sensor"
2021-07-28 22:27:09,602 [terkin.driver.hx711_sensor ] INFO : Selected HX711 hardware driver "heisenberg"
2021-07-28 22:27:09,606 [terkin.datalogger ] INFO : Setting up sensor with id=ds18b20-1 and type=ds18b20 on bus=onewire:0 with address=None
2021-07-28 22:27:09,609 [terkin.datalogger ] INFO : Importing module "terkin.driver.ds18x20_sensor"
2021-07-28 22:27:09,625 [terkin.datalogger ] INFO : Setting up sensor with id=bme280-1 and type=bme280 on bus=i2c:1 with address=0x76 described as "Bme280 on ic2:1 0x76"
2021-07-28 22:27:09,629 [terkin.datalogger ] INFO : Importing module "terkin.driver.bme280_sensor"
2021-07-28 22:27:09,645 [terkin.datalogger ] INFO : Setting up sensor with id=gpiozero and type=gpiozero on bus=None with address=None described as "gpiozero"
2021-07-28 22:27:09,648 [terkin.datalogger ] INFO : Importing module "terkin.driver.gpiozero_sensor"
2021-07-28 22:27:09,664 [terkin.sensor.core ] INFO : Starting all sensors
2021-07-28 22:27:09,668 [terkin.driver.hx711_sensor ] INFO : Initializing HX711 sensor with pin_dout=5, pin_pdsck=6, gain=128, scale=4.424242, offset=-73000.0
Traceback (most recent call last):
File "/usr/local/lib/python3.7/dist-packages/terkin/driver/hx711_sensor.py", line 106, in start
self.loadcell = self.driver_class(pin_dout, pin_pdsck, gain)
File "/usr/local/lib/python3.7/dist-packages/terkin/lib/hx711_heisenberg.py", line 45, in __init__
super().__init__(dout, pd_sck, gain)
File "/usr/local/lib/python3.7/dist-packages/terkin/lib/hx711.py", line 33, in __init__
raise NotImplementedError('HX711 is not implemented on this platform')
NotImplementedError: HX711 is not implemented on this platform
2021-07-28 22:27:09,699 [terkin.driver.hx711_sensor ] ERROR : HX711 hardware driver failed. Reason: HX711 is not implemented on this platform
2021-07-28 22:27:09,753 [terkin.driver.gpiozero_sensor ] INFO : Initializing sensor GPIOZero
2021-07-28 22:27:10,220 [terkin.datalogger ] INFO : Setup finished
2021-07-28 22:27:10,223 [root ] INFO : Starting Terkin
2021-07-28 22:27:10,229 [terkin.sensor.core ] INFO : Sending power_on to bus i2c:1
2021-07-28 22:27:10,233 [terkin.sensor.core ] INFO : Sending power_on to sensor HX711Sensor
2021-07-28 22:27:10,236 [terkin.driver.hx711_sensor ] INFO : Powering up HX711
2021-07-28 22:27:10,240 [terkin.datalogger ] INFO : Reading 5 sensor ports
2021-07-28 22:27:10,246 [terkin.datalogger ] INFO : Reading sensor port "SystemMemoryFree"
2021-07-28 22:27:10,255 [terkin.datalogger ] INFO : Reading sensor port "HX711Sensor"
2021-07-28 22:27:10,259 [terkin.driver.hx711_sensor ] INFO : Powering down HX711
2021-07-28 22:27:10,264 [terkin.datalogger ] INFO : Reading sensor port "DS18x20Sensor"
2021-07-28 22:27:10,268 [terkin.driver.ds18x20_sensor ] INFO : Acquire readings from all DS18x20 sensors attached to bus "onewire:0"
2021-07-28 22:27:11,022 [terkin.driver.ds18x20_sensor ] INFO : Start conversion for DS18x20 devices on bus "onewire:0"
2021-07-28 22:27:11,027 [terkin.driver.ds18x20_sensor ] WARNING: No data from any DS18x20 devices on bus "onewire:0"
2021-07-28 22:27:11,032 [terkin.datalogger ] INFO : Reading sensor port "BME280Sensor"
2021-07-28 22:27:11,180 [terkin.datalogger ] INFO : Reading sensor port "GPIOZeroSensor"
2021-07-28 22:27:11,183 [terkin.driver.gpiozero_sensor ] INFO : Reading sensor GPIOZero
GPIOZero Data: {'cputemp': '37.932', 'diskusage': '5.7419893004755185', 'loadaverage': '0.33'}
2021-07-28 22:27:11,194 [terkin.datalogger ] INFO : Sensor data:
cputemp.rpi 37.932 gpiozero
diskusage.rpi 5.7419893004755185 gpiozero
humidity.0x76.i2c:1 55.89199661626913 Bme280 on ic2:1 0x76
loadaverage.rpi 0.33 gpiozero
pressure.0x76.i2c:1 1005.2552738715547 Bme280 on ic2:1 0x76
system.memfree 78.53808286861275
temperature.0x76.i2c:1 25.2517578125 Bme280 on ic2:1 0x76
2021-07-28 22:27:11,203 [terkin.device ] INFO : Start curating the garbage collector
2021-07-28 22:27:11,216 [terkin.device ] INFO : Collecting garbage
2021-07-28 22:27:11,225 [terkin.device ] INFO : Curating the garbage collector finished. Free memory: 78.53626637118309
2021-07-28 22:27:11,230 [terkin.telemetry.core ] INFO : Telemetry transport: MQTT over TCP
2021-07-28 22:27:11,236 [terkin.telemetry.core ] INFO : Connecting to MQTT broker at swarm.hiveeyes.org with username 01D8V8B3AS97FZJ9C3HJ1TTGT2. client_id=terkin.3639343533
2021-07-28 22:27:11,263 [terkin.telemetry.core ] INFO : MQTT topic: hiveeyes/01D8V8B3AS97FZJ9C3HJ1TTGT2/Oering/ZeroPi-Test-mqtt-json/data.json
2021-07-28 22:27:11,266 [terkin.telemetry.core ] INFO : MQTT payload: {"system.memfree": 78.53808286861275, "temperature.0x76.i2c:1": 25.2517578125, "humidity.0x76.i2c:1": 55.89199661626913, "pressure.0x76.i2c:1": 1005.2552738715547, "cputemp.rpi": "37.932", "diskusage.rpi": "5.7419893004755185", "loadaverage.rpi": "0.33"}
2021-07-28 22:27:11,272 [terkin.telemetry.core ] INFO : Connecting to MQTT broker at swarm.hiveeyes.org with username 01D8V8B3AS97FZJ9C3HJ1TTGT2
2021-07-28 22:27:11,373 [terkin.telemetry.core ] INFO : Connecting to MQTT broker at ('46.4.251.66', 1883) succeeded
2021-07-28 22:27:11,449 [terkin.datalogger ] INFO : Telemetry status: SUCCESS (1/1)
2021-07-28 22:27:11,453 [terkin.device ] INFO : Start curating the garbage collector
2021-07-28 22:27:11,467 [terkin.device ] INFO : Collecting garbage
2021-07-28 22:27:11,476 [terkin.device ] INFO : Curating the garbage collector finished. Free memory: 78.44725799712994
pi@raspberrypi:~/terkin-datalogger $
EDIT: 1 Wire (DS18b20) geht jetzt auch! War ein schlecht gequetschter Stecker (Isolierung mit eingeklemmt).