Haiku/SenseMe Smart Fan Support

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?

I have updated to the HACS version which has fixed the above but FYI I am now seeing this in the log:

2020-06-19 16:11:24 WARNING (MainThread) [hacs.repository.integration.mikelawrence.senseme-hacs] ‘install’ is deprecated, use ‘async_install’ instead

I am yet to get my fan to be discovered but I’ll work on that tomorrow.

I think I have an issue in that the aiosenseme library is not installed? Should that happen automatically when the HACS install happens? I am running on a Raspberry Pi.

Hey, I’m creating a Haiku/Sense Me integration If anyone wants to help :smiley:,

Just wondering will yours be different to Mike’s?

Hello @OzGav,

Sorry I’ve been busy lately. Did you fix your problem?

The aiosenseme library it is automatically installed by Home Assistant. If there is a problem with the library, Home Assistant will log an error.

I believe the last warning “‘install’ is deprecated, use ‘async_install’ instead” will be fixed by updating HACS itself.

Hi Mike,

Thanks for getting back to me. On the last point. I think you are right. That one has gone.

As for the Fan support issue. I am not sure what is going on. The aiosenseme library was not installed in …/deps/lib/python3.x which is where I thought it would be based on what I have observed with other custom components. I think I have found the correct files and manually added them. I see init device discovery and version and a scripts directory.

I have added

custom_components.senseme: debug
aiosenseme: debug
aiosenseme.discovery: debug

to my config but other than this message I don’t see anything else in the logs (and no fan discovery):

2020-06-24 21:43:16 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 experience issues with Home Assistant.

I could undo this by deleting this from HACS and go back to your old version and just fix the deprecation but would prefer to get this one going if I can…

Gav…

I did not know that “Mike” made one but i’m planing on adding mine to Home Assistant core and, mine will have auto discovery (I don’t know if his has it). You can run the code and it will discover your fans.

@OzGav So when you say older version what version do you mean?

I don’t know where the libraries are installed but I think Home Assistant uses Python Virtual Environments so it doesn’t necessarily get installed in standard places. Either way you will definitely get an Error in Home Assistant if it couldn’t install the aiosenseme library.

Since you get the custom integration warning I can tell you have the integration installed (via HACS I think).

So I have some tests I want you to run. First add the following logging debug to your config yaml.

logger:
  default: warning
  logs:
    custom_components.senseme: debug
    aiosenseme: debug

Next add the senseme integration with the Home Assistant GUI. What did the GUI say when you added the integration? The log will have at least some information about what happened. Copy all the lines containing [custom_components.senseme] or [aiosenseme.discovery] or [aiosenseme.device] from the log and post it here. Feel free to obfuscate mac ids, ip addresses…

Your original version which used the senseme library. With that I can see the senseme library in …/deps/lib/python3.x/senseme That is why I expected to see the aiosenseme library there as well but as I said I didn’t and I have added it manually although I am not 100% sure if I have grabbed the correct files.

I already had the logger section added. I selected REINSTALL in HACS and got no messages other than the “pending restart” banner. I restarted HA from the GUI and the only thing in the logs I obtained from the GUI is:

2020-06-25 11:02:42 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 experience issues with Home Assistant.

Ideas?

@OzGav So once you install the SenseME integration with HACS and you have rebooted you then have to add the integration.

Goto Configuration -> Integrations then click the + icon at the bottom right. Type in “senseme” and then select the SenseME integration. Follow the directions from there. It should detect your fans. If you haven’t done this step then that might explain why the aiosenseme library hasn’t been installed and there are no errors in the log about it. The aiosenseme library should be installed with “pip”. If you just copied files it may not work so I recommend removing any aiosenseme files you manually copied.

There is additional information about other issues with this integration on Github.

Thanks Mike. I hate looking like a noob! :slight_smile: All working now. Thanks again for all the effort you have put into getting this to work and to answering dumb questions like mine!

Cheers!
Gav…

No worries!

First time doing stuff on github so see how I go but I have added a pull request on the logo repository to get the Haiku icon added.

That’s awesome!

Mike, loving the integration so far. Is there a way to manually trigger discovery when a device is unavailable?