Examples for Shelly Scripts for Gen2 Shelly devices

Overview

Shelly Script Examples

This project contains example Shelly Script solutions.

Initial support for Shelly Script comes with firmware version 0.9, September 2021 for Gen2 Shellies based on ESP32.

Changelog

2021-09

Added

  • Shelly Scripts demonstrating different script or device capabilities
  • tools/put_script.py for uploading scripts from the command line.
Comments
  • mqtt-discovery update never arrives

    mqtt-discovery update never arrives

    With Shelly1 Plus firmware 0.10.3, using mqtt-discovery.js and commands works through mqtt, but status never arrives about changed state.

    Replaced

    Shelly.addEventHandler(function (ev_data) { ...

    block to

    Shelly.addStatusHandler(function (notification) { ...

    from mqtt-switch-status.js and now status reporting works finally.

    opened by enesbcs 1
  • Mutliple actions switch example

    Mutliple actions switch example

    The goal of this pull request is to add two example which performs simple and double press actions on a switch instead of a button. This behaviour can be achieved in the UI for a button but not for a switch as far as I know. The double-press-double-switch script has too a special case when the two button are press simultaneously.

    opened by Letreguilly 0
  • router-watchdog.js not working

    router-watchdog.js not working

    Hello, I am trying to use router-watchdog to ping local web server (Home Assistant in this case). My knowledge of js/C/C++ is very limited...

    First issue: Error code of unresponding server I am getting is -104, not -114 as in example from library. Wouldn't be better to check if response is anything but 0? Edit: It looks like -114 is for connection refused, -104 is for regular timeout/no response.

    Second issue: Watchdog is not restarted after switch is toggled off and on. I'm trying to figure this one out, but so far no luck. This condition is never true in my testing:

      if (
        event.name === "switch" &&
        event.info.source === "timer" &&
        event.info.output === false
      ) {
    
    opened by NateLogan 0
  • Script Request: iBeacon Scanner

    Script Request: iBeacon Scanner

    Hi, I really appreciate new script and BLE features. I spent many hours to scan / recognize my iBeacon via Shelly. I was not able to find / recognize my iBeacon in scan result. Scan process is running well, I receive many advertisements, but no one seems to match my iBeacon.

    Please, could you add an example, where the uuid from iBeacon is readable in clear text? Usually, the uuid is hex coded, therefore the missing String part in mJS should not influence this task.

    Thank you, in any case for your work.

    opened by gsicilia82 0
  • Add date to GetStatus or add function to get date out of unix timestamp

    Add date to GetStatus or add function to get date out of unix timestamp

    Maybe I am missing something here, but when playing around with Shelly scripting on my Shelly Plus 1PM I cannot find a function to convert the unix timestamp from Sys.getStatus to a date in the YYYYMMDD format. We have the time already, I think we should have a date too. Or alternatively the Date class from Javascript. Need this to send Solar data to the PVOutput API.

    opened by runsnbunsn 0
  • example for operating 2 outputs on a multioutput device at the saem time

    example for operating 2 outputs on a multioutput device at the saem time

    More of a suggestion

    For e.g. a Shelly Pro 2: a script that makes both outputs on or off at the same time no matter what inputs (network, buttons, ...) are used to switch them (without creating a loop that results in a flip-flop) . Making sure there's no possibility to leave it with one output on and the other off.

    Use case: Bathrooms are here are required to switch on and off both the phase and the neutral at the same time.

    A foolproof script would be preferred, a script with just one used as master (and operated) and the other as slave (optionally making its controls inoperative if that could be achieved) could be acceptable as well.

    opened by swa66 3
  • Delay switching off

    Delay switching off

    On the Shelly 1 plus, a script to switch on relay at the first push of the button and at the second push of the button delay the switching off of the relay after 60 seconds. How to do that?

    opened by antatta 1
Owner
ALLTERCO
ALLTERCO
Hemsida för personer i Sverige som kan och vill erbjuda boende till människor på flykt

Getting Started with Create React App This project was bootstrapped with Create React App. Available Scripts In the project directory, you can run: np

null 4 May 3, 2022
Kurs-repo för kursen Webbserver och Databaser

Webbserver och databaser This repository is meant for CME students to access exercises and codealongs that happen throughout the course. I hope you wi

null 14 Jan 3, 2023
HTML5 Canvas Gauge. Tiny implementation of highly configurable gauge using pure JavaScript and HTML5 canvas. No dependencies. Suitable for IoT devices because of minimum code base.

HTML Canvas Gauges v2.1 Installation Documentation Add-Ons Special Thanks License This is tiny implementation of highly configurable gauge using pure

Mykhailo Stadnyk 1.5k Dec 30, 2022
OpenUI5 lets you build enterprise-ready web applications, responsive to all devices, running on almost any browser of your choice.

OpenUI5. Build Once. Run on any device. What is it? OpenUI5 lets you build enterprise-ready web applications, responsive to all devices, running on al

SAP 2.7k Dec 31, 2022
A Javascript library for working with Audio. It provides a consistent API for loading and playing audio on different browsers and devices. Currently supports WebAudio, HTML5 Audio, Cordova / PhoneGap, and a Flash fallback.

SoundJS SoundJS is a library to make working with audio on the web easier. It provides a consistent API for playing audio in different browsers, inclu

CreateJS 4.3k Dec 31, 2022
A simple dashboard to keep track of all your active devices/servers

Slashboard Pulsar A lightweight node js app designed to work with the Slashboard desktop client Built using Node.js Installation Clone this repository

Philippe Négrel-Jerzy 25 Dec 21, 2022
Unofficial API client for the Tidbyt API. Use this client to control Tidbyt devices and integrate with other services.

Tidbyt Client for Node.js Unofficial API client for the Tidbyt API. Use this client to control Tidbyt devices and integrate with other services. Insta

Nicholas Penree 19 Dec 17, 2022
A web panel to manage TP-Link/Kasa smart home devices.

TP-Link Web Panel A web panel to manage TP-Link/Kasa smart home devices. Prerequisites Node.js v16.13.1 or higher Yarn Installation Run git clone http

Milan M 3 Apr 1, 2022
Ios-calculator-js - Calculator made with vanilla javascript and custom css based on the design of iOS devices.

ios-calculator-js This is a practice project in which I try to replicate iOS calculator's both logic and styling. In case you spot room for improvemen

Franco 1 Nov 10, 2021
Easy responsive tabs - is a lightweight jQuery plugin which optimizes normal horizontal or vertical tabs to accordion on multi devices

Easy responsive tabs - is a lightweight jQuery plugin which optimizes normal horizontal or vertical tabs to accordion on multi devices like: web, tablets, Mobile (IPad & IPhone). This plugin adapts the screen size and changes its action accordingly.

Samson Onna 600 Dec 8, 2022
This is a Homebridge plugin that adds HomeKit support to Tidbyt devices.

Tidbyt Platform Plugin This is a Homebridge plugin that adds HomeKit support to Tidbyt devices. Built with node-tidbyt. This project is not endorsed o

Nicholas Penree 18 Nov 20, 2022
Homebridge plugin exposes to Apple's HomeKit devices

This Homebridge plugin exposes to Apple's HomeKit devices (lights, plugs, sensors, switches, ...) and virtual devices on a Crestron professor. Homebridge Crestron communicates with TCP.

null 23 Nov 21, 2022
Um bot feito utilizando a API baileys em WebSocket para o Whatsapp Multi-Devices.

Informação ?? O BaileysBot foi feito utilzando a API Baileys Caso encontre algum BUG, faça um Novo Issue! Requisitos ?? NodeJS Git Instalação ?? Para

null 12 Dec 3, 2022
Nest accessory developed with HAP-NodeJS to allow devices into HomeKit

Nest_accfactory This is a HAP-NodeJS accessory I have developed to allow Nest devices to be used with HomeKit including having support for HomeKit Sec

markh 9 Oct 9, 2022
A JavaScript library for optimizing html pages with video content that prevents videos from loading on mobile devices.

?? js-vido — JavaScript Video Download Optimizer A JavaScript library for optimizing html pages with video content that prevents videos from loading o

Ariel Montes 1 Feb 9, 2021
Provide solutions to make your app flexible for different screen sizes, different devices.

react-native-size-scaling Provide solutions to make your app flexible for different screen sizes, different devices, based on your device's pixel rati

Hoà Phan 33 Dec 23, 2022
Reorderable drag-and-drop lists for modern browsers and touch devices. No jQuery or framework required.

Sortable Sortable is a JavaScript library for reorderable drag-and-drop lists. Demo: http://sortablejs.github.io/Sortable/ Features Supports touch dev

SortableJS 26.1k Jan 5, 2023
Recap let's you recap on your favourite social network videos by downloading them on your devices, from the range of YouTube, SoundCloud, Facebook, Twitter, Instagram, TikTok, Vimeo, Dailymotion, VK, or AOL.

Recap A Social Network Video Downloader Recap let's you recap on your favourite social network videos by downloading them on your devices, from the ra

John Oladele 4 Sep 24, 2022
Examples of how to do query, style, dom, ajax, event etc like jQuery with plain javascript.

You (Might) Don't Need jQuery Frontend environments evolve rapidly nowadays and modern browsers have already implemented a great deal of DOM/BOM APIs

NEFE 20.3k Dec 24, 2022
The NASA WorldWind Javascript SDK (WebWW) includes the library and examples for creating geo-browser web applications and for embedding a 3D globe in HTML5 web pages.

Web WorldWind New versions of WorldWind released Web WorldWind 0.10.0 and WorldWind Java 2.2.0 are now available on GitHub. The new version of Web Wor

NASA WorldWind 770 Jan 1, 2023