Package for TFA KlimaLoggPro-Driver to use with Home Assistant
Project description
kloggpro
This is a library to query "TFA KlimaLogg pro" weather stations via its included USB transceiver. It is used for an Integration into Home Assistant.
Acknowledgement
This is derived from the code of weex-klimalogg by matthewwall. Thanks alot to the authors of that project!
Status experimental!
kloggpro
can be installed via PyPI on Raspberry Pi OS.
It needs usb access to work properly, maybe you need to grant usb access to the USB-Transceiver by
- adding the user to plugdev group
sudo adduser <username> plugdev
- add following rule to
/etc/udev/rules.d/50-usb-perms.rules
:
SUBSYSTEM=="usb", ATTRS{idVendor}=="6666", ATTRS{idProduct}=="5555", GROUP="plugdev", MODE="0660"
To check for success:
lsusb
Bus 001 Device 004: ID 6666:5555 Prototype product Vendor ID
# should show the klimlogg receiver, here bus 001 device 004
ls -l /dev/bus/usb/001/004
# expected output would be
crw-rw-rw- 1 root plugdev 189, 3 Dec 21 21:52 /dev/bus/usb/001/004
# now group plugdev can access the device and everything should work
(I had an error: The device has no langid (permission issue, no string descriptors supported or device error)
, so i followed these
instructions)
Usage
After successful installation and usb configuration start python and
import kloggpro.klimalogg
Now you can create a KlimaLoggDriver-Object
kldr = KlimaLoggDriver()
To start communication, you need to clear wait state
kldr.clear_wait_at_start()
Now it is possible to either access the current values object directly
kldr._service.current.values['Temp0']
or you can receive packets:
for packet in kldr.genLoopPackets():
print("Time: {} - {}".format(packet['dateTime'], packet))
time.sleep(5)
After finishing:
kldr.shutDown()
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file kloggpro-0.0.4.tar.gz
.
File metadata
- Download URL: kloggpro-0.0.4.tar.gz
- Upload date:
- Size: 39.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.11.2
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 20bcd371b3bd1819ec3a7ebe2bcea964740f029a81948012268df427650a9fd3 |
|
MD5 | 308e8baddbbcaf92caf066f84f4af102 |
|
BLAKE2b-256 | 59e0110f40d636e4a097380fd254421030217940effadfc22f684810e1a3052d |
File details
Details for the file kloggpro-0.0.4-py3-none-any.whl
.
File metadata
- Download URL: kloggpro-0.0.4-py3-none-any.whl
- Upload date:
- Size: 38.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.11.2
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 26ca496e89acc79d1b5090d7eef795f833621b53870d11564a47aee0dabb2309 |
|
MD5 | 459d73bb74464635d602a454341ffc70 |
|
BLAKE2b-256 | e3eeea193c08175780b55b6ac455031898cab4c4d6d25528c817c60673d05b7e |