CASAMBI BLE Light Support

Hi.

Android devices are limited with Bluetooth. This is specific to Android since (I believe) version 9. Bluetooth is automatically disconnected by Android after a specific time. Perhaps this has been discussed in this thread. To be honest I didn’t check, it’s bit long.

I don’t know if the Android based gateway that have been discussed above has an earlier android version which doesn’t have this caveat.

My solution has been to buy an old used iPhone for 60CHF. It is permanently powered. The iOS software manages to safeguard the battery so the risk is low. I tried to make an automation to monitor battery level and use a smart plug (Hue) to change only between 80 and 20% but the HA app disconnects and therefore the automation was not launched when necessary. Hence I decided to leave it plugged all the time. I have sometimes (now rarely) disconnects, but most of the time the iphone is connected to bluetooth and it works fine. I may work more on this and find a way to make checks for the app to always be running.

That said, I didn’t yet made the automations and scenes of the Casambi enviornment in Home Assistant. Right now, I occasionally operates from Home Assistant. Lately, everytime I did, it worked fine. The latest releases fo teh component have been more stable. Also I guess Home Assistant evolves :slight_smile:

That said, I’m looking forward to Matter. Casambi is a member now. So I expect we will soon be able to implement and use Matter for the Casambi network.

EDIT: Looking at the casambi dev website, it’s clear that a gateway is not the solution for websocket for now.

Is there any other possibility to use the API to control Casambi-powered light appliances without having a phone/tablet gateway just for this purpose?

Currently no, but we are developing new Gateway device that would not require dedicated phone for this purpose.

https://developer.casambi.com/faq#websocket

All that said, I make a new message as I plan to collaborate to the casambi module and the casambi component.

My situation is as follow:

I have a Winsol Pergola with blinds, and Winsol blinds on my Veranda. Winsol has been using a luminaire type module with a specific firmware (hence specific fixture) to drive the blinds. I have the exact same modules for all the blinds.

Here is an example of unit data for one of the blind driver:

 '34': {'address': '9de0466824df',
        'firmwareVersion': '38.1',
        'fixtureId': 27807,
        'groupId': 0,
        'id': 34,
        'name': 'Store Sud Entrée',
        'position': 1,
        'type': 'Luminaire'},

I will contact Winsol to ask why it is idenfied as Luminaire. From my PoV, they should make a change in either the profile or the firmware for it to be identified as a blind controller. But until then, I would like to use the fixture ID to identify it.

I want to differentiate blind from Winsol, and then make them identified as cover in Home Assistant.

I also want to add the EnOcean switchs. For these, it’s quite easier given they are identified as BatterySwitch.

My plan would be to adapt the aiocasambi module to handle the specific Winsol cover drivers as a specific feature (by fixture ID), and also integrate switch control in that module.

Then I would like to ad covers and see if I can make the EnOcean switch work in the custom component. I believe this last part might not be possible.

Any input, recommendation, tip about what I said above, please let me know. That will be my first collab ^^.

I have developed so far the maxsmart module and custom component. This was my first python dev.

After analyzing the module I decided it does make sense to change the module for now to identify the blind drivers by fixture. Winsol should change their shit to make it right. When this will be right, it make sense to work on the module to handle blind controllers.

Until then I will rather intercept by fixture ID the Winsol blind drivers and prevent them to be created as light entities and rather be set up as cover entities.

I also realize, reading the FAQ on developer.casambi.com that blind controllers are not officially supported via websocket so far. That is perhaps a reason why Winsol selected a Luminaire type. Definitely the best approach to handle that from the component.

No more API keys from Casambi :frowning: Very disappointing as I just spend quite a bit of cash on new lights.

“Unfortunately within the Casambi API beta-program, we cannot anymore distribute keys for domestic use due to available server resources. The situation can change during time.”

Go for the casambi-bt home assistant integration, then you don’t need an api key fare as I understand. I can’t use it since I have a classic only casambi network.

1 Like

Thanks for the tip, works well combined with a bluetooth proxy.

This is so much better, convenient, responsive vs. the API solution.

Only features I find indispensable on the API is the temperature and vertical controls.

Is this still planned for the BT solution?

Then I will switch to the BT and get rid of the API for convenience and reactivity.

Thanks a lot anyhow for the current version!

Cheers.

@rik2878 I use this one

And it does have color temperature settings and dimming. What do you call vertical controls?

Yes, I’ve tried it. But it is missing vertical light for some lamps. You can distribute light between the upward light and downward light in the same lamp that has two LED strips directed each one either upward or downward.

It is variable between 0 and 255 like for brightness. 0 is 100% of light is upward and 255 is 100% light is downward. Example, 127 would be 50% of light id downward and the remaining 50% is upward.

You have control over it by the casambi app and the other casambi integration using the API. But response time is not as effective as in the BT version where all is local and very reactive.

Hope this explains what I was meaning.

Cheers.

So I think I have the Casambi Classic network (I think it says something about classic in the Casambi app for the network i have setup for my spotlights in the roof), and if i interpret the responses in this thread I will not be able to controll the lights through home assistant? I can controll them through the casambi app though.

I had a try with this. I installed the integration which went straightforward. I have a Casambi Bluetooth controlled light which in Casambi works perfectly well.
The integration discovered nicely the Net ID of the light ( new entity discovered). Then the integration asks for a password which is of the Bluetooth network I assume and I wait. But then it’s says ‘ Failed to connect’. This was already forecasted in the documentation although I have my settings as recommended in the documentation.
Now to progress and to increase my understanding of this Bluetooth connection I have a question. I use a RP Pi4 and it seems to see the Bluetooth network because it picks up the NetID but does it actually communicate with it? Or is there additional hardware required (Bluetooth usb stick?) for the RP pi4?

If you don’t have an api key your out of luck. The old integration requires a casambi gateway (can be an old phone) and api key for casambis api.

Think its best if you raise an issue in the the projects github: GitHub - lkempf/casambi-bt-hass , I am not able to run the integration at all since I am on a Casambi Classic network.

Thanks. I will do that!

How does that work? I have the Casambi app. The light has a Bluetooth connection with my iPhone so I went to the bt version. But how does the setup with the ‘old iPhone’ works?

I have seen a gateway option in the app. How to configure that and how to get an Casambi API?

The new integration (casambi-bt) uses the private casambi api and then it talks bluetooth directly from home assistant to the casambi devices.

The old integrations talks through a casambi gateway. Could be your old Iphone, you just click in the gateway option and you make sure its always on. But that requires and api key, which can be requested here: https://developer.casambi.com/

I have requested for an API Key. Let’s see if they provide.

By sheer coincidence I got the BT version running for just a minute or 2 and after that it lost connection but couldn’t find the way back to reconnect. I am soooo close but no cigar :cry:

I have got the API key. They were very friendly at Casambi support. So I have got the old version running.

I guess I can get the bt version running as well if the Bluetooth reception of my RP would be better.

Hi Hellqvio, that means if i would send you a oligo grace led lamp you could integrate the functionality into your

?
would you do so :wink: ?

thxia

I think that light is not supported by the api, the integration can only support the devices supported by the api.

The other integration (casambi-bt) is talking the protocol directly with the devices, that’s probably the way to integrate it.

Its two lights integrated to one?