-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Site issue] Shelly Plus Plug S Template #1740
Comments
Based on the first example I made this berry script to display relay state on two leds and energy level on the other two
As above saved as autoexec.be |
what the hell is a berry script or autoexec.be? |
The second script from MASHtm is great. But when you turn it off, only one side of the LED ring lights up. Can you adjust the config so that the red LEDs also completely illuminate the ring? Problem: The green LED ring lights up completely with a delay! Do you have an idea ? Thank you ^^ |
One half of "the ring"... basically two of the four LEDs show the power consumption. 0W is green ..orange .. 2500W is red. This is also the reason for the delay because the color is only updated when the event handler is called. Since only the other two LEDs show the "power relay state" only those turn red if power is off. And it works as designed so far;-) |
Hi guys, I have a question since I'm not familiar at all with Tasmota and even less with berry scripts: I wanted to actually flash ESPHome on my Shelly plug plus s because I'm familiar with that but realized there is now a safeboot mode or something like that that will prevent me from running ESPHome after a reboot (?)... or risk to soft-brick the device which probably means having to open it up and flash it with serial anyway. So I guess I'll just have to stick to Tasmota for now: is there any way to expose the LEDs directly to Home Assistant through berry scripting? What do I want to achieve with this? I want to use the LEDs to show in which tariff I am currently in (low or normal) but following the ton of rules I have already set up for all my other lights in the house (for example by setting brightness depending on either lux values from other sensors or time of day / season of the year, that kind of stuff). So: is exposing the LEDs as a controllable LED to HA possible? For other newcomers: this is the documentation on how to control the LEDs: https://tasmota.github.io/docs/Berry_Addressable-LED/#led-strips-matrix-and-sub-strips and you can control the brightness of the LEDs by passing on a third parameter to |
Hi! Thanks for sharing, but unfortunately I can't work with the two templates. Simply copy/paste does not work, I get the following error message: "BRY: Exception> 'value_error' - invalid GPIO number stack traceback:
Sorry I'm not an expert, but I was just hoping to get the LEDs on my Shelly Plus Plug S to light up without having to spend days learning the programming and syntax... What am I doing wrong? I suspect that in the lines "#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))" I must enter something else. What? An example would be helpful. Only "25" and "26" hasn't worked so far or I've made another syntax error in the process. And one more question: Does the line "{"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,0,4736,0,0,0,0,0,0], "FLAG":0, "BASE":1}" belong to the template? Do I have to execute it first? Adapted to the name of my device in the network? Do I have to integrate it later in the autoexec.be? And once it works in the console... As I understand it, I then have to make an "autoexec.be" out of it and place it under "Manage File System" so that it is in the autostart. Right? |
Shot in the dark: Looks like the template (see first post) is not configured (Settings -> Other Settings -> Template) |
Thx, that was it! One have to do this first: https://templates.blakadder.com/howto.html |
how can I change this script to implement overall brightness control ? |
You can try to append the brightness (as percentage) after the color. myLeds1.set_pixel_color(1,0xCC0000,50) |
I'm trying to install some sensors in the Shelly Plus plug S. Do you guys know where I can get the real pinout in relation to the template and the pins function? Like a picture pointing to which Gpio is which. |
I have to switch the "1" and the "2" next to "WS2812" at GPIO 24 and 25 in order for it to work (to control all 4 LEDs within the Web UI, otherwise only 2 LEDs are controlled). Then the button switches only the light and not the relay, so I have to change the button to Switch and use "SwitchMode 4" with an easy "Rule1 ON Switch1#Action=TOGGLE DO Power1 TOGGLE ENDON". All this only works as long as the plug is connected to power. When it is unplugged and replugged. Is there anything you have done differently @gru-github? |
I hope someone answers... even if no one seems to be interested. |
Usually it's the missing template or a wrong one. |
It seems that after upgrading from 13.4.0 to 14.3.0, only the LEDs on GPIO 25 still work. |
Same problem here with 14.3.0. Neither with GPIO24 as Led1 nor with any other combination it worked. (see https://tasmota.github.io/docs/Berry_Addressable-LED/ => Scheme 14, Found a workaround:
Using WS2812_2 and WS2812_3 instead. So initializing the LED objects becomes:
My full autoexec.be:
This turns on the whole ring @ red, 50% intensity. Sidenote for the NTC:
gives equal results compared the original firmware (tested in a temperature chamber over a range of 10°C - 50°C to account for equality). |
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
The text was updated successfully, but these errors were encountered: