Led lightstrip as indicator - ideas

Hi,

I’m prepping for my led strip install, following fantastic BRUH tutorial https://github.com/bruhautomation/ESP-MQTT-JSON-Digital-LEDs.

But I would like my strip to be not only good looking, but also “informative”. Some of the examples I came up with:

  • color of the animation can indicate the temperature outside
  • some section of my led strip can indicate if my alarm is enabled at my basement
  • lights can blink if anybody opens the door, or presence is detected

Notifications may be by color, particular animation, speed animation, or just some sections of led strip would “mean” something.

Now, I’d like to call out to you fellow automaters, what would you add to this list?
Or maybe do you see some important usability issues that I missed and can make this whole idea terrible?

I’ve done this using a NodeMCU and an LED strip. I’ve extended the concept with a PIR for motion detection and an IR blaster to control a nearby A/V receiver.

When the PIR senses motion, the strip updates with a colour depending on the weather from DarkSky. It also has a night-light mode, and a blinking red mode so it looks like a security sensor when there is no one home.

- alias: Weather light
  trigger:
    - platform: state
      entity_id: binary_sensor.bookcase_pir
      to: 'on'
  action:
    - service: mqtt.publish
      data:
        topic: "bookcase/strip/set"
        qos: 1
        retain: true
        payload_template: >-
          {%- if is_state("sensor.dark_sky_icon", "snow") -%}
            {'state': 'ON', 'effect': 'glitter', 'color': {'r': 255, 'g': 255, 'b': 150}, 'brightness': 255}
          {%- elif is_state("sensor.dark_sky_icon", "sleet") -%}
            {'state': 'ON', 'effect': 'glitter', 'color': {'r': 192, 'g': 192, 'b': 255}, 'brightness': 255}
          {%- elif is_state("sensor.dark_sky_icon", "rain")  -%}
            {'state': 'ON', 'effect': 'glitter', 'color': {'r': 64, 'g': 64, 'b': 255}, 'brightness': 255}
          {%- elif is_state("sensor.dark_sky_icon", "fog")  -%}
            {'state': 'ON', 'effect': 'glitter', 'color': {'r': 128, 'g': 255, 'b': 64}, 'brightness': 255}
          {%- elif is_state("sensor.dark_sky_icon", "clear-day") or is_state("sensor.dark_sky_icon", "clear-night") -%}
            {'state': 'ON', 'effect': 'glitter', 'color': {'r': 255, 'g': 150, 'b': 16}, 'brightness': 255}
          {%- else -%}
            {'state': 'ON', 'effect': 'glitter', 'color': {'r': 255, 'g': 0, 'b': 255}, 'brightness': 255}
          {%- endif -%}

The only usability issue is that if you make the patterns too complicated people will have a hard time remembering their meanings.

2 Likes

This is excellent, I like the idea of using DarkSky prediction.

I was also thinking about night light, and was planning on using NodeMCU. For motion detection I’ll use motion sensors from already existing alarm system.

I was also thinking about adding photocell to get some info about light in the room (can’t control all the lights
in the room).

What automations do you have for IR Blaster?
Also, do you have any other ideas that you haven’t realized but are planning to?
I’m fishing for ideas here :slight_smile:

Have you done any more with this?

I have made and installed a 60’ cove light with rgb LEDs and have been thinking along similar lines. I love the idea of conveying basic information with it, after all it is a 1 dimensional screen. I was thinking about having it mimic sky color and dim with the sunset/sunrise.

I like the idea of conveying basic subway or traffic information too.

Whereas I have the whole thing working perfectly with homeassistant, I haven’t a clue where to start programming it…

I haven’t realized the idea yet, but it’s my plan for coming weeks.

One other idea for notification is to have it remind me that my door is unlocked - slow blinking or sthing.

Idea about programming it can be taken from excellend BRUH Automation tutorial on leds: https://github.com/bruhautomation/ESP-MQTT-JSON-Digital-LEDs

1 Like

Hi All,
I loved this idea and have an LED lightstrip over a closet/shrank in out bedroom. I’m trying to change color in AM, and cannot get my head around template.

#### Configuration.yaml
  - platform: flux_led
    devices:
      xxx.xxx.xxx.174:          #Magichome wifi controller/Master Bedroom Closet Lights
        name: B2MBR-LED
        mode: "rgb"

Automation (not working yet)

- id: Motion in BR  # Weekends
  alias: 'Motion in BR'
  trigger:
    platform: state
    entity_id: binary_sensor.fibaro_system_fgms001zw5_motion_sensor_sensor_2
    to: 'on'
  condition:
    - condition: time
      after: '08:29:00'
      before: '21:30:00'
    - condition: time
      weekday:
        - sat
        - sun
  action:
    - service: light.turn_on
      entity_id: 
        - light.b2mbrled
      data_template: >-
          {%- if is_state("sensor.dark_sky_icon", "snow") -%}
            {'state': 'ON', 'color': {'r': 255, 'g': 255, 'b': 150}, 'brightness': 255}
          {%- elif is_state("sensor.dark_sky_icon", "partly-cloud-day") -%}
            {'state': 'ON', 'color': {'r': 192, 'g': 192, 'b': 255}, 'brightness': 255}
          {%- elif is_state("sensor.dark_sky_icon", "rain")  -%}
            {'state': 'ON', 'color': {'r': 64, 'g': 64, 'b': 255}, 'brightness': 255}
          {%- elif is_state("sensor.dark_sky_icon", "fog")  -%}
            {'state': 'ON', 'color': {'r': 128, 'g': 255, 'b': 64}, 'brightness': 255}
          {%- elif is_state("sensor.dark_sky_icon", "clear-day") or is_state("sensor.dark_sky_icon", "clear-night") -%}
            {'state': 'ON', 'color': {'r': 255, 'g': 150, 'b': 16}, 'brightness': 255}
          {%- else -%}
            {'state': 'ON', 'color': {'r': 255, 'g': 0, 'b': 255}, 'brightness': 255}
          {%- endif -%}

Any help is appreciated.

~Bryan

I don’t think the normal light uses STATE ON that would be for the mqtt light, so yours would have to use the normal light template so for the brightness some thing like this…

    brightness_pct: >-
      {%- if states.sensor.dark_sky_cloud_coverage.state | int >= 80 %}
        75
      {%- elif states.sensor.dark_sky_cloud_coverage.state | int >= 60 %}
        50
      {%- elif states.sensor.dark_sky_cloud_coverage.state | int >= 40 %}
        30
      {%- endif %}       

For the color it would be something similar…

Hope that helps :slight_smile:

Thank you @keithh666.
I was able to finally get results I wanted.
Basically, I learned a few things: I was initially passing a tuple back, when a string was expected. So by converting to string colors, I was able to get the automation working.

Here is how I accomplished changing the LED colors based on dark_sky icon. Bit of a hack, but at least it is functioning.

BTW, I liked your light globe. Looks cool.

- service: homeassistant.turn_on
  data_template:
    entity_id: light.b2mbrled
    brightness: 255 
    color_name: >-
      {% if is_state("sensor.dark_sky_icon", "snow") %}
        orange
      {% elif is_state("sensor.dark_sky_icon", "partly-cloud-day") %}
        yellow
      {% elif is_state("sensor.dark_sky_icon", "rain") %}
        blue
      {% else %}
        white
      {% endif %}  

~Bryan

2 Likes