sonoff

command
v0.0.0-...-2387267 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 9, 2022 License: MIT Imports: 3 Imported by: 0

README

modules.sonoff

Available on port 4002 This controller can communicate with all Sonoff devices, including plugs and lamps

Usage

Lookup device details

Definition

GET /devices/<id>

Response

  • 404: device not found
  • 200: success
{
  "identifier": "bedroom-plug",
  "name": "Bedroom Plug",
  "address": "123.456.7.890",
  "state": {
    "power": true
  }
}
Lookup device details

Definition

PUT /devices/<id>

Arguments

  • "power":boolean the power state of the device

Response

  • 404: device not found
  • 200: success
{
  "identifier": "bedroom-plug",
  "name": "Bedroom Plug",
  "address": "123.456.7.890",
  "state": {
    "power": true
  }
}

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL