In the following examples, only the umqtt simple is used; in the code several delays have been inserted to allow the board to manage the messages and not run into errors;in the case the Mqtt server is not available the code restarts the board.

Below the code used for these examples.

Node with DHT11 sensor

boot.py: code executed at startup

1

2

3

4

5

6

7

8

9

10

11

12

13

14

15

16

17

18

19

20

21

22

23

24

25

26

27

28

29

#This file is executed on every boot (including wake-boot from deepsleep)

WARNING: Use of the settings shown is at your own risk.We assume no responsibility if these settings cause malfunctions or breakage of the printer.

At the first access to OctoPrint, the basic parameters for managing the printer are requested. In our case, we connect the Orange PI PC to an Anet A8 3d printer via the USB port. At the first access to the address

From the OctoPrint site we can download an image for Raspberry PI with the system already ready; in the case of the Orange PI PC we have to install and configure OctoPrint on a Linux image.

You can also use a Linux image available for Orange PI PC and run the steps related to OctoPrint package installation, but you have to check the prerequisites for Octoprint python package installation.

We instead built for this article an image using the Armban scripts.

As a first step, prepare the micro sd card with an Armbian image.In the specific case, we’ll use a Debian Jessie image created using the Armbian script, as indicated on the link

Access now the Freeboard dashboard and add the links to the temperature and humidity topics, the gauges and timeseries mesauring the values in real time and in a specific range of time . Here are some settings:

Datasource

Gauge

Timeseries

Chrome/Chromium browser allows to save the settings in a json file. This settings can be loaded locally or loaded from the web server, saving for example the dashboard.json file in /var/www/html/freeboard, with the url

1

http://beaglebone.local/freeboard/index.html?load=dashboard.json

The image shows the Freeboad interface with various widgets showing the status and timeseries of the ESP8266 relay and sensors

In these series of articles we configured the envinronment to access the Beaglebone using the beaglebone.local/beaglebone alias