Closed cubilon closed 5 years ago
This is a strange error. Could you setup the demo climate component and tell me if it works?
climate:
platform: demo
yes, it works: I got two other integrations working fine, Nest and Tado. The third, Eqiva, stop working if SmartIR is configured, as I told previously.
Could you send me the contents of climates.yaml?
which one? old or new
New
- platform: smartir
name: Mitsubishi
device_code: 1221
controller_send_service: switch.broadlink_send_packet_192_168_1_90
power_sensor: binary_sensor.power_status
- platform: eq3btsmart
devices:
bagno:
mac: '00:1A:22:FC:1A:E1'
You are using the last ver of HA, right?
sure, 0.88.1 installed standalone on Raspbian.
In Python virtual environment?
yes 👍
I tried all the above in the same environment. Everything works fine here. Give me some time to search it further.
sure! please check, on indomus.it we’re waiting to publish an article on SmartIR but we need do get a full test it before 👍
!!! Just yesterday found the article about Broadlink IR Climate in this site. It was amazing how detailed the instructions were.
you deserve it!!
Thank you! Could you also try if this version works? https://github.com/smartHomeHub/SmartIR/blob/f8ecfd9c6c48d620466acf02a0fac6393dd548ff/smartir/climate.py
can’t now :/ first thing tomorrow morning
No worries. Thanks for your help. I really appreciate it.
no, thank YOU for your amazing work. I’ll update you soon.
Hi there, I made a try: same behaviour
Feb 24 09:52:58 raspberrypi hass[4523]: 2019-02-24 09:52:58 ERROR (MainThread) [homeassistant.loader] Error loading custom_components.climate.smartir. Make sure all dependencies are installed
Feb 24 09:52:58 raspberrypi hass[4523]: Traceback (most recent call last):
Feb 24 09:52:58 raspberrypi hass[4523]: File "/srv/homeassistant/lib/python3.5/site-packages/homeassistant/loader.py", line 147, in _load_file
Feb 24 09:52:58 raspberrypi hass[4523]: module = importlib.import_module(path)
Feb 24 09:52:58 raspberrypi hass[4523]: File "/usr/lib/python3.5/importlib/__init__.py", line 126, in import_module
Feb 24 09:52:58 raspberrypi hass[4523]: return _bootstrap._gcd_import(name[level:], package, level)
Feb 24 09:52:58 raspberrypi hass[4523]: File "<frozen importlib._bootstrap>", line 986, in _gcd_import
Feb 24 09:52:58 raspberrypi hass[4523]: File "<frozen importlib._bootstrap>", line 969, in _find_and_load
Feb 24 09:52:58 raspberrypi hass[4523]: File "<frozen importlib._bootstrap>", line 953, in _find_and_load_unlocked
Feb 24 09:52:58 raspberrypi hass[4523]: ImportError: No module named 'custom_components.climate.smartir'; 'custom_components.climate' is not a package
Feb 24 09:52:58 raspberrypi hass[4523]: 2019-02-24 09:52:58 ERROR (MainThread) [homeassistant.loader] Unable to find platform smartir
Feb 24 09:52:58 raspberrypi hass[4523]: 2019-02-24 09:52:58 ERROR (MainThread) [homeassistant.config] Invalid config for [climate]: required key not provided @ data['controller_send_service']. Got None
Feb 24 09:52:58 raspberrypi hass[4523]: required key not provided @ data['device_code']. Got None. (See /home/homeassistant/.homeassistant/climates.yaml, line 6). Please check the docs at https://home-assistant.io/components/climate/
Feb 24 09:52:58 raspberrypi hass[4523]: 2019-02-24 09:52:58 INFO (MainThread) [homeassistant.setup] Setting up climate
Feb 24 09:52:58 raspberrypi hass[4523]: 2019-02-24 09:52:58 ERROR (MainThread) [homeassistant.setup] Error during setup of component climate
Feb 24 09:52:58 raspberrypi hass[4523]: Traceback (most recent call last):
Feb 24 09:52:58 raspberrypi hass[4523]: File "/srv/homeassistant/lib/python3.5/site-packages/homeassistant/setup.py", line 154, in _async_setup_component
Feb 24 09:52:58 raspberrypi hass[4523]: component.setup, hass, processed_config) # type: ignore
Feb 24 09:52:58 raspberrypi hass[4523]: AttributeError: module 'custom_components.climate' has no attribute 'setup'
It' like boradlink switch loads after SmartIR, so this one can't find switch.broadlink_send_packet_192_168_1_90 becouse it's not yet loaded. I remember there's a way to tell HA when load a component, but I'm unable to recover how - can be useful tell HA to load SmartIR AFTER broadlink switch.
Btw, even this version os SmartIR breaks eqiva load.
Hi. Could you check if the component is placed under the right folder? (.homeassistant/custom_components/smartir/)
Oh, my. It wasn't - I moved everything on smartir/ folder and now everything works. So I asked myself how I can be so stupid, so I checked back on the documentation. What I understood from the first picture in your post here:
https://community.home-assistant.io/t/smartir-climate-component/100798
is that you have to place everything under custom_components/, not custom_components/smartir. Am I wrong?
It is confusing to me :/ sorry if I wasted your time mate.
No worries. The custom_components folder structure is going to change from the last HA version. My picture was also wrong!
Ok, I’ll keep in mind while writing about SmartIR on inDomus. 👍 thanks again Vas
I’m also going to release a new version today which there is no need for the user to create the codes/climate subfolder. The component detects if they are missing and creates them. Also if your device Json file is missing it is trying to download from the GitHub, automatically. So, if the device is already supported, you only need to provide the device code.
more simple. great 👍
Hi Vassilis, I'm unable to make it work on HA version 0.88.1.
My config is:
Of course switch.broadlink_send_packet_192_168_1_40 exists, so does binary_sensor.hvac_power. Code 1221 is a custom of mine made with your conversion tool.
One very strange thing is that another integration stopped working, this one: https://www.home-assistant.io/components/climate.eq3btsmart/
Got one entity configured and working, but when I try using your custom component SmartIR, it stops working (but I don't have errors on my logs).When I put back your deprecated version (and the previous configuration too), it works again.