Skip to content

Console menu application for actuating Sonoff WIFI Smart Switch Basic by posting HTTP request. Written in Python.

License

Notifications You must be signed in to change notification settings

khanlatif001/Sonoff-Switch-Control

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

24 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Sonoff-Switch-Control

This is console menu application for actuating Sonoff WIFI Smart Switch Basic by posting HTTP request written in Python. Your pc/laptop and Sonoff Smart Switches have to be on the same WiFi network and you need to know IP address for each of yours Sonoff Smart Switches(you will know by following procedure below).

Prerequisite

  • Python 3
  • Connect Sonoff WIFI Smart Switch Basic on your WiFi network. How to is HERE. IMPORTANT: You will actually write new firmware to Sonoff. Setup Arduino IDE Settings like THIS.
  • Configure Sonoff WIFI Smart Switch Basic following Sonoff configuration section from THIS guide.

Usage

In config.xml list all of yours Sonoff WIFI Smart Switches and they will appear in console menu. One switch is represented as a pair:

  • <name>
  • <IP address>.

Start script as python sonoff_switch_control.py and console like on the picture below will appear. For every listed switch ON and OFF option will be presetned in the list.

capture

Conclusion

I used this script for testing my Sonoffs at the beginning. Now, I run it on my Raspberry PI which I connect on IoT platform and controls Sonnofs over my phone or web remotely.

About

Console menu application for actuating Sonoff WIFI Smart Switch Basic by posting HTTP request. Written in Python.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 100.0%