Avea Server for Elgato Avea Bulb

Hi there!

I have an Avea Bulb from Elgato: https://www.elgato.com/avea

It only accessible via Blueooth and there is a nice node based server that exposed the bulbs via a rest api: https://github.com/Marmelatze/avea_server

You can get all the bulbs and their states via get and set all stuff via post. Currently I have it accessible via HA Bridge, but it be cool to see it in Home Assistant!

I looked into the code for Yeelight, but it seems like I have to learn a lot of Python to write it myself :confused:

Template for getting info

{“bulbs”:{“xxxxxxxxx”:{“id”:“xxxxxxxxx”,“name”:“Wohnzimmer”,“color”:{“current”:{“white”:4094,“red”:0,“green”:532,“blue”:3792},“target”:{“white”:4095,“red”:0,“green”:533,“blue”:3793}},“brightness”:100,“lastSeen”:“2017-02-25T00:22:50.298Z”}}}

Template for setting state

POST htt p://xxxx:3000/api/bulbs/xxxxxx brightness=0

Greets, Sören

Hi Sören,

How is your current setup? I think it would be great to have a decent “component” for the Avea bulb, but the workaround seems okay, too. However one has to run ha-bridge as well as avea-server to be able to route the requests to ha-bridge to a web interface? Sounds like I would have to have another rpi running for this setup.

Cheers,
dih

As I couldn’t get avea Server running an an hass.io addon I installed the avea server on a Pi Zero and wrote a very bad custom component for Home Assistant that talks to my Avea Server

Hey there, I just published avea_server as an experimental hass.io addon: https://github.com/pattyland/hassio-addons
No more ha-bridge or extra pi’s :wink:

Feedback is welcome, I will work now on the component for hass

You should be ready to control you avea via command line, for example change the brightness with curl -d "brightness=0" -X POST http://hassio.local:3000/api/bulbs/fge87efgfg7f

It took me quite a long time but I wrote a “real” Avea component for Ha without the need of any server/addon: https://github.com/pattyland/hass_avea

We will see wether I can push into ha :slight_smile:

I get this error. I will look if anyone has this problem.

ERROR (MainThread) [homeassistant.components.hassio] Integration avea not found when trying to verify its light platform.

1 Like

I’m sorry, there were already breaking changes in ha. You can use version 0.0.2 which is compatible with ha 0.92

Because this Topic is still number one on Google for “Avea Home Assistant”: https://www.home-assistant.io/components/avea/

Home Assistant got an avea integration since version 0.97 without any server/addon whatever.

This topic can be closed

Ok, but how to add bulbs?

They should be found and displayed automatically. Are Avea errors in the log?

Thanks for your answer! I have no “avea” word in logs at all, but I can see my bulb in bluetooth devices around on my phone. Should it be displayed in “Integrations” section?

No, I’m still working on the gui configuration. For now you need to activate it via yaml (see docs)

Which docs I should see? I can’t find any info about it. Just how to add support in configuration.yaml there (https://www.home-assistant.io/components/avea/). I have done it.

Ah sorry, yes I meant that entry. Here a few tips:

  • Is BLE working in other integrations?
  • Can you see your bulb from hassio? bluetoothctl devices | grep Avea
  • Try killing the avea app on your phone, sometimes it seems to steal the connection
  • Try movin the bulb close to the server
  • Try turning power off an on at the bulb and restart ha after that
  1. Yes, I have Xiaomi Mijia 2 Bluetooth connected and worked fine.
  2. “bluetoothctl devices | grep Avea” does not show anything. But “bluetoothctl” show my bulb in list:
  3. I have no avea app on my phone.
  4. The bulb is 2 meters away from server
  5. I have tried any of variants of restarting and the bulb, and the server.

Where the bulb should be displayed if everything is ok? Maybe I look the wrong places.

Hm, I don’t know if the Bulb will work without being configured in the app. That’s my only known way to set a name for example
Are you using Home Assistant OS?

If you can, you should try using the library I’m using to control avea bulbs: https://pypi.org/project/avea/
(I’m not the author of it, I just wrote the integration for Home Assistant)

Hi! Thanks for your support. I really looked in the wrong place. But later I found my bulb in entity list with id “light.avea_bulb_1”. I’m sure it should be specified in the configuration section on page https://www.home-assistant.io/integrations/avea.

I’m having trouble with my Avea bulb. It has functioned well before, so we know it has worked. t also shows up in the list of bluetooth devices when I look into bluetoothctl on the command line. Here is the error log:

Logger: homeassistant.components.light
Source: helpers/entity.py:887
Integration: Light ([documentation](https://www.home-assistant.io/integrations/light), [issues](https://github.com/home-assistant/home-assistant/issues?q=is%3Aissue+is%3Aopen+label%3A%22integration%3A+light%22))
First occurred: 1:23:53 PM (2 occurrences)
Last logged: 1:23:53 PM

* Error adding entities for domain light with platform avea
* Error while setting up avea platform for light

Traceback (most recent call last): File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 382, in async_add_entities await asyncio.gather(*tasks) File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 587, in _async_add_entity await entity.add_to_platform_finish() File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 698, in add_to_platform_finish self.async_write_ha_state() File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 464, in async_write_ha_state self._async_write_ha_state() File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 498, in _async_write_ha_state state = self._stringify_state() File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 470, in _stringify_state state = self.state File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 882, in state return STATE_ON if self.is_on else STATE_OFF File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 887, in is_on return self._attr_is_on AttributeError: 'AveaLight' object has no attribute '_attr_is_on'

Any ideas? I’m on the newest version of HA. Did a breaking change get introduced?