Backend for JeeLabs JeeLink receiver. Receives sensor data from LaCrosse 868MHz temperature/humidity sensors, logs data to InfluxDB and publishes via MQTT.
FloKra ea1f2dec29 2024-03-19: | 7 місяців тому | |
---|---|---|
jeelinklog | 7 місяців тому | |
CHANGELOG.md | 7 місяців тому | |
README.md | 2 роки тому |
Backend for JeeLabs JeeLink receiver.
Receives sensor data from LaCrosse 868MHz temperature/humidity sensors, logs data to InfluxDB and publishes via MQTT. Sensor type tested working: LaCrosse/TechnoLine TX29 DTH-IT.
Requires Python 3 (default on Debian/RaspberryOS Buster or Bullseye).
test if it works:
cd /home/pi
./jeelinklog.py -v (start in verbose mode)
install systemd service:
cd /home/pi/jeelinklog
sudo cp jeelinklog.service /lib/systemd/system
sudo systemctl daemon-reload
sudo systemctl enable jeelinklog.service
sudo systemctl start jeelinklog.service
check if service is running:
sudo systemctl status jeelinklog.service
The configuration is split in the following files:
jeelinklog_influxdb.yml format:
temphum: instance name used in sensor configuration
host: localhost
port: 8086
username: jeelinklog [optional] comment out if authentication is not used
password: password [optional] comment out if authentication is not used
database: TempHum InfluxDB database name - must already exist
measurement: TempHum InfluxDB measurement name, will be added automatically if it does not already exist
fieldnames:
temperature: temp
humidity: hum
datatypes:
temperature: float
humidity: int
You can add as many InfluxDB instances as you need. Please mind correct indenting in YAML files!
jeelinklog_sensors.yml format:
Aussen: Sensor name
LaCrosseID: 1 LaCrosse Sensor ID, randomly generated on battery change
DomoticzIdx: 94 [optional] Sensor ID in Domoticz (deprecated)
Topic_Temp: "Test/Atemp" [optional] additional MQTT topic to publish temperature values of that sensor
Topic_Hum: "Test/Ahum" [optional] additional MQTT topic to publish humidity values of that sensor
InfluxDB_Instance: TempHum InfluxDB instance name to use (as set in jeelinklog_influxdb.yml)
isOutsideTempSensor: true true or false
DomoticzIdx can be commented out or removed if not needed. Topic_Temp and Topic_Hum is optional, can be left commented or removed. InfluxDB_Instance MUST be a valid name configured in jeelinklog_influxdb.yml.
isOutsideTempSensor: true will include that sensor in mean/average outside temperature calculation. Set it to true on all sensors that are (properly) located outside to enhance accuracy. You can add as many sensors as you need. Please mind correct indenting in YAML files!
All data is published to LaCrosse/
topic-prefix (can be configured in jeelinklog.ini).
[mqtt]
topic_prefix = LaCrosse
For sensors with a configured Topic_Temp
and/or Topic_Hum
in jeelinklog_sensors.yml
, values will be published to these topics additionally.
Outside temperature/humidity (mean/average of multiple sensors if configured) is published to topics set in jeelinklog.ini
:
[mqtt]
topic_prefix_outside_temphum = wetter/atemphum
# additional single topics for outside temp/hum
topic_outside_temp = wetter/atemp
topic_outside_hum = wetter/ahum
Example output:
Topic | Payload |
---|---|
LaCrosse/Sensorname/temperature | 20.2 |
LaCrosse/Sensorname/humidity | 56 |
LaCrosse/Sensorname/battery | OK |
LaCrosse/Sensorname/batteryNew | NO |
LaCrosse/Sensorname/availability | available |
LaCrosse/Sensorname/lastUpdate | 2022-11-08 09:22:42 |
LaCrosse/Sensorname/json | {"temperature":20.2, "humidity":56, "battery":"OK"} |
LaCrosse/Sensorname/TempHumText | 20.2° 56% |