Toshiba home AC control

It was not tested with more than one AC probably.

@haseat nope :frowning:

@h4de5 I tried integrating my latest changes with HA code but for some reason Toshiba-AC-control is not being updated. Any idea what can I do about this? Sorted this out.

I have created PR to HA integration with latest changes.

The latest release 2021.8.3 does not work for me. Going back to 2021.8.2. for now :slightly_smiling_face:

Logger: homeassistant.components.climate
Source: custom_components/toshiba_ac/climate.py:188
Integration: Climate (documentation, issues)
First occurred: 5:47:48 AM (2 occurrences)
Last logged: 5:47:48 AM

Error adding entities for domain climate with platform toshiba_ac
Error while setting up toshiba_ac platform for climate
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 382, in async_add_entities
    await asyncio.gather(*tasks)
  File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 587, in _async_add_entity
    await entity.add_to_platform_finish()
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 711, in add_to_platform_finish
    self.async_write_ha_state()
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 464, in async_write_ha_state
    self._async_write_ha_state()
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 500, in _async_write_ha_state
    attr.update(self.state_attributes or {})
  File "/usr/src/homeassistant/homeassistant/components/climate/__init__.py", line 261, in state_attributes
    self.current_temperature,
  File "/config/custom_components/toshiba_ac/climate.py", line 188, in current_temperature
    return self._device.ac_indoor_temperature
AttributeError: 'ToshibaAcDevice' object has no attribute 'ac_indoor_temperature'

This error originated from a custom integration.

Logger: homeassistant
Source: custom_components/toshiba_ac/climate.py:188
Integration: Toshiba AC (documentation, issues)
First occurred: 5:47:48 AM (1 occurrences)
Last logged: 5:47:48 AM

Error doing job: Task exception was never retrieved
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 451, in async_update_ha_state
    self._async_write_ha_state()
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 500, in _async_write_ha_state
    attr.update(self.state_attributes or {})
  File "/usr/src/homeassistant/homeassistant/components/climate/__init__.py", line 261, in state_attributes
    self.current_temperature,
  File "/config/custom_components/toshiba_ac/climate.py", line 188, in current_temperature
    return self._device.ac_indoor_temperature
AttributeError: 'ToshibaAcDevice' object has no attribute 'ac_indoor_temperature'

it seems it did not update the dependend toshiba control python lib, because the requirement string did not change.

how do you run HA? in case its some docker related setup, can you try to start from an fresh docker container? otherwise you may find a way to wipe the installed python packages used in HA.

i think this can only be fixed when we start to use proper versions in the requirements.

I’m running a supervised installation on a Raspberry Pi 4. Unfortunately I don’t know enough to tinker with docker, I’m happy that it’s running flawlessly :rofl: (when I set it up 2 years ago I had no idea what I was doing, I just followed some random guide I found online). I’ve been wanting to switch over to HA OS for a long time, I guess it’s time to get myself a HA Blue now …

@haseat Integration now uses pypi version of toshiba-ac - this should resolve any problems with toshiba-ac version. If it fails for you with latest integration version you will have to manually remove toshiba-ac package (just this time). To do this in supervised installation:

  • Connect to your supervisor console, you should be greeted with HA banner and ha > prompt
  • Run login, prompt should change to #
  • Run docker exec -it homeassistant /bin/bash, prompt should change to bash-5.1# or something similar
  • Run pip uninstall toshiba-ac
  • Restart ha core
1 Like

@m2k93 Can you please check with latest integration version (2021.8.5, you may need to manually remove old version of toshiba-ac as described in comment above)?
In this version you can enable logging for toshiba-ac module by adding this to your configuration.yaml:

logger:
  default: warning
  logs:
    # log level toshiba-ac
    toshiba_ac: debug

This will enable debug logs for toshiba-ac library. After reboot in HA logs you should see logs similar to this one:

2021-08-26 12:48:41 DEBUG (MainThread) [toshiba_ac.device_manager] Found devices: [ToshibaAcDeviceInfo(ac_id='xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx', ac_unique_id='xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx', ac_name='<name>'), ToshibaAcDeviceInfo(ac_id='xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx', ac_unique_id='xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx', ac_name='<name>'), ...]

It should include all your ACs. Please check if ac_unique_id for each device is truly unique (toshiba-ac assumes that it’s unique) and let me know in this thread or in this issue: https://github.com/KaSroka/Toshiba-AC-control/issues/2

Everything works fine now, no manual work was needed :+1:.

1 Like

I can’t wait to come back from vacation to test this :blush:

is there someone having multiple ac units under the same account and is able and willing to test out some things?
it seems currently the integration only lists one device and we would like to figure out why.

Sure I have 3 in 1 account, what do we need to test ?

I’ve gathered this information for you and posted it on github, if you need more, please let me know

2 Likes

@Antiloop thanks for your input! This helped us to resolve problem with multiple devices.

@h4de5 ah yes, device_id that was used is id of controlling device (HA in this case, used as user name for AMQP) and not AC. This value is currently generated from user name and some hard-coded “random” value. It will be better to have this replaced with ID that’s generated and constant for given HA instance. Can HA provide something like this to integration? If yes, I’ll add required API in toshiba-ac.

All 3 units are recognized now, thanks!

2 Likes

2 practical things I’ve noticed:
When pressing power button it turns off, when pressing again it does not turn on AC
The WAF describes it should :joy:

When AC is Turned off, you can not see which mode it is currently in, but perhaps this is a limitation of HA

Hello @kamaloo92 @h4de5

I tested the plugin


Sending and returning orders is responsive

To turn on the air conditioning unit, you have to choose a mode.
The power button turns off the unit only.

the colors and icons of the application Toshiba


There is no color when the “Ventilation Only” mode is activated

For special functions, the SILENT function of the outdoor unit is missing.

Console - RAS-B10J2FVG-E
Split Seiya - RAS-B07-B13-J2KVG-E
Unité extérieure - RAS-4M27U2AVG-E

thank you very much for testing.

i am not sure if you are familiar with other Home-Assistent Integrations, but it is usual to use a default card, like in this the climate, bridge the functionality over to the device and let user modify it using othe custom cards.

having said this: icons are HA default, same is (i think) the power button behaviour and the colors. the default silent mode should be available in the fan speed selection. special modes like pureion and eco etc. are not yet implemented.

thanks again and we will add your model to the supported list.

I can confirm that the power button behavior is the same for both my air conditions (Mitsubishi and Toshiba).

Please note, the indoor unit’s Quiet mode and the outdoor unit’s silent mode are two different modes

for colors and icons I don’t mind. :blush: very good plugin to use. :sunglasses:

1 Like

Bonjour
Did you find the special function “Silent CDU to reduce the outdoor unit noise level” ?

There is no color when the “Ventilation Only” mode is activated
image

@Didier3L silent mode for outdoor unit is supported by underlying toshiba-ac library, but it’s not yet exposed to HA.

When it comes to the colors - integration doesn’t control them, it’s controlled by HA and theme that you are using.