Giter VIP home page Giter VIP logo

ha_custom_klimaloggpro's Introduction

TFA KlimaLogg Pro for Home Assistant

TFA KlimaLogg Pro custom component to use with Home Assistant.

Experimental! Prototype!

Installation

Use HACS and add this repository as a custom repository of category Integration. URL: https://github.com/z8i/ha_custom_klimaloggpro

Installation steps:

  1. Add repo to HACS
  2. Install custom integration " TFA KlimaLogg pro BETA" via HACS
  3. Restart Home Assistant
  4. Go to Settings-Integrations in Home Assistant
  5. Add Integration "Klimalogg".. this takes a while, please be patient! Do a refresh in your browser if you cannot find "Klimalogg"
  6. Select the sensors you have connected to you base station
  7. Add the integration to your dashboard
  8. Press 3 seconds on the USB button on the main TFA station, so "USB" is constantly displayed on TFA station
  9. finish!

During step 5 i usually press the USB buttom some times (hold it a bit), until the base station is connected with the raspberry. If you use HAOS all the custom usb device right management stuff is not neccessary. Once the station is connected, you can see the live data in Home Assistant, the connection will stay permanent.

Attention: USB Device!

TFA KlimaLogg Pro weather station includes an USB Transceiver, which is used by this integration. So the stick needs to be physically connected to the computer which runs Home Assistant.

Tested and works under following circumstances:

Tested on a Raspberry 4 Model B

Manual Home Assistant Installation on a Raspberry Pi with Raspberry Pi OS (Raspbian)

USB-access is configured for user access:

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

More Info

This integration uses kloggpro-Module from PyPI.

Do you like to test this integration? Please do! Let me know, if it works, or raise an issue

ha_custom_klimaloggpro's People

Contributors

z8i avatar

Stargazers

Alx avatar Jens Gassmann avatar  avatar Marc Hefter avatar  avatar Anton Golubev avatar Steph avatar

Watchers

Lucian avatar James Cloos avatar  avatar  avatar

ha_custom_klimaloggpro's Issues

ALARM settings in Base station

If I change the min humidity on the basestation to 20% without USB-stick connected to the Home assistant this stays ok.
When I plugin the USB-stick to the Home assistant. The connection is ok. But the ALARM value for min humidity stays on 99%. This result offcourse in a alarm warning.
How to solve?

Resource busy....

Good morning,
During installation, in step No. 7 "Add the integration to your dashboard". I see the message "Configuration failed" and in the log file I have the message:

" File "/usr/local/lib/python3.11/site-packages/kloggpro/klimalogg.py", line 2405, in _open_device
raise NameError(e)
NameError: [Errno 16] Resource busy"
Can you help me please ?

No USB connection / devices are not discovered

I've installed the ha_custom_klimaloggpro extension into "Home Assistant 2022.4.5", installation type "Home Assitant OS" with the help of HACS

I've connected the USB stick and see it appears in the list of devices under dev id 6666:5555:

[core-ssh ~]$ lsusb
Bus 001 Device 005: ID 10c4:ea60
Bus 001 Device 001: ID 1d6b:0002
Bus 001 Device 003: ID 0424:ec00
Bus 001 Device 002: ID 0424:9514
Bus 001 Device 007: ID 6666:5555

The device is readable by the root user:

[core-ssh ~]$ ls -l /dev/bus/usb/001/007
crw-rw-r--    1 root     root      189,   6 Apr 20 23:25 /dev/bus/usb/001/007

(I don't now however which user is used to run integraton).

My USB stick is paired with the KlimaLogPro station and can successfully transfer data over windows application.

However, when I plug the stick into Home Assitant, the KlimaLog integration is not able to detect sensors. I tried rebooting assitant, pressing "USB" button on the KlimaLogPro central station (USB symbol blinks indicating that the connection cannot be established).

I don't have any further ideas how to troubleshoot this situation.
I see that some users report that the integration works perfectly for them.

I would like to try/use this

Hi.
I'm running HA on an HP T630 thin client using the generic x86-64 HAOS.
I have had the Klimalogg-Pro for several years now with 2 additional sensors feeding in to the App on my windows PC through the dongle.
I would like to use it directly into HA instead, so your work looked good.
I have downloaded and installed the repository ha_custom_klimaloggpro and restarted but apart from the thing showing up in the HACS screen, I'm not seeing anything else and now I'm not sure what to do.
It looks like I have to also download the kloggpro thing but that's where I get lost.
Any help gratefully received.
I also have a question - To send data to the PC required me to press the USB button on the base station. I would want the base station to update HA in real time with no USB button press. Is that possible even?
Thanks.

Initiating USB transceiver connection is hard

Generally this works great (Base 30.3039 + 4x30.3181 + 2x30.3144) attached to a Pi. But I found it hard to get the USB connection working. I tried various options from the Home Assistant Host/PI and I wasn't sure if this was because the Base/USB wasn't paired or if the reconnect didn't work correctly.
Initial workaround: I put the USB transceiver into my windows machine and used the TFA windows software for initial pairing (long press USB Button on base). Then switching the USB transceiver over to the PI, and the Base seemed not to notice the quick signal drop and kept USB connection thereafter.

Few days later I restarted the Base (removed batteries) and USB wouldn't reconnect. What worked then was to short-press USB on the base to start searching the USB transceiver wireless connection and restart Home Assistant also. This re-connected correctly.

I was already digging through the code to find the init section for the USB connection and possibly kickstart this on the Home Assistant console, but couldn't spot it.

In the end, I think the integration needs a "pair USB tranceiver" and "reconnect USB transceiver" command/button. I wouldn't want to restart Home Assistant each time I change batteries in the base.

Would be great to hear if there is an easier solution.

Use of depreceated sonstants for humidity and temperature

Home Assistant version 2024.2.0
Server: Intel NUC running debian 11

Error messages by home assistant:

  • WARNING (MainThread) [homeassistant.const] TEMP_CELSIUS was used from klimaloggpro, this is a deprecated constant which will be removed in HA Core 2025.1. Use UnitOfTemperature.CELSIUS instead, please report it to the author of the 'klimaloggpro' custom integration
  • WARNING (MainThread) [homeassistant.const] DEVICE_CLASS_HUMIDITY was used from klimaloggpro, this is a deprecated constant which will be removed in HA Core 2025.1. Use SensorDeviceClass.HUMIDITY instead, please report it to the author of the 'klimaloggpro' custom integration

Integration broken after update to HA Core 2024.7.0

Thanks a lot for your Klimalogg pro integration! I'm only into Home Assistant for 1 month now and it worked instantly when I installed it.
BUT: Yesterday evening I updated to HA core 2024.7.0 and unfortunately no values were available any more.
I decided to start a debug protocol and there were errors visible. Especially I understood the following 2 warnings:

2024-07-04 21:37:36.228 WARNING (MainThread) [homeassistant.helpers.frame] Detected that custom integration 'hacs' calls hass.http.register_static_path which is deprecated because it does blocking I/O in the event loop, instead call await hass.http.async_register_static_paths([StaticPathConfig("/hacsfiles", "/config/www/community", True)]); This function will be removed in 2025.7 at custom_components/hacs/base.py, line 1162: self.hass.http.register_static_path(, please create a bug report at https://github.com/hacs/integration/issues
2024-07-04 21:37:36.296 WARNING (MainThread) [homeassistant.util.loop] Detected blocking call to open with args ('/lib/usb-1.0', 'rb') inside the event loop by custom integration 'klimaloggpro' at custom_components/klimaloggpro/init.py, line 33: hass.data[DOMAIN]["kldr"] = kloggpro.klimalogg.KlimaLoggDriver() # creates an instance of the klimalogg-device (offender: /usr/local/lib/python3.12/ctypes/util.py, line 276: with open(filepath, 'rb') as fh:), please report it to the author of the 'klimaloggpro' custom integration

I did not report to hacs/integration/issues up to now - maybe this can be resolved by you. Otherwise please report it from your side.

For the moment I could get it to work again by downgrading via installing my backup of the previous version 2024.6.4

The debug protocol is attached. Hope this is what you need to adjust the integration.
home-assistant_klimaloggpro_2024-07-04T21-04-49.274Z.log

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.