No video

How to use scripting in Shelly?

  Рет қаралды 33,088

Csongor Varga

Csongor Varga

Күн бұрын

Пікірлер: 33
@andreibabulevich4454
@andreibabulevich4454 3 ай бұрын
Thank you for this great video, Shelly should quote it in their tutorial!
@jameskelly1557
@jameskelly1557 9 ай бұрын
Thanks csongor, I have no experience with scripting at all but managed to use your video and salvage some of your code to write a simple script for my shelly plus 1, all my script does is to turn off the relay if the button has been pushed 5 times. i spent DAYS trawling the net for some really basic examples that i could use and turned up nothing! i spent 3 hours with your video and with trial and error came up with 10 lines of code that do the job! so Thank you very much for taking the time to make this video. I feel like 10 years ago, people were more enthusiastic about sharing simple tutorials like this, without people like you, the internet would become a money grabbing insta shit show!! well done you!
@csongorvarga
@csongorvarga 9 ай бұрын
This is great. I am thinking about how I would do it, but I have no idea. But you did it :)
@Chrom35kull
@Chrom35kull 2 жыл бұрын
Thank you for the video, looking at your scripts has made it easier in my head to start writing up a script on my Shelly 4PM to control the warehouse lighting. I plan to add a Shelly motion sensor literally for its LUX sensor and have the 4PM only allow the lights to be on when the light level is low.
@macthaidhg
@macthaidhg 2 жыл бұрын
This is a very nice introduction to scripting in shellys, something that is not widely covered on YT. I just purchased a Shelly 4PM and I'd like to write a simple script whereby one switch down makes another switch up (and vice versa). I'm not a programmer so any pointers would be appreciated! I usually do this kind of stuff in home assistant but for this installation it needs to be on the device.
@chrispaul7890
@chrispaul7890 2 жыл бұрын
Wow. Csongor. Your how to video was very well done and very clear. Thank you! BTW: 0.9.1 is the current version (as of 12/9/2021) if you update your Plus1.
@florintrenca
@florintrenca 9 ай бұрын
Salutare, Oare se poate creea un sistem de comandă și control pentru încălzirea în pardoseală, independent de internet, folosind shellly rgbw2 pentru controlul a 4 zone separate și un releu dry contact de la shelly pentru a porni centrala? Prin protocolul Device to device communication pot face un shelly h&t să trimită o comandă de pornire la un canal din cele 4 existente la rgbw2, dar problema pe care o întâmpin este cum pot comanda in același timp si dry contact pt comandă centrală, in același timp ținând cont si de celelate zone care sunt controlate fiecare in parte de un termostat shelly. Mulțumesc.
@joker_g7337
@joker_g7337 Ай бұрын
This is the tutorial to Shelly's documentation.
@Usefulhacksfreeofcharge
@Usefulhacksfreeofcharge Жыл бұрын
Hello, I do not know how to continue..... I would like to achieve that when the humidity outside is lower than in the garage, that one shelly plus 1 pm is switched on, so that the fan starts. Apparently this is only possible with two shelly, two addon and scripting. Do you know who can help me? I do not have Home-Assistant and neither Scripting skills.
@claudiogi5263
@claudiogi5263 2 жыл бұрын
Thanks for your script movie, but I don't understand much about it. I would like to know if it is possible with a script to enable the cloud only for a few hours of the day, so if it needs to act for example on an active scene. Thank you! Claudio Gi
@iliobenigni1388
@iliobenigni1388 10 ай бұрын
hi, I would simply like to lengthen the time in ms for the long press of the shelly 1 plus. can anyone help me?
@matic1982
@matic1982 7 ай бұрын
Hey! Great video! I wonder how I could use Event handler script and use it for two separate buttons on a single Shelly device. Event in this video is triggered by both of the inputs the same way. I would like to separate them.
@csongorvarga
@csongorvarga 6 ай бұрын
Uh, it was a long time I did this, but you can tell from the event which button was pressed. But it does trigger the same event.
@unionse7en
@unionse7en 2 ай бұрын
Can deep sleep be implemented? (Shelly Uni +)
@Rajo1012
@Rajo1012 Жыл бұрын
@Csongor Varga , can you tell me if I can upload code to a shelly device and let it run on the device, as opposed to running code on a PC and sending commands over WIFI? I want open and close a switch to a power supply at certain times throughout the night and do not want to run a WIFI network during the night. The use case is to have a window opening and closing automatically at times whiich I to specify, e.g.: 9:59 pm --> close window; 10:01 pm --> open window (And yes, I want to keep the air fresh and also avoid a predictable noise at the full hour, every hour) I was looking at the "Shelly Plus 2PM" which generally would suite the purpose, but I dont know I the code can be uploaded to the device itself. If not, would anyone know of an alternative?
@csongorvarga
@csongorvarga Жыл бұрын
Scripting is a code that runs on the device. So it will definitely stored and runs on the device. But the simple schedules that you set in the settings are also stored in the device memory. So both of those work without the cloud. In these cases cloud is only used to access the device from your phone. One note: these small Shelly devices do not have an internal clock battery. Therefore in case of a power outage the clock resets to 00:00. They sync their clock from the internet. So if your power goes out and the internet is down as well, the clock of the Shelly will not be set correctly.
@Rajo1012
@Rajo1012 Жыл бұрын
@@csongorvarga Thank you for this info. Ideally I would like to use a device which is programmed/accessed via cable (eg via USB). I assume the Shelly Plus 2PM is constantly advertising its WIFI access point, therefore there is constantly a 2.4 GHz WIFI signal send. I would like to avoid WIFI pollution in my space. Would you happen to know of an alternative device, which can be accessed for script upload via a cable?
@csongorvarga
@csongorvarga Жыл бұрын
@@Rajo1012 Not really. There are a few Shelly Pro devices that have wires eithernet connection as well. That would be my only tip.
@Rajo1012
@Rajo1012 Жыл бұрын
@@csongorvarga Thanks
@nunomcp
@nunomcp Жыл бұрын
Great video! Do you know how to put credentials for authentication in the url? I need the authentication enable...
@markrichards3910
@markrichards3910 Жыл бұрын
Is it possible to Script something to read temperature values off Shelly Uni to create a “if sensor 0 is less than sensor 1” turn off relay ?
@csongorvarga
@csongorvarga Жыл бұрын
Yes probably. But I have not explored how to read other sensor much. But you could make a HTTP call to the uni and read the temperature from the result.
@iliobenigni1388
@iliobenigni1388 10 ай бұрын
This video is really interesting. I'm trying to modify the ms to start the longpush on the new shelly 1, in the old one it was possible to modify it, do you have any advice?
@terryshaw2162
@terryshaw2162 2 жыл бұрын
Is it possible to have a script that takes the app button press and makes the relay pulse on and then off. Need this for a particular application that needs a relay pulsed input for on / off operation.
@csongorvarga
@csongorvarga 2 жыл бұрын
Yes, but you don't even need a script for that. Just set the auto-off delay on the output.
@terryshaw2162
@terryshaw2162 2 жыл бұрын
Thank you!
@terryshaw2162
@terryshaw2162 2 жыл бұрын
The application here is an aircon unit and the auto off works to a point. Obviously the downside is that the switch always shows as off, when the unit may be on, and turning the unit off with the app (or with google) doesn't work. I have created a routine in google that "remaps" turn the aircon off" to a switch on operation. But I have no real way of knowing if the unit is on or off. The aircon unit does have an output relay that provides operation status (closed = on, open = off). I tried connecting this to the Shelly Plus 1's switch input and set the switch to detached to see if that would give me any indication of on/off status, but it doesn't seem to. Any advice on how I could integrate this output relay into the Shelly to provide on/off status?
@csongorvarga
@csongorvarga 2 жыл бұрын
@@terryshaw2162 That is a good question, but I have no idea either. The only other hint is the unit is on or not, is to monitor the power consumption to tell if it is running or only in standby mode.
@terryshaw2162
@terryshaw2162 2 жыл бұрын
@@csongorvarga I am thinking I use a 2nd Shelly with the aircon output relay connected to its switch input, and the switch set to toggle, but nothing connected to the relay of this Shelly. Then call this Shelly "AC Status" or something like that.
@Manish-fm5iv
@Manish-fm5iv 2 жыл бұрын
Does it support sockets?
@csongorvarga
@csongorvarga 2 жыл бұрын
This is available in the new Plus line of devices. There is no Plus socket...yet.
@Manish-fm5iv
@Manish-fm5iv 2 жыл бұрын
@@csongorvarga Thanks for responding. Apologies I should have been clearer, I meant in regards to NodeJS something like this: var net = require('net'); var client = new net.Socket(); I guess this is lower than HTTP. I did look around the docs but could not find anything. Would have been nice to avoid spinning up a little server just to send a packet. Never the less I think what Shelly are doing is really awesome and hope they expand on JS/Node feature support.
@stefanlodders9521
@stefanlodders9521 10 ай бұрын
When starting a script with "url/rps/Script.Start?Id=1", can I pass an argument (like temperature?) and how would I use it in the started script?
Automating My Life with Python: The Ultimate Guide | Code With Me
11:26
Shelly Scripting - Erste Schritte mit mJS auf dem Shelly Pro 4 PM
22:24
WHO CAN RUN FASTER?
00:23
Zhong
Рет қаралды 46 МЛН
The Giant sleep in the town 👹🛏️🏡
00:24
Construction Site
Рет қаралды 20 МЛН
WILL IT BURST?
00:31
Natan por Aí
Рет қаралды 28 МЛН
How ChatGPT Built My App in Minutes 🤯
8:28
Website Learners
Рет қаралды 2,3 МЛН
Shelly scenes - how to create basic automations
6:38
ShellyGuide
Рет қаралды 2,3 М.
Tank Water Level  Sensor Part 2 and Shelly Uni review
8:32
Simon Says Home Assistant
Рет қаралды 18 М.
Shelly 3EM Installation
26:51
Jimmy James
Рет қаралды 122 М.
Shelly Plus was made for DIY automation
14:31
NotEnoughTECH
Рет қаралды 51 М.
How to Document Your Code Like a Pro
19:03
ArjanCodes
Рет қаралды 90 М.
WHO CAN RUN FASTER?
00:23
Zhong
Рет қаралды 46 МЛН