Haiku/SenseMe Smart Fan Support

Another quick one. The README suggests that the “friendly_name” is optional but seems mandatory based on this error I received. I added it in and all good.

2019-03-03 23:07:45 ERROR (MainThread) [homeassistant.setup] Error during setup of component senseme
Traceback (most recent call last):
File “/usr/local/lib/python3.7/site-packages/homeassistant/setup.py”, line 154, in _async_setup_component
component.setup, hass, processed_config) # type: ignore
File “/usr/local/lib/python3.7/concurrent/futures/thread.py”, line 57, in run
result = self.fn(*self.args, **self.kwargs)
File “/config/custom_components/senseme/init.py”, line 74, in setup
hubs.append(SenseMeHub(newDevice, include[‘friendly_name’],
KeyError: ‘friendly_name’

Also for others if you are having trouble debugging this I found adding the following to line 591 of senseme.py was handy so I could see which fans it did find. Otherwise all I was seeing was that a message was received and then a timeout error.

LOGGER.info(“Name :%s:”, name)

Thanks for the bug report on the optional “friendly_name”! It is now fixed and on Github.

When you mentioned adding a line to the code I think you forgot the leading ‘_’. Your example code should have been…

 _LOGGER.info(“Name :%s:”, name)

Thanks and quite right on the underscore. Cut and paste error!

Anyone have this working on 0.94.0? This is the first time I’m trying to get this to work, so I’m not positive it’s not something I have wrong. Thanks @lawr1000 for the work on this though!

It’s still working on my system, Home Assistant 94.3. You haven’t given much information on your problem so I’ll start from the beginning.

  1. Add senseme: to your configuration file.
  2. Copy the senseme directory from Github to the config/custom_components directory on your Home Assistant instance.
  3. Restart Home Assistant.
  4. Goto States Developer Tool in Home Assistant.
  5. Scroll down to the states beginning with fan. Your fan should be in there if the component is working. The name of your fan should match the name given in the Haiku app.
  6. If you don’t see your fan there then look for Senseme errors in the log.

There is more information in the Github repository for the SenseMe component here.

This integration has been significantly updated. See this post.

1 Like

Hey man! I do not get any fans showing up in dev-states. There are no errors logged, only thing I see is that it at least acknowledges and tries the component:

## Log Details (WARNING)
Fri Jun 14 2019 13:43:41 GMT-0400 (Eastern Daylight Time)
Setup of senseme is taking over 10 seconds.

and also in Full Log:

2019-06-14 17:43:30 WARNING (MainThread) [homeassistant.loader] You are using a custom integration for senseme which has not been tested by Home Assistant. This component might cause stability problems, be sure to disable it if you do experience issues with Home Assistant.

Should I see the files in config/deps? I do not see anything in there - I wonder if that’s an indication that HA is not downloading/installing the Python module.

I think I’ll try power cycling the devices when I get home and make sure they’re actively talking to the Haiku Home App before restarting HA. I also run HA in Docker so I may restart the container too later.

I get those two warning all the time and the SenseMe component works just fine. I thought that is where dependencies were installed but when I looked in my config/deps folder it was empty and my SenseMe component still works. I’m running Hassio so Docker installs are probably different.

The component looks like it is loading because you get the warning about the custom integration. I think the problem is with the fan’s network. I have had fans stop working (not working is no network control) in the past and a power cycle of the fan fixed the problem.

Do you power cycle by shutting the fuse off? To be honest, these fans and lights have never worked well with their app either. Never could get anything to do a firmware update either

I’m seeing the following errors from this Senseme component in my home-assistant.log. Any idea what’s wrong? The issue I’m seeing is that only two of my Haiku fans are showing up in Home Assistant.

2019-10-17 21:28:12 ERROR (Thread-3) [senseme.lib.background_monitor] Background task error Traceback (most recent call last): File "/usr/local/lib/python3.7/site-packages/senseme/lib/background_monitor.py", line 29, in _loop self.action() File "/usr/local/lib/python3.7/site-packages/senseme/senseme.py", line 438, in _get_all_bare _, result = result.split(";", 1) ValueError: not enough values to unpack (expected 2, got 1) 2019-10-17 21:28:12 ERROR (Thread-4) [senseme.lib.background_monitor] Background task error Traceback (most recent call last): File "/usr/local/lib/python3.7/site-packages/senseme/lib/background_monitor.py", line 29, in _loop self.action() File "/usr/local/lib/python3.7/site-packages/senseme/senseme.py", line 449, in _get_all_bare category, value = result.rsplit(";", 1) ValueError: not enough values to unpack (expected 2, got 1) 2019-10-17 21:28:12 ERROR (Thread-2) [senseme.lib.background_monitor] Background task error Traceback (most recent call last): File "/usr/local/lib/python3.7/site-packages/senseme/lib/background_monitor.py", line 29, in _loop self.action() File "/usr/local/lib/python3.7/site-packages/senseme/senseme.py", line 438, in _get_all_bare _, result = result.split(";", 1) ValueError: not enough values to unpack (expected 2, got 1) 2019-10-17 21:28:42 ERROR (Thread-3) [senseme.lib.background_monitor] Background task error Traceback (most recent call last): File "/usr/local/lib/python3.7/site-packages/senseme/lib/background_monitor.py", line 29, in _loop self.action() File "/usr/local/lib/python3.7/site-packages/senseme/senseme.py", line 438, in _get_all_bare _, result = result.split(";", 1) ValueError: not enough values to unpack (expected 2, got 1) 2019-10-17 21:28:42 ERROR (Thread-4) [senseme.lib.background_monitor] Background task error Traceback (most recent call last): File "/usr/local/lib/python3.7/site-packages/senseme/lib/background_monitor.py", line 29, in _loop self.action() File "/usr/local/lib/python3.7/site-packages/senseme/senseme.py", line 449, in _get_all_bare category, value = result.rsplit(";", 1) ValueError: not enough values to unpack (expected 2, got 1) 2019-10-17 21:28:42 ERROR (Thread-2) [senseme.lib.background_monitor] Background task error Traceback (most recent call last): File "/usr/local/lib/python3.7/site-packages/senseme/lib/background_monitor.py", line 29, in _loop self.action() File "/usr/local/lib/python3.7/site-packages/senseme/senseme.py", line 438, in _get_all_bare _, result = result.split(";", 1) ValueError: not enough values to unpack (expected 2, got 1)

I also get these errors occasionally in the background task. This task periodically gets the state of the currently connected fans (inside the senseme library). I don’t know why the errors happen but they are temporary.

As to why you are only seeing two fans…Sometimes restarting Home Assistant will allow the fans to be rediscovered. I only have two older (2015) fans so I have never tested a case with more fans. What does your config look like? Are your fans newer models?

I have split the SenseME Home Assistant Integration into it’s own GitHub repository and made it compatible with HACS.

The latest version V2.0.0 uses my aiosenseme library to better support Home Assistant and push updates. With push updates the occupancy sensor now makes more sense and is added to Home Assistant when you install the integration. This integration now supports configuration via the Home Assistant frontend GUI. There’s lots more! Give it a try.

3 Likes

Setup, seems to be working well so far.

Thanks for the update.

Is there a way I can disable the Woosh feature connected to oscillate?

Real minor thing. I use this component to integrate with Homekit and can’t set the fan as a ceiling fan since I believe it has the oscillate feature (so it thinks its a floor fan).

Otherwise integration is still working well.

Shouldn’t be too hard. I will probably add this as an option in config flow which would turn this off for all SenseME fans.

1 Like

Awesome! I appreciate the consideration.

Release v2.0.5 adds two configuration options: “Enable Direction” and “Enable Whoosh as Oscillate”.
These options are available when you first setup the integration or if you go to Configuration -> Integrations -> SenseME and the select the gear icon near the upper right of your browser.

Hopefully this addresses concerns about Homekit integration from a_ndy.

I updated. It did not fix it for some reason.

It must be something with how HA brings in the fan component.

My floor fans, which are just switched on/off I can update the icon.

Regardless I appreciate you making that change. Granularity is always good!

So I just looked at my Homekit integration and for all fans imported by Home Assistant you cannot change the icon. In fact the light is the only component imported by Home Assistant that I can change the icon. Not sure why.

1 Like

I am just making a new home assistant on NUC, and trying everything from scratch. Is there any way to install HACs via the community store? Trying to see if I can just use the web front end to build up a system.