8000 GitHub - 3ative/meteor-modules: Keep those "Meteor" Modules Synced
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

3ative/meteor-modules

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 

Repository files navigation

Controlling "Meteor" Modules, Timings and adding "Effects"

Link(s) and Full ESPHome (D1 Mini) Code:

  • AilExpr 80C1 ess Link for the Modules Modules used: "Blue 58mm"
  • YouTube Tutorial
  • Copy & Paste in to your Device - Enjoy 💖
substitutions:
  name: Meteor # For Component Names - Capitals allowed

esphome:
  name: light-meteors

esp8266:
  board: d1_mini

logger:
  logs:
    ## Stop Spamming the Logs
    component: none
    switch: NONE
api:
ota:
  platform: esphome

wifi:
  ssid: !secret wifi_ssid
  password: !secret wifi_password

number:
# "Sliders" Used for Timing and Fine Tuning
  - platform: template
    name: $name Timing Delay
    id: main_delay
    min_value: 200
    max_value: 2000
    step: 50
    optimistic: True
    initial_value: 800

  - platform: template
    name: $name Timing Ofset
    id: main_ofset
    min_value: 0
    max_value: 200
    step: 10
    optimistic: True
    initial_value: 0

switch:
# Switches (Templated) For the "Effects" On/Off
  - platform: template
    name: $name Set1 Synced
    id: meteor_sync
    optimistic: true
    on_turn_on:
      - script.execute: synced
    on_turn_off:
      - script.stop: synced      # Stop the "synced" Script
      - script.execute: all_off  # Turn the Modules' GPIOs off

  - platform: template
    name: $name Set2 Cascade
    id: meteor_casc
    optimistic: true
    on_turn_on:
      - script.execute: casc
    on_turn_off:
      - script.stop: casc       # Stop the "cacs" Script
      - script.execute: all_off # Turn the Modules' GPIOs  off

# Switches (GPIOs) For the Meteor Modules
  - platform: gpio
    id: meteor1
    pin: D5
  - platform: gpio
    id: meteor2
    pin: D6
  - platform: gpio
    id: meteor3
    pin: D7

script:
# "synced" Turns all Modules On/Off at the same time
  - id: synced
    then:
      - while:
          condition:
            switch.is_on: meteor_sync
          then:
            - switch.turn_on: meteor1
            - switch.turn_on: meteor2
            - switch.turn_on: meteor3
            
            - delay: !lambda  return id(main_delay).state - id(main_ofset).state;
            
            - switch.turn_off: meteor1
            - switch.turn_off: meteor2
            - switch.turn_off: meteor3

# "casc" Turns Modules On/Off in Sequence: 1-2-3
  - id: casc
    then:
      - while:
          condition:
            switch.is_on: meteor_casc
          then:
            - switch.turn_on: meteor1
            - delay: !lambda  return id(main_delay).state - id(main_ofset).state;
            - switch.turn_off: meteor1
            
            - switch.turn_on: meteor2
            - delay: !lambda  return id(main_delay).state - id(main_ofset).state;
            - switch.turn_off: meteor2
            
            - switch.turn_on: meteor3
            - delay: !lambda  return id(main_delay).state - id(main_ofset).state;
            - switch.turn_off: meteor3

# "all_off" Turns Off all (swtiches) for the Modules
  - id: all_off
    then:
      - switch.turn_off: meteor1
      - switch.turn_off: meteor2
      - switch.turn_off: meteor3

🤝 Found this useful, want to say 'Thanks' and support my efforts. CHEERS🍺

Buy me a Coffee PATREON
Buy Me A Coffee Patreon

About

Keep those "Meteor" Modules Synced

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published
0