hass-divoom icon indicating copy to clipboard operation
hass-divoom copied to clipboard

Allow installation via HACS

Open bahuma20 opened this issue 2 years ago • 9 comments

Please allow to install this plugin via HACS as this will allow more people to discover and use it. (Especially now that it will be able to setup via UI discovery with the new bluetooth api)

Here is some documentation: https://hacs.xyz/docs/publish/start

bahuma20 avatar Nov 06 '22 13:11 bahuma20

Just writing to encourage this! 👍

luisdomg avatar Nov 13 '22 18:11 luisdomg

I'm sure I'm being a bit dumb with the manual install, I get: "Platform error notify.divoom - Integration 'divoom' not found." It's just copying the files to \config\custom_components\divoom and writing the conf right?

luisdomg avatar Nov 13 '22 19:11 luisdomg

It would be cool if this was added to HACS! Working on a video on how to use the PIXOO 64 with HA... would be cool if I could include this repo.

makeitworktech avatar Feb 06 '23 16:02 makeitworktech

hey all, thank you for your interest and such.

currently I'm quite busy with other stuff, which is why its so quiet here and nothing really changed. on top of it, I would still have to get used to all the HA coding things (and partially python itself). that basically means, an update regarding bluetooth configuration or HACS will very likely not be done by me in the near future, but its still on my table. feel free to start something yourself and open a PR, if you are able to do so. 😉

I'm sure I'm being a bit dumb with the manual install, I get: "Platform error notify.divoom - Integration 'divoom' not found." It's just copying the files to \config\custom_components\divoom and writing the conf right?

yes exactly. if something goes wrong while initiating the whole component, it will not be available (which the error message states). look into your logs for the reason. very likely the media-directory is missing or it has problems with bluetooth.

d03n3rfr1tz3 avatar Feb 10 '23 13:02 d03n3rfr1tz3

Well, as I said, I was being dumb. I didn't copy the "root" folder, but the hass-divoom-main that's in the zip, into the divoom folder in custom_components. I post it here for my own shame :) Other tricks for dummies like me:

  • I didn't configure bluetooth like in the readme, I just followed the new bluetooth integration and got the mac from my phone's connection properties.
  • To test if it's really working, I used the "developer tools" page and "services" tab, and selected the notification service I put in the configuration.yaml (don't forget :))
  • Now I'm trying to get it to show a gif, but I keep getting a "ERROR (SyncWorker_1) [custom_components.divoom.notify] Service call needs a message type". I'll repost it I get to fix it :) Thanks again for the code!

luisdomg avatar Feb 25 '23 15:02 luisdomg

Second part, I got to not getting an error in the log by switching to YAML mode and this code:

service: notify.mi_divoom
data:
  message: ""
  data:
    mode: 'image'
    file: 'giphy.gif'

(mi_divoom is the name you put in the configuration.yaml) alas, a charging icon appears and then the screen goes blank. Stay tuned!

(for reference, if it helps you, the clock call is like this: service: notify.mi_divoom

data:
  message: ''
  data:
    mode: 'clock'
    clock: 1
    weather: 0
    temp: 0
    calendar: 0

)

luisdomg avatar Feb 25 '23 16:02 luisdomg

Second part, I got to not getting an error in the log by switching to YAML mode and this code:

service: notify.mi_divoom
data:
  message: ""
  data:
    mode: 'image'
    file: 'giphy.gif'

(mi_divoom is the name you put in the configuration.yaml) alas, a charging icon appears and then the screen goes blank. Stay tuned!

Hi, Did you get this to work? I just got my Pixoo yesterday and got some of the service calls from Home Assistant working, like the clock, color, visualization, screen off etc, but I couldn't get it to show any custom gifs.

mattituo avatar May 09 '23 07:05 mattituo

No, didn't get to put an image either. If someone has a file that works, it would be very nice!

luisdomg avatar May 09 '23 17:05 luisdomg

-- As a new issue, this should be brought to a new thread. --

Configuration.yaml


notify:
  - name: pixoo
    platform: divoom
    mac: "11:75:58:5E:D5:D7"
    device_type: "pixoo"
    media_directory: "pixelart"

script:
    pixoo_night_light:
        alias: pixoo night light
        icon: mdi:wall-sconce-flat-variant
        sequence:
          service: notify.pixoo
          data:
            data:
              mode: light
              brightness: 75
              color:
                - 0
                - 250
                - 250
            message: pixoo night light

    pixoo_phone_full_battery:
        alias: pixoo phone full battery
        icon: mdi:battery-charging-100
        sequence:
          - service: script.pixoo_night_light
          - service: notify.pixoo
            data:
              message: low battery
              data:
                mode: image
                file: phone-full-bat.gif
  1. I have to trigger a solid color first to guarantee that the gif service call
  2. don't forget the nested data: data:. confusing to read, but the quick explanation is the first 'data' is the service call and the 2nd is the payload to the device
  3. my media_directory is set to /pixelart. A folder that lives as a sibling to other folders like www, logs, custom_components, ect.
  4. make sure your gif is the same resolution as your screen. Example, i have the 16 x 16 pixel version so my .gif should match the pixel grid

wchorski avatar May 10 '23 15:05 wchorski

As some might already have noticed:
Installation through HACS is possible now. We also have UI configuration and auto-discovery now.

Currently we are not in the list of default repositories for HACS (the PR for that is open since nearly a month now), but still this button, which is also in the readme, works:

Open your Home Assistant instance and open a repository inside the Home Assistant Community Store.

d03n3rfr1tz3 avatar Apr 28 '24 13:04 d03n3rfr1tz3