GithubHelp home page GithubHelp logo

shelly-plug's Introduction

Shelly Plug Wi-Fi Connection Manager

Python Windows PyCharm

This utility streamlines the process of connecting multiple devices to Wi-Fi by automating the entry of network credentials. It scans for Wi-Fi networks, connects devices, and logs the status of each connection attempt into a CSV file.

Highlight

  • Features: Automating Wi-Fi connections and generating reports.
  • Installation: Steps to set up the necessary environment.
  • Getting Started: Initial configuration before running the program.
  • Usage: Guidelines on how to use the program.
  • Execution: The workflow from start to finish.
  • Error Handling: How the program deals with potential issues.
  • Maintenance: Information about software maintenance.
  • Testing: Instructions for running unit tests.

Features

  • Batch process Wi-Fi connections for multiple devices.
  • Auto-retry mechanism for devices that fail to connect on the first attempt.
  • Generates a CSV report detailing the connection status of each device.

Installation

To set up the necessary environment for the program, install the following packages using pip:

pip install requests pandas

Getting Started

Before running the program, ensure the connect_device_to_wifi("device_name") function is invoked in the main routine.

Usage

  1. Provide the customer name and workspace ID when prompted.
  2. All input is treated as strings, even numerical values.

Execution

The program follows these steps:

  1. Retrieves Wi-Fi credentials via a GET request to the workspace server.
  2. Attempts to connect to the device twice if the first attempt fails.
  3. Posts updated device configurations to the server.
  4. Generates a CSV report with the outcomes of the connection attempts.

Error Handling

The program includes exception handling for various potential issues, such as:

  • Wi-Fi list access errors.
  • Connection failures to devices or servers.
  • Fallback to a backup Wi-Fi network if the primary credentials are not provided.

Maintenance

This software is maintained by NNE. All rights reserved.

Testing

Unit tests are provided to ensure the functionality works as expected. Run the tests using the following command:

python -m unittest discover

Program Entry Point

The main program is designed to be user-friendly. Invoke the connect_device_to_wifi function with the appropriate parameters to start the process.

# Main execution
if __name__ == '__main__':
    connect_device_to_wifi("shelly")

shelly-plug's People

Contributors

saidrmansour avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.