Skip to content

[Site issue] Shelly Plus Plug S Template #1740

Closed
@geru-github

Description

@geru-github

Shelly Plus Plug S has four WS2812 LEDs in the outer ring.
This template for both LED Strings (each with two WS2812) on GPIO 25 (left half) and 26 Right half) works for me:
{"NAME":"Shelly Plus Plug S","GPIO":[0,0,0,0,224,0,32,2720,0,0,0,0,0,0,0,2624,0,0,2656,0,544,1376,1377,0,0,0,0,0,0,4736,0,0,0,0,0,0],"FLAG":0,"BASE":1}
Berry scripting in autoexec.be

#Index myLeds1 & 2 via Gpio 25,26, Berry index is 0 and 1
myLeds1 = Leds(2,gpio.pin(gpio.WS2812, 0)) 
myLeds2 = Leds(2,gpio.pin(gpio.WS2812, 1))
#Color after boot
myLeds1.set_pixel_color(0,0xff0000)
myLeds1.set_pixel_color(1,0xff00ff)
myLeds2.set_pixel_color(0,0x00ff00)
myLeds2.set_pixel_color(1,0x00ffff)
myLeds1.show()
myLeds2.show()
#method for accessing both strings via RULES
def ledsColor(cmd, idx, payload, payload_json)
  var myColor=int(payload)
  myLeds1.set_pixel_color(0,myColor)
  myLeds1.set_pixel_color(1,myColor)
  myLeds2.set_pixel_color(0,myColor)
  myLeds2.set_pixel_color(1,myColor)
  myLeds1.show()
  myLeds2.show()
  tasmota.resp_cmnd_done()
end
#create new RULES command "LedsColor". Example all Leds to white :
#LedsColor 0xffffff
tasmota.add_cmd('LedsColor', ledsColor)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions