Haiku/SenseMe Smart Fan Support

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.

According to the HACS website you have to have access to the file system of Home Assistant. Once you have copied the HACS component to the config folder. You should be able to complete the installation via the Home Assistant front end.

@lawr1000 Thanks. I got HACS sorted, and installed in my new HA instance. Then added your new packaging. It is delightful to have access to the occupancy sensor! aiosenseme appears really solid. Thank you very much for your work on this over the years! Is there a reason why it doesn’t become a built in integration? It’s very good.

@lawr1000 can’t thank you enough for this work, I’ve been using your previous release for my Haiku L’s without issue in the past, it’s been great, thank you!

Having some issues migrating to the new release using aiosenseme. I’m running my HA in docker on a ubuntu system (technically a ubuntu VM on a windows host via virtualbox). I can’t seem to discover my fans.

To troubleshoot I’ve installed the aiosenseme python lib on the ubuntu machine and run ‘aiosenseme -d’ directly, no luck. I suspected a firewall issue so I completely disabled ufw, still no discovery. Interesting here is that when I move over to my raspberry pi and install aiosenseme it does discover the fans. Also of note, is that on my windows machine I did the same thing and ‘aiosenseme -d’ also does not find the fans. (windows firewall inbound and outbound rules setup to allow port 31415)

Any reason you can think of that this would work fine on RPi and not on the other OS’s?
(all machines and fans are on the same local subnet)

1 Like

Yes I can think of some things that cause problems for the aiosenseme library. Unusual network configs, like your Windows, running a Ubuntu VM, running docker, running Home Assistant. Currently I have to discover all network interfaces so I can listen on port 31415. Weird configurations sometimes cause errors that I can’t predict.

First try the following at the command prompt

aiosenseme --debug -d

This will show additional debug information and maybe an error on an interface.

Also post the output of

ifconfig

If you want you can email me directly at mike{at}big{remove}mikehome{dot}com.

Hi Mike,

I am still running an older version of your awesome library. I just updated to 0.110 and I have received this:

Log Details (WARNING)
Logger: homeassistant.components.light
Source: components/light/__init__.py:451
Integration: Light (documentation, issues)
First occurred: May 21, 2020, 8:51:18 PM (1 occurrences)
Last logged: May 21, 2020, 8:51:18 PM

Light is deprecated, modify HaikuSenseMeLight to extend LightEntity

Is this something which has already been fixed or is this new?