Sensorlogger

  1. Overview
  2. Download, Installation & Startup
  3. Configuration & complete example

Tinkerforge settings

Connection to the Brick Daemon

The general tinkerforge section is used to configure the connection parameters to the Brick Daemon.

"tinkerforge": {
    "host": "localhost",
    "port": 4223,
    "max_bricklet_read_failures":  8,
    "max_brickd_restart_attempts": 3,
    "brickd_restart_command": "sudo /bin/systemctl restart brickd",
    "system_restart_command": "sudo /bin/systemctl --force reboot"  
}

On any normally running system, you should not use the restart parameters and instead omit them or set them to null. Please only use them if you are fully aware of what you’re doing.

"brickd_restart_command": null,
"system_restart_command": null

Tinkerforge sensors

Polling in specific time intervals

"sensors": [
    ...
    {
        "sensor_id": "Weather/Temperature",
        "tinkerforge_uid": "z3L",
        "factor": 1,
        "offset": -4.5,
        "channel": 0,
        "mqtt_publish": "House/Weather/Temperature/current",
        "homematic_publish": "12345",
        "counter": false,
        "trigger": "periodic",
        "rest_period": {"value": 60, "unit": "s"},
        "retry_time":  {"value": 30, "unit": "s"}
    },
    ...
]

External triggers

Only Tinkerforge IO Bricklets are currently supported as external triggers.

"sensors": [
    ...
    {
        "sensor_id": "Weather/Wind",
        "tinkerforge_uid": "9Ws",
        "channel": 0,
        "io_port": "a",
        "factor": 0.5,
        "offset": 0,
        "mqtt_publish": "House/Weather/Wind/last-pulse",
        "counter": true,
        "trigger": "low",
        "rest_period": {"value": 7, "unit": "ms"},
        "io_debounce": {"value": 7, "unit": "ms"}
    },
    ...
]

Supported Bricklets & Channels

Currently, version 2.1.33 (2022-05-11) of the Tinkerforge C/C++ bindings are used. The following Tinkerforge Bricklets are supported. The table also lists the channel IDs if a Bricklet supports different types of measurements.

Bricklet and Versions Channels
Air Quality 0: Indoor air quality (IAQ) index
1: Temperature
2: Relative humidity
3: Air pressure
Ambient Light ver. 1, 2, 3  
Analog In ver. 1, 2, 3  
Barometer ver. 1, 2  
CO2  
CO2 2.0 0: CO2 concentration
1: Temperature
2: Relative humidity
Current12  
Current25  
Distance IR ver. 1, 2  
Distance US ver. 1, 2  
Dust  
Energy Monitor 0: Voltage
1: Current
2: Energy
3: Real power
4: Apparent power
5: Reactive power
6: Power factor
7: Frequency
GPS ver. 1 0: Latitude
1: Longitude
6: PDOP
7: HDOP
8: VDOP
9: EPE
GPS ver. 2, 3 0: Latitude
1: Longitude
2: Altitude (m)
3: Geoidal separation (m)
4: Speed (km/h)
5: Course (°)
6: PDOP
7: HDOP
8: VDOP
Hall Effect ver. 2  
Humidity ver. 1, 2  
Industrial Digital In 4 ver. 1, 2 0 to 3
Industrial Dual 0-20mA ver. 1, 2 0 to 1
Industrial Dual Analog In ver. 1, 2 0 to 1
IO4 ver. 1, 2 0 to 3, also as a pulse counter
IO16 ver. 1, 2 0 to 15, also as a pulse counter
Laser Range Finder ver. 1, 2  
Line  
Load Cell ver. 1, 2  
Moisture  
Particulate Matter 1 or 10: PM1.0
2 or 25: PM2.5
3 or 100: PM10
PTC Temperature ver. 1, 2  
Sound Intensity  
Sound Pressure Level  
Temperature ver. 1, 2  
Temperature IR ver. 1, 2 0: Ambient
1: Object
UV Light ver. 1, 2  
Voltage  
Voltage/Current ver. 1, 2 0: Voltage
1: Current

MQTT>>