CASAMBI BLE Light Support

Please raise an issue in github.com. But you need aiocasambi library in order to use this addon, it’s easiest to install it through pip and it only supports python 3.

It is the library that’s is doing the heavy lifting (following home assistant development vest practice).

The easiest way to install it is to follow the instructions and install it as a custom HACS repo.

Home assistant will download the library on its own.

You can always test your credentials by either using the casambi library or the aiocasambi library on its own (pip install it and follow the example).

Your credentials is probably the problem, but it’s hard to say without logs.
I would start with trouble shooting those first, to eliminate that possibility.

My guess is that your password is incorrect for Create network session:

Create network session

Create network (admin) session identified by email & password, requires use of API key (Header: X-Casambi-Key).

HTTP Request

POST https://door.casambi.com/v1/networks/session

Path Parameters

None

Request Body

{
**"email"** : "[email protected]",
**"password"** : "password"
}

https://developer.casambi.com/

The integration is now available through Home Assistant Community Store (HACS): https://hacs.xyz/

Hi,

First of all, thank you for working on this and the time spent!

I am running homeassistant on a Raspberyy Pi and I can’t seem to use pip.

I installed the casambi integration through HACS and I am trying to add the aoicasambi as a custom hacs repo.
But when I try to add it as a custom repo, I kepe getting a “Repostitory structure for master is not compliant” error.

Any suggestions what I might be doing wrong?

Hi,
First please raise a github issue (easier to track) :slight_smile:

You need to use pip3, aiocasambi and casambi is python3 only, you are probably using pip for python2, I am running test on my Raspberry Pi 4 from time to time and I install it on Raspbian (Raspberry Pi OS 32 bit) and that works fine :slight_smile:

No I don’t know why you re getting repository structure for master is not compliant, but it sounds like its an issue with the project structure, I am running it myself on an Intel NUC and that works fine as a custom component.

Have you tried to download it through the official HACS store? It just made the cut and is now “officially” part of the store so installing it as a custom hacs repo is no longer necessary :slight_smile:

Hi, I will raise a github issue :slight_smile:

I can’t find aiocasambi as an official HACS repo, that is why I tried the custom install

It’s named casambi, that’s the domain, I have not installed it yet through the official channel, currently testing that out on a VM then time allows :slightly_smiling_face:

aiocasambi is the library that the integration uses, the library is doing all the "heavy lifting*, to comply with the coding standards

1 Like

That one I installed, was easy enough :slight_smile:
But I assumed it would still need aiocasambi to work

Home assistant will install and manage the aiocasambi library for you, the aiocasambi version is pinned to the integration version, you don’t need to bother with that if you don’t want to help me with some python code that is :wink::slightly_smiling_face:

ah great, I think I see where I messed up now.

I started with a manual install and added lines to the config file.
Didn’t work, removed lines from config file.

Installed through HACS, did not add lines back to config file…
Sorry to bother because I did not pay attention.

I will mess with the config a bit more to see if I can get it to work. Thanks!

If I could be of service I would gladly help out, but apart from some yaml, data analysis and Business intelligence coding, my coding skills are very limited

You need to add the yaml configuration as stated in the readme, how you install homeassistant_casambi doesn’t matter, easiest is through hacs.

But you also have some perquisites that need to be fulfilled, those are stated in the readme (request api key, setup a site, etc.).

The project do not not support setup through the homeassistant gui, is on the roadmap, but not yet implemented.

Most people have problems with setting up the api side, I would trouble shoot that by using my first casambi library “casambi”, install it through pip: pip3 install casambi

You will need to renew your api key every third month, I have that as an alert in my calendar

1 Like

yeah and they informed me about the fact that there will be a cost structure in a few months for the api, so no longer free.

your documentation was pretty clear for the most part, the mess-up earlier was me trying t do a few things too much at the same time :wink:

What I struggled the most with was getting the right user/setup process for the network and site.
I assumed that I can create a network and site and then give the registered api user all the rights to them, especially since the developer api console gace an authorized response.

But all need to be created by the email account registered to the api.

That is fixed now and I have a light showing up.

thanks for the assist and writing all of this :slight_smile:

I think the api key isn’t associated with the site, just there for security purposes, they might have changed that.

Thats bad news, I don’t see me paying for the api access in its current state, the api (not my python library) isn’t even feature equivalent with the app. I hope they change that or start to support a local api option.

But good that you got it working! :tada::tada::slightly_smiling_face:

1 Like

To follow up on my post from earlier: you were right (of course), it was an authentication issue. My API key had expired between the time I had validated the authentication through the Casambi API console, and the time at which I tried out this integration. After the renewal of my key, everything works beautifully.

Next up, deciding on an old device to act as an always-on gateway.

Thank you so very much for your work on this!

1 Like

Hi All,

I got an information today from the support that Casambi API will not be free anymore. There is no establish cost structure for the moment but seems that something will be in place for 2022

Hopefully it will not cost too much too keep interaction between devices

Yes, hopefully the have a free tier for small home networks

Casambi is a real PITA with regards to integration, i.e. their closed ecosystem. Even though I would personally avoid it, I will be getting some equipment next year which unfortunately is based on Casambi. Ahead of this I have been looking into how to integrate it with HA and was hoping Olof’s integration would do the job (though I will also need blinds). Given what was written above about the API, I am now putting my hopes on this:

https://casambi.intelligent-lighting.de/

It supports different protocols including MQTT. They have an example flow which I imported:

I currently have no idea where to buy it or what it costs, but found that approach promising and just wanted to share.

1 Like

Hi,

brief question, I’m a Home Assistant newbie who just migrated from iobroker, partly because of the opportunity to integrate my (Occhio) Casambi lights into the overall smart home system.

So far I’ve successfully installed the Home Assistant Integration via HACS, but I seem to struggle to get the correct lines Into the configuration.yaml (error from the loader: mapping values ar not allowed in here). When I test my casambi cloud credentials on API console, I only seem to be able to create Create network (admin) sessions, but no user sessions on the casambi cloud. Is this the reason for my problems? Or could anybody please provide an (anonymized) sample configuration.yaml section?

Thank you in advance,

Dirk