Skip to content

Commit

Permalink
sonoff_preparation.md: add info about Sonoff S26
Browse files Browse the repository at this point in the history
Signed-off-by: Piotr Lasota <[email protected]>
  • Loading branch information
Psotas committed Nov 29, 2023
1 parent 7b64a5e commit 6a56f05
Showing 1 changed file with 33 additions and 0 deletions.
33 changes: 33 additions & 0 deletions docs/transparent-validation/sonoff/sonoff_preparation.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,10 @@
The below section of the documentation is based on the
[EPSHome documentation](https://esphome.io/devices/sonoff_s20.html)

> The following procedure is for Sonoff S20. It has also been tested on **Sonoff S26 Release 2**,
however, the connection method for flashing is different and is
described [here](https://tasmota.github.io/docs/devices/Sonoff-S26-Smart-Socket/#s26-release-2).

1. Open the Sonoff case.

1. Check if the headers are soldered to the board. If not - 4 pin header
Expand Down Expand Up @@ -135,3 +139,32 @@ The below section of the documentation is based on the
> Note: The effective range for this device is only a few meters.

1. Based on the minicom logs read the IP address assigned to the device.

1. The device should have a statically assigned IP address based on its MAC
address - this will make it easy to find it on the network.

The device will host the website which can be used to switch the relay.

Bear in mind that the antenna in this device is very poorly
performing - effective range is only few meters

---

## Controlling the relay switch

To switch the relay the following bash commands may be used:

> `192.168.43.171` should be replaced with assigned IP.
```sh
curl -X POST http://192.168.43.171/switch/sonoff_s20_relay/toggle
curl -X POST http://192.168.43.171/switch/sonoff_s20_relay/turn_off
curl -X POST http://192.168.43.171/switch/sonoff_s20_relay/turn_on
```

To check the state of the component use:

```sh
# name @ name in /home/name/workspace/sonoff/docker [16:28:02] C:1
$ curl http://192.168.43.171/switch/sonoff_s20_relay
{"id":"switch-sonoff_s20_relay","state":"OFF","value":false}
```

0 comments on commit 6a56f05

Please sign in to comment.