Haiku/SenseMe Smart Fan Support

Anyways, I just wanted to put it into a docker container because I use docker for everything and didn’t want to spin up a VM just to run this.

If you send me your Dockerfile I could probably help finish it. Do you have it in github?

Has anyone managed to get this working with Home Assistant? I have two Haiku fans, each with their own wall control units. I would love to be able to control these through Home Assistant!

Not yet but I am looking at buying one of these fans. Currently running hass.io on a Raspberry Pi 3 and I use cloudmqtt to supply owntracks data

After reading the thread above could this be as easy as installing node.js on the Pi then this package (https://github.com/forty2/haiku2mqtt) and pointing to my mqtt broker? The only thing I am concerned about is the example shown for a remote broker only has the host not the login credentials. Can you have more than one mqtt broken with hassio? If so I could start the inbuilt broker and use that?

1 Like

Ok I finally had a closer look at this and the first problem is I cant seem to work out how to install node.js when I am running HASSIO on my Raspberry Pi? Has anyone actually made any progress with getting this to work?

I have been working on a custom component that works with the Haiku SenseMe Fan. The custom senseme hub component supports the fan and light if installed. It should work under all Home Assistant installations including Hassio. Give it a try and let let me know how it works.

This integration has been significantly updated. See this post.

Requires Tom Faulkner’s python library. Occasionally the library fails to communicate with fan and errors are shown in the log. This is also true for the background monitor that updates the fan state every minute or so. Note: Home Assistant/Hass.io will automatically install this library using pip.
1 Like

Dude… yes… it works!

Testing with a Haiku L Series.

Could you just confirm which directories and files you pulled from TomFaulkner and where you placed them?

Thanks for your work on this!

You only add the three senseme.py files for the custom component. Home Assistant will automatically install the SenseMe library from TomFaulkner using pip. After successfully placing the three senseme.py files in the correct directories and restarting Home Assistant you will see the SenseMe library files from TomFaulkner in config/deps/lib/python3.6/senseme.

Thanks I am making progress. No error for the component is generated now when I have a basic entry of just “max_number_fans: 1”

But I am getting this error (I see some reference to lights below and I dont have a light with the fan. not sure if that matters):
2018-07-22 22:21:30 ERROR (MainThread) [homeassistant.helpers.entity] Update for fan.alfresco fails
Traceback (most recent call last):
File “/usr/local/lib/python3.6/site-packages/homeassistant/helpers/entity.py”, line 196, in async_update_ha_state
yield from self.async_device_update()
File “/usr/local/lib/python3.6/site-packages/homeassistant/helpers/entity.py”, line 319, in async_device_update
yield from self.hass.async_add_job(self.update)
File “/usr/local/lib/python3.6/concurrent/futures/thread.py”, line 56, in run
result = self.fn(*self.args, **self.kwargs)
File “/config/custom_components/fan/senseme.py”, line 180, in update
File “/usr/local/lib/python3.6/site-packages/homeassistant/util/init.py”, line 318, in wrapper
result = method(*args, **kwargs)
File “/config/custom_components/senseme.py”, line 279, in update
self._light_on = self._device.get_attribute(“LIGHT;PWR”) == ‘ON’
File “/config/deps/lib/python3.6/site-packages/senseme/senseme.py”, line 478, in get_attribute
return response_dict[attribute]
KeyError: ‘LIGHT;PWR’

Edit: I can turn the fan on from HA but the switch in HA immediately moves back to off even though the fan is on,

Having never tested a fan without a light I’m not surprised there is an error like this. The component doesn’t add a light when the fan indicates there isn’t one but the update which is in the hub part of the component still checks light status. I have updated the component on Github. That should fix this problem. Is there another problem…

This integration has been significantly updated. See this post.

I am not seeing the fan now. Not sure of the reason? On the first try an hour ago the fan wasnt detected but then it was after a restart. I have tried restarting multiple times now.

I have tried this:

  max_number_fans: 1

and this:

  max_number_fans: 1
    - "Alfresco"

I take it there are no errors in the log and you have looked at the states developer tool for any fan that might be your senseme fan. Try adding some logging statements to the senseme.py on the custom components directory (not fan or light directories).

Like this logger statement on line 85 which will put a warning “Found fan: ‘Living Room’” in the log.

line 84: newHub = SenseMeHub(newDevice)
line 85: _LOGGER.warning("Found fan: '%s'." % device.name)
line 86: if newHub.group:

Have to go to work for five days so will look at this again when I get back. Will keep you posted. Thanks!

OK I have updated to 0.74.2 and all appears to be working. Not that I use it at the moment but is the “Whoosh” function supported? I just see “oscillate” and “direction” and “speed” when i click on it?

Thanks so much for getting this up and running!

Also it is unfortunate that it doesn’t seem like the temperature and motion sensor status in the fan can be read?

Ya I used Oscillate to control Whoosh. If you know a better way to handle whoosh let me know.

It may be possible to get motion information from the fan but I don’t know how it would work especially with status updates occurring every minute or so.

Since this custom component downloads a required library via PIP, can this be used with Hass.io? If so, are there any special steps required, as I’m not having any success after adding your custom components, updating my configuration.yaml file and rebooting. I see nothing related to my Haiku fans in Home Assistant.

I’m using it with Hass.io without issue (other than than the mentioned issue of the library failing to communicate with the fan/light). Many components require additional packages and Hass.io would be pretty limited if those requirements couldn’t be met.

claytonnj is correct, Hass.io will also automatically install the required third party library (SenseMe). I’ve modified the original post to mention Hass.io.

@lawr1000 as of HA 0.81.2 lines 96-97 need to be changed to:

    load_platform(hass, 'fan', DOMAIN, {}, config)
    load_platform(hass, 'light', DOMAIN, {}, config)

(* Pass hass_config to load_platform (@balloob - #17952))

In my testing this change should be backwards compatible. I can add an issue in GitHub or submit a pull request if you’d like but it seemed silly for such a minor change.