RavenSystem / esp-homekit-devices

Advanced firmware to add native Apple HomeKit and custom configurations, compatible with any SoC based on ESP32, ESP32-S, ESP32-C and ESP8266 series. (Shelly, Sonoff, Electrodragon, Tuya...)
Other
2.66k stars 355 forks source link

[Deprecated] Tested MEPLHAA Scripts Collection #689

Closed GPL71 closed 2 years ago

GPL71 commented 4 years ago

A JSON tested collection. Please add your. FORMAT:

GPL71 commented 4 years ago
GPL71 commented 4 years ago

This Json is a modified RavenSystem's configuration

GPL71 commented 4 years ago

This Json is by RavenSystem

GPL71 commented 4 years ago
GPL71 commented 4 years ago
GPL71 commented 4 years ago
GPL71 commented 4 years ago
GPL71 commented 4 years ago
peros550 commented 4 years ago
skv6 commented 4 years ago
pawelosin commented 4 years ago
pawelosin commented 4 years ago
pawelosin commented 4 years ago
GPL71 commented 4 years ago
diodo157 commented 4 years ago
{"c":{"o":1,"l": 3,"i":1,"b":[{"g":1,"t":5}]},
"a":[
{"t":2,"0":{"r":[{"g": 12,"v":0}]},"1":{"r":[{"g":12,"v":1}]}},
{"t":2,"0":{"r":[{"g":14,"v":0}]},"1":{"r":[{"g": 14,"v":1}]}},
{"t":2,"0":{"r":[{"g":13,"v":0}]},"1":{"r":[{"g":13,"v":1}]}},
{"t":2,"0":{"r":[{"g":4,"v":0}]},"1":{"r":[{"g":4,"v":1}]}},
{"t":2,"0":{"r":[{"g":5,"v":0}]},"1":{"r":[{"g":5,"v":1}]}},

{"t":3,"f0":[{"g":1}],"f1":[{"g":1,"t":2}],"f2":[{"g":1,"t":3}]}
]}

s-l1600

mikebatnz commented 4 years ago

{"a":[{"t":30,"r":4,"g":12,"v":14,"w":5,"s":1}]}

mikebatnz commented 4 years ago

Pressing physical button will turn power on/off Also creates 2 accessories for Setup mode and OTA update

{"c":{"n":"brilliant-bl20925","l":13,"b":[{"g":3,"t":5}],"i":1},"a":[{"0":{"r":[{"g":14}]},"1":{"r":[{"g":14,"v":1}]},"t":2,"b":[{"g":3,"t":1}],"s":5},{"1":{"s":[{"a":1}]}},{"i":0.5,"1":{"s":[{"a":2}]}}]}

mikebatnz commented 4 years ago

{"a":[{"t":30,"w":14,"s":1}]}

mikebatnz commented 4 years ago

{"a":[{"t":30,"v":14,"w":12,"s":1}]}

GPL71 commented 4 years ago

{"c":{"l":13,"b":[{"g":0,"t":5}]},"a":[{"0":{"r":[{"g":15}]},"1":{"r":[{"g":15,"v":1}]},"b":[{"g":14}],"s":0},{"0":{"r":[{"g":12}]},"1":{"r":[{"g":12,"v":1}]},"b":[{"g":0}],"s":0},{"0":{"r":[{"g":5}]},"1":{"r":[{"g":5,"v":1}]},"b":[{"g":9}],"s":0},{"0":{"r":[{"g":4}]},"1":{"r":[{"g":4,"v":1}]},"b":[{"g":10}],"s":0},{"t":1,"b":[],"s":0,"i":0.6}]}

peterduyts commented 4 years ago

Shelly 1 pulse switch gives a 1 sec. pulse, then returns to the off position

{"a":[ { "t": 1, "d": 1, "0":{"r":[{"g":4}]}, "1":{"r":[{"g":4,"v":1,"i":1}]}, "b":[{"g":5,"p":0},{"g":5,"t":0}]}]}

peros550 commented 4 years ago

Blitzwolf BW-LT21 tested: {"c":{"n":"Led-BW-LT21"},"a":[{"t":30,"r":14,"g":12,"v":5,"w":15}]}

GPL71 commented 4 years ago
md-zaikin commented 4 years ago

ESP-01S + Relay v4 https://aliexpress.ru/item/32843645421.html?spm=a2g0s.9042311.0.0.264d33edkHTRIc Relay GPIO - 0 - defolt, Button -GPOI 2 ( on defoult butten on relay conectet to RST!) {"c":{"l":13,"b":[{"g":2,"t":5}],"i":0,"n":"ESP_01S"},"a":[{"0":{"r":[{"g":0,"v":1}]},"1":{"r":[{"g":0,"v":0}]},"b":[{"g":2}],"s":0}]}

vglucas commented 4 years ago

ESP01 with Relay v.4 GPIO0 add switch GPIO3

json {"c":{"l":13},"a":[{"t":1,"0":{"r":[{"g":0,"v":0}]},"1":{"r":[{"g":0,"v":1}]},"b":[{"g":3,"t":1},{"g":3,"t":0}]}]}

IMG_1266

IMG_1267

belkone commented 4 years ago
rasod commented 4 years ago
Screen Shot 2020-02-04 at 1 54 16 PM
pilot1981 commented 4 years ago
platinman commented 4 years ago

Blitzwolf bw-ss1

rasod commented 4 years ago

Teckin SL02 LED Strip

72597742-af347f00-390e-11ea-9aa2-2898e4b7f6dc

mriksman commented 4 years ago

https://www.aliexpress.com/item/4000615022697.html AVATTO US/AU Wall Switch SYS-WS 01/02/03 image

GPIO13          Relay1
GPIO15          Relay2
GPIO4           Relay3
GPIO16          Button1
GPIO5           Button2
GPIO3 (RXD0)        Button3
GPIO12          LED1
GPIO1 (TXD0)        LED2
GPIO14          LED3
GPIO0           Status LED

For a 2-gang switch;

{
    "c": {
        "l": 0,
        "b": [{"g": 16, "t": 5}]
    },
    "a": [
        {
            "t": 1,
            "0": {"r": [{"g": 13, "v": 0}, {"g": 12, "v": 1}]},
            "1": {"r": [{"g": 13, "v": 1}, {"g": 12, "v": 0}]},
            "b": [{"g": 16, "t": 1}]
        },
        {
            "t": 1,
            "0": {"r": [{"g": 4, "v": 0}, {"g": 14, "v": 1}]},
            "1": {"r": [{"g": 4, "v": 1}, {"g": 14, "v": 0}]},
            "b": [{"g": 1,  "t": 1}]
        }
    ]
}
princefisher commented 4 years ago

Device(s)

All Smart Plugs with Tuya ESP Chip tested:

Accessory description

Wifi Smart Plug GPIO Configuration

JSON

Formatted:

{
  "c": {
    "l": 13,
    "n": "name-your-outlet",
    "b": [
      {
        "g": 4,
        "t": 5
      }
    ]
  },
  "a": [
    {
      "0": {
        "r": [
          {
            "g": 12,
            "v": 1
          },
          {
            "g": 14,
            "v": 0
          }
        ]
      },
      "1": {
        "r": [
          {
            "g": 12,
            "v": 0
          },
          {
            "g": 14,
            "v": 1
          }
        ]
      },
      "b": [
        {
          "g": 4,
          "t": 1,
          "p": 1
        }
      ],
      "s": 0
    }
  ]
}

One-Liner:

{"c":{"l":13,"n":"name-your-outlet","b":[{"g":4,"t":5}]},"a":[{"0":{"r":[{"g":12,"v":1},{"g":14,"v":0}]},"1":{"r":[{"g":12,"v":0},{"g":14,"v":1}]},"b":[{"g":4,"t":1,"p":1}],"s":0}]}

Notes

pilot1981 commented 4 years ago

Shelly 1 used to control water valve; on switch of GPIO5 I attached external physical button stateless to control manually water valve; I added also a dummy switch to enter in setup mode:

{"a":[{"t":20,"d":3600,"0":{"r":[{"g":4}]},"1":{"r":[{"g":4,"v":1}]},"b":[{"g":5,"p":0}]},{"i":0.5,"1":{"s":[{"a":1}]}}]}

xrust83 commented 4 years ago

Sonoff basic + si7021 DescLamp whit Temp+Hum

{"c":{"l":13,"b":[{"g":0,"t":5}]},"a":[{"0":{"r":[{"g":12}]},"1":{"r":[{"g":12,"v":1}]},"b":[{"g":0}],"s":0},{"t":24,"b":[],"n":4,"g":14,"j":90}]}

Crazor commented 4 years ago

Teckin SP22 Smart Plug

{"c":{"l":3,"b":[{"g":1,"t":5}]},"a":[{"0":{"r":[{"g":14}]},"1":{"r":[{"g":14,"v":1}]},"t":2,"b":[{"g":1}]}]}

pilot1981 commented 4 years ago

Shelly 2.5 2 switch for lightbulb with initial state Dummy switch to enter in setup mode

{"c":{"l":0,"i":1},"a":[{"s":5,"0":{"r":[{"g":4}]},"1":{"r":[{"g":4,"v":1}]},"b":[{"g":13,"p":0},{"g":13,"t":0}]},{"s":5,"0":{"r":[{"g":15}]},"1":{"r":[{"g":15,"v":1}]},"b":[{"g":5,"p":0},{"g":5,"t":0}]},{"1":{"s":[{"a":1}]}}]}

TriderG75 commented 4 years ago

Universal IR device https://gearbest.app.link/7kIjGiVCz5 (Tested Type B - 2 versions) https://a.aliexpress.com/_d7NKf18 (Not tested) https://s.click.aliexpress.com/e/_d7qlxvI (Tested) https://www.connectsmarthome.com.au/garden.html (Tested) (Thanks to carminedelia, micheletorrini, PSB and Ajax on Discord)

Type C version successfully flashed with Tuya-convert too

This json is for managing a Samsung TV with an IR device (see links above). IR commands can be found here : https://github.com/RavenSystem/esp-homekit-devices/wiki/IR-Codes-Database. Also available Philips and LG IR commands. Json has also an IP function to know if smart Tv is On or Off using ping and a dummy switch that allows you to enter in setup mode by pressing it once. If you have pairing issues, use first the short json (below) to pair and then, when correctly paired replace the short json with the right one.

Short Json (for pairing) {"c":{"t":14,"ct":31,"l":4,"i":0,"p":"J(J(AcAcAcDFAc","b":[{"g":13,"t":5}]},"a":[{"t":60,"xa":0,"i":[{"n":"MENU","0":{"i": [{"r":2,"c":"CeCfAaBcAaAbC"}]}},{"n":"SOURCE","0":{"i":[{"r":2,"c":"CeCeAhG"}]}},{"n":"MUTE","0":{"i":[{"r":2,"c":"CeCeDhD"}]}}]},{"1":{"s":[{"a":1}]}}]}

If you need more commands in this part, you have to add more {"n":"XXXXX","0":{"i":[{"r":2,"c":"XXXXX"}]}} before pairing (Max 8? - to test)

For Samsung smart Tv 2016+ found those http commands: {"n":"NETFLIX","0":{"h":[{"h":"192.168.1.100","p":8001,"m":2,"u":"ws/apps/Netflix"}]}} {"n":"PRIME","0":{"h":[{"h":"192.168.1.100","p":8001,"m":2,"u":"api/v2/applications/3201512006785"}]}} {"n":"YouTube","0":{"h":[{"h":"192.168.1.100","p":8001,"m":2,"u":"ws/apps/YouTube"}]}} {"n":"Disney+","0":{"h":[{"h":"192.168.1.100","p":8001,"m":2,"u":"ws/apps/Disney+"}]}} {"n":"SPOTIFY","0":{"h":[{"h":"192.168.1.100","p":8001,"m":2,"u":"api/v2/applications/3201606009684"}]}}

For Samsung smart Tv 2020 found those http commands: {"n":"NETFLIX","0":{"h":[{"h":"192.168.1.100","p":8001,"m":2,"u":"api/v2/applications/3201907018807"}]}} {"n":"PRIME","0":{"h":[{"h":"192.168.1.100","p":8001,"m":2,"u":"api/v2/applications/3201910019365"}]}} {"n":"YouTube","0":{"h":[{"h":"192.168.1.100","p":8001,"m":2,"u":"api/v2/applications/111299001912"}]}} {"n":"Disney+","0":{"h":[{"h":"192.168.1.100","p":8001,"m":2,"u":"api/v2/applications/3201901017640"}]}} {"n":"AppleTv","0":{"h":[{"h":"192.168.1.100","p":8001,"m":2,"u":"api/v2/applications/3201807016597"}]}} {"n":"Browser","0":{"h":[{"h":"192.168.1.100","p":8001,"m":2,"u":"api/v2/applications/org.tizen.browser"}]}}

Json: {"c":{"t":14,"ct":31,"l":4,"i":0,"p":"J(J(AcAcAcDFAc","b":[{"g":13,"t":5}]},"a":[{"t":60,"xa":0,"i":[{"n":"MENU","0":{"i": [{"r":2,"c":"CeCfAaBcAaAbC"}]}},{"n":"SOURCE","0":{"i":[{"r":2,"c":"CeCeAhG"}]}},{"n":"MUTE","0":{"i":[{"r":2,"c":"CeCeDhD"}]}}],"0":{"i":[{"r":4,"c":"CeChBbDbBa"}]},"1":{"i":[{"r":4,"c":"CeCeAbBbAaBbBa"}]},"6":{"i":[{"r":2,"c":"CeCjBaEbA"}]},"7":{"i":[{"r":2,"c":"CeCeAdBbDbA"}]},"8":{"i":[{"r":2,"c":"CeCeAaAbBbAaBbA"}]},"9":{"i":[{"r":2,"c":"CeCfAcBaAaCbA"}]},"10":{"i":[{"r":2,"c":"CeChAaBaCaAbA"}]},"11":{"i":[{"r":2,"c":"CeChBaAaCbAaA"}]},"13":{"i":[{"r":2,"c":"CeCeBaAaBcAaAbA"}]},"17":{"i":[{"r":2,"c":"CeCeEhC"}]},"22":{"i":[{"r":2,"c":"CeCeChE"}]},"23":{"i":[{"r":2,"c":"CeCeBaAfAaD"}]},"q0":[{"h":"192.168.1.100","r":0,"i":1}],"q1":[{"h":"192.168.1.100","r":1,"i":1}]},{"1":{"s":[{"a":1}]}}]}

If ir commands like volume up/down are repeated you can put "r":1 instead "r":2

Tv_actions Tv_actions

More Samsung IR commands:

On/Off: CeCfAfAaF On: CeCeAbBbAaBbBa Off: CeChBbDbBa CH+: CeCfAbAcAaBaC CH-: CeCiAcDaC V+: CeCeChE V-: CeCeBaAfAaD
Menu: CeCfAaBcAaAbC Mute: CeCeDhD Up: CeCjBaEbA Down: CeCeAdBbDbA Left: CeCeAaAbBbAaBbA Right: CeCfAcBaAaCbA Ok: CeChAaBaCaAbA Back: CeChBaAaCbAaA Exit: CeCeAaBaAcAbAaB Source: CeCeAhG Tools: CeCeBaAbAcAaBaA Content: CeCeAbDbBdA
CH List: CeCeBaAaBcAaAbA Play: CeCeCcAdCaA Pause: CeCfAaAbAaAaAaBaA Info: CeCeEhC Hdmi: CeCeBaAcAbAaCa Hdmi1: CeCeAbAaCaBaAc Hdmi2: CeCfEaBeAa Hdmi3: CeCfAdCaDb Hdmi4: CeCeAaAcBaAaCb
Stop: CeCfBcAaAbCaA 1: CeCgAeBaECeCgAeBaE 2: CeCeAaAfAaE 3: CeCfBeAbE 4: CeChAdCaD 5: CeCeAbAeBaD 6: CeCfAaAdAaAaD 7: CeCgBdBbD 8: CeCeAaBeAbD 9: CeCfCdAcD 0: CeCeAcAdCaC

Cogomma Type B Gocomma_B1 Gocomma_B2 Gocomma_B3

Cogomma Type B - Ver 2 Gocomma_C1 Gocomma_C2 Gocomma_C3

Avatto S07 Avatto_s07_1 Avatto_s07_2

TriderG75 commented 4 years ago

Gpio list: https://templates.blakadder.com/jinvoo_SM-AW713-v2.html

Schermata 2020-04-15 alle 10 57 07

TriderG75 commented 4 years ago

Gpio list: https://templates.blakadder.com/jinvoo_SM-SW101-3.html

Jinvoo_1

Jinvoo_2

Jinvoo_3

Jinvoo_4

Jinvoo_5

Note: The flashing problem was caused by the chip U4 presence. This chip manages the 3 capacitive touch buttons and has its serial pin connected to the TYWE3S Rx pin. So we had to desolder U4, flash TYWE3S and then solder U4 again. I suppose that disconnecting pins 5 and 6 (maybe only pin 5) is enough.

TriderG75 commented 4 years ago

Gpio list: https://templates.blakadder.com/electrodragon_board.html

Schermata 2020-04-15 alle 14 17 22

PsbDxb commented 4 years ago

GPIO list: https://templates.blakadder.com/DS-102_3.html

image image

pilot1981 commented 4 years ago

Shelly 1 1 switch for lightbulb with initial state and dummy switch to enter in setup mode:

{"a":[{"s":5,"0":{"r":[{"g":4}]},"1":{"r":[{"g":4,"v":1}]},"b":[{"g":5,"p":0},{"g":5,"t":0}]},{"i":0.5,"1":{"s":[{"a":1}]}}]}

sercitecotf commented 4 years ago

SONOFF 4ch 4 Water Valve with timer, made with haajc v0.6 Json: {"c":{"o":0,"l":13,"i":0,"b":[{"g":0,"t":5}]},"a":[{"0":{"r":[{"g":15,"v":0}]},"1":{"r":[{"g":15,"v":1}]},"t":20,"b":[{"g":14,"t":1,"p":0}],"s":0,"w":0,"d":3600,"f0":[]},{"0":{"r":[{"g":4,"v":0}]},"1":{"r":[{"g":4,"v":1}]},"t":20,"b":[{"g":10,"t":1,"p":0}],"s":0,"w":0,"d":3600,"f0":[]},{"0":{"r":[{"g":5,"v":0}]},"1":{"r":[{"g":5,"v":1}]},"t":20,"b":[{"g":9,"t":1}],"s":0,"w":0,"d":3600},{"0":{"r":[{"g":12,"v":0}]},"1":{"r":[{"g":12,"v":1}]},"t":20,"b":[{"g":0,"t":1}],"s":0,"w":0,"d":3600,"f0":[]}]}

sercitecotf commented 4 years ago

SONOFF 4ch 2 timer water valves and 2 switches, made with haajc v0.6 Json:

{"c":{"o":0,"l":13,"i":0,"b":[{"g":0,"t":5}]},"a":[{"0":{"r":[{"g":12,"v":0}]},"1":{"r":[{"g":12,"v":1}]},"t":20,"b":[{"g":0,"t":1,"p":0}],"s":0,"w":0,"d":3600,"f0":[]},{"0":{"r":[{"g":5,"v":0}]},"1":{"r":[{"g":5,"v":1}]},"t":20,"b":[{"g":9,"t":1,"p":0}],"s":0,"w":0,"d":3600,"f0":[]},{"0":{"r":[{"g":15,"v":0}]},"1":{"r":[{"g":15,"v":1}]},"t":1,"b":[{"g":14,"t":1}],"s":0},{"0":{"r":[{"g":4,"v":0}]},"1":{"r":[{"g":4,"v":1}]},"t":1,"b":[{"g":10,"t":1}],"s":0}]}

pilot1981 commented 4 years ago

JSON: {"c":{"l":13,"i":1,"b":[{"g":0,"t":5}]},"a":[{"t":4,"s":5,"i":1,"1":{"r":[{"g":12,"v":0}]},"0":{"r":[{"g":12,"v":1,"i":0.5}]},"b":[{"g":0,"p":1,"t":1}]},{"i":0.5,"1":{"s":[{"a":1}]}}]}

IMG_4241

TriderG75 commented 4 years ago

image

tonysprenk commented 4 years ago

Zemismart Curtain Motor and Rail

Inexpensive automatic curtain solution. It uses a WiFi usb dongle. Inside the usb dongle is an esp8266 which can be flashed with HAA using Tuya-Convert . The esp8266 chip communicates with a secondary mcu inside the motor housing. With the below json the curtain motor can be controlled through the home app however when controlling manually or with the provided RF remote the status is not updated in the home app as this is not (yet) supported by HAA.

JSON:


{
    "c": {
        "r": [{
            "n": 2,
            "s": 9600
        }]
    },

    "a": [{
        "t": 45,
                 "o": 13,
        "c": 13,
                 "0": {
            "u": [{
                "v": "55aa00060005660400010075"
            }]

        },

        "1": {
            "u": [{
                "v": "55aa00060005660400010176"
            }]

        },

                 "2": {
            "u": [{
                "v": "55aa00060005660400010277"
            }]

        },

        "y1": [{
            "v": 1,
            "1": {
                "u": [{
                    "v": "55aa00060008650200040000000179"
                }]
            }
        }, {
            "v": 5,
            "1": {
                "u": [{
                    "v": "55aa0006000865020004000000057d"
                }]
            }
        }, {
            "v": 10,
            "1": {
                "u": [{
                    "v": "55aa00060008650200040000000a82"
                }]
            }
        }, {
            "v": 15,
            "1": {
                "u": [{
                    "v": "55aa00060008650200040000000f87"
                }]
            }
        }, {
            "v": 20,
            "1": {
                "u": [{
                    "v": "55aa0006000865020004000000148c"
                }]
            }
        }, {
            "v": 25,
            "1": {
                "u": [{
                    "v": "55aa00060008650200040000001991"
                }]
            }
        }, {
            "v": 30,
            "1": {
                "u": [{
                    "v": "55aa00060008650200040000001e96"
                }]
            }
        }, {
            "v": 35,
            "1": {
                "u": [{
                    "v": "55aa0006000865020004000000239b"
                }]
            }
        }, {
            "v": 40,
            "1": {
                "u": [{
                    "v": "55aa000600086502000400000028a0"
                }]
            }
        }, {
            "v": 45,
            "1": {
                "u": [{
                    "v": "55aa00060008650200040000002da5"
                }]
            }
        }, {
            "v": 50,
            "1": {
                "u": [{
                    "v": "55aa000600086502000400000032aa"
                }]
            }
        }, {
            "v": 55,
            "1": {
                "u": [{
                    "v": "55aa000600086502000400000037af"
                }]
            }
        }, {
            "v": 60,
            "1": {
                "u": [{
                    "v": "55aa00060008650200040000003cb4"
                }]
            }
        }, {
            "v": 65,
            "1": {
                "u": [{
                    "v": "55aa000600086502000400000041b9"
                }]
            }
        }, {
            "v": 70,
            "1": {
                "u": [{
                    "v": "55aa000600086502000400000046be"
                }]
            }
        }, {
            "v": 75,
            "1": {
                "u": [{
                    "v": "55aa00060008650200040000004bc3"
                }]
            }
        }, {
            "v": 80,
            "1": {
                "u": [{
                    "v": "55aa000600086502000400000050c8"
                }]
            }
        }, {
            "v": 85,
            "1": {
                "u": [{
                    "v": "55aa000600086502000400000055cd"
                }]
            }
        }, {
            "v": 90,
            "1": {
                "u": [{
                    "v": "55aa00060008650200040000005ad2"
                }]
            }
        }, {
            "v": 95,
            "1": {
                "u": [{
                    "v": "55aa00060008650200040000005fd7"
                }]
            }
        }, {
            "v": 100,
            "1": {
                "u": [{
                    "v": "55aa000600086502000400000064dc"
                }]
            }

        }
]
    },
{
        "1": {
            "s": [{
                "a": 1
            }]
        },
        "i": 1
    }]

}
aleroot commented 4 years ago

Sonoff Basic R2 with Switch connected to GPIO 3 (RX) and GND :

{"c":{"l":13,"b":[{"g":0,"t":5}]},"a":[{"0":{"r":[{"g":12}]},"1":{"r":[{"g":12,"v":1}]},"b":[{"g":0},{"g":3},{"g":3,"t":0}]}]}

Andre000Dias commented 4 years ago

json for garage door? sonoff basic r2 (dry contact) HAA homekit pls (with stop/pause)

KrzysiekRadek commented 4 years ago

Hi All :) I need a sprinkler string for Sonoff BASIC ... can you help me?