Add M5 boards compatibility and low power mode (#586)

This commit is contained in:
Florian authored and GitHub committed 2020-04-26 19:56:10 -05:00
1 parent ac743ed350
commit 30147140bd
18 files changed
+753 -199

No files matched your search

+1
View File
@@ -78,6 +78,7 @@ module.exports = {
'use/rfm69',
'use/sensors',
'use/actuators',
'use/boards',
'use/gateway'
]
},
Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 49 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 64 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 308 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 323 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 274 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 178 KiB

+30
View File
@@ -0,0 +1,30 @@
# M5 Boards
M5 boards, manufactured by [M5Stack](https://m5stack.com/) are inexpensive, well featured boards based on ESP32.
## M5StickC and M5Stack
M5StickC and M5Stack are supported by OpenMQTTGateway and provide the following features:
### 3 low power modes
#### Always ON display
The display is always ON but decrease its brightness when not processing.
#### ON display when processing
The display is OFF when not processing and the ESP32 is put in low power mode.
#### Always OFF display
The display is always OFF, if the board has a led, the led is used when processing.
To change the low power mode you can do it by [MQTT](../use/boards#low-power-mode-for-m5-boards) or by pushing the middle button (btn B) of the M5Stack and the top button (btn B) of the M5Stick C
### Start screen
![](../img/OpenMQTTgateway_M5_Stack_Board_Display_Logo.png)
### Sleep screen
The screen brightness is put to a minimum so as to reduce power consumption.
![](../img/OpenMQTTgateway_M5_Stack_Board_Display_Text.png)
### Log display in case of warning
If the gateway detects a warning or an error the sleep go out the sleep screen and show the message with a red (error) or orange (warning) background.
![](../img/OpenMQTTgateway_M5_Stack_Board_Display_Warning.png)
The M5Stick support low power mode 2 but its display is not supported for the moment.
+16 -14
View File
@@ -6,24 +6,26 @@ You can take a look to the components sheet to have a view of [supported boards
Moreover it supports also sensors; DHT, HC SR501, ADC, I2C bus, INA226, TSL2561
Or can actutate things (LED chipsets, relays).
Here is some information to find the board suitable for your need, you have the choice between wifi, ethernet and off the shelves devices:
Here is some information to find the board suitable for your need, you have the choice between wifi, ethernet and off the shelves devices.
|Off the shelves wifi boards|RF|IR|BLE|LORA|GSM|Button|Relay|
|-|:-:|:-:|:-:|:-:|:-:|:-:|:-:|
|Sonoff RF Bridge (*) |X|[needs an hack](https://1technophile.blogspot.com/2018/02/adding-infrared-emitter-to-sonoff-rf.html)|-|-|-|-|-|
|All bare ESP32|-|-|X|-|-|-|-|
|M5Stack Basic|-|-|X|-|-|-|-|
|M5Stick|-|sending|X|-|-|X|X|
|M5Stick C|-|sending|X|-|-|X|X|
|TTGO LORA32|-|-|-|X|-|-|-|
|Sonoff RFR3|receiving [needs an hack](https://1technophile.blogspot.com/2019/08/new-sonoff-rfr3-as-433tomqtt-gateway.html)|-|-|-|-|X|X|
|Sonoff Basic|-|-|-|-|-|X|X|
|RF WIFI GATEWAY|[receiving](https://1technophile.blogspot.com/2019/09/hack-of-rf-wifi-gateway-usb-stick.html)|-|-|-|-|-|-|
## Off the shelves boards
The boards below doesn't need hardware modification (or a lite one).
|Off the shelves wifi boards|Pictures|RF|IR|BLE|LORA|Relay|Display|Low Power|
|-|:-:|:-:|:-:|:-:|:-:|:-:|:-:|:-:|
|Sonoff RF Bridge (*) |![](../img/OpenMQTTGateway_boards_sonoff_rfbridge.png)|X|[mod](https://1technophile.blogspot.com/2018/02/adding-infrared-emitter-to-sonoff-rf.html)|-|-|-|-|-|
|All bare ESP32|-|-|-|X|-|X|-|X|
|[M5Stack Basic](M5)|![](../img/OpenMQTTgateway_M5_Stack_Board_Display_Text.png)|-|-|X|-|X|X|X|
|M5Stick|-|-|send|X|-|X|-|X|
|[M5Stick C](M5)|![](../img/OpenMQTTgateway_M5_StickC_Board_Display_Text.png)|-|send|X|-|X|X|X|
|TTGO LORA32|![](../img/OpenMQTTGateway_TTGO32_LORA_Send.jpg)|-|-|-|X|-|-|-|
|Sonoff RFR3|![](../img/OpenMQTTGateway_boards_sonoff_rfr3.png)|[receiving](https://1technophile.blogspot.com/2019/08/new-sonoff-rfr3-as-433tomqtt-gateway.html)|-|-|-|X|-|-|
|Sonoff Basic|-|-|-|-|-|X|-|-|
|RF WIFI GATEWAY|![](../img/OpenMQTTGateway_board_wifi_rf_gateway.png)|[receiving](https://1technophile.blogspot.com/2019/09/hack-of-rf-wifi-gateway-usb-stick.html)|-|-|-|-|-|-|
'(*)' *So as to extend the number of RF protocols supported by the Sonoff RF Bridge you can apply an [hardware hack](https://1technophile.blogspot.com/2019/04/sonoff-rf-bridge-pilight-or-how-to.html), this way you will be able to use Pilight or RF2 gateway.*
![boards](../img/OpenMQTTGateway_boards_sonoff.png)
## DIY boards
The boards below need hardware modifications and electronic/hardware competencies. You have more possibilities of gateways combination compared to off the shelves ones.
|DIY boards|RF|IR|BLE|LORA|GSM|Button|Relay|
|-|:-:|:-:|:-:|:-:|:-:|:-:|:-:|
|Arduino UNO|X|X(limited compared to ESP)|X|-|X|X|
+3
View File
@@ -54,5 +54,8 @@ If you notice that your Arduino with w5100 Ethernet shield does not connect to n
According to this [video](https://www.youtube.com/watch?v=9ZBeprOqC3w&feature=youtu.be), w5100 clones sometimes struggle to initialise because the reset pin wasn't held low long enough. The solution is simple - add a 0.1uF (100nF) capacitor between the pins on the reset switch. You can get more details [here](http://forum.arduino.cc/index.php?topic=28175.15).
But even with this fix your board might not work well with a specific PSU. I would recommend try at least one different one and also try bigger capacitor (some report using 47uF)
## ESP Continuous restart or strange behaviour:
This can be due to corruption of the ESP flash memory, try to erase flash and upload OMG on it again.
If you didn't find your answer here post a question to the forum:
[![Community forum](https://img.shields.io/badge/community-forum-brightgreen.svg)](https://community.openmqttgateway.com)
+55
View File
@@ -0,0 +1,55 @@
# Boards
## ESP32
### Low power mode for ESP32
OpenMQTTGateway support a low power mode for ESP32, this mode can be set by MQTT on a barebone ESP32:
* Normal mode (per default)
`mosquitto_pub -t "home/OpenMQTTGateway/commands/MQTTtoBT/config" -m '{"low_power_mode":0}'`
* Low Power mode
`mosquitto_pub -t "home/OpenMQTTGateway/commands/MQTTtoBT/config" -m '{"low_power_mode":2}'`
## M5Stick C or M5Stack
### Behaviour
If the connexion of the board to WIFI and MQTT is successfull you will see the logo with text like below:
![boards](../img/OpenMQTTgateway_M5_Stack_Board_Display_Text.png)
The same behaviour apply to M5 Stick C
![boards](../img/OpenMQTTgateway_M5_StickC_Board_Display_Text.png)
### Setting the log output
Per default the log of the M5 boards is going to the LCD display with Errors and Warnings only, if you want to change the ouput at build time you can do it in [config_M5.h](https://github.com/1technophile/OpenMQTTGateway/blob/development/main/config_M5.h).
You can also change it by MQTT. For example if you want to set to LCD
`mosquitto_pub -t home/OpenMQTTGateway/commands/MQTTtoM5/config -m '{"log-display":true}'`
you can also revert it to the serial monitor:
`mosquitto_pub -t home/OpenMQTTGateway/commands/MQTTtoM5/config -m '{"log-display":false}'`
### Low power mode for M5 boards
OpenMQTTGateway support a low power mode for ESP32, this mode can be set by MQTT on a barebone ESP32:
* Normal mode (per default), screen ON
`mosquitto_pub -t "home/OpenMQTTGateway/commands/MQTTtoBT/config" -m '{"low_power_mode":0}'`
* Low Power mode, screen ON when processing
`mosquitto_pub -t "home/OpenMQTTGateway/commands/MQTTtoBT/config" -m '{"low_power_mode":1}'`
* Low Power mode, screen OFF, LED ON when processing on M5StickC
`mosquitto_pub -t "home/OpenMQTTGateway/commands/MQTTtoBT/config" -m '{"low_power_mode":2}'`
The low power mode can be changed also with a push to button B when the board is processing (top button on M5stickC and middle button of M5stack).