Cloud4RPi
Published

How To Control Sonoff Basic Smart Switch with Smartphone

We connected the Sonoff Switch relay to our desktop light and control it via smartphone.

BeginnerFull instructions provided2,400
How To Control Sonoff Basic Smart Switch with Smartphone

Things used in this project

Hardware components

Sonoff Basic
Itead Sonoff Basic
×1

Software apps and online services

Cloud4RPi
Cloud4RPi

Story

Read more

Code

Code snippet #15

Plain text
device.declare({
    'Relay': {
        'type': 'bool',
        'value': False,
        'bind': on_relay
    },
    # ...
})

Code snippet #16

Plain text
device.declare({
    'Relay': {
        'type': 'bool',
        'value': False,
        'bind': on_relay
    },
    # ...
})

Github

https://github.com/micropython/webrepl

Github file

https://github.com/micropython/micropython-lib/blob/master/umqtt.simple/umqtt/simple.py

Github file

https://github.com/cloud4rpi/cloud4rpi-esp8266-micropython/blob/master/cloud4rpi.py

Credits

Cloud4RPi

Cloud4RPi

8 projects • 20 followers
Cloud control panel for your IoT projects. Use dashboard widgets to display device data in real-time. Control your IoT devices remotely.

Comments