IntesisHome WiFi AC Control

Intesis make the IntesisHome WiFi AC controller for a range of air conditioners including Panasonic, Daikin, Fujitsu, Toshiba, LG and more. I’ve just purchased one for a ducted Fujitsu system.

I plan to try and develop a component to connect Home Assistant with the IntesisHome API for two way communication, if anyone else is also interested this will help speed me along!

Control seems to only be via their cloud servers which is a shame but I’ve been unable to find any other options for my ducted system short of buying an infrared unit for it (which wouldn’t be bi-directional and only slightly cheaper). It uses OAuth2 for authentication, so if anyone has recommendations about a good existing climate component I can use to help design this new component let me know!

Thanks

——
Latest release links:

I’ve just completed an alpha Python interface and Home Assistant platform for IntesisHome, if anyone is interested please let me know; just a case of dropping into your custom components folder and adding the username/password to configuration

I’m interested in testing your platform for IntesisHome. Could you send me the custom component?

What functionality is still outstanding? I may have some time of the next week to enhance it if needed.

Thanks,
Tim

Hey Tim, sorry for some reason it didn’t notify me of your message
Check out https://github.com/jnimmo/pyIntesisHome/tree/master/home-assistant/custom_components

Should just be a case of dropping intesishome.py and climate/intesishome.py into your custom_components folder in HA config directory

Configure it like this - don’t need to add anything under the climate section.

intesishome:
  username: 'username'
  password: 'password'

Would love to hear how you get on, and what type of unit you’re running with the IntesisHome. I’ve got a wired Fujitsu unit, which supports Auto/Fan/Heat/Cool/Dry, Quiet/Low/Medium/High, and shows current room temperature etc. I haven’t been able to test with any other devices yet so might need some more work to make it automatically detect available modes of different brands.
Thanks!

I cant get it to work - get this in log, what to look for?
Regards Thomas

16-11-30 06:43:59 homeassistant.bootstrap: Error during setup of component intesishome
Traceback (most recent call last):
  File "/usr/local/lib/python3.4/dist-packages/homeassistant/bootstrap.py", line 150, in _async_setup_component
    None, component.setup, hass, config)
  File "/usr/lib/python3.4/asyncio/futures.py", line 388, in __iter__
    yield self  # This tells Task to wait for completion.
  File "/usr/lib/python3.4/asyncio/tasks.py", line 286, in _wakeup
    value = future.result()
  File "/usr/lib/python3.4/asyncio/futures.py", line 277, in result
    raise self._exception
  File "/usr/lib/python3.4/concurrent/futures/thread.py", line 54, in run
    result = self.fn(*self.args, **self.kwargs)
  File "/home/pi/.homeassistant/custom_components/intesishome.py", line 38, in setup
    from pydispatch import dispatcher
ImportError: No module named 'pydispatch'
16-11-30 06:43:59 homeassistant.bootstrap: Component intesishome failed to setup
16-11-30 06:43:59 homeassistant.bootstrap: Unable to prepare setup for platform climate.intesishome because dependency intesishome could not be initialized
16-11-30 06:44:02 homeassistant.bootstrap: Error during setup of component intesishome
Traceback (most recent call last):
  File "/usr/local/lib/python3.4/dist-packages/homeassistant/bootstrap.py", line 150, in _async_setup_component
    None, component.setup, hass, config)
  File "/usr/lib/python3.4/asyncio/futures.py", line 388, in __iter__
    yield self  # This tells Task to wait for completion.
  File "/usr/lib/python3.4/asyncio/tasks.py", line 286, in _wakeup
    value = future.result()
  File "/usr/lib/python3.4/asyncio/futures.py", line 277, in result
    raise self._exception
  File "/usr/lib/python3.4/concurrent/futures/thread.py", line 54, in run
    result = self.fn(*self.args, **self.kwargs)
  File "/home/pi/.homeassistant/custom_components/intesishome.py", line 38, in setup
    from pydispatch import dispatcher
ImportError: No module named 'pydispatch'

Sorry, try deleting line in intesishome.py - from pydispatch import dispatcher as it isn’t required. I’ve updated code on GitHub.
Feel free to jump on Gitter and DM me for (possibly) realtime assistance.

Thanks - got it working now - Great addon Thanks :slight_smile:

Great thanks for letting me know!
Does it support all of the functions of your device or are there some more controls I need to add for it?

All the functios that I need is there, my unit is a Panasonic AC

Hi @peterfam - I’ve just updated the two files in custom_components as I found I’d uploaded an older version. The update should fix modes not updating on the UI.

@jnimmo thanks for you effort on this. It’s not working for me, I have a universal IR device rather than a wired one and it doesn’t support “working_hours”. So I’m currently getting the error:

16-12-05 14:15:24 homeassistant.components.climate: Error while setting up platform intesishome
Traceback (most recent call last):
  File "/srv/homeassistant/homeassistant_venv/lib/python3.4/site-packages/homeassistant/helpers/entity_component.py", line 150, in _async_setup_platform
    entity_platform.add_entities, discovery_info
  File "/usr/lib/python3.4/asyncio/futures.py", line 388, in __iter__
    yield self  # This tells Task to wait for completion.
  File "/usr/lib/python3.4/asyncio/tasks.py", line 286, in _wakeup
    value = future.result()
  File "/usr/lib/python3.4/asyncio/futures.py", line 277, in result
    raise self._exception
  File "/usr/lib/python3.4/concurrent/futures/thread.py", line 54, in run
    result = self.fn(*self.args, **self.kwargs)
  File "/home/homeassistant/.homeassistant/custom_components/climate/intesishome.py", line 46, in setup_platform
    for deviceid, device in intesishome.get_devices().items()])
  File "/home/homeassistant/.homeassistant/custom_components/climate/intesishome.py", line 46, in <listcomp>
    for deviceid, device in intesishome.get_devices().items()])
  File "/home/homeassistant/.homeassistant/custom_components/climate/intesishome.py", line 73, in __init__
    self.update()
  File "/home/homeassistant/.homeassistant/custom_components/climate/intesishome.py", line 171, in update
    self._run_hours = intesishome.controller.get_run_hours(self._deviceid)
  File "/home/homeassistant/.homeassistant/deps/pyintesishome/pyintesishome.py", line 192, in get_run_hours
    return self._devices[str(deviceid)]['working_hours']
KeyError: 'working_hours'

I’ll have a look to see if there’s a way of getting a list of support functions for a given device. If not, perhaps catch the keyerror and return a zero.

Thanks for testing - ah silly me left one hard key reference in. I’ve just pushed an update to hopefully sort that issue, of course you may have other features that it needs to support too so will be interesting to see how you get on.

There is a way of determining supported features in the initial HTTP request that gets the authorisation token, but obviously I’ve only seen that for my unit so far for what the value mappings are

Great! That’s got me past the errors and the basic on off, set temp functionality appears to be working.

There are a couple of issues. The AC is appearing twice under Climate in the UI. I have it configured like this:

climate:
  - platform: nest
  - platform: intesishome

Looking at the entities I have two listed:

  • climate.main_ac
  • climate.main_ac2

In terms of the supported functions available, I can set the temp, mode and fan speed and see the current temp. The unit also supports the ability to adjust the vertical and horizontal vanes, but I can see this functionality isn’t implemented yet.

Did Intesis provide you with any API docs beyond what’s on their website?

1 Like

Cool that’s good to hear
Remove the intesishome platform from under climate - I forgot to say I updated it to automatically register the climate component in the base intesishome platform (where you put the username/password)

No unfortunately the public API from Intesishome is only for other cloud services to use (i.e. if Home Assistant was a public cloud) rather than individual users, so have reverse engineered it from the iOS client.

I’d probably need to see a packet capture from the mobile app (just testing now if it is possible to get from the web interface)

Basically there is an initial HTTP connection to https://user.intesishome.com/api.php/get/control which sends the username and password. This gets back an initial state of the device including the supported controls. It also returns a server IP address and port to connect to, and a one time authentication token.

The computer then connects to the port, sends the authentication token. While the connection is open, all status changes are pushed out in realtime

If you can modify pyintesishome.py (find pyintesishome in deps or site-packages) - just need to add the else statement from the code block below. Then you can run HA interactively while manipulating the vanes from Intesishome web or mobile apps, and it will log out the UID and values for these commands.
i.e. UID 4 is fan speed with values 0 = auto through to 4 = high

def _update_device_state(self, deviceid, uid, value):
    """Internal method to update the state table of IntesisHome devices"""
    deviceid = str(deviceid)

    if uid in INTESIS_MAP:
        if 'values' in INTESIS_MAP[uid]:
            self._devices[deviceid][INTESIS_MAP[uid]['name']] = INTESIS_MAP[uid]['values'][value]
        elif 'null' in INTESIS_MAP[uid] and value == INTESIS_MAP[uid]['null']:
            self._devices[deviceid][INTESIS_MAP[uid]['name']] = None
        else:
            self._devices[deviceid][INTESIS_MAP[uid]['name']] = value
            _LOGGER.debug(self._devices)
    else:
        _LOGGER.info('Received status update for unknown UID %s to value %s',uid,value)

I’ve managed to get the basics working. It looks like the climate component only supports controlling a single swing operation, which means I can’t set the horizontal and vertical vanes independently.

For each vane Intesis allows you to set to either:

  • Swing
  • One of 5 fixed positions
  • Auto/stop

The fixed positions seem redundant if they can’t be controlled separately, so I’ll just add Swing and Auto/Stop functionality for now.

I’ll create a PR once I get round to completing a first pass of the swing functionality.

1 Like

Done and created a PR.

Available swing modes are:

  • Swing
  • Auto/Stop - only appears to stop vanes on my unit
  • Middle - set both horizontal and vertical vanes to middle position

Thanks Tim, I’ve just done a new release at https://github.com/jnimmo/pyIntesisHome incorporating the changes

0.4 Release

  • Adds support for controlling vane swing if supported by the AC device (auto detection should be working…) @AmazingMonkey
  • Improved error handling/stability
  • Now correctly switches back to polling for status if the persistent TCP connection is closed (you can monitor this through the ha_update_type attribute)
  • Will present connection errors or authentication errors as a notification back to the UI on initial platform setup
  • More error checking and better exception handling

I think it should be nearly ready to propose to pull into HA core but still need to get it tested by some fahrenheit users first

Great stuff. I’ll give it a go

Hello,

I’m brand new to HomeAssistant (I use Homeseer), and have been searching for a way to integrate IntesisHome units, but there is no plugin for Homeseer. If I took a Windows box, installed Python and HomeAssistant, and installed this Intesis component you have developed, is there a way to transfer the data on the devices over to Homeser and back again? Specifically, can HomeAssistant send the data via HTTP to Homeseer? Could I use POST or GET commands to send requests back to HomeAssistant to control the devices?

Alternatively - could you explain how you managed to get an oAuth key to develop the component? I’ve reached out to Intesis but they have never responded.

Thanks in advance for your help.

Regards.