Homatics LEDs addon

@frodo19 @p750mmx

Last option in list is for purple without kit mode … Straight purple…

Maybe I add more colours in service add-on later…

1 Like

Thanks, I played with @vpeter addon, and made a simple version, with just one led.
Disable then enable the addon, in addon settings after change the color.
thanks FoLeY and vpeter…
Write if wrong anything there.
Added magenta, orange, deepblue, improved yellow.

download simple leds addon

1 Like

I will “update” my service led addon in next days to add option to set the effect or just set the straight color. And to set custom colors for on, suspend and shutdown state. But need to find time.

3 Likes

Thanks, please made simple “one led” option too…

Or rather the middle two… :slightly_smiling_face:

Nice icon , Frodo… I like it … Can I use it ?

Feel free to use…

1 Like

With so many LEDs there must be knight rider :innocent:

5 Likes

@vpeter cool :slightly_smiling_face:
Will be customizable?

There is 10 RGB LEDs which can be controlled individually. Video above was produced by a simple shell script which does turn on and off correct LED.

3 Likes
#!/bin/bash

LEDS_COUNT=10
COLOR='ff0000'
DELAY=90000

leds_clear=()
for i in $(seq 1 $LEDS_COUNT); do
  leds_clear+=('000000')
done

cd /sys/devices/platform/soc/fe000000.apb4/fe06c000.i2c/i2c-3/3-003c/leds/bct3236
echo "${leds_clear[@]}" >colors
echo 4 >brightness

function ctrl_c() {
  echo $(awk '/edge on/ {print $3}' colors) >edge_color_on
  echo 1 >brightness
  exit
}

trap ctrl_c INT

turn_led_on() {
  leds_out=("${leds_clear[@]}")
  leds_out[$1]="${COLOR}"
  echo "${leds_out[@]}" >colors
}

while true; do
  # to right
  for i in $(seq 0 1 $(($LEDS_COUNT - 1))); do
    turn_led_on $i
    usleep ${DELAY}
  done

  usleep ${DELAY}

  # to left
  for i in $(seq $(($LEDS_COUNT - 1)) -1 0); do
    turn_led_on $i
    usleep ${DELAY}
  done

  usleep ${DELAY}
done

Save it to file and run it from terminal.

chmod +x homatics_knight_rider.sh
./homatics_knight_rider.sh
2 Likes

@vpeter Thanks. Would be nice to use just for boot lighting.
Its possible?

LEDs are turned on from the driver in kernel and this happens very early. To run some script (like in this case) it would happen much later and you will not get exactly the result you want: you would see few seconds blue color and then the knight rider effect. And effect must be turned on when kodi starts or little later.

So no, not possible. I could add this effect into driver itself but to me looks like overkill :smiley:

1 Like

Thanks @vpeter How to set the suspend color? Mine stay as the powered color. Power off state 000000 is ok.

I think I missed this part. Can’t currently do any testing but I made some changes.

Thanks, but no changes in suspend. Other parts ok

I didn’t bump linux version in the image. Please test again with tomorrow nightly.

Update: Still not ok after resume. Addon needs some more love :slight_smile:

1 Like

@vpeter I like the addon, so I will add bit more…:slight_smile:

Addon updated on first post.

I did some different tests and it works as what I intended.

2 Likes

That works now in suspend too, thanks :sunglasses::+1:

1 Like

This topic was automatically closed 91 days after the last reply. New replies are no longer allowed.