Jump to content
Gen2 Devices: FW Update Required / Gen2 Geräte: FW-Update erforderlich ×

Circadian light with Shelly RGBW


Recommended Posts

Hello everyone,

I am new to the forum, I use 20-30 Shelly 1PM, 2.5 devices and I am considering getting a Shelly RGBW.

Is there a solution for circadian lighting with Shelly RGWB?

Thanks in advance for any advice!

 

Link to comment
Share on other sites

  • 5 weeks later...

Hi, I use many Shelly RGWB2 devices for this. Sometimes 1 light (cold and warm channels), sometimes 2 lights per device.

Shelly FW does not support it, so I use ESPHome, Home Assistant and Circadial Lightning plugin.

substitutions:
  device_name: hall-light
  human_name: Hall Light

<<: !include common/network_base.yml

esphome:
  name: ${device_name}
  platform: ESP8266
  board: esp01_1m

light:
  - platform: cwww
    id: light_1
    name: $human_name
    cold_white: output_green
    warm_white: output_red
    cold_white_color_temperature: 9000 K
    warm_white_color_temperature: 2300 K
    default_transition_length: 100ms

  - platform: cwww
    id: light_2
    name: $human_name 2
    cold_white: output_blue
    warm_white: output_white
    cold_white_color_temperature: 9000 K
    warm_white_color_temperature: 2300 K
    default_transition_length: 100ms

binary_sensor:
  - platform: gpio
    pin: 5 # Switch input
    name: $device_name Button entrace
    on_press:
      then:
        - light.toggle: light_1
    on_multi_click: &turn_off_all_lights
      - timing:
          - ON for at least 2s
        then:
          - logger.log: "Long press"
          - homeassistant.service:
              service: light.turn_off
              data:
                entity_id: all

  - platform: gpio
    pin:
      number: 0
      mode: INPUT_PULLUP
      inverted: true
    name: $device_name Button bedroom
    on_press:
      then:
        - light.toggle: light_2
    on_multi_click: *turn_off_all_lights

  - platform: gpio
    pin:
      number: 3 # RX
      mode: INPUT_PULLUP
      inverted: true
    name: $device_name Button bathroom
    on_press:
      then:
        - if:
            condition:
              - light.is_on: light_1
              - light.is_on: light_2
            then:
              - light.turn_off: light_1
              - light.turn_off: light_2
            else:
              - light.turn_on: light_1
              - light.turn_on: light_2

output:
  - platform: esp8266_pwm
    pin: GPIO12
    frequency: 1000 Hz
    id: output_red

  - platform: esp8266_pwm
    pin: GPIO15
    frequency: 1000 Hz
    id: output_green

  - platform: esp8266_pwm
    pin: GPIO14
    frequency: 1000 Hz
    id: output_blue

  - platform: esp8266_pwm
    pin: GPIO4
    frequency: 1000 Hz
    id: output_white

 

  • Like 1
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...