Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

Version 1 Next »

Submodules

libnxembeddedtools.hw.reboot module

This module contains everything to electrally reboot your boardwith a Sonoff plug flashed with the Tasmota OS.

You should install nxbase2 (and get nxbase2_cli on your PATH) to use this module.

You will find the documentation to flash your Sonoff s26 plug at the top level oh this project.

class libnxembeddedtools.hw.reboot.Reboot(ip)

Bases: object

Class used to electrally reboot your board.

Parameters:

ip (str) – IP of your Sonoff plug.

powerOff()

Send a power off request to the plug.

powerOn()

Send a power on request to the plug.

startSPI(flashNr, external=False, tmr=False)

Reboot the board in SPI flash mode using nxbase2.

Parameters:
  • flashNr (int) – First flash used to boot.

  • external (Boolean) – Use external flash as flash#3.

  • tmr (Boolean) – Use TMR mode for flash#0-#3.

startSpacewire(external=False, tmr=False)

Reboot the board in spacewire mode using nxbase2.

Parameters:
  • external (Boolean) – Use external flash as flash#3.

  • tmr (Boolean) – Use TMR mode for flash#0-#3.

libnxembeddedtools.hw.sonoff_powr2 module

This module contains everything to control your sonoff plug.

libnxembeddedtools.hw.sonoff_powr2.off(ip)

Send a power off request

Parameters:

ip (str) – IP address of your sonoff plug.

libnxembeddedtools.hw.sonoff_powr2.on(ip)

Send a power on request

Parameters:

ip (str) – IP address of your sonoff plug.

libnxembeddedtools.hw.sonoff_powr2.toggle(ip)

Send a toggle (off to on or on to off) request

Parameters:

ip (str) – IP address of your sonoff plug.

Module contents

  • No labels