d03n3rfr1tz3 / hass-divoom

Divoom Integration for Home Assistant
MIT License
110 stars 9 forks source link

Implement APIxoo #33

Closed redphx closed 4 months ago

redphx commented 7 months ago

Hi there,

I made a Python lib called APIxoo that allows you to query and download Divoom's animations as GIF files.

It's not in active development right now but I hope it's still useful for this project.

d03n3rfr1tz3 commented 7 months ago

I remember someone mentioning that already, especially because your library makes sure to convert the GIFs to the correct size and format. I do like it! But currently it's not on my todo list, mostly because of two things (besides not having enough time to do all the stuff I want to do):

  1. I'm not sure how to actually make use of your library. I mean, do you already have ideas how the functionality could look like in HA? Sure, a simple service call with a query, that then just downloads, converts and displays the first image it found, might work, but it could be much more useful I guess.
  2. I'm always a bit reserved when it comes to integrations that want any type of password. It would be quite a step in terms of trust (and responsibility) asking for it, especially when we might get into the HACS default repos. Of course there are a few integrations in HA that do exactly this, but again.. I'm not sure if I want that. 🤷‍♂️

I could see improvements in my HA integration, so that it would check compatibility of the GIF the user wants to send and maybe even convert it, if necessary. A few people had problems with GIFs they downloaded from the Divoom app (these things are definitly not 16x16) and GIFs from the internet, so checking compatibility and converting might actually be useful. But thats not the part you meant, right?

redphx commented 7 months ago
  1. I saw that this addon has ability to display a GIF file (MODE image), so how about let them download a bunch of GIF files into a folder and show them one by one? What do you think? I don't have a Divoom device anymore, but I remembered it can only show a limited number of GIF files. I did attempt to make my own Divoom display using Pi Zero 2W + APIxoo. It was successful but I didn't have time to continue the project.

  2. You can let them define email & password in the configuration.yaml + !secret. Nothing is being leaked. Also I'd recommend using a totally new account since you can't have 1 Divoom account with 2 or more sessions using at the same time.