Custom component - Divoom TimeBox notifier

just fixed the component. seems to work fine for me.
I made a few additions to the services to interpolate colors by values.

CAVEAT: Unfortunately I don’t have time to document it - and probably will only maintain it at my own leisure.

If anyone wants to use the component: https://github.com/noheton/timebox

3 Likes

i’m trying to integrate your version, but i’m getting this:

Error setting up platform timebox
Traceback (most recent call last):
  File "/srv/homeassistant/lib/python3.7/site-packages/homeassistant/components/notify/__init__.py", line 78, in async_setup_platform
    platform.get_service, hass, p_config, discovery_info
  File "/usr/local/lib/python3.7/concurrent/futures/thread.py", line 57, in run
    result = self.fn(*self.args, **self.kwargs)
  File "/home/homeassistant/.homeassistant/custom_components/timebox/notify.py", line 57, in get_service
    image_dir)
  File "/home/homeassistant/.homeassistant/custom_components/timebox/notify.py", line 63, in __init__
    from timebox import TimeBox
ModuleNotFoundError: No module named 'timebox'

Anyone can help me? thanks

Hi,
i have the same error message:

Error setting up platform timebox
Traceback (most recent call last):
File “/usr/src/homeassistant/homeassistant/components/notify/init.py”, line 78, in async_setup_platform
platform.get_service, hass, p_config, discovery_info
File “/usr/local/lib/python3.7/concurrent/futures/thread.py”, line 57, in run
result = self.fn(*self.args, **self.kwargs)
File “/config/custom_components/timebox/notify.py”, line 55, in get_service
image_dir)
File “/config/custom_components/timebox/notify.py”, line 61, in init
from timebox import TimeBox
ModuleNotFoundError: No module named ‘timebox’

Any help here, please? I am on hassio HassOS 3.7

Thanks

Anyone managed to get this working in the newer HA versions?
Thanks!

It looks like the backend library is also no longer compatible with the version of python 3 Home Assistant uses, and will need some updating.
Sorry, but I no longer have the hardware capable of testing this this component any more, so I’m not really in a position to get it up to date.

Is there any way we can help with testing (since we have the hardware)…I mean if it’s not that much work on your end (I really can’t estimate what it would take to update it).

Thanks!

Hello,
Je relance le sujet afin de savoir si quelqu’un a trouvé le moyen de faire fonctionner la divvom box?
Merci à tous.

Hi
anyone working with timebox now? @noheton

Is this component dead? Or has anyone found a way to use it again?
Hopefully the last :wink:

Hey, I have looked into it, let me give you an update.

The main problem is that there is no python libraries / tools to connect with the Timebox that works at this time.
The protocol evolve and libraries needs to be updated to keep working.

I have looked into these github projects:
ScR4tCh/timebox
derHeinz/divoom-adapter
DavidVentura/divoom
This require a quite important amount of work to fix these library without previous knowledge on this.

For reference there is one javascript library that is working (but we need a python library):

If one of the python libraries get updated feel free to ping me, I will happily update / implement a timebox custom component.

Hey,

I have implemented a custom component to interact with the Timebox Evo and it works like a charm :smiley:

The installation process is a bit more complex because it require to install a web server to use the JavaScript library. I have made a docker container for it.

It have some cool features, such as displaying an image only from an url or directly from a png. I have an automation that display on the Timebox the album cover of the current music.

Here is the link of the project

2 Likes

Hi, first of all, thanks a lot for doing this! This is for whoever like me spent hours trying to make this work with this setup:

  1. Using Virtualbox image from Home Assistant website
  2. Because the Home Assistant OS is specific, it’s not a regular linux that we can log in and run docker, etc I needed to run another virtualbox with a regular linux, then ran the docker as the documentation guides
  3. Then I had to make my Home Assistant connect to a different IP address on the port 5555

I was receiving error on loading the notify.timebox I fixed it by editing the file \custom_components\timebox\notify.py and setting the TIMEOUT = 15 (it was 5 and was giving me timeout) try larger numbers if you are also having this problem.

Bye and thanks again!

Also! Another thing, you don’t have on your documentation on github, but you can also send text not only images… just:

{
  "message": "",
  "data": {
    "mode": "text",
    "text": "Your text!"
  }
}

Thanks for your feedback, I have updated the repository with the new timeout and added the text example in the README :slight_smile:

Excellent work! Any future plans to make it work on HAOS? Bummer that it won’t do that as of now (if I understand corrently. I had considered running it via Docker under Dietpi on a Pine A64 until I realized that the Pine didn’t have BT.

Cool project @noeRls

Any idea if it would work with other Divoom products?
i.e. Pixoo or Pixoo Max?

I will be checking regularly if there is viable python library to interact with the Timebox, if there is one I would update it to make it easier to setup.

1 Like

It has not been tested for other product than the Timebox. I don’t think it will work, if it does it’s pure luck that they share the same protocol.

noeRls: by the way man your custom is working great with Timebox Pixoo.
Chapeaux!
Update: al least pictures are Ok. Failed for text output…

1 Like

Do you have any idea why I get the “connection refused” while setting up the integration in Home Assistant log?

As far as I know, docker container is running and log says listening at port 5555.

Logger: homeassistant.components.notify
Source: custom_components/timebox/notify.py:38
Integration: Notifications (documentation, issues)
First occurred: 15:24:39 (1 occurrences)
Last logged: 15:24:39

Error setting up platform timebox
Traceback (most recent call last):
  File "/usr/local/lib/python3.9/site-packages/urllib3/connection.py", line 174, in _new_conn
    conn = connection.create_connection(
  File "/usr/local/lib/python3.9/site-packages/urllib3/util/connection.py", line 95, in create_connection
    raise err
  File "/usr/local/lib/python3.9/site-packages/urllib3/util/connection.py", line 85, in create_connection
    sock.connect(sa)
ConnectionRefusedError: [Errno 111] Connection refused