redis-cloudclient is a simple client that connects out to a redis server and watches a simple queue for incoming commands. It also uses the redis server for storage. Currently the only operation it supports is exec which executes one or more commands and streams the result back to the server where it can be read and displayed by the caller without storing everything in ram or flash on the microcontroller.
Multiple boards can connect to the same redis server and be controlled centrally.
Explanations can be confusing, so here's some examples using the script to manage multiple esp8266 boards:
The client sends a heartbeat and status information to the redis server. The list command lists the boards that have registered with the server:
Code: Select all
$ micropython_board_manager list
Platform Name
esp8266 nodemcu1
esp8266 nodemcu2
Code: Select all
$ cat /tmp/info.py
import machine
import sys
import ubinascii
print('Platform', sys.platform)
print('Version', sys.version)
print('ID', ubinascii.hexlify(machine.unique_id()))
Code: Select all
$ cat /tmp/info.py|micropython_board_manager execute nodemcu[1-2]
******************************************************************************
Executing on 'nodemcu1'
******************************************************************************
Platform esp8266
Version 3.4.0
ID b'9efaf100'
******************************************************************************
Executing on 'nodemcu2'
******************************************************************************
Platform esp8266
Version 3.4.0
ID b'd5d00400'
$
- Currently the client doesn't work on the Wipy currently (the board hangs).
- The client doesn't currently support running with a redis serial proxy to allow usage over a UART.