Skip to content

trancio/SonoffDual

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 

Repository files navigation

MicroPython relay module for Sonoff Dual

Simple module for original Sonoff Dual

Functions

SonoffDual.setOn(relay) # relay: 0 or 1

SonoffDual.setOff(relay) # relay: 0 or 1

SonoffDual.getStatus() # return a list, e.g. ['on', 'off']

Example

from sonoffdual import SonoffDual

relay = SonoffDual()

relay.setOn(0)
relay.setOn(1)
print(relay.getStatus())
relay.setOff(0)
relay.setOff(1)
print(relay.getStatus()[0])

Releases

No releases published

Packages

No packages published

Languages