v2.2.1:libnxembeddedtools.hw package

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 with a bringup board.

You should use an Angie probe to use this module with the ngultra devkit

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

class libnxembeddedtools.hw.reboot.Reboot(ip, boardType=1)

Bases: object

NGULTRA_BRINGUP = 0
NGULTRA_DEVKIT = 1

Class used to electrally reboot your board.

Parameters:
  • boardType (int) – Type of the board. May be Reboot.NGULTRA_BRINGUP or Reboot.NGULTRA_DEVKIT

  • 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.

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.

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

© NanoXplore 2022