[BOARDS] Remove Arduino boards (#1929)
This commit is contained in:
1 parent
30f8264878
commit
2065d57e11
98 files changed
+336
-571
No files matched your search
@@ -70,9 +70,6 @@ jobs:
|
|||||||
- "nodemcuv2-weatherstation"
|
- "nodemcuv2-weatherstation"
|
||||||
- "sonoff-basic"
|
- "sonoff-basic"
|
||||||
- "sonoff-basic-rfr3"
|
- "sonoff-basic-rfr3"
|
||||||
- "atmega-all-test"
|
|
||||||
- "uno-rf"
|
|
||||||
- "uno-fastled"
|
|
||||||
- "esp32dev-ble-datatest"
|
- "esp32dev-ble-datatest"
|
||||||
- "esp32s3-dev-c1-ble"
|
- "esp32s3-dev-c1-ble"
|
||||||
- "esp32c3-dev-m1-ble"
|
- "esp32c3-dev-m1-ble"
|
||||||
|
|||||||
@@ -19,7 +19,7 @@ The reference sheet, with the list of all functions, pinouts is [here](https://d
|
|||||||
|
|
||||||
## Upload
|
## Upload
|
||||||
|
|
||||||
Upload OpenMQTTGateway directly from the [upload page](https://docs.openmqttgateway.com/upload/web-install.html) (no additional software required) or [build your own configuration](https://docs.openmqttgateway.com/upload/builds.html) with [PlatformIO](https://platformio.org/) or [Arduino IDE](https://www.arduino.cc/en/software)
|
Upload OpenMQTTGateway directly from the [upload page](https://docs.openmqttgateway.com/upload/web-install.html) (no additional software required) or [build your own configuration](https://docs.openmqttgateway.com/upload/builds.html) with [PlatformIO](https://platformio.org/).
|
||||||
|
|
||||||
## Using OpenMQTTGateway ?
|
## Using OpenMQTTGateway ?
|
||||||
Support open-source development through sponsorship and gain exclusive access to our private forum. Your questions, issues, and feature requests will receive priority attention, plus you'll gain insider access to our roadmap.
|
Support open-source development through sponsorship and gain exclusive access to our private forum. Your questions, issues, and feature requests will receive priority attention, plus you'll gain insider access to our roadmap.
|
||||||
|
|||||||
@@ -4,7 +4,7 @@ module.exports = {
|
|||||||
...commonConfig,
|
...commonConfig,
|
||||||
title: 'Theengs OpenMQTTGateway version_tag',
|
title: 'Theengs OpenMQTTGateway version_tag',
|
||||||
base: '/',
|
base: '/',
|
||||||
description: 'One gateway, many technologies: MQTT gateway for ESP8266, ESP32, Sonoff RF Bridge or Arduino with bidirectional 433mhz/315mhz/868mhz, Infrared communications, BLE, beacons detection, mi flora / mi jia / LYWSD02/ Mi Scale compatibility, SMS & LORA.',
|
description: 'One gateway, many technologies: MQTT gateway for ESP8266 or ESP32 with bidirectional 433mhz/315mhz/868mhz, Infrared communications, BLE, LoRa, beacons detection, mi flora / mi jia / LYWSD02/ Mi Scale compatibility, SMS & LORA.',
|
||||||
head: [
|
head: [
|
||||||
...commonConfig.head,
|
...commonConfig.head,
|
||||||
['script', {type: 'module', src: 'https://unpkg.com/esp-web-tools@9.4.3/dist/web/install-button.js?module'}]
|
['script', {type: 'module', src: 'https://unpkg.com/esp-web-tools@9.4.3/dist/web/install-button.js?module'}]
|
||||||
|
|||||||
+1
-1
@@ -23,7 +23,7 @@ OpenMQTTGateway integrates with established technologies, such as 433mhz/315mhz
|
|||||||
To have an overview of the supported PIR, door, water, temperature, smoke sensors, sirens, rings, beacons, switches & weather stations you can take a look to the
|
To have an overview of the supported PIR, door, water, temperature, smoke sensors, sirens, rings, beacons, switches & weather stations you can take a look to the
|
||||||
[compatible devices list](https://compatible.openmqttgateway.com/index.php/devices)
|
[compatible devices list](https://compatible.openmqttgateway.com/index.php/devices)
|
||||||
|
|
||||||
You can run OpenMQTTGateway on a wide variety of [boards](https://compatible.openmqttgateway.com/index.php/boards/), ESP32, ESP8266, Arduino MEGA, UNO (with limitation).
|
You can run OpenMQTTGateway on a wide variety of [boards](https://compatible.openmqttgateway.com/index.php/boards/), ESP32, ESP8266, ESP32S3, ESP32C3.
|
||||||
BLE to MQTT gateway can also run on Raspberry Pi, Windows or Unix computers thanks to [Theengs Gateway](https://theengs.github.io/gateway/).
|
BLE to MQTT gateway can also run on Raspberry Pi, Windows or Unix computers thanks to [Theengs Gateway](https://theengs.github.io/gateway/).
|
||||||
|
|
||||||
Using MQTT, you can seamlessly integrate with home automation platforms such as OpenHAB, Home Assistant, and others, or with IoT software like Node-Red.
|
Using MQTT, you can seamlessly integrate with home automation platforms such as OpenHAB, Home Assistant, and others, or with IoT software like Node-Red.
|
||||||
|
|||||||
@@ -78,18 +78,7 @@ Now you should have the following information for the OpenMQTTGateway configurat
|
|||||||
|
|
||||||
## Modify OpenMQTTGateway configuration
|
## Modify OpenMQTTGateway configuration
|
||||||
|
|
||||||
With Arduino IDE, you can update the following field into User_config.h with the information gathered:
|
With PlatformIO you can directly leverage the environment `esp32dev-ble-aws` as an example and modify it following your needs.
|
||||||
* Gateway_Name
|
|
||||||
* `MQTT_SERVER "xxxxxx.iot-eu-amazonaws.com"`
|
|
||||||
* `MQTT_PORT "8883"`
|
|
||||||
* `AWS_IOT true`
|
|
||||||
* ss_server_cert with the root certificate
|
|
||||||
* ss_client_cert with the client certificate
|
|
||||||
* ss_client_key with the Client key
|
|
||||||
* `MQTT_SECURE_SELF_SIGNED 1`
|
|
||||||
* `MQTT_SECURE_DEFAULT true`
|
|
||||||
|
|
||||||
With PlatformIO you can directly leverage the environment `esp32dev-ble-aws`
|
|
||||||
|
|
||||||
## Build and upload
|
## Build and upload
|
||||||
|
|
||||||
|
|||||||
@@ -16,7 +16,7 @@ Make your modification,
|
|||||||
* If you want to add a new sensor, name it `ZsensorYYY`, `YYY` replaced by your sensor type, can be more than three letters
|
* If you want to add a new sensor, name it `ZsensorYYY`, `YYY` replaced by your sensor type, can be more than three letters
|
||||||
* If you want to add a new actuator, name it `ZactuatorZZZ`, `ZZZ` replaced by your actuator type, can be more than three letters
|
* If you want to add a new actuator, name it `ZactuatorZZZ`, `ZZZ` replaced by your actuator type, can be more than three letters
|
||||||
|
|
||||||
Review your code, compile it for Arduino Uno, ESP32 and ESP8266
|
Review your code, compile it for ESP32 and ESP8266
|
||||||
|
|
||||||
Test it locally on your hardware config
|
Test it locally on your hardware config
|
||||||
|
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
# Boards
|
# Boards
|
||||||
|
|
||||||
OpenMQTTGateway is not closed to one board or type of board, by using the power of the Arduino framework and libraries that are cross compatibles it let you many choice of hardware, from an Arduino UNO to an ESP32.
|
OpenMQTTGateway is not closed to one board or type of board, by using the power of the Arduino framework and libraries that are cross compatibles it let you many choice of hardware, from an ESP8266 to an ESP32.
|
||||||
|
|
||||||
You can take a look to the [OpenMQTTGateway compatible website](https://compatible.openmqttgateway.com) to have a view of the [supported boards](https://compatible.openmqttgateway.com/index.php/boards/).
|
You can take a look to the [OpenMQTTGateway compatible website](https://compatible.openmqttgateway.com) to have a view of the [supported boards](https://compatible.openmqttgateway.com/index.php/boards/).
|
||||||
|
|
||||||
|
|||||||
@@ -13,15 +13,11 @@ The IR setup can work with bc547 and a 4x3 LED-Matrix.
|
|||||||
## Pinout
|
## Pinout
|
||||||
|Board| Receiver Pin| Emitter Pin|
|
|Board| Receiver Pin| Emitter Pin|
|
||||||
|-|:-:|:-:|
|
|-|:-:|:-:|
|
||||||
|Arduino UNO|D2|D9|
|
|
||||||
|ESP8266|D4|D0|
|
|ESP8266|D4|D0|
|
||||||
|ESP32|27/**26**|14|
|
|ESP32|27/**26**|14|
|
||||||
|
|
||||||
Connect the Emitter and Receiver to a 5V supply source, and the ground of your supply source to the ground of your board.
|
Connect the Emitter and Receiver to a 5V supply source, and the ground of your supply source to the ground of your board.
|
||||||
|
|
||||||
## Arduino Hardware setup
|
|
||||||

|
|
||||||
|
|
||||||
## ESP8266 Hardware setup
|
## ESP8266 Hardware setup
|
||||||

|

|
||||||
|
|
||||||
|
|||||||
@@ -32,7 +32,6 @@ Heltec LORA V3 is not compatible with RTL_433 library as it is based on an SX126
|
|||||||
### SRX STX Pinout
|
### SRX STX Pinout
|
||||||
|Board| Receiver Pin| Emitter Pin|
|
|Board| Receiver Pin| Emitter Pin|
|
||||||
|-|:-:|:-:|
|
|-|:-:|:-:|
|
||||||
|Arduino UNO|D3|D4|
|
|
||||||
|ESP8266|D2/**D3**/D1/D8|**RX**/D2|
|
|ESP8266|D2/**D3**/D1/D8|**RX**/D2|
|
||||||
|ESP32|**27**/26|12|
|
|ESP32|**27**/26|12|
|
||||||
|RF BRIDGE|-|-|
|
|RF BRIDGE|-|-|
|
||||||
@@ -65,9 +64,6 @@ With SRX882 some users reported that D3 is not working use D1 instead in this ca
|
|||||||
|
|
||||||

|

|
||||||
|
|
||||||
## Arduino Hardware setup
|
|
||||||

|
|
||||||
|
|
||||||
## SONOFF RF Bridge Hardware setup
|
## SONOFF RF Bridge Hardware setup
|
||||||
Per default there is no need on modifying the RF Bridge hardware, unless you don't want to use the provided RF controller (EFM8BB1). Indeed if you want to extend the protocols supported by the bridge you can [bypass this controller](https://github.com/xoseperez/espurna/wiki/Hardware-Itead-Sonoff-RF-Bridge---Direct-Hack) and use the ESP8255 capacities to decode RF Signal.
|
Per default there is no need on modifying the RF Bridge hardware, unless you don't want to use the provided RF controller (EFM8BB1). Indeed if you want to extend the protocols supported by the bridge you can [bypass this controller](https://github.com/xoseperez/espurna/wiki/Hardware-Itead-Sonoff-RF-Bridge---Direct-Hack) and use the ESP8255 capacities to decode RF Signal.
|
||||||
The RF processing can be achieved after the modification by either RF, RF2 or Pilight gateways.
|
The RF processing can be achieved after the modification by either RF, RF2 or Pilight gateways.
|
||||||
|
|||||||
@@ -10,15 +10,11 @@ Any module using a MAX232 chip will work. Don't pay extra to get all the signals
|
|||||||
## Pinout
|
## Pinout
|
||||||
|Board| Receiver Pin| Emitter Pin|
|
|Board| Receiver Pin| Emitter Pin|
|
||||||
|-|:-:|:-:|
|
|-|:-:|:-:|
|
||||||
|Arduino UNO|D2|D9|
|
|
||||||
|ESP8266|D2|D4|
|
|ESP8266|D2|D4|
|
||||||
|ESP32|27/**26**|14|
|
|ESP32|27/**26**|14|
|
||||||
|
|
||||||
Connect VCC on the module to 5V of your board, and the ground on the module to the ground of your board. your Transmit pin goes to TX and your Receive pin goes to RX. This may seem backwards, but the module is labeled as where it will be connected on the RS232 side of the module.
|
Connect VCC on the module to 5V of your board, and the ground on the module to the ground of your board. your Transmit pin goes to TX and your Receive pin goes to RX. This may seem backwards, but the module is labeled as where it will be connected on the RS232 side of the module.
|
||||||
|
|
||||||
## Arduino Hardware setup
|
|
||||||

|
|
||||||
|
|
||||||
## ESP8266 Hardware setup
|
## ESP8266 Hardware setup
|
||||||

|

|
||||||
|
|
||||||
|
|||||||
@@ -42,11 +42,6 @@ Most probably a network issue, don't use a guest network and if going through a
|
|||||||
This is due to a too small MQTT packet size, open User_config.h and set:
|
This is due to a too small MQTT packet size, open User_config.h and set:
|
||||||
`#define mqtt_max_packet_size 1024`
|
`#define mqtt_max_packet_size 1024`
|
||||||
|
|
||||||
## Your Arduino with w5100 Ethernet shield does not connect to network until you press Reset button
|
|
||||||
If you notice that your Arduino with w5100 Ethernet shield does not connect to network until you press its Reset button, but connects fine if you connect the Arduino with a USB cable to a computer/laptop with the IDE running and open Serial Monitor, the problem is most likely the Ethernet shield and/or the power supply you're using.
|
|
||||||
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:
|
## 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.
|
This can be due to corruption of the ESP flash memory, try to erase flash and upload OMG on it again.
|
||||||
|
|
||||||
|
|||||||
@@ -77,10 +77,6 @@ By default this function is not available on the pre built binary of RFBridge, i
|
|||||||
```
|
```
|
||||||
build_flags = '-UMQTTsetMQTT'
|
build_flags = '-UMQTTsetMQTT'
|
||||||
```
|
```
|
||||||
Arduino boards does not have this function per default also, to add it:
|
|
||||||
```
|
|
||||||
build_flags = '-DMQTTsetMQTT'
|
|
||||||
```
|
|
||||||
:::
|
:::
|
||||||
|
|
||||||
::: tip
|
::: tip
|
||||||
|
|||||||
+1
-5
@@ -97,11 +97,7 @@ mosquitto_pub -t home/OpenMQTTGateway/commands/MQTTtoIR -m '{"value":551489775,"
|
|||||||
|
|
||||||
## Send raw IR data by MQTT
|
## Send raw IR data by MQTT
|
||||||
|
|
||||||
2) If you use an Arduino UNO enable `IR_Raw` by uncommenting the line 129 in User_config.h
|
Publish your code like below
|
||||||
`#define IR_Raw`
|
|
||||||
If you are using the uno you will have to comment other gateway like ZgatewayRF, ZgatewayBT and ZgatewayIR to keep enough memory
|
|
||||||
|
|
||||||
3) publish your code like below
|
|
||||||
```
|
```
|
||||||
mosquitto_pub -t home/OpenMQTTGateway/commands/MQTTtoIR -m '{"raw":"8850,4450,600,550,550,550,600,1600,600,550,600,500,600,500,600,550,600,500,600,1650,600,1600,600,550,600,1600,600,1650,600,1600,600,1650,600,1600,600,550,600,500,600,550,550,1650,600,500,600,550,600,500,600,550,550,1650,600,1650,550,1650,600,550,550,1650,600,1650,550,1650,600,1650,600","protocol_name":"Raw"}'
|
mosquitto_pub -t home/OpenMQTTGateway/commands/MQTTtoIR -m '{"raw":"8850,4450,600,550,550,550,600,1600,600,550,600,500,600,500,600,550,600,500,600,1650,600,1600,600,550,600,1600,600,1650,600,1600,600,1650,600,1600,600,550,600,500,600,550,550,1650,600,500,600,550,600,500,600,550,550,1650,600,1650,550,1650,600,550,550,1650,600,1650,550,1650,600,1650,600","protocol_name":"Raw"}'
|
||||||
```
|
```
|
||||||
|
|||||||
@@ -1504,86 +1504,6 @@ board_build.flash_mode = dout
|
|||||||
custom_description = Wifi relay and RF receiver using RCSwitch library, [tutorial](https://1technophile.blogspot.com/2019/08/new-sonoff-rfr3-as-433tomqtt-gateway.html)
|
custom_description = Wifi relay and RF receiver using RCSwitch library, [tutorial](https://1technophile.blogspot.com/2019/08/new-sonoff-rfr3-as-433tomqtt-gateway.html)
|
||||||
custom_hardware = Sonoff Basic RFR3, [tutorial](https://1technophile.blogspot.com/2019/08/new-sonoff-rfr3-as-433tomqtt-gateway.html)
|
custom_hardware = Sonoff Basic RFR3, [tutorial](https://1technophile.blogspot.com/2019/08/new-sonoff-rfr3-as-433tomqtt-gateway.html)
|
||||||
|
|
||||||
[env:atmega-all-test]
|
|
||||||
platform = ${com.atmelavr_platform}
|
|
||||||
board = megaatmega2560
|
|
||||||
lib_deps =
|
|
||||||
${com-arduino.lib_deps}
|
|
||||||
${libraries.irremote}
|
|
||||||
${libraries.rfm69}
|
|
||||||
${libraries.rfm69spi}
|
|
||||||
${libraries.rfm69_low-power}
|
|
||||||
${libraries.rc-switch}
|
|
||||||
${libraries.newremoteswitch}
|
|
||||||
${libraries.bme280}
|
|
||||||
${libraries.bmp180}
|
|
||||||
${libraries.htu21}
|
|
||||||
${libraries.ahtx0}
|
|
||||||
${libraries.unifiedsensor}
|
|
||||||
${libraries.dht}
|
|
||||||
${libraries.tsl2561}
|
|
||||||
${libraries.a6lib}
|
|
||||||
${libraries.ina226}
|
|
||||||
${libraries.fastled}
|
|
||||||
${libraries.onewire}
|
|
||||||
${libraries.dallastemperature}
|
|
||||||
${libraries.rfWeatherStation}
|
|
||||||
${libraries.stl}
|
|
||||||
build_flags =
|
|
||||||
${com-arduino.build_flags}
|
|
||||||
'-DZgatewayRF="RF"'
|
|
||||||
'-DZgatewayRF="RF315"'
|
|
||||||
'-DZgatewayRF2="RF2"'
|
|
||||||
'-DZgatewayIR="IR"'
|
|
||||||
'-DZactuatorONOFF="ONOFF"'
|
|
||||||
'-DZactuatorFASTLED="FASTLED"'
|
|
||||||
'-DZactuatorPWM="PWM"'
|
|
||||||
'-DZsensorINA226="INA226"'
|
|
||||||
'-DZsensorHCSR501="HCSR501"'
|
|
||||||
'-DZsensorADC="ADC"'
|
|
||||||
'-DZsensorBH1750="BH1750"'
|
|
||||||
'-DZsensorBME280="BME280"'
|
|
||||||
'-DZsensorHTU21="HTU21"'
|
|
||||||
'-DZsensorAHTx0="AHTx0"'
|
|
||||||
'-DZsensorTSL2561="TSL2561"'
|
|
||||||
'-DZsensorDHT="DHT"'
|
|
||||||
'-DZsensorDS1820="DS1820"'
|
|
||||||
'-DZgatewayRFM69="RFM69"'
|
|
||||||
'-DZgatewayWeatherStation="WeatherStation"'
|
|
||||||
'-DZsensorGPIOInput="GPIOInput"'
|
|
||||||
;'-DZsensorGPIOKeyCode="GPIOKeyCode"'
|
|
||||||
'-DZmqttDiscovery="HADiscovery"'
|
|
||||||
'-DsimplePublishing=true'
|
|
||||||
'-DGateway_Name="OMG_ATMEGA_ALL"'
|
|
||||||
'-UZmqttDiscovery="HADiscovery"'
|
|
||||||
|
|
||||||
[env:uno-rf]
|
|
||||||
platform = ${com.atmelavr_platform}
|
|
||||||
board = uno
|
|
||||||
lib_deps =
|
|
||||||
${com-arduino.lib_deps}
|
|
||||||
${libraries.rc-switch}
|
|
||||||
build_flags =
|
|
||||||
${com-arduino-low-memory.build_flags}
|
|
||||||
'-UZmqttDiscovery="HADiscovery"'
|
|
||||||
'-DZgatewayRF="RF"'
|
|
||||||
'-DGateway_Name="OMG_1_RF"'
|
|
||||||
'-DDISABLE_LOGGING'
|
|
||||||
custom_description = RF gateway based on RCSwitch
|
|
||||||
|
|
||||||
[env:uno-fastled]
|
|
||||||
platform = ${com.atmelavr_platform}
|
|
||||||
board = uno
|
|
||||||
lib_deps =
|
|
||||||
${com-arduino.lib_deps}
|
|
||||||
${libraries.fastled}
|
|
||||||
build_flags =
|
|
||||||
${com-arduino-low-memory.build_flags}
|
|
||||||
'-DGateway_Name="OMG_1_FL"'
|
|
||||||
'-DZactuatorFASTLED="FASTLED"'
|
|
||||||
'-UZmqttDiscovery="HADiscovery"'
|
|
||||||
custom_description = FastLed control
|
|
||||||
|
|
||||||
[env:esp32dev-ble-datatest]
|
[env:esp32dev-ble-datatest]
|
||||||
platform = ${com.esp32_platform}
|
platform = ${com.esp32_platform}
|
||||||
board = esp32dev
|
board = esp32dev
|
||||||
|
|||||||
+10
-36
@@ -1,7 +1,7 @@
|
|||||||
/*
|
/*
|
||||||
OpenMQTTGateway - ESP8266 or Arduino program for home automation
|
OpenMQTTGateway - ESP8266 or Arduino program for home automation
|
||||||
|
|
||||||
Act as a wifi or ethernet gateway between your 433mhz/infrared IR signal and a MQTT broker
|
Act as a gateway between your 433mhz, infrared IR, BLE, LoRa signal and one interface like an MQTT broker
|
||||||
Send and receiving command by MQTT
|
Send and receiving command by MQTT
|
||||||
|
|
||||||
This program enables to:
|
This program enables to:
|
||||||
@@ -145,23 +145,17 @@ const byte mac[] = {0xDE, 0xED, 0xBA, 0xFE, 0x54, 0x95}; //W5100 ethernet shield
|
|||||||
|
|
||||||
/*-------------DEFINE YOUR MQTT PARAMETERS BELOW----------------*/
|
/*-------------DEFINE YOUR MQTT PARAMETERS BELOW----------------*/
|
||||||
//MQTT Parameters definition
|
//MQTT Parameters definition
|
||||||
#if defined(ESP8266) || defined(ESP32) || defined(__AVR_ATmega2560__) || defined(__AVR_ATmega1280__)
|
#define parameters_size 65
|
||||||
# define parameters_size 65
|
#define mqtt_topic_max_size 150
|
||||||
# define mqtt_topic_max_size 150
|
#ifndef mqtt_max_packet_size
|
||||||
# ifndef mqtt_max_packet_size
|
# ifdef MQTT_HTTPS_FW_UPDATE
|
||||||
# ifdef MQTT_HTTPS_FW_UPDATE
|
# ifndef CHECK_OTA_UPDATE
|
||||||
# ifndef CHECK_OTA_UPDATE
|
# define CHECK_OTA_UPDATE true // enable to check for the presence of a new version for your environment on Github
|
||||||
# define CHECK_OTA_UPDATE true // enable to check for the presence of a new version for your environment on Github
|
|
||||||
# endif
|
|
||||||
# define mqtt_max_packet_size 2560
|
|
||||||
# else
|
|
||||||
# define mqtt_max_packet_size 1024
|
|
||||||
# endif
|
# endif
|
||||||
|
# define mqtt_max_packet_size 2560
|
||||||
|
# else
|
||||||
|
# define mqtt_max_packet_size 1024
|
||||||
# endif
|
# endif
|
||||||
#else
|
|
||||||
# define parameters_size 30
|
|
||||||
# define mqtt_topic_max_size 75
|
|
||||||
# define mqtt_max_packet_size 128
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifndef MQTT_USER
|
#ifndef MQTT_USER
|
||||||
@@ -429,10 +423,6 @@ int lowpowermode = DEFAULT_LOW_POWER_MODE;
|
|||||||
//# define LED_SEND_RECEIVE 40
|
//# define LED_SEND_RECEIVE 40
|
||||||
# elif ESP32
|
# elif ESP32
|
||||||
//# define LED_SEND_RECEIVE 40
|
//# define LED_SEND_RECEIVE 40
|
||||||
# elif __AVR_ATmega2560__ //arduino mega
|
|
||||||
//# define LED_SEND_RECEIVE 40
|
|
||||||
# else //arduino uno/nano
|
|
||||||
//# define LED_SEND_RECEIVE 40
|
|
||||||
# endif
|
# endif
|
||||||
# endif
|
# endif
|
||||||
# ifndef LED_SEND_RECEIVE_ON
|
# ifndef LED_SEND_RECEIVE_ON
|
||||||
@@ -443,10 +433,6 @@ int lowpowermode = DEFAULT_LOW_POWER_MODE;
|
|||||||
//# define LED_ERROR 42
|
//# define LED_ERROR 42
|
||||||
# elif ESP32
|
# elif ESP32
|
||||||
//# define LED_ERROR 42
|
//# define LED_ERROR 42
|
||||||
# elif __AVR_ATmega2560__ //arduino mega
|
|
||||||
//# define LED_ERROR 42
|
|
||||||
# else //arduino uno/nano
|
|
||||||
//# define LED_ERROR 42
|
|
||||||
# endif
|
# endif
|
||||||
# endif
|
# endif
|
||||||
# ifndef LED_ERROR_ON
|
# ifndef LED_ERROR_ON
|
||||||
@@ -457,10 +443,6 @@ int lowpowermode = DEFAULT_LOW_POWER_MODE;
|
|||||||
//# define LED_INFO 44
|
//# define LED_INFO 44
|
||||||
# elif ESP32
|
# elif ESP32
|
||||||
//# define LED_INFO 44
|
//# define LED_INFO 44
|
||||||
# elif __AVR_ATmega2560__ //arduino mega
|
|
||||||
//# define LED_INFO 44
|
|
||||||
# else //arduino uno/nano
|
|
||||||
//# define LED_INFO 44
|
|
||||||
# endif
|
# endif
|
||||||
# endif
|
# endif
|
||||||
# ifndef LED_INFO_ON
|
# ifndef LED_INFO_ON
|
||||||
@@ -681,14 +663,6 @@ Adafruit_NeoPixel leds2(ANEOPIX_IND_NUM_LEDS, ANEOPIX_IND_DATA_GPIO2, ANEOPIX_IN
|
|||||||
# define JSON_MSG_BUFFER 512 // Json message max buffer size, don't put 768 or higher it is causing unexpected behaviour on ESP8266
|
# define JSON_MSG_BUFFER 512 // Json message max buffer size, don't put 768 or higher it is causing unexpected behaviour on ESP8266
|
||||||
# define SIGNAL_SIZE_UL_ULL uint64_t
|
# define SIGNAL_SIZE_UL_ULL uint64_t
|
||||||
# define STRTO_UL_ULL strtoull
|
# define STRTO_UL_ULL strtoull
|
||||||
#elif defined(__AVR_ATmega2560__) || defined(__AVR_ATmega1280__)
|
|
||||||
# define JSON_MSG_BUFFER 512 // Json message max buffer size, don't put 1024 or higher
|
|
||||||
# define SIGNAL_SIZE_UL_ULL uint64_t
|
|
||||||
# define STRTO_UL_ULL strtoul
|
|
||||||
#else // boards with smaller memory
|
|
||||||
# define JSON_MSG_BUFFER 64 // Json message max buffer size, don't put 1024 or higher
|
|
||||||
# define SIGNAL_SIZE_UL_ULL uint32_t
|
|
||||||
# define STRTO_UL_ULL strtoul
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if defined(ZgatewayRF) || defined(ZgatewayIR) || defined(ZgatewaySRFB) || defined(ZgatewayWeatherStation) || defined(ZgatewayRTL_433)
|
#if defined(ZgatewayRF) || defined(ZgatewayIR) || defined(ZgatewaySRFB) || defined(ZgatewayWeatherStation) || defined(ZgatewayRTL_433)
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
OpenMQTTGateway - ESP8266 or Arduino program for home automation
|
Theengs OpenMQTTGateway - We Unite Sensors in One Open-Source Interface
|
||||||
|
|
||||||
This gateway enables to use RGBLED strips like WS2812
|
This gateway enables to use RGBLED strips like WS2812
|
||||||
|
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
/*
|
/*
|
||||||
OpenMQTTGateway Addon - ESP8266 or Arduino program for home automation
|
Theengs OpenMQTTGateway - We Unite Sensors in One Open-Source Interface
|
||||||
|
|
||||||
Act as a wifi or ethernet gateway between your 433mhz/infrared IR signal and a MQTT broker
|
Act as a gateway between your 433mhz, infrared IR, BLE, LoRa signal and one interface like an MQTT broker
|
||||||
Send and receiving command by MQTT
|
Send and receiving command by MQTT
|
||||||
|
|
||||||
Output GPIO defined to High or Low
|
Output GPIO defined to High or Low
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
OpenMQTTGateway - ESP32, ESP8266 or Arduino program for home automation
|
Theengs OpenMQTTGateway - We Unite Sensors in One Open-Source Interface
|
||||||
|
|
||||||
This actuator enables control over the PWM outputs of microcontrollers.
|
This actuator enables control over the PWM outputs of microcontrollers.
|
||||||
|
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
/*
|
/*
|
||||||
OpenMQTTGateway - ESP8266 or Arduino program for home automation
|
Theengs OpenMQTTGateway - We Unite Sensors in One Open-Source Interface
|
||||||
Act as a wifi or ethernet gateway between your 433mhz/infrared IR signal and a MQTT broker
|
Act as a gateway between your 433mhz, infrared IR, BLE, LoRa signal and one interface like an MQTT broker
|
||||||
Send and receiving command by MQTT
|
Send and receiving command by MQTT
|
||||||
|
|
||||||
This actor enables to:
|
This actor enables to:
|
||||||
|
|||||||
+1
-1
@@ -1,7 +1,7 @@
|
|||||||
/*
|
/*
|
||||||
OpenMQTTGateway - ESP8266 or Arduino program for home automation
|
OpenMQTTGateway - ESP8266 or Arduino program for home automation
|
||||||
|
|
||||||
Act as a wifi or ethernet gateway between your 433mhz/infrared IR signal and a MQTT broker
|
Act as a gateway between your 433mhz, infrared IR, BLE, LoRa signal and one interface like an MQTT broker
|
||||||
Send and receiving command by MQTT
|
Send and receiving command by MQTT
|
||||||
|
|
||||||
This program enables to:
|
This program enables to:
|
||||||
|
|||||||
+2
-2
@@ -1,7 +1,7 @@
|
|||||||
/*
|
/*
|
||||||
OpenMQTTGateway Addon - ESP8266 or Arduino program for home automation
|
Theengs OpenMQTTGateway - We Unite Sensors in One Open-Source Interface
|
||||||
|
|
||||||
Act as a wifi or ethernet gateway between your 433mhz/infrared IR signal and a MQTT broker
|
Act as a gateway between your 433mhz, infrared IR, BLE, LoRa signal and one interface like an MQTT broker
|
||||||
Send and receiving command by MQTT
|
Send and receiving command by MQTT
|
||||||
|
|
||||||
M5 boards management
|
M5 boards management
|
||||||
|
|||||||
+51
-62
@@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
OpenMQTTGateway - ESP8266 or Arduino program for home automation
|
Theengs OpenMQTTGateway - We Unite Sensors in One Open-Source Interface
|
||||||
|
|
||||||
Act as a wifi or ethernet gateway between your BLE/433mhz/infrared IR signal and an MQTT broker
|
Act as a wifi or ethernet gateway between your BLE/433mhz/infrared IR signal and an MQTT broker
|
||||||
Send and receiving command by MQTT
|
Send and receiving command by MQTT
|
||||||
@@ -25,14 +25,13 @@
|
|||||||
#include "User_config.h"
|
#include "User_config.h"
|
||||||
|
|
||||||
#if defined(ZgatewayRF) || defined(ZgatewayPilight) || defined(ZgatewayRTL_433) || defined(ZgatewayRF2) || defined(ZactuatorSomfy)
|
#if defined(ZgatewayRF) || defined(ZgatewayPilight) || defined(ZgatewayRTL_433) || defined(ZgatewayRF2) || defined(ZactuatorSomfy)
|
||||||
# ifndef ARDUINO_AVR_UNO
|
|
||||||
|
|
||||||
# ifdef ZradioCC1101
|
# ifdef ZradioCC1101
|
||||||
# include <ELECHOUSE_CC1101_SRC_DRV.h>
|
# include <ELECHOUSE_CC1101_SRC_DRV.h>
|
||||||
# endif
|
# endif
|
||||||
|
|
||||||
void initCC1101() {
|
void initCC1101() {
|
||||||
# ifdef ZradioCC1101 //receiving with CC1101
|
# ifdef ZradioCC1101 //receiving with CC1101
|
||||||
// Loop on getCC1101() until it returns true and break after 10 attempts
|
// Loop on getCC1101() until it returns true and break after 10 attempts
|
||||||
int delayMS = 16;
|
int delayMS = 16;
|
||||||
int delayMaxMS = 500;
|
int delayMaxMS = 500;
|
||||||
@@ -50,7 +49,7 @@ void initCC1101() {
|
|||||||
delayMS = delayMS * 2;
|
delayMS = delayMS * 2;
|
||||||
if (delayMS > delayMaxMS) delayMS = delayMaxMS;
|
if (delayMS > delayMaxMS) delayMS = delayMaxMS;
|
||||||
}
|
}
|
||||||
# endif
|
# endif
|
||||||
}
|
}
|
||||||
|
|
||||||
void setupCommonRF() {
|
void setupCommonRF() {
|
||||||
@@ -71,105 +70,101 @@ bool validFrequency(float mhz) {
|
|||||||
|
|
||||||
int currentReceiver = ACTIVE_NONE;
|
int currentReceiver = ACTIVE_NONE;
|
||||||
|
|
||||||
# if !defined(ZgatewayRFM69) && !defined(ZactuatorSomfy)
|
# if !defined(ZgatewayRFM69) && !defined(ZactuatorSomfy)
|
||||||
# if defined(ESP8266) || defined(ESP32)
|
# if defined(ESP8266) || defined(ESP32)
|
||||||
// Check if a receiver is available
|
// Check if a receiver is available
|
||||||
bool validReceiver(int receiver) {
|
bool validReceiver(int receiver) {
|
||||||
switch (receiver) {
|
switch (receiver) {
|
||||||
# ifdef ZgatewayPilight
|
# ifdef ZgatewayPilight
|
||||||
case ACTIVE_PILIGHT:
|
case ACTIVE_PILIGHT:
|
||||||
return true;
|
return true;
|
||||||
# endif
|
# endif
|
||||||
# ifdef ZgatewayRF
|
# ifdef ZgatewayRF
|
||||||
case ACTIVE_RF:
|
case ACTIVE_RF:
|
||||||
return true;
|
return true;
|
||||||
# endif
|
# endif
|
||||||
# ifdef ZgatewayRTL_433
|
# ifdef ZgatewayRTL_433
|
||||||
case ACTIVE_RTL:
|
case ACTIVE_RTL:
|
||||||
return true;
|
return true;
|
||||||
# endif
|
# endif
|
||||||
# ifdef ZgatewayRF2
|
# ifdef ZgatewayRF2
|
||||||
case ACTIVE_RF2:
|
case ACTIVE_RF2:
|
||||||
return true;
|
return true;
|
||||||
# endif
|
# endif
|
||||||
default:
|
default:
|
||||||
Log.error(F("ERROR: stored receiver %d not available" CR), receiver);
|
Log.error(F("ERROR: stored receiver %d not available" CR), receiver);
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
# endif
|
|
||||||
# endif
|
# endif
|
||||||
|
# endif
|
||||||
|
|
||||||
void disableCurrentReceiver() {
|
void disableCurrentReceiver() {
|
||||||
Log.trace(F("disableCurrentReceiver: %d" CR), currentReceiver);
|
Log.trace(F("disableCurrentReceiver: %d" CR), currentReceiver);
|
||||||
switch (currentReceiver) {
|
switch (currentReceiver) {
|
||||||
case ACTIVE_NONE:
|
case ACTIVE_NONE:
|
||||||
break;
|
break;
|
||||||
# ifdef ZgatewayPilight
|
# ifdef ZgatewayPilight
|
||||||
case ACTIVE_PILIGHT:
|
case ACTIVE_PILIGHT:
|
||||||
disablePilightReceive();
|
disablePilightReceive();
|
||||||
break;
|
break;
|
||||||
# endif
|
# endif
|
||||||
# ifdef ZgatewayRF
|
# ifdef ZgatewayRF
|
||||||
case ACTIVE_RF:
|
case ACTIVE_RF:
|
||||||
disableRFReceive();
|
disableRFReceive();
|
||||||
break;
|
break;
|
||||||
# endif
|
# endif
|
||||||
# ifdef ZgatewayRTL_433
|
# ifdef ZgatewayRTL_433
|
||||||
case ACTIVE_RTL:
|
case ACTIVE_RTL:
|
||||||
disableRTLreceive();
|
disableRTLreceive();
|
||||||
break;
|
break;
|
||||||
# endif
|
# endif
|
||||||
# ifdef ZgatewayRF2
|
# ifdef ZgatewayRF2
|
||||||
case ACTIVE_RF2:
|
case ACTIVE_RF2:
|
||||||
disableRF2Receive();
|
disableRF2Receive();
|
||||||
break;
|
break;
|
||||||
# endif
|
# endif
|
||||||
# ifndef ARDUINO_AVR_UNO // Space issues with the UNO
|
|
||||||
default:
|
default:
|
||||||
Log.error(F("ERROR: unsupported receiver %d" CR), RFConfig.activeReceiver);
|
Log.error(F("ERROR: unsupported receiver %d" CR), RFConfig.activeReceiver);
|
||||||
# endif
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void enableActiveReceiver() {
|
void enableActiveReceiver() {
|
||||||
Log.trace(F("enableActiveReceiver: %d" CR), RFConfig.activeReceiver);
|
Log.trace(F("enableActiveReceiver: %d" CR), RFConfig.activeReceiver);
|
||||||
switch (RFConfig.activeReceiver) {
|
switch (RFConfig.activeReceiver) {
|
||||||
# ifdef ZgatewayPilight
|
# ifdef ZgatewayPilight
|
||||||
case ACTIVE_PILIGHT:
|
case ACTIVE_PILIGHT:
|
||||||
initCC1101();
|
initCC1101();
|
||||||
enablePilightReceive();
|
enablePilightReceive();
|
||||||
currentReceiver = ACTIVE_PILIGHT;
|
currentReceiver = ACTIVE_PILIGHT;
|
||||||
break;
|
break;
|
||||||
# endif
|
# endif
|
||||||
# ifdef ZgatewayRF
|
# ifdef ZgatewayRF
|
||||||
case ACTIVE_RF:
|
case ACTIVE_RF:
|
||||||
initCC1101();
|
initCC1101();
|
||||||
enableRFReceive();
|
enableRFReceive();
|
||||||
currentReceiver = ACTIVE_RF;
|
currentReceiver = ACTIVE_RF;
|
||||||
break;
|
break;
|
||||||
# endif
|
# endif
|
||||||
# ifdef ZgatewayRTL_433
|
# ifdef ZgatewayRTL_433
|
||||||
case ACTIVE_RTL:
|
case ACTIVE_RTL:
|
||||||
initCC1101();
|
initCC1101();
|
||||||
enableRTLreceive();
|
enableRTLreceive();
|
||||||
currentReceiver = ACTIVE_RTL;
|
currentReceiver = ACTIVE_RTL;
|
||||||
break;
|
break;
|
||||||
# endif
|
# endif
|
||||||
# ifdef ZgatewayRF2
|
# ifdef ZgatewayRF2
|
||||||
case ACTIVE_RF2:
|
case ACTIVE_RF2:
|
||||||
initCC1101();
|
initCC1101();
|
||||||
enableRF2Receive();
|
enableRF2Receive();
|
||||||
currentReceiver = ACTIVE_RF2;
|
currentReceiver = ACTIVE_RF2;
|
||||||
break;
|
break;
|
||||||
# endif
|
# endif
|
||||||
case ACTIVE_RECERROR:
|
case ACTIVE_RECERROR:
|
||||||
Log.error(F("ERROR: no receiver selected" CR));
|
Log.error(F("ERROR: no receiver selected" CR));
|
||||||
break;
|
break;
|
||||||
# ifndef ARDUINO_AVR_UNO // Space issues with the UNO
|
|
||||||
default:
|
default:
|
||||||
Log.error(F("ERROR: unsupported receiver %d" CR), RFConfig.activeReceiver);
|
Log.error(F("ERROR: unsupported receiver %d" CR), RFConfig.activeReceiver);
|
||||||
# endif
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -178,20 +173,20 @@ String stateRFMeasures() {
|
|||||||
StaticJsonDocument<JSON_MSG_BUFFER> jsonBuffer;
|
StaticJsonDocument<JSON_MSG_BUFFER> jsonBuffer;
|
||||||
JsonObject RFdata = jsonBuffer.to<JsonObject>();
|
JsonObject RFdata = jsonBuffer.to<JsonObject>();
|
||||||
RFdata["active"] = RFConfig.activeReceiver;
|
RFdata["active"] = RFConfig.activeReceiver;
|
||||||
# if defined(ZradioCC1101) || defined(ZradioSX127x)
|
# if defined(ZradioCC1101) || defined(ZradioSX127x)
|
||||||
RFdata["frequency"] = RFConfig.frequency;
|
RFdata["frequency"] = RFConfig.frequency;
|
||||||
if (RFConfig.activeReceiver == ACTIVE_RTL) {
|
if (RFConfig.activeReceiver == ACTIVE_RTL) {
|
||||||
# ifdef ZgatewayRTL_433
|
# ifdef ZgatewayRTL_433
|
||||||
RFdata["rssithreshold"] = (int)getRTLrssiThreshold();
|
RFdata["rssithreshold"] = (int)getRTLrssiThreshold();
|
||||||
RFdata["rssi"] = (int)getRTLCurrentRSSI();
|
RFdata["rssi"] = (int)getRTLCurrentRSSI();
|
||||||
RFdata["avgrssi"] = (int)getRTLAverageRSSI();
|
RFdata["avgrssi"] = (int)getRTLAverageRSSI();
|
||||||
RFdata["count"] = (int)getRTLMessageCount();
|
RFdata["count"] = (int)getRTLMessageCount();
|
||||||
# endif
|
|
||||||
# ifdef ZradioSX127x
|
|
||||||
RFdata["ookthreshold"] = (int)getOOKThresh();
|
|
||||||
# endif
|
|
||||||
}
|
|
||||||
# endif
|
# endif
|
||||||
|
# ifdef ZradioSX127x
|
||||||
|
RFdata["ookthreshold"] = (int)getOOKThresh();
|
||||||
|
# endif
|
||||||
|
}
|
||||||
|
# endif
|
||||||
pub(subjectcommonRFtoMQTT, RFdata);
|
pub(subjectcommonRFtoMQTT, RFdata);
|
||||||
|
|
||||||
String output;
|
String output;
|
||||||
@@ -211,21 +206,21 @@ void RFConfig_fromJson(JsonObject& RFdata) {
|
|||||||
Config_update(RFdata, "active", RFConfig.activeReceiver);
|
Config_update(RFdata, "active", RFConfig.activeReceiver);
|
||||||
success = true;
|
success = true;
|
||||||
}
|
}
|
||||||
# ifdef ZgatewayRTL_433
|
# ifdef ZgatewayRTL_433
|
||||||
if (RFdata.containsKey("rssithreshold")) {
|
if (RFdata.containsKey("rssithreshold")) {
|
||||||
Log.notice(F("RTL_433 RSSI Threshold : %d " CR), RFConfig.rssiThreshold);
|
Log.notice(F("RTL_433 RSSI Threshold : %d " CR), RFConfig.rssiThreshold);
|
||||||
Config_update(RFdata, "rssithreshold", RFConfig.rssiThreshold);
|
Config_update(RFdata, "rssithreshold", RFConfig.rssiThreshold);
|
||||||
rtl_433.setRSSIThreshold(RFConfig.rssiThreshold);
|
rtl_433.setRSSIThreshold(RFConfig.rssiThreshold);
|
||||||
success = true;
|
success = true;
|
||||||
}
|
}
|
||||||
# if defined(RF_SX1276) || defined(RF_SX1278)
|
# if defined(RF_SX1276) || defined(RF_SX1278)
|
||||||
if (RFdata.containsKey("ookthreshold")) {
|
if (RFdata.containsKey("ookthreshold")) {
|
||||||
Config_update(RFdata, "ookthreshold", RFConfig.newOokThreshold);
|
Config_update(RFdata, "ookthreshold", RFConfig.newOokThreshold);
|
||||||
Log.notice(F("RTL_433 ookThreshold %d" CR), RFConfig.newOokThreshold);
|
Log.notice(F("RTL_433 ookThreshold %d" CR), RFConfig.newOokThreshold);
|
||||||
rtl_433.setOOKThreshold(RFConfig.newOokThreshold);
|
rtl_433.setOOKThreshold(RFConfig.newOokThreshold);
|
||||||
success = true;
|
success = true;
|
||||||
}
|
}
|
||||||
# endif
|
# endif
|
||||||
if (RFdata.containsKey("status")) {
|
if (RFdata.containsKey("status")) {
|
||||||
Log.notice(F("RF get status:" CR));
|
Log.notice(F("RF get status:" CR));
|
||||||
rtl_433.getStatus();
|
rtl_433.getStatus();
|
||||||
@@ -234,10 +229,10 @@ void RFConfig_fromJson(JsonObject& RFdata) {
|
|||||||
if (!success) {
|
if (!success) {
|
||||||
Log.error(F("MQTTtoRF Fail json" CR));
|
Log.error(F("MQTTtoRF Fail json" CR));
|
||||||
}
|
}
|
||||||
# endif
|
# endif
|
||||||
disableCurrentReceiver();
|
disableCurrentReceiver();
|
||||||
enableActiveReceiver();
|
enableActiveReceiver();
|
||||||
# ifdef ESP32
|
# ifdef ESP32
|
||||||
if (RFdata.containsKey("erase") && RFdata["erase"].as<bool>()) {
|
if (RFdata.containsKey("erase") && RFdata["erase"].as<bool>()) {
|
||||||
// Erase config from NVS (non-volatile storage)
|
// Erase config from NVS (non-volatile storage)
|
||||||
preferences.begin(Gateway_Short_Name, false);
|
preferences.begin(Gateway_Short_Name, false);
|
||||||
@@ -257,10 +252,10 @@ void RFConfig_fromJson(JsonObject& RFdata) {
|
|||||||
jo["frequency"] = RFConfig.frequency;
|
jo["frequency"] = RFConfig.frequency;
|
||||||
jo["active"] = RFConfig.activeReceiver;
|
jo["active"] = RFConfig.activeReceiver;
|
||||||
// Don't save those for now, need to be tested
|
// Don't save those for now, need to be tested
|
||||||
# ifdef ZgatewayRTL_433
|
# ifdef ZgatewayRTL_433
|
||||||
//jo["rssithreshold"] = RFConfig.rssiThreshold;
|
//jo["rssithreshold"] = RFConfig.rssiThreshold;
|
||||||
//jo["ookthreshold"] = RFConfig.newOokThreshold;
|
//jo["ookthreshold"] = RFConfig.newOokThreshold;
|
||||||
# endif
|
# endif
|
||||||
// Save config into NVS (non-volatile storage)
|
// Save config into NVS (non-volatile storage)
|
||||||
String conf = "";
|
String conf = "";
|
||||||
serializeJson(jsonBuffer, conf);
|
serializeJson(jsonBuffer, conf);
|
||||||
@@ -269,7 +264,7 @@ void RFConfig_fromJson(JsonObject& RFdata) {
|
|||||||
preferences.end();
|
preferences.end();
|
||||||
Log.notice(F("RF Config_save: %s, result: %d" CR), conf.c_str(), result);
|
Log.notice(F("RF Config_save: %s, result: %d" CR), conf.c_str(), result);
|
||||||
}
|
}
|
||||||
# endif
|
# endif
|
||||||
}
|
}
|
||||||
|
|
||||||
void RFConfig_init() {
|
void RFConfig_init() {
|
||||||
@@ -280,7 +275,7 @@ void RFConfig_init() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
void RFConfig_load() {
|
void RFConfig_load() {
|
||||||
# ifdef ESP32
|
# ifdef ESP32
|
||||||
StaticJsonDocument<JSON_MSG_BUFFER> jsonBuffer;
|
StaticJsonDocument<JSON_MSG_BUFFER> jsonBuffer;
|
||||||
preferences.begin(Gateway_Short_Name, true);
|
preferences.begin(Gateway_Short_Name, true);
|
||||||
if (preferences.isKey("RFConfig")) {
|
if (preferences.isKey("RFConfig")) {
|
||||||
@@ -302,9 +297,9 @@ void RFConfig_load() {
|
|||||||
Log.notice(F("RF Config not found using default" CR));
|
Log.notice(F("RF Config not found using default" CR));
|
||||||
enableActiveReceiver();
|
enableActiveReceiver();
|
||||||
}
|
}
|
||||||
# else
|
# else
|
||||||
enableActiveReceiver();
|
enableActiveReceiver();
|
||||||
# endif
|
# endif
|
||||||
}
|
}
|
||||||
|
|
||||||
void MQTTtoRFset(char* topicOri, JsonObject& RFdata) {
|
void MQTTtoRFset(char* topicOri, JsonObject& RFdata) {
|
||||||
@@ -330,10 +325,4 @@ void MQTTtoRFset(char* topicOri, JsonObject& RFdata) {
|
|||||||
stateRFMeasures();
|
stateRFMeasures();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
# else
|
|
||||||
void RFConfig_init() {}
|
|
||||||
void RFConfig_load() {}
|
|
||||||
void MQTTtoRFset(char* topicOri, JsonObject& RFdata) {}
|
|
||||||
void enableActiveReceiver() {}
|
|
||||||
# endif
|
|
||||||
#endif
|
#endif
|
||||||
@@ -1,7 +1,7 @@
|
|||||||
/*
|
/*
|
||||||
OpenMQTTGateway Addon - ESP8266 or Arduino program for home automation
|
OpenMQTTGateway Addon - ESP8266 or Arduino program for home automation
|
||||||
|
|
||||||
Act as a wifi or ethernet gateway between your 433mhz/infrared IR signal and a MQTT broker
|
Act as a gateway between your 433mhz, infrared IR, BLE, LoRa signal and one interface like an MQTT broker
|
||||||
Send and receiving command by MQTT
|
Send and receiving command by MQTT
|
||||||
|
|
||||||
Supported boards with displays
|
Supported boards with displays
|
||||||
|
|||||||
+2
-2
@@ -1,7 +1,7 @@
|
|||||||
/*
|
/*
|
||||||
OpenMQTTGateway - ESP8266 or Arduino program for home automation
|
Theengs OpenMQTTGateway - We Unite Sensors in One Open-Source Interface
|
||||||
|
|
||||||
Act as a wifi or ethernet gateway between your 433mhz/infrared IR signal and a MQTT broker
|
Act as a gateway between your 433mhz, infrared IR, BLE, LoRa signal and one interface like an MQTT broker
|
||||||
Send and receiving command by MQTT
|
Send and receiving command by MQTT
|
||||||
|
|
||||||
This gateway enables to:
|
This gateway enables to:
|
||||||
|
|||||||
+2
-4
@@ -1,13 +1,11 @@
|
|||||||
/*
|
/*
|
||||||
OpenMQTTGateway - ESP8266 or Arduino program for home automation
|
OpenMQTTGateway - ESP8266 or Arduino program for home automation
|
||||||
|
|
||||||
Act as a wifi or ethernet gateway between your 433mhz/infrared IR signal/BLE and a MQTT broker
|
Act as a gateway between your 433mhz, infrared IR, BLE, LoRa signal and one interface like an MQTT broker
|
||||||
Send and receiving command by MQTT
|
Send and receiving command by MQTT
|
||||||
|
|
||||||
This gateway enables to:
|
This gateway enables to:
|
||||||
- publish MQTT data to a different topic related to BLE devices rssi signal
|
- publish MQTT data to a topic related to BLE devices data
|
||||||
- publish MQTT data related to mi flora temperature, moisture, fertility and lux
|
|
||||||
- publish MQTT data related to mi jia indoor temperature & humidity sensor
|
|
||||||
|
|
||||||
Copyright: (c)Florian ROBERT
|
Copyright: (c)Florian ROBERT
|
||||||
|
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
OpenMQTTGateway - ESP8266 or Arduino program for home automation
|
Theengs OpenMQTTGateway - We Unite Sensors in One Open-Source Interface
|
||||||
|
|
||||||
Act as a wifi or ethernet gateway between your GridFree SUN-2000G inverter and a MQTT broker.
|
Act as a wifi or ethernet gateway between your GridFree SUN-2000G inverter and a MQTT broker.
|
||||||
Send inverter metrics by MQTT.
|
Send inverter metrics by MQTT.
|
||||||
|
|||||||
+1
-1
@@ -1,7 +1,7 @@
|
|||||||
/*
|
/*
|
||||||
OpenMQTTGateway - ESP8266 or Arduino program for home automation
|
OpenMQTTGateway - ESP8266 or Arduino program for home automation
|
||||||
|
|
||||||
Act as a wifi or ethernet gateway between your 433mhz/infrared IR signal and a MQTT broker
|
Act as a gateway between your 433mhz, infrared IR, BLE, LoRa signal and one interface like an MQTT broker
|
||||||
Send and receiving command by MQTT
|
Send and receiving command by MQTT
|
||||||
|
|
||||||
This gateway enables to:
|
This gateway enables to:
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
OpenMQTTGateway - ESP8266 or Arduino program for home automation
|
Theengs OpenMQTTGateway - We Unite Sensors in One Open-Source Interface
|
||||||
|
|
||||||
Act as a wifi or ethernet gateway between your 433mhz/infrared IR/BLE signal and a MQTT broker
|
Act as a wifi or ethernet gateway between your 433mhz/infrared IR/BLE signal and a MQTT broker
|
||||||
Send and receiving command by MQTT
|
Send and receiving command by MQTT
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
/*
|
/*
|
||||||
OpenMQTTGateway - ESP8266 or Arduino program for home automation
|
OpenMQTTGateway - ESP8266 or Arduino program for home automation
|
||||||
|
|
||||||
Act as a wifi or ethernet gateway between your 433mhz/infrared IR signal and a MQTT broker
|
Act as a gateway between your 433mhz, infrared IR, BLE, LoRa signal and one interface like an MQTT broker
|
||||||
Send and receiving command by MQTT
|
Send and receiving command by MQTT
|
||||||
|
|
||||||
This gateway enables to:
|
This gateway enables to:
|
||||||
|
|||||||
+2
-2
@@ -1,7 +1,7 @@
|
|||||||
/*
|
/*
|
||||||
OpenMQTTGateway - ESP8266 or Arduino program for home automation
|
Theengs OpenMQTTGateway - We Unite Sensors in One Open-Source Interface
|
||||||
|
|
||||||
Act as a wifi or ethernet gateway between your 433mhz/infrared IR signal and a MQTT broker
|
Act as a gateway between your 433mhz, infrared IR, BLE, LoRa signal and one interface like an MQTT broker
|
||||||
Send and receiving command by MQTT
|
Send and receiving command by MQTT
|
||||||
|
|
||||||
This gateway enables to:
|
This gateway enables to:
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
/*
|
/*
|
||||||
OpenMQTTGateway - ESP8266 or Arduino program for home automation
|
Theengs OpenMQTTGateway - We Unite Sensors in One Open-Source Interface
|
||||||
|
|
||||||
Act as a wifi or ethernet gateway between your 433mhz/infrared IR signal and a MQTT broker
|
Act as a gateway between your 433mhz, infrared IR, BLE, LoRa signal and one interface like an MQTT broker
|
||||||
Send and receiving command by MQTT
|
Send and receiving command by MQTT
|
||||||
|
|
||||||
This gateway enables to:
|
This gateway enables to:
|
||||||
@@ -292,9 +292,7 @@ void MQTTtoRF2(char* topicOri, JsonObject& RF2data) { // json object decoding
|
|||||||
// we acknowledge the sending by publishing the value to an acknowledgement topic, for the moment even if it is a signal repetition we acknowledge also
|
// we acknowledge the sending by publishing the value to an acknowledgement topic, for the moment even if it is a signal repetition we acknowledge also
|
||||||
pub(subjectRF2toMQTT, RF2data);
|
pub(subjectRF2toMQTT, RF2data);
|
||||||
} else {
|
} else {
|
||||||
# ifndef ARDUINO_AVR_UNO // Space issues with the UNO
|
|
||||||
pub(subjectGTWRF2toMQTT, "{\"Status\": \"Error\"}"); // Fail feedback
|
pub(subjectGTWRF2toMQTT, "{\"Status\": \"Error\"}"); // Fail feedback
|
||||||
# endif
|
|
||||||
Log.error(F("MQTTtoRF2 failed json read" CR));
|
Log.error(F("MQTTtoRF2 failed json read" CR));
|
||||||
}
|
}
|
||||||
enableActiveReceiver();
|
enableActiveReceiver();
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
OpenMQTTGateway - ESP8266 or Arduino program for home automation
|
Theengs OpenMQTTGateway - We Unite Sensors in One Open-Source Interface
|
||||||
|
|
||||||
Act as a wifi or ethernet gateway between your RF/infrared IR signal and a MQTT broker
|
Act as a wifi or ethernet gateway between your RF/infrared IR signal and a MQTT broker
|
||||||
Send and receiving command by MQTT
|
Send and receiving command by MQTT
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
OpenMQTTGateway - ESP8266 or Arduino program for home automation
|
Theengs OpenMQTTGateway - We Unite Sensors in One Open-Source Interface
|
||||||
|
|
||||||
Act as a wifi or ethernet gateway between your RS232 device and a MQTT broker
|
Act as a wifi or ethernet gateway between your RS232 device and a MQTT broker
|
||||||
Send and receiving command by MQTT
|
Send and receiving command by MQTT
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
/*
|
/*
|
||||||
OpenMQTTGateway - ESP8266 or Arduino program for home automation
|
OpenMQTTGateway - ESP8266 or Arduino program for home automation
|
||||||
|
|
||||||
Act as a wifi or ethernet gateway between your 433mhz/infrared IR signal and a MQTT broker
|
Act as a gateway between your 433mhz, infrared IR, BLE, LoRa signal and one interface like an MQTT broker
|
||||||
Send and receiving command by MQTT
|
Send and receiving command by MQTT
|
||||||
|
|
||||||
This gateway enables to:
|
This gateway enables to:
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
/*
|
/*
|
||||||
OpenMQTTGateway - ESP8266 or Arduino program for home automation
|
Theengs OpenMQTTGateway - We Unite Sensors in One Open-Source Interface
|
||||||
|
|
||||||
Act as a wifi or ethernet gateway between your 433mhz/infrared IR signal and a MQTT broker
|
Act as a gateway between your 433mhz, infrared IR, BLE, LoRa signal and one interface like an MQTT broker
|
||||||
Send and receiving command by MQTT
|
Send and receiving command by MQTT
|
||||||
|
|
||||||
This gateway enables to:
|
This gateway enables to:
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
/*
|
/*
|
||||||
OpenMQTTGateway - ESP8266 or Arduino program for home automation
|
OpenMQTTGateway - ESP8266 or Arduino program for home automation
|
||||||
|
|
||||||
Act as a wifi or ethernet gateway between your 433mhz/infrared IR signal and a MQTT broker
|
Act as a gateway between your 433mhz, infrared IR, BLE, LoRa signal and one interface like an MQTT broker
|
||||||
Send and receiving command by MQTT
|
Send and receiving command by MQTT
|
||||||
|
|
||||||
This gateway enables to:
|
This gateway enables to:
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
/*
|
/*
|
||||||
OpenMQTTGateway Addon - ESP8266 or Arduino program for home automation
|
OpenMQTTGateway Addon - ESP8266 or Arduino program for home automation
|
||||||
|
|
||||||
Act as a wifi or ethernet gateway between your 433mhz/infrared IR signal and a MQTT broker
|
Act as a gateway between your 433mhz, infrared IR, BLE, LoRa signal and one interface like an MQTT broker
|
||||||
Send and receiving command by MQTT
|
Send and receiving command by MQTT
|
||||||
|
|
||||||
This is the Home Assistant MQTT Discovery addon.
|
This is the Home Assistant MQTT Discovery addon.
|
||||||
|
|||||||
+2
-2
@@ -1,7 +1,7 @@
|
|||||||
/*
|
/*
|
||||||
OpenMQTTGateway Addon - ESP8266 or Arduino program for home automation
|
Theengs OpenMQTTGateway - We Unite Sensors in One Open-Source Interface
|
||||||
|
|
||||||
Act as a wifi or ethernet gateway between your 433mhz/infrared IR signal and a MQTT broker
|
Act as a gateway between your 433mhz, infrared IR, BLE, LoRa signal and one interface like an MQTT broker
|
||||||
Send and receiving command by MQTT
|
Send and receiving command by MQTT
|
||||||
|
|
||||||
Analog GPIO reading Addon
|
Analog GPIO reading Addon
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
/*
|
/*
|
||||||
OpenMQTTGateway Addon - ESP8266 or Arduino program for home automation
|
Theengs OpenMQTTGateway - We Unite Sensors in One Open-Source Interface
|
||||||
|
|
||||||
Act as a wifi or ethernet gateway between your 433mhz/infrared IR signal and a MQTT broker
|
Act as a gateway between your 433mhz, infrared IR, BLE, LoRa signal and one interface like an MQTT broker
|
||||||
Send and receiving command by MQTT
|
Send and receiving command by MQTT
|
||||||
|
|
||||||
This is the Climate Addon:
|
This is the Climate Addon:
|
||||||
@@ -13,12 +13,12 @@
|
|||||||
Connection Schemata:
|
Connection Schemata:
|
||||||
--------------------
|
--------------------
|
||||||
|
|
||||||
AHT10 ------> Arduino Uno ----------> ESP8266
|
AHT10 ------> ESP8266
|
||||||
==============================================
|
==============================================
|
||||||
Vcc ---------> 5V -------------------> 3v3 (3V)
|
Vcc ---------> 3v3 (3V)
|
||||||
GND ---------> GND ------------------> GND
|
GND ---------> GND
|
||||||
SCL ---------> Pin A5 ---------------> D1
|
SCL ---------> D1
|
||||||
SDA ---------> Pin A4 ---------------> D2
|
SDA ---------> D2
|
||||||
|
|
||||||
This file is part of OpenMQTTGateway.
|
This file is part of OpenMQTTGateway.
|
||||||
|
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
/*
|
/*
|
||||||
OpenMQTTGateway Addon - ESP8266 or Arduino program for home automation
|
Theengs OpenMQTTGateway - We Unite Sensors in One Open-Source Interface
|
||||||
|
|
||||||
Act as a wifi or ethernet gateway between your 433mhz/infrared IR signal and a MQTT broker
|
Act as a gateway between your 433mhz, infrared IR, BLE, LoRa signal and one interface like an MQTT broker
|
||||||
Send and receiving command by MQTT
|
Send and receiving command by MQTT
|
||||||
|
|
||||||
This is the Light Meter Addon:
|
This is the Light Meter Addon:
|
||||||
@@ -11,13 +11,13 @@
|
|||||||
Connection Schemata:
|
Connection Schemata:
|
||||||
--------------------
|
--------------------
|
||||||
|
|
||||||
BH1750 ------> Arduino Uno ----------> ESP8266
|
BH1750 ------> ESP8266
|
||||||
==============================================
|
==============================================
|
||||||
Vcc ---------> 5V -------------------> Vu (5V)
|
Vcc ---------> Vu (5V)
|
||||||
GND ---------> GND ------------------> GND
|
GND ---------> GND
|
||||||
SCL ---------> Pin A5 ---------------> D1
|
SCL ---------> D1
|
||||||
SDA ---------> Pin A4 ---------------> D2
|
SDA ---------> D2
|
||||||
ADD ---------> N/C (Not Connected) --> N/C (Not Connected)
|
ADD ---------> N/C (Not Connected)
|
||||||
|
|
||||||
Copyright: (c) Hans-Juergen Dinges
|
Copyright: (c) Hans-Juergen Dinges
|
||||||
|
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
/*
|
/*
|
||||||
OpenMQTTGateway Addon - ESP8266 or Arduino program for home automation
|
OpenMQTTGateway Addon - ESP8266 or Arduino program for home automation
|
||||||
|
|
||||||
Act as a wifi or ethernet gateway between your 433mhz/infrared IR signal and a MQTT broker
|
Act as a gateway between your 433mhz, infrared IR, BLE, LoRa signal and one interface like an MQTT broker
|
||||||
Send and receiving command by MQTT
|
Send and receiving command by MQTT
|
||||||
|
|
||||||
This is the Climate Addon:
|
This is the Climate Addon:
|
||||||
@@ -13,12 +13,12 @@
|
|||||||
Connection Schemata:
|
Connection Schemata:
|
||||||
--------------------
|
--------------------
|
||||||
|
|
||||||
BME280/BMP280 ------> Arduino Uno ----------> ESP8266
|
BME280/BMP280 ------> ESP8266
|
||||||
=====================================================
|
=====================================================
|
||||||
Vcc ----------------> 5V/3.3V ----------> 5V/3.3V (5V or 3.3V depends on the BME280/BMP280 board variant)
|
Vcc ----------------> 5V/3.3V (5V or 3.3V depends on the BME280/BMP280 board variant)
|
||||||
GND ----------------> GND ----------> GND
|
GND ----------------> GND
|
||||||
SCL ----------------> Pin A5 ----------> D1
|
SCL ----------------> D1
|
||||||
SDA ----------------> Pin A4 ----------> D2
|
SDA ----------------> D2
|
||||||
|
|
||||||
Copyright: (c) Hans-Juergen Dinges
|
Copyright: (c) Hans-Juergen Dinges
|
||||||
|
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
OpenMQTTGateway Addon - ESP8266 or Arduino program for home automation
|
Theengs OpenMQTTGateway - We Unite Sensors in One Open-Source Interface
|
||||||
|
|
||||||
Act as a wifi or ethernet gateway between your 433mhz/infrared IR/BLE signal and a MQTT broker
|
Act as a wifi or ethernet gateway between your 433mhz/infrared IR/BLE signal and a MQTT broker
|
||||||
Send and receiving command by MQTT
|
Send and receiving command by MQTT
|
||||||
|
|||||||
+2
-2
@@ -1,7 +1,7 @@
|
|||||||
/*
|
/*
|
||||||
OpenMQTTGateway Addon - ESP8266 or Arduino program for home automation
|
Theengs OpenMQTTGateway - We Unite Sensors in One Open-Source Interface
|
||||||
|
|
||||||
Act as a wifi or ethernet gateway between your 433mhz/infrared IR signal and a MQTT broker
|
Act as a gateway between your 433mhz, infrared IR, BLE, LoRa signal and one interface like an MQTT broker
|
||||||
Send and receiving command by MQTT
|
Send and receiving command by MQTT
|
||||||
|
|
||||||
DHT reading Addon
|
DHT reading Addon
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
OpenMQTTGateway Addon - ESP8266 or Arduino program for home automation
|
Theengs OpenMQTTGateway - We Unite Sensors in One Open-Source Interface
|
||||||
|
|
||||||
Act as a wifi or ethernet gateway between your 433mhz/infrared IR/BLE signal and a MQTT broker
|
Act as a wifi or ethernet gateway between your 433mhz/infrared IR/BLE signal and a MQTT broker
|
||||||
Send and receiving command by MQTT
|
Send and receiving command by MQTT
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
/*
|
/*
|
||||||
OpenMQTTGateway Addon - ESP8266 or Arduino program for home automation
|
Theengs OpenMQTTGateway - We Unite Sensors in One Open-Source Interface
|
||||||
Act as a wifi or ethernet gateway between your 433mhz/infrared IR signal and a MQTT broker
|
Act as a gateway between your 433mhz, infrared IR, BLE, LoRa signal and one interface like an MQTT broker
|
||||||
Send and receiving command by MQTT
|
Send and receiving command by MQTT
|
||||||
|
|
||||||
GPIO Input derived from HC SR-501 reading Addon and https://www.arduino.cc/en/Tutorial/Debounce
|
GPIO Input derived from HC SR-501 reading Addon and https://www.arduino.cc/en/Tutorial/Debounce
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
/*
|
/*
|
||||||
OpenMQTTGateway Addon - ESP8266 or Arduino program for home automation
|
Theengs OpenMQTTGateway - We Unite Sensors in One Open-Source Interface
|
||||||
Act as a wifi or ethernet gateway between your 433mhz/infrared IR signal and a MQTT broker
|
Act as a gateway between your 433mhz, infrared IR, BLE, LoRa signal and one interface like an MQTT broker
|
||||||
Send and receiving command by MQTT
|
Send and receiving command by MQTT
|
||||||
|
|
||||||
GPIO KeyCode derived from GPIO Input
|
GPIO KeyCode derived from GPIO Input
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
/*
|
/*
|
||||||
OpenMQTTGateway Addon - ESP8266 or Arduino program for home automation
|
Theengs OpenMQTTGateway - We Unite Sensors in One Open-Source Interface
|
||||||
|
|
||||||
Act as a wifi or ethernet gateway between your 433mhz/infrared IR signal and a MQTT broker
|
Act as a gateway between your 433mhz, infrared IR, BLE, LoRa signal and one interface like an MQTT broker
|
||||||
Send and receiving command by MQTT
|
Send and receiving command by MQTT
|
||||||
|
|
||||||
HC SR-04 reading Addon
|
HC SR-04 reading Addon
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
/*
|
/*
|
||||||
OpenMQTTGateway Addon - ESP8266 or Arduino program for home automation
|
Theengs OpenMQTTGateway - We Unite Sensors in One Open-Source Interface
|
||||||
|
|
||||||
Act as a wifi or ethernet gateway between your 433mhz/infrared IR signal and a MQTT broker
|
Act as a gateway between your 433mhz, infrared IR, BLE, LoRa signal and one interface like an MQTT broker
|
||||||
Send and receiving command by MQTT
|
Send and receiving command by MQTT
|
||||||
|
|
||||||
HC SR-501 reading Addon
|
HC SR-501 reading Addon
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
/*
|
/*
|
||||||
OpenMQTTGateway Addon - ESP8266 or Arduino program for home automation
|
Theengs OpenMQTTGateway - We Unite Sensors in One Open-Source Interface
|
||||||
|
|
||||||
Act as a wifi or ethernet gateway between your 433mhz/infrared IR signal and a MQTT broker
|
Act as a gateway between your 433mhz, infrared IR, BLE, LoRa signal and one interface like an MQTT broker
|
||||||
Send and receiving command by MQTT
|
Send and receiving command by MQTT
|
||||||
|
|
||||||
This is the Climate Addon:
|
This is the Climate Addon:
|
||||||
@@ -13,12 +13,12 @@
|
|||||||
Connection Schemata:
|
Connection Schemata:
|
||||||
--------------------
|
--------------------
|
||||||
|
|
||||||
HTU21 ------> Arduino Uno ----------> ESP8266
|
HTU21 ------> ESP8266
|
||||||
==============================================
|
==============================================
|
||||||
Vcc ---------> 5V -------------------> Vu (5V)
|
Vcc ---------> Vu (5V)
|
||||||
GND ---------> GND ------------------> GND
|
GND ---------> GND
|
||||||
SCL ---------> Pin A5 ---------------> D1
|
SCL ---------> D1
|
||||||
SDA ---------> Pin A4 ---------------> D2
|
SDA ---------> D2
|
||||||
|
|
||||||
This file is part of OpenMQTTGateway.
|
This file is part of OpenMQTTGateway.
|
||||||
|
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
/*
|
/*
|
||||||
OpenMQTTGateway Addon - ESP8266 or Arduino program for home automation
|
Theengs OpenMQTTGateway - We Unite Sensors in One Open-Source Interface
|
||||||
|
|
||||||
Act as a wifi or ethernet gateway between your 433mhz/infrared IR signal and a MQTT broker
|
Act as a gateway between your 433mhz, infrared IR, BLE, LoRa signal and one interface like an MQTT broker
|
||||||
Send and receiving command by MQTT
|
Send and receiving command by MQTT
|
||||||
|
|
||||||
INA226 reading Addon
|
INA226 reading Addon
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
/*
|
/*
|
||||||
OpenMQTTGateway Addon - ESP8266 or Arduino program for home automation
|
OpenMQTTGateway Addon - ESP8266 or Arduino program for home automation
|
||||||
|
|
||||||
Act as a wifi or ethernet gateway between your 433mhz/infrared IR signal and a MQTT broker
|
Act as a gateway between your 433mhz, infrared IR, BLE, LoRa signal and one interface like an MQTT broker
|
||||||
Send and receiving command by MQTT
|
Send and receiving command by MQTT
|
||||||
|
|
||||||
This is a Temperature Addon:
|
This is a Temperature Addon:
|
||||||
@@ -13,12 +13,12 @@
|
|||||||
Connection Schemata:
|
Connection Schemata:
|
||||||
--------------------
|
--------------------
|
||||||
|
|
||||||
LM75 ------> Arduino Uno ----------> ESP8266
|
LM75 ------> ESP8266
|
||||||
==============================================
|
==============================================
|
||||||
Vcc ---------> 5V -------------------> Vu (5V)
|
Vcc ---------> Vu (5V)
|
||||||
GND ---------> GND ------------------> GND
|
GND ---------> GND
|
||||||
SCL ---------> Pin A5 ---------------> D1
|
SCL ---------> D1
|
||||||
SDA ---------> Pin A4 ---------------> D2
|
SDA ---------> D2
|
||||||
|
|
||||||
This file is part of OpenMQTTGateway.
|
This file is part of OpenMQTTGateway.
|
||||||
|
|
||||||
|
|||||||
+7
-7
@@ -1,7 +1,7 @@
|
|||||||
/*
|
/*
|
||||||
OpenMQTTGateway Addon - ESP8266 or Arduino program for home automation
|
Theengs OpenMQTTGateway - We Unite Sensors in One Open-Source Interface
|
||||||
|
|
||||||
Act as a wifi or ethernet gateway between your 433mhz/infrared IR signal and a MQTT broker
|
Act as a gateway between your 433mhz, infrared IR, BLE, LoRa signal and one interface like an MQTT broker
|
||||||
Send and receiving command by MQTT
|
Send and receiving command by MQTT
|
||||||
|
|
||||||
This is the MQ2 GAS Sensor Addon based on modules with a MQ:
|
This is the MQ2 GAS Sensor Addon based on modules with a MQ:
|
||||||
@@ -11,12 +11,12 @@
|
|||||||
Connection Scheme:
|
Connection Scheme:
|
||||||
--------------------
|
--------------------
|
||||||
|
|
||||||
MQ-2 -------> Arduino Uno ----------> ESP8266
|
MQ-2 -------> ESP8266
|
||||||
==============================================
|
==============================================
|
||||||
Vcc ---------> 3.3V or 5V------------> 3.3V or 5V
|
Vcc ---------> 3.3V or 5V
|
||||||
GND ---------> GND ------------------> GND
|
GND ---------> GND
|
||||||
A0 ----------> Pin A0 ---------------> A0
|
A0 ----------> A0
|
||||||
D0 ----------> Pin D4 ---------------> D4
|
D0 ----------> D4
|
||||||
|
|
||||||
This file is part of OpenMQTTGateway.
|
This file is part of OpenMQTTGateway.
|
||||||
|
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
/*
|
/*
|
||||||
OpenMQTTGateway Addon - ESP8266, ESP32 or Arduino program for home automation
|
OpenMQTTGateway Addon - ESP8266, ESP32 or Arduino program for home automation
|
||||||
|
|
||||||
Act as a wifi or ethernet gateway between your 433mhz/infrared IR signal and a MQTT broker
|
Act as a gateway between your 433mhz, infrared IR, BLE, LoRa signal and one interface like an MQTT broker
|
||||||
Send and receiving command by MQTT
|
Send and receiving command by MQTT
|
||||||
|
|
||||||
RN8209 reading Addon
|
RN8209 reading Addon
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
/*
|
/*
|
||||||
OpenMQTTGateway Addon - ESP8266 or Arduino program for home automation
|
Theengs OpenMQTTGateway - We Unite Sensors in One Open-Source Interface
|
||||||
|
|
||||||
Act as a wifi or ethernet gateway between your 433mhz/infrared IR signal and a MQTT broker
|
Act as a gateway between your 433mhz, infrared IR, BLE, LoRa signal and one interface like an MQTT broker
|
||||||
Send and receiving command by MQTT
|
Send and receiving command by MQTT
|
||||||
|
|
||||||
This is the Light Meter Addon based on modules with a TEMT6000:
|
This is the Light Meter Addon based on modules with a TEMT6000:
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
/*
|
/*
|
||||||
OpenMQTTGateway Addon - ESP8266 or Arduino program for home automation
|
Theengs OpenMQTTGateway - We Unite Sensors in One Open-Source Interface
|
||||||
|
|
||||||
Act as a wifi or ethernet gateway between your 433mhz/infrared IR signal and a MQTT broker
|
Act as a gateway between your 433mhz, infrared IR, BLE, LoRa signal and one interface like an MQTT broker
|
||||||
Send and receiving command by MQTT
|
Send and receiving command by MQTT
|
||||||
|
|
||||||
This is the Light Meter Addon based on modules with a TSL2561:
|
This is the Light Meter Addon based on modules with a TSL2561:
|
||||||
@@ -12,13 +12,13 @@
|
|||||||
Connection Scheme:
|
Connection Scheme:
|
||||||
--------------------
|
--------------------
|
||||||
|
|
||||||
TSL2561------> Arduino Uno ----------> ESP8266
|
TSL2561------> ESP8266
|
||||||
==============================================
|
==============================================
|
||||||
Vcc ---------> 3.3V -----------------> 3.3V
|
Vcc ---------> 3.3V
|
||||||
GND ---------> GND ------------------> GND
|
GND ---------> GND
|
||||||
SCL ---------> Pin A5 ---------------> D1
|
SCL ---------> D1
|
||||||
SDA ---------> Pin A4 ---------------> D2
|
SDA ---------> D2
|
||||||
ADD ---------> N/C (Not Connected) --> N/C (Not Connected)
|
ADD ---------> N/C (Not Connected)
|
||||||
|
|
||||||
Copyright: (c) Chris Broekema
|
Copyright: (c) Chris Broekema
|
||||||
|
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
/*
|
/*
|
||||||
OpenMQTTGateway Addon - ESP8266 or Arduino program for home automation
|
Theengs OpenMQTTGateway - We Unite Sensors in One Open-Source Interface
|
||||||
|
|
||||||
Act as a wifi or ethernet gateway between your 433mhz/infrared IR signal and a MQTT broker
|
Act as a gateway between your 433mhz, infrared IR, BLE, LoRa signal and one interface like an MQTT broker
|
||||||
Send and receiving command by MQTT
|
Send and receiving command by MQTT
|
||||||
|
|
||||||
For esp32, touch sensor reading add-on.
|
For esp32, touch sensor reading add-on.
|
||||||
|
|||||||
+2
-2
@@ -1,7 +1,7 @@
|
|||||||
/*
|
/*
|
||||||
OpenMQTTGateway - ESP8266 or Arduino program for home automation
|
Theengs OpenMQTTGateway - We Unite Sensors in One Open-Source Interface
|
||||||
|
|
||||||
Act as a wifi or ethernet gateway between your 433mhz/infrared IR signal and a MQTT broker
|
Act as a gateway between your 433mhz, infrared IR, BLE, LoRa signal and one interface like an MQTT broker
|
||||||
Send and receiving command by MQTT
|
Send and receiving command by MQTT
|
||||||
|
|
||||||
Copyright: (c)Florian ROBERT
|
Copyright: (c)Florian ROBERT
|
||||||
|
|||||||
+2
-2
@@ -1,7 +1,7 @@
|
|||||||
/*
|
/*
|
||||||
OpenMQTTGateway - ESP8266 or Arduino program for home automation
|
Theengs OpenMQTTGateway - We Unite Sensors in One Open-Source Interface
|
||||||
|
|
||||||
Act as a wifi or ethernet gateway between your 433mhz/infrared IR signal and a MQTT broker
|
Act as a gateway between your 433mhz, infrared IR, BLE, LoRa signal and one interface like an MQTT broker
|
||||||
Send and receiving command by MQTT
|
Send and receiving command by MQTT
|
||||||
|
|
||||||
This gateway enables to set your parameters for the 2G gateway
|
This gateway enables to set your parameters for the 2G gateway
|
||||||
|
|||||||
+2
-2
@@ -1,7 +1,7 @@
|
|||||||
/*
|
/*
|
||||||
OpenMQTTGateway - ESP8266 or Arduino program for home automation
|
Theengs OpenMQTTGateway - We Unite Sensors in One Open-Source Interface
|
||||||
|
|
||||||
Act as a wifi or ethernet gateway between your 433mhz/infrared IR signal and a MQTT broker
|
Act as a gateway between your 433mhz, infrared IR, BLE, LoRa signal and one interface like an MQTT broker
|
||||||
Send and receiving command by MQTT
|
Send and receiving command by MQTT
|
||||||
|
|
||||||
This files enables to set your parameter for the ADC value
|
This files enables to set your parameter for the ADC value
|
||||||
|
|||||||
+8
-8
@@ -1,7 +1,7 @@
|
|||||||
/*
|
/*
|
||||||
OpenMQTTGateway Addon - ESP8266 or Arduino program for home automation
|
Theengs OpenMQTTGateway - We Unite Sensors in One Open-Source Interface
|
||||||
|
|
||||||
Act as a wifi or ethernet gateway between your 433mhz/infrared IR signal and a MQTT broker
|
Act as a gateway between your 433mhz, infrared IR, BLE, LoRa signal and one interface like an MQTT broker
|
||||||
Send and receiving command by MQTT
|
Send and receiving command by MQTT
|
||||||
|
|
||||||
This is the Climate Addon:
|
This is the Climate Addon:
|
||||||
@@ -13,12 +13,12 @@
|
|||||||
Connection Schemata:
|
Connection Schemata:
|
||||||
--------------------
|
--------------------
|
||||||
|
|
||||||
AHT10 ------> Arduino Uno ----------> ESP8266
|
AHT10 ------> ESP8266
|
||||||
==============================================
|
=======================
|
||||||
Vcc ---------> 5V -------------------> 3v3 (3V)
|
Vcc ---------> 3v3 (3V)
|
||||||
GND ---------> GND ------------------> GND
|
GND ---------> GND
|
||||||
SCL ---------> Pin A5 ---------------> D1
|
SCL ---------> D1
|
||||||
SDA ---------> Pin A4 ---------------> D2
|
SDA ---------> D2
|
||||||
|
|
||||||
This file is part of OpenMQTTGateway.
|
This file is part of OpenMQTTGateway.
|
||||||
|
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
/*
|
/*
|
||||||
OpenMQTTGateway - ESP8266 or Arduino program for home automation
|
Theengs OpenMQTTGateway - We Unite Sensors in One Open-Source Interface
|
||||||
|
|
||||||
Act as a wifi or ethernet gateway between your 433mhz/infrared IR signal and a MQTT broker
|
Act as a gateway between your 433mhz, infrared IR, BLE, LoRa signal and one interface like an MQTT broker
|
||||||
Send and receiving command by MQTT
|
Send and receiving command by MQTT
|
||||||
|
|
||||||
This files enables to set your parameter for the BH1750 sensor
|
This files enables to set your parameter for the BH1750 sensor
|
||||||
@@ -26,13 +26,13 @@
|
|||||||
Connection Schemata:
|
Connection Schemata:
|
||||||
--------------------
|
--------------------
|
||||||
|
|
||||||
BH1750 ------> Arduino Uno ----------> ESP8266
|
BH1750 ------> ESP8266
|
||||||
==============================================
|
==================================
|
||||||
Vcc ---------> 5V -------------------> Vu (5V)
|
Vcc ---------> (5V)
|
||||||
GND ---------> GND ------------------> GND
|
GND ---------> GND
|
||||||
SCL ---------> Pin A5 ---------------> D1
|
SCL ---------> D1
|
||||||
SDA ---------> Pin A4 ---------------> D2
|
SDA ---------> D2
|
||||||
ADD ---------> N/C (Not Connected) --> N/C (Not Connected)
|
ADD ---------> N/C (Not Connected)
|
||||||
|
|
||||||
*/
|
*/
|
||||||
#ifndef config_BH1750_h
|
#ifndef config_BH1750_h
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
/*
|
/*
|
||||||
OpenMQTTGateway - ESP8266 or Arduino program for home automation
|
Theengs OpenMQTTGateway - We Unite Sensors in One Open-Source Interface
|
||||||
|
|
||||||
Act as a wifi or ethernet gateway between your 433mhz/infrared IR signal and a MQTT broker
|
Act as a gateway between your 433mhz, infrared IR, BLE, LoRa signal and one interface like an MQTT broker
|
||||||
Send and receiving command by MQTT
|
Send and receiving command by MQTT
|
||||||
|
|
||||||
This files enables you to set parameters for the BME280 or BMP280 sensors.
|
This files enables you to set parameters for the BME280 or BMP280 sensors.
|
||||||
@@ -26,12 +26,12 @@
|
|||||||
Connection Schemata:
|
Connection Schemata:
|
||||||
--------------------
|
--------------------
|
||||||
|
|
||||||
BME280/BMP280 ------> Arduino Uno ----------> ESP8266
|
BME280/BMP280 ------> ESP8266
|
||||||
=====================================================
|
==============================
|
||||||
Vcc ----------------> 5V/3.3V ----------> 5V/3.3V (5V or 3.3V depends on the BME280/BMP280 board variant)
|
Vcc ----------------> 5V/3.3V (5V or 3.3V depends on the BME280/BMP280 board variant)
|
||||||
GND ----------------> GND ----------> GND
|
GND ----------------> GND
|
||||||
SCL ----------------> Pin A5 ----------> D1
|
SCL ----------------> D1
|
||||||
SDA ----------------> Pin A4 ----------> D2
|
SDA ----------------> D2
|
||||||
|
|
||||||
*/
|
*/
|
||||||
#ifndef config_BME280_h
|
#ifndef config_BME280_h
|
||||||
|
|||||||
+2
-2
@@ -1,7 +1,7 @@
|
|||||||
/*
|
/*
|
||||||
OpenMQTTGateway - ESP8266 or Arduino program for home automation
|
Theengs OpenMQTTGateway - We Unite Sensors in One Open-Source Interface
|
||||||
|
|
||||||
Act as a wifi or ethernet gateway between your 433mhz/infrared IR signal and a MQTT broker
|
Act as a gateway between your 433mhz, infrared IR, BLE, LoRa signal and one interface like an MQTT broker
|
||||||
Send and receiving command by MQTT
|
Send and receiving command by MQTT
|
||||||
|
|
||||||
This files enables to set your parameter for the bluetooth low energy gateway (beacons detection)
|
This files enables to set your parameter for the bluetooth low energy gateway (beacons detection)
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
OpenMQTTGateway - ESP8266 or Arduino program for home automation
|
Theengs OpenMQTTGateway - We Unite Sensors in One Open-Source Interface
|
||||||
|
|
||||||
Act as a wifi or ethernet gateway between your RF/infrared IR signal and a MQTT broker
|
Act as a wifi or ethernet gateway between your RF/infrared IR signal and a MQTT broker
|
||||||
Send and receiving command by MQTT
|
Send and receiving command by MQTT
|
||||||
|
|||||||
+2
-2
@@ -1,7 +1,7 @@
|
|||||||
/*
|
/*
|
||||||
OpenMQTTGateway - ESP8266 or Arduino program for home automation
|
Theengs OpenMQTTGateway - We Unite Sensors in One Open-Source Interface
|
||||||
|
|
||||||
Act as a wifi or ethernet gateway between your 433mhz/infrared IR signal and a MQTT broker
|
Act as a gateway between your 433mhz, infrared IR, BLE, LoRa signal and one interface like an MQTT broker
|
||||||
Send and receiving command by MQTT
|
Send and receiving command by MQTT
|
||||||
|
|
||||||
This files enables to set your parameter for the DHT11/22 sensor
|
This files enables to set your parameter for the DHT11/22 sensor
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
OpenMQTTGateway - ESP8266 or Arduino program for home automation
|
Theengs OpenMQTTGateway - We Unite Sensors in One Open-Source Interface
|
||||||
|
|
||||||
Act as a wifi or ethernet gateway between your RF/infrared IR signal and a MQTT broker
|
Act as a wifi or ethernet gateway between your RF/infrared IR signal and a MQTT broker
|
||||||
Send and receiving command by MQTT
|
Send and receiving command by MQTT
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
OpenMQTTGateway - ESP8266 or Arduino program for home automation
|
Theengs OpenMQTTGateway - We Unite Sensors in One Open-Source Interface
|
||||||
|
|
||||||
This files enables you to set your parameters for the FASTLED actuator
|
This files enables you to set your parameters for the FASTLED actuator
|
||||||
|
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
OpenMQTTGateway - ESP8266 or Arduino program for home automation
|
Theengs OpenMQTTGateway - We Unite Sensors in One Open-Source Interface
|
||||||
|
|
||||||
Act as a wifi or ethernet gateway between your GridFree SUN-2000G inverter and a MQTT broker.
|
Act as a wifi or ethernet gateway between your GridFree SUN-2000G inverter and a MQTT broker.
|
||||||
Send inverter metrics by MQTT.
|
Send inverter metrics by MQTT.
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
/*
|
/*
|
||||||
OpenMQTTGateway - ESP8266 or Arduino program for home automation
|
Theengs OpenMQTTGateway - We Unite Sensors in One Open-Source Interface
|
||||||
|
|
||||||
Act as a wifi or ethernet gateway between your 433mhz/infrared IR signal and a MQTT broker
|
Act as a gateway between your 433mhz, infrared IR, BLE, LoRa signal and one interface like an MQTT broker
|
||||||
Send and receiving command by MQTT
|
Send and receiving command by MQTT
|
||||||
|
|
||||||
This files enables to set your parameter for the GPIOInput sensor
|
This files enables to set your parameter for the GPIOInput sensor
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
/*
|
/*
|
||||||
OpenMQTTGateway - ESP8266 or Arduino program for home automation
|
Theengs OpenMQTTGateway - We Unite Sensors in One Open-Source Interface
|
||||||
|
|
||||||
Act as a wifi or ethernet gateway between your 433mhz/infrared IR signal and a MQTT broker
|
Act as a gateway between your 433mhz, infrared IR, BLE, LoRa signal and one interface like an MQTT broker
|
||||||
Send and receiving command by MQTT
|
Send and receiving command by MQTT
|
||||||
|
|
||||||
This files enables to set your parameter for the GPIOKeyCode multi input
|
This files enables to set your parameter for the GPIOKeyCode multi input
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
/*
|
/*
|
||||||
OpenMQTTGateway - ESP8266 or Arduino program for home automation
|
Theengs OpenMQTTGateway - We Unite Sensors in One Open-Source Interface
|
||||||
|
|
||||||
Act as a wifi or ethernet gateway between your 433mhz/infrared IR signal and a MQTT broker
|
Act as a gateway between your 433mhz, infrared IR, BLE, LoRa signal and one interface like an MQTT broker
|
||||||
Send and receiving command by MQTT
|
Send and receiving command by MQTT
|
||||||
|
|
||||||
This files enables to set your parameter for the HCSR04 sensor
|
This files enables to set your parameter for the HCSR04 sensor
|
||||||
@@ -26,12 +26,12 @@
|
|||||||
Connection Schemata:
|
Connection Schemata:
|
||||||
--------------------
|
--------------------
|
||||||
|
|
||||||
HC-SR04 ------> Arduino Uno ----------> ESP8266
|
HC-SR04 ------> ESP8266
|
||||||
==============================================
|
=======================
|
||||||
Vcc ---------> 5V -------------------> Vu (5V)
|
Vcc ---------> Vu (5V)
|
||||||
GND ---------> GND ------------------> GND
|
GND ---------> GND
|
||||||
TRI ---------> Pin D6 ---------------> D6
|
TRI ---------> D6
|
||||||
ECH ---------> Pin D7 ---------------> D7
|
ECH ---------> D7
|
||||||
|
|
||||||
*/
|
*/
|
||||||
#ifndef config_HCSR04_h
|
#ifndef config_HCSR04_h
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
/*
|
/*
|
||||||
OpenMQTTGateway - ESP8266 or Arduino program for home automation
|
Theengs OpenMQTTGateway - We Unite Sensors in One Open-Source Interface
|
||||||
|
|
||||||
Act as a wifi or ethernet gateway between your 433mhz/infrared IR signal and a MQTT broker
|
Act as a gateway between your 433mhz, infrared IR, BLE, LoRa signal and one interface like an MQTT broker
|
||||||
Send and receiving command by MQTT
|
Send and receiving command by MQTT
|
||||||
|
|
||||||
This files enables to set your parameter for the HC SR-501 sensor
|
This files enables to set your parameter for the HC SR-501 sensor
|
||||||
|
|||||||
+8
-8
@@ -1,7 +1,7 @@
|
|||||||
/*
|
/*
|
||||||
OpenMQTTGateway Addon - ESP8266 or Arduino program for home automation
|
Theengs OpenMQTTGateway - We Unite Sensors in One Open-Source Interface
|
||||||
|
|
||||||
Act as a wifi or ethernet gateway between your 433mhz/infrared IR signal and a MQTT broker
|
Act as a gateway between your 433mhz, infrared IR, BLE, LoRa signal and one interface like an MQTT broker
|
||||||
Send and receiving command by MQTT
|
Send and receiving command by MQTT
|
||||||
|
|
||||||
This is the Climate Addon:
|
This is the Climate Addon:
|
||||||
@@ -13,12 +13,12 @@
|
|||||||
Connection Schemata:
|
Connection Schemata:
|
||||||
--------------------
|
--------------------
|
||||||
|
|
||||||
HTU21 ------> Arduino Uno ----------> ESP8266
|
HTU21 ------> ESP8266
|
||||||
==============================================
|
======================
|
||||||
Vcc ---------> 5V -------------------> Vu (5V)
|
Vcc ---------> Vu (5V)
|
||||||
GND ---------> GND ------------------> GND
|
GND ---------> GND
|
||||||
SCL ---------> Pin A5 ---------------> D1
|
SCL ---------> D1
|
||||||
SDA ---------> Pin A4 ---------------> D2
|
SDA ---------> D2
|
||||||
|
|
||||||
This file is part of OpenMQTTGateway.
|
This file is part of OpenMQTTGateway.
|
||||||
|
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
/*
|
/*
|
||||||
OpenMQTTGateway - ESP8266 or Arduino program for home automation
|
Theengs OpenMQTTGateway - We Unite Sensors in One Open-Source Interface
|
||||||
|
|
||||||
Act as a wifi or ethernet gateway between your 433mhz/infrared IR signal and a MQTT broker
|
Act as a gateway between your 433mhz, infrared IR, BLE, LoRa signal and one interface like an MQTT broker
|
||||||
Send and receiving command by MQTT
|
Send and receiving command by MQTT
|
||||||
|
|
||||||
This files enables to set your parameter for the INA226 sensor
|
This files enables to set your parameter for the INA226 sensor
|
||||||
|
|||||||
+1
-20
@@ -1,7 +1,7 @@
|
|||||||
/*
|
/*
|
||||||
OpenMQTTGateway - ESP8266 or Arduino program for home automation
|
OpenMQTTGateway - ESP8266 or Arduino program for home automation
|
||||||
|
|
||||||
Act as a wifi or ethernet gateway between your 433mhz/infrared IR signal and a MQTT broker
|
Act as a gateway between your 433mhz, infrared IR, BLE, LoRa signal and one interface like an MQTT broker
|
||||||
Send and receiving command by MQTT
|
Send and receiving command by MQTT
|
||||||
|
|
||||||
This files enables to set your parameter for the infrared gateway
|
This files enables to set your parameter for the infrared gateway
|
||||||
@@ -159,17 +159,6 @@ extern void MQTTtoIR(char* topicOri, JsonObject& RFdata);
|
|||||||
# define IR_COOLIX48
|
# define IR_COOLIX48
|
||||||
# define IR_HITACHI_AC264
|
# define IR_HITACHI_AC264
|
||||||
# define IR_HITACHI_AC296
|
# define IR_HITACHI_AC296
|
||||||
#elif __AVR_ATmega2560__
|
|
||||||
# define IR_COOLIX
|
|
||||||
# define IR_Whynter
|
|
||||||
# define IR_LG
|
|
||||||
# define IR_Sony
|
|
||||||
# define IR_DISH
|
|
||||||
# define IR_RC5
|
|
||||||
# define IR_Sharp
|
|
||||||
# define IR_SAMSUNG
|
|
||||||
# define IR_Raw
|
|
||||||
# define IR_PANASONIC
|
|
||||||
#else //IR supported protocols on arduino uncomment if you want to send with this protocol, NEC protocol is available per default
|
#else //IR supported protocols on arduino uncomment if you want to send with this protocol, NEC protocol is available per default
|
||||||
//#define IR_COOLIX
|
//#define IR_COOLIX
|
||||||
//#define IR_Whynter
|
//#define IR_Whynter
|
||||||
@@ -195,10 +184,6 @@ extern void MQTTtoIR(char* topicOri, JsonObject& RFdata);
|
|||||||
# define IR_RECEIVER_GPIO 2 //D4 /replace by 4 with sonoff rf bridge
|
# define IR_RECEIVER_GPIO 2 //D4 /replace by 4 with sonoff rf bridge
|
||||||
# elif ESP32
|
# elif ESP32
|
||||||
# define IR_RECEIVER_GPIO 26
|
# define IR_RECEIVER_GPIO 26
|
||||||
# elif __AVR_ATmega2560__
|
|
||||||
# define IR_RECEIVER_GPIO 2 // 2 = D2 on arduino mega
|
|
||||||
# else
|
|
||||||
# define IR_RECEIVER_GPIO 0 // 0 = D2 on arduino UNO
|
|
||||||
# endif
|
# endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@@ -207,10 +192,6 @@ extern void MQTTtoIR(char* topicOri, JsonObject& RFdata);
|
|||||||
# define IR_EMITTER_GPIO 16 //D0/ replace by 0 (D3) if you use IR LOLIN controller shield /replace by 5 with sonoff rf bridge
|
# define IR_EMITTER_GPIO 16 //D0/ replace by 0 (D3) if you use IR LOLIN controller shield /replace by 5 with sonoff rf bridge
|
||||||
# elif ESP32
|
# elif ESP32
|
||||||
# define IR_EMITTER_GPIO 14
|
# define IR_EMITTER_GPIO 14
|
||||||
# elif __AVR_ATmega2560__
|
|
||||||
# define IR_EMITTER_GPIO 9
|
|
||||||
# else
|
|
||||||
# define IR_EMITTER_GPIO 9
|
|
||||||
# endif
|
# endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|||||||
+7
-7
@@ -1,7 +1,7 @@
|
|||||||
/*
|
/*
|
||||||
OpenMQTTGateway Addon - ESP8266 or Arduino program for home automation
|
OpenMQTTGateway Addon - ESP8266 or Arduino program for home automation
|
||||||
|
|
||||||
Act as a wifi or ethernet gateway between your 433mhz/infrared IR signal and a MQTT broker
|
Act as a gateway between your 433mhz, infrared IR, BLE, LoRa signal and one interface like an MQTT broker
|
||||||
Send and receiving command by MQTT
|
Send and receiving command by MQTT
|
||||||
|
|
||||||
This is a Temperature Addon:
|
This is a Temperature Addon:
|
||||||
@@ -13,12 +13,12 @@
|
|||||||
Connection Schemata:
|
Connection Schemata:
|
||||||
--------------------
|
--------------------
|
||||||
|
|
||||||
LM75 ------> Arduino Uno ----------> ESP8266
|
LM75 ------> ESP8266
|
||||||
==============================================
|
======================
|
||||||
Vcc ---------> 5V -------------------> Vu (5V)
|
Vcc ---------> Vu (5V)
|
||||||
GND ---------> GND ------------------> GND
|
GND ---------> GND
|
||||||
SCL ---------> Pin A5 ---------------> D1
|
SCL ---------> D1
|
||||||
SDA ---------> Pin A4 ---------------> D2
|
SDA ---------> D2
|
||||||
|
|
||||||
This file is part of OpenMQTTGateway.
|
This file is part of OpenMQTTGateway.
|
||||||
|
|
||||||
|
|||||||
+2
-2
@@ -1,7 +1,7 @@
|
|||||||
/*
|
/*
|
||||||
OpenMQTTGateway - ESP8266 or Arduino program for home automation
|
Theengs OpenMQTTGateway - We Unite Sensors in One Open-Source Interface
|
||||||
|
|
||||||
Act as a wifi or ethernet gateway between your 433mhz/infrared IR signal and a MQTT broker
|
Act as a gateway between your 433mhz, infrared IR, BLE, LoRa signal and one interface like an MQTT broker
|
||||||
Send and receiving command by MQTT
|
Send and receiving command by MQTT
|
||||||
|
|
||||||
This files enables to set your parameter for the LORA gateway
|
This files enables to set your parameter for the LORA gateway
|
||||||
|
|||||||
+2
-2
@@ -1,7 +1,7 @@
|
|||||||
/*
|
/*
|
||||||
OpenMQTTGateway - ESP8266 or Arduino program for home automation
|
Theengs OpenMQTTGateway - We Unite Sensors in One Open-Source Interface
|
||||||
|
|
||||||
Act as a wifi or ethernet gateway between your 433mhz/infrared IR signal and a MQTT broker
|
Act as a gateway between your 433mhz, infrared IR, BLE, LoRa signal and one interface like an MQTT broker
|
||||||
Send and receiving command by MQTT
|
Send and receiving command by MQTT
|
||||||
|
|
||||||
This files enables to use M5Stick C board components (display)
|
This files enables to use M5Stick C board components (display)
|
||||||
|
|||||||
+8
-8
@@ -1,7 +1,7 @@
|
|||||||
/*
|
/*
|
||||||
OpenMQTTGateway Addon - ESP8266 or Arduino program for home automation
|
Theengs OpenMQTTGateway - We Unite Sensors in One Open-Source Interface
|
||||||
|
|
||||||
Act as a wifi or ethernet gateway between your 433mhz/infrared IR signal and a MQTT broker
|
Act as a gateway between your 433mhz, infrared IR, BLE, LoRa signal and one interface like an MQTT broker
|
||||||
Send and receiving command by MQTT
|
Send and receiving command by MQTT
|
||||||
|
|
||||||
This is the MQ2 GAS Sensor Addon based on modules with a MQ:
|
This is the MQ2 GAS Sensor Addon based on modules with a MQ:
|
||||||
@@ -11,12 +11,12 @@
|
|||||||
Connection Scheme:
|
Connection Scheme:
|
||||||
--------------------
|
--------------------
|
||||||
|
|
||||||
MQ-2 -------> Arduino Uno ----------> ESP8266
|
MQ-2 -------> ESP8266
|
||||||
==============================================
|
==========================
|
||||||
Vcc ---------> 3.3V or 5V------------> 3.3V or 5V
|
Vcc ---------> 3.3V or 5V
|
||||||
GND ---------> GND ------------------> GND
|
GND ---------> GND
|
||||||
A0 ----------> Pin A0 ---------------> A0
|
A0 ----------> A0
|
||||||
D0 ----------> Pin D4 ---------------> D4
|
D0 ----------> D4
|
||||||
|
|
||||||
This file is part of OpenMQTTGateway.
|
This file is part of OpenMQTTGateway.
|
||||||
|
|
||||||
|
|||||||
+2
-2
@@ -1,7 +1,7 @@
|
|||||||
/*
|
/*
|
||||||
OpenMQTTGateway - ESP8266 or Arduino program for home automation
|
Theengs OpenMQTTGateway - We Unite Sensors in One Open-Source Interface
|
||||||
|
|
||||||
Act as a wifi or ethernet gateway between your 433mhz/infrared IR signal and a MQTT broker
|
Act as a gateway between your 433mhz, infrared IR, BLE, LoRa signal and one interface like an MQTT broker
|
||||||
Send and receiving command by MQTT
|
Send and receiving command by MQTT
|
||||||
|
|
||||||
This files enables to set your parameter for the ON OFF actuator
|
This files enables to set your parameter for the ON OFF actuator
|
||||||
|
|||||||
+1
-1
@@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
OpenMQTTGateway - ESP8266 or Arduino program for home automation
|
Theengs OpenMQTTGateway - We Unite Sensors in One Open-Source Interface
|
||||||
|
|
||||||
This files enables you to set your parameters for the PWM actuator
|
This files enables you to set your parameters for the PWM actuator
|
||||||
|
|
||||||
|
|||||||
+2
-8
@@ -1,7 +1,7 @@
|
|||||||
/*
|
/*
|
||||||
OpenMQTTGateway - ESP8266 or Arduino program for home automation
|
Theengs OpenMQTTGateway - We Unite Sensors in One Open-Source Interface
|
||||||
|
|
||||||
Act as a wifi or ethernet gateway between your 433mhz/infrared IR signal and a MQTT broker
|
Act as a gateway between your 433mhz, infrared IR, BLE, LoRa signal and one interface like an MQTT broker
|
||||||
Send and receiving command by MQTT
|
Send and receiving command by MQTT
|
||||||
|
|
||||||
This files enables to set your parameter for the radiofrequency gateways (ZgatewayRF and ZgatewayRF2) with RCswitch and newremoteswitch library
|
This files enables to set your parameter for the radiofrequency gateways (ZgatewayRF and ZgatewayRF2) with RCswitch and newremoteswitch library
|
||||||
@@ -223,10 +223,6 @@ RFConfig_s RFConfig;
|
|||||||
# define RF_RECEIVER_GPIO 0 // D3 on nodemcu // put 4 with rf bridge direct mod
|
# define RF_RECEIVER_GPIO 0 // D3 on nodemcu // put 4 with rf bridge direct mod
|
||||||
# elif ESP32
|
# elif ESP32
|
||||||
# define RF_RECEIVER_GPIO 27 // D27 on DOIT ESP32
|
# define RF_RECEIVER_GPIO 27 // D27 on DOIT ESP32
|
||||||
# elif __AVR_ATmega2560__
|
|
||||||
# define RF_RECEIVER_GPIO 1 //1 = D3 on mega
|
|
||||||
# else
|
|
||||||
# define RF_RECEIVER_GPIO 1 //1 = D3 on arduino
|
|
||||||
# endif
|
# endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@@ -235,8 +231,6 @@ RFConfig_s RFConfig;
|
|||||||
# define RF_EMITTER_GPIO 3 // RX on nodemcu if it doesn't work with 3, try with 4 (D2) // put 5 with rf bridge direct mod
|
# define RF_EMITTER_GPIO 3 // RX on nodemcu if it doesn't work with 3, try with 4 (D2) // put 5 with rf bridge direct mod
|
||||||
# elif ESP32
|
# elif ESP32
|
||||||
# define RF_EMITTER_GPIO 12 // D12 on DOIT ESP32
|
# define RF_EMITTER_GPIO 12 // D12 on DOIT ESP32
|
||||||
# elif __AVR_ATmega2560__
|
|
||||||
# define RF_EMITTER_GPIO 4
|
|
||||||
# else
|
# else
|
||||||
//IMPORTANT NOTE: On arduino UNO connect IR emitter pin to D9 , comment #define IR_USE_TIMER2 and uncomment #define IR_USE_TIMER1 on library <library>IRremote/boarddefs.h so as to free pin D3 for RF RECEIVER PIN
|
//IMPORTANT NOTE: On arduino UNO connect IR emitter pin to D9 , comment #define IR_USE_TIMER2 and uncomment #define IR_USE_TIMER1 on library <library>IRremote/boarddefs.h so as to free pin D3 for RF RECEIVER PIN
|
||||||
//RF PIN definition
|
//RF PIN definition
|
||||||
|
|||||||
+1
-1
@@ -1,7 +1,7 @@
|
|||||||
/*
|
/*
|
||||||
OpenMQTTGateway - ESP8266 or Arduino program for home automation
|
OpenMQTTGateway - ESP8266 or Arduino program for home automation
|
||||||
|
|
||||||
Act as a wifi or ethernet gateway between your 433mhz/infrared IR signal and a MQTT broker
|
Act as a gateway between your 433mhz, infrared IR, BLE, LoRa signal and one interface like an MQTT broker
|
||||||
Send and receiving command by MQTT
|
Send and receiving command by MQTT
|
||||||
|
|
||||||
This files enables to set your parameter for the radiofrequency gateways (ZgatewayRF and ZgatewayRF2) with RCswitch and newremoteswitch library
|
This files enables to set your parameter for the radiofrequency gateways (ZgatewayRF and ZgatewayRF2) with RCswitch and newremoteswitch library
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
/*
|
/*
|
||||||
OpenMQTTGateway - ESP8266 or Arduino program for home automation
|
Theengs OpenMQTTGateway - We Unite Sensors in One Open-Source Interface
|
||||||
|
|
||||||
Act as a wifi or ethernet gateway between your 433mhz/infrared IR signal and a MQTT broker
|
Act as a gateway between your 433mhz, infrared IR, BLE, LoRa signal and one interface like an MQTT broker
|
||||||
Send and receiving command by MQTT
|
Send and receiving command by MQTT
|
||||||
|
|
||||||
This files enables to set your parameter for the RN8209 sensor
|
This files enables to set your parameter for the RN8209 sensor
|
||||||
|
|||||||
+1
-17
@@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
OpenMQTTGateway - ESP8266 or Arduino program for home automation
|
Theengs OpenMQTTGateway - We Unite Sensors in One Open-Source Interface
|
||||||
|
|
||||||
Act as a wifi or ethernet gateway between your RS232 device and a MQTT broker
|
Act as a wifi or ethernet gateway between your RS232 device and a MQTT broker
|
||||||
Send and receiving command by MQTT
|
Send and receiving command by MQTT
|
||||||
@@ -88,26 +88,18 @@ extern void MQTTtoRS232(char* topicOri, JsonObject& RS232data);
|
|||||||
// ESP8266: (TX0 GPIO1, RX0 GPIO3)
|
// ESP8266: (TX0 GPIO1, RX0 GPIO3)
|
||||||
// (TX0 GPIO15, RX0 GPIO13) with UART0 swap enabled
|
// (TX0 GPIO15, RX0 GPIO13) with UART0 swap enabled
|
||||||
// ESP32: (TX0 by RS232_TX_GPIO, RX0 by RS232_RX_GPIO)
|
// ESP32: (TX0 by RS232_TX_GPIO, RX0 by RS232_RX_GPIO)
|
||||||
// ATmega2560: (TX0 pin1, RX0 pin0)
|
|
||||||
// Arduino Uno: (TX0 pin1, RX0 pin0)
|
|
||||||
//
|
//
|
||||||
// - 1: use HW UART1 (serial1)
|
// - 1: use HW UART1 (serial1)
|
||||||
// ESP8266: (TX1 GPIO2, RX none) only transmit available
|
// ESP8266: (TX1 GPIO2, RX none) only transmit available
|
||||||
// ESP32: (TX1 by RS232_TX_GPIO, RX1 by RS232_RX_GPIO)
|
// ESP32: (TX1 by RS232_TX_GPIO, RX1 by RS232_RX_GPIO)
|
||||||
// ATmega2560: (TX1 pin18, RX1 pin19)
|
|
||||||
// Arduino Uno: N/A
|
|
||||||
//
|
//
|
||||||
// - 2: use HW UART2 (serial2)
|
// - 2: use HW UART2 (serial2)
|
||||||
// ESP8266: N/A
|
// ESP8266: N/A
|
||||||
// ESP32: (TX2 by RS232_TX_GPIO, RX2 by RS232_RX_GPIO)
|
// ESP32: (TX2 by RS232_TX_GPIO, RX2 by RS232_RX_GPIO)
|
||||||
// ATmega2560: (TX2 pin16, RX1 pin17)
|
|
||||||
// Arduino Uno: N/A
|
|
||||||
//
|
//
|
||||||
// - 3: use HW UART3 (serial3)
|
// - 3: use HW UART3 (serial3)
|
||||||
// ESP8266: N/A
|
// ESP8266: N/A
|
||||||
// ESP32: N/A
|
// ESP32: N/A
|
||||||
// ATmega2560: (TX2 pin14, RX1 pin15)
|
|
||||||
// Arduino Uno: N/A
|
|
||||||
//
|
//
|
||||||
// defaults
|
// defaults
|
||||||
# ifdef ESP32
|
# ifdef ESP32
|
||||||
@@ -129,10 +121,6 @@ extern void MQTTtoRS232(char* topicOri, JsonObject& RS232data);
|
|||||||
# define RS232_RX_GPIO 4 //D2
|
# define RS232_RX_GPIO 4 //D2
|
||||||
# elif defined(ESP32)
|
# elif defined(ESP32)
|
||||||
# define RS232_RX_GPIO 26
|
# define RS232_RX_GPIO 26
|
||||||
# elif defined(__AVR_ATmega2560__) && !defined(RS232_UART)
|
|
||||||
# define RS232_RX_GPIO 2 // 2 = D2 on arduino mega
|
|
||||||
# else
|
|
||||||
# define RS232_RX_GPIO 0 // 0 = D2 on arduino UNO
|
|
||||||
# endif
|
# endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@@ -142,10 +130,6 @@ extern void MQTTtoRS232(char* topicOri, JsonObject& RS232data);
|
|||||||
# define RS232_TX_GPIO 2 //D4
|
# define RS232_TX_GPIO 2 //D4
|
||||||
# elif ESP32
|
# elif ESP32
|
||||||
# define RS232_TX_GPIO 14
|
# define RS232_TX_GPIO 14
|
||||||
# elif defined(__AVR_ATmega2560__) && !defined(RS232_UART)
|
|
||||||
# define RS232_TX_GPIO 9
|
|
||||||
# else
|
|
||||||
# define RS232_TX_GPIO 9
|
|
||||||
# endif
|
# endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|||||||
+2
-2
@@ -1,7 +1,7 @@
|
|||||||
/*
|
/*
|
||||||
OpenMQTTGateway - ESP8266 or Arduino program for home automation
|
Theengs OpenMQTTGateway - We Unite Sensors in One Open-Source Interface
|
||||||
|
|
||||||
Act as a wifi or ethernet gateway between your 433mhz/infrared IR signal and a MQTT broker
|
Act as a gateway between your 433mhz, infrared IR, BLE, LoRa signal and one interface like an MQTT broker
|
||||||
Send and receiving command by MQTT
|
Send and receiving command by MQTT
|
||||||
|
|
||||||
This files enables to set your parameter for the SHTC311/22 sensor
|
This files enables to set your parameter for the SHTC311/22 sensor
|
||||||
|
|||||||
+2
-2
@@ -1,7 +1,7 @@
|
|||||||
/*
|
/*
|
||||||
OpenMQTTGateway - ESP8266 or Arduino program for home automation
|
Theengs OpenMQTTGateway - We Unite Sensors in One Open-Source Interface
|
||||||
|
|
||||||
Act as a wifi or ethernet gateway between your 433mhz/infrared IR signal and a MQTT broker
|
Act as a gateway between your 433mhz, infrared IR, BLE, LoRa signal and one interface like an MQTT broker
|
||||||
Send and receiving command by MQTT
|
Send and receiving command by MQTT
|
||||||
|
|
||||||
This files enables to set your parameter for the radiofrequency gateway on sonoff rf bridge (ZgatewaySRFB)
|
This files enables to set your parameter for the radiofrequency gateway on sonoff rf bridge (ZgatewaySRFB)
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
/*
|
/*
|
||||||
OpenMQTTGateway Addon - ESP8266 or Arduino program for home automation
|
OpenMQTTGateway Addon - ESP8266 or Arduino program for home automation
|
||||||
|
|
||||||
Act as a wifi or ethernet gateway between your 433mhz/infrared IR signal and a MQTT broker
|
Act as a gateway between your 433mhz, infrared IR, BLE, LoRa signal and one interface like an MQTT broker
|
||||||
Send and receiving command by MQTT
|
Send and receiving command by MQTT
|
||||||
|
|
||||||
Supported boards with displays
|
Supported boards with displays
|
||||||
|
|||||||
+2
-2
@@ -1,6 +1,6 @@
|
|||||||
/*
|
/*
|
||||||
OpenMQTTGateway - ESP8266 or Arduino program for home automation
|
Theengs OpenMQTTGateway - We Unite Sensors in One Open-Source Interface
|
||||||
Act as a wifi or ethernet gateway between your 433mhz/infrared IR signal and a MQTT broker
|
Act as a gateway between your 433mhz, infrared IR, BLE, LoRa signal and one interface like an MQTT broker
|
||||||
Send and receiving command by MQTT
|
Send and receiving command by MQTT
|
||||||
|
|
||||||
This actor enables to:
|
This actor enables to:
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
/*
|
/*
|
||||||
OpenMQTTGateway Addon - ESP8266 or Arduino program for home automation
|
Theengs OpenMQTTGateway - We Unite Sensors in One Open-Source Interface
|
||||||
|
|
||||||
Act as a wifi or ethernet gateway between your 433mhz/infrared IR signal and a MQTT broker
|
Act as a gateway between your 433mhz, infrared IR, BLE, LoRa signal and one interface like an MQTT broker
|
||||||
Send and receiving command by MQTT
|
Send and receiving command by MQTT
|
||||||
|
|
||||||
This is the Light Meter Addon based on modules with a TEMT6000:
|
This is the Light Meter Addon based on modules with a TEMT6000:
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
/*
|
/*
|
||||||
OpenMQTTGateway - ESP8266 or Arduino program for home automation
|
Theengs OpenMQTTGateway - We Unite Sensors in One Open-Source Interface
|
||||||
|
|
||||||
Act as a wifi or ethernet gateway between your 433mhz/infrared IR signal and a MQTT broker
|
Act as a gateway between your 433mhz, infrared IR, BLE, LoRa signal and one interface like an MQTT broker
|
||||||
Send and receiving command by MQTT
|
Send and receiving command by MQTT
|
||||||
|
|
||||||
This files exposes light level measured by a TSL2651 module
|
This files exposes light level measured by a TSL2651 module
|
||||||
@@ -27,13 +27,13 @@
|
|||||||
Connection Schemata:
|
Connection Schemata:
|
||||||
--------------------
|
--------------------
|
||||||
|
|
||||||
TSL2561 ------> Arduino Uno ----------> ESP8266
|
TSL2561 ------> ESP8266
|
||||||
==============================================
|
===================================
|
||||||
Vcc ---------> 3.3V -----------------> Vu (3.3V)
|
Vcc ---------> Vu (3.3V)
|
||||||
GND ---------> GND ------------------> GND
|
GND ---------> GND
|
||||||
SCL ---------> Pin A5 ---------------> D1
|
SCL ---------> D1
|
||||||
SDA ---------> Pin A4 ---------------> D2
|
SDA ---------> D2
|
||||||
ADD ---------> N/C (Not Connected) --> N/C (Not Connected)
|
ADD ---------> N/C (Not Connected)
|
||||||
|
|
||||||
*/
|
*/
|
||||||
#ifndef config_TSL2561_h
|
#ifndef config_TSL2561_h
|
||||||
|
|||||||
+2
-2
@@ -1,7 +1,7 @@
|
|||||||
/*
|
/*
|
||||||
OpenMQTTGateway - ESP8266 or Arduino program for home automation
|
Theengs OpenMQTTGateway - We Unite Sensors in One Open-Source Interface
|
||||||
|
|
||||||
Act as a wifi or ethernet gateway between your 433mhz/infrared IR signal and a MQTT broker
|
Act as a gateway between your 433mhz, infrared IR, BLE, LoRa signal and one interface like an MQTT broker
|
||||||
Send and receiving command by MQTT
|
Send and receiving command by MQTT
|
||||||
|
|
||||||
This files enables to set your parameter for the esp32's touch buttons
|
This files enables to set your parameter for the esp32's touch buttons
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
/*
|
/*
|
||||||
OpenMQTTGateway - ESP8266 or Arduino program for home automation
|
OpenMQTTGateway - ESP8266 or Arduino program for home automation
|
||||||
|
|
||||||
Act as a wifi or ethernet gateway between your 433mhz/infrared IR signal and a MQTT broker
|
Act as a gateway between your 433mhz, infrared IR, BLE, LoRa signal and one interface like an MQTT broker
|
||||||
Send and receiving command by MQTT
|
Send and receiving command by MQTT
|
||||||
|
|
||||||
This files enables to set your parameter for the DHT11/22 sensor
|
This files enables to set your parameter for the DHT11/22 sensor
|
||||||
@@ -41,10 +41,6 @@ extern void ZgatewayWeatherStationtoMQTT();
|
|||||||
# define RF_WS_RECEIVER_GPIO 0 // D3 on nodemcu // put 4 with rf bridge direct mod
|
# define RF_WS_RECEIVER_GPIO 0 // D3 on nodemcu // put 4 with rf bridge direct mod
|
||||||
# elif ESP32
|
# elif ESP32
|
||||||
# define RF_WS_RECEIVER_GPIO 27 // D27 on DOIT ESP32
|
# define RF_WS_RECEIVER_GPIO 27 // D27 on DOIT ESP32
|
||||||
# elif __AVR_ATmega2560__
|
|
||||||
# define RF_WS_RECEIVER_GPIO 1 //1 = D3 on mega
|
|
||||||
# else
|
|
||||||
# define RF_WS_RECEIVER_GPIO 1 //1 = D3 on arduino
|
|
||||||
# endif
|
# endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
/*
|
/*
|
||||||
OpenMQTTGateway - ESP8266 or Arduino program for home automation
|
OpenMQTTGateway - ESP8266 or Arduino program for home automation
|
||||||
|
|
||||||
Act as a wifi or ethernet gateway between your 433mhz/infrared IR signal and a MQTT broker
|
Act as a gateway between your 433mhz, infrared IR, BLE, LoRa signal and one interface like an MQTT broker
|
||||||
Send and receiving command by MQTT
|
Send and receiving command by MQTT
|
||||||
|
|
||||||
This files enables to set your parameter for the DHT11/22 sensor
|
This files enables to set your parameter for the DHT11/22 sensor
|
||||||
|
|||||||
+2
-2
@@ -1,7 +1,7 @@
|
|||||||
/*
|
/*
|
||||||
OpenMQTTGateway - ESP8266 or Arduino program for home automation
|
Theengs OpenMQTTGateway - We Unite Sensors in One Open-Source Interface
|
||||||
|
|
||||||
Act as a wifi or ethernet gateway between your 433mhz/infrared IR signal and a MQTT broker
|
Act as a gateway between your 433mhz, infrared IR, BLE, LoRa signal and one interface like an MQTT broker
|
||||||
Send and receiving command by MQTT
|
Send and receiving command by MQTT
|
||||||
|
|
||||||
This files enables to set your parameter for the DHT11/22 sensor
|
This files enables to set your parameter for the DHT11/22 sensor
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
/*
|
/*
|
||||||
OpenMQTTGateway - ESP8266 or Arduino program for home automation
|
OpenMQTTGateway - ESP8266 or Arduino program for home automation
|
||||||
|
|
||||||
Act as a wifi or ethernet gateway between your 433mhz/infrared IR signal and a MQTT broker
|
Act as a gateway between your 433mhz, infrared IR, BLE, LoRa signal and one interface like an MQTT broker
|
||||||
Send and receiving command by MQTT
|
Send and receiving command by MQTT
|
||||||
|
|
||||||
This files enables to set your parameter for the Home assistant mqtt Discovery
|
This files enables to set your parameter for the Home assistant mqtt Discovery
|
||||||
|
|||||||
+52
-81
@@ -1,7 +1,7 @@
|
|||||||
/*
|
/*
|
||||||
OpenMQTTGateway - ESP8266 or Arduino program for home automation
|
OpenMQTTGateway - ESP8266 or Arduino program for home automation
|
||||||
|
|
||||||
Act as a wifi or ethernet gateway between your 433mhz/infrared IR signal and a MQTT broker
|
Act as a gateway between your 433mhz, infrared IR, BLE, LoRa signal and one interface like an MQTT broker
|
||||||
Send and receiving command by MQTT
|
Send and receiving command by MQTT
|
||||||
|
|
||||||
This program enables to:
|
This program enables to:
|
||||||
@@ -43,33 +43,28 @@ struct ReceivedSignal {
|
|||||||
SIGNAL_SIZE_UL_ULL value;
|
SIGNAL_SIZE_UL_ULL value;
|
||||||
uint32_t time;
|
uint32_t time;
|
||||||
};
|
};
|
||||||
# if defined(ESP8266) || defined(ESP32) || defined(__AVR_ATmega2560__) || defined(__AVR_ATmega1280__)
|
|
||||||
ReceivedSignal receivedSignal[] = {{0, 0}, {0, 0}, {0, 0}, {0, 0}, {0, 0}, {0, 0}, {0, 0}, {0, 0}, {0, 0}, {0, 0}, {0, 0}, {0, 0}};
|
ReceivedSignal receivedSignal[] = {{0, 0}, {0, 0}, {0, 0}, {0, 0}, {0, 0}, {0, 0}, {0, 0}, {0, 0}, {0, 0}, {0, 0}, {0, 0}, {0, 0}};
|
||||||
# else // boards with smaller memory
|
|
||||||
ReceivedSignal receivedSignal[] = {{0, 0}, {0, 0}, {0, 0}, {0, 0}};
|
|
||||||
# endif
|
|
||||||
# define struct_size (sizeof(receivedSignal) / sizeof(ReceivedSignal))
|
# define struct_size (sizeof(receivedSignal) / sizeof(ReceivedSignal))
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if defined(ESP8266) || defined(ESP32) || defined(__AVR_ATmega2560__) || defined(__AVR_ATmega1280__)
|
|
||||||
//Time used to wait for an interval before checking system measures
|
//Time used to wait for an interval before checking system measures
|
||||||
unsigned long timer_sys_measures = 0;
|
unsigned long timer_sys_measures = 0;
|
||||||
|
|
||||||
// Time used to wait before system checkings
|
// Time used to wait before system checkings
|
||||||
unsigned long timer_sys_checks = 0;
|
unsigned long timer_sys_checks = 0;
|
||||||
|
|
||||||
# define ARDUINOJSON_USE_LONG_LONG 1
|
#define ARDUINOJSON_USE_LONG_LONG 1
|
||||||
# define ARDUINOJSON_ENABLE_STD_STRING 1
|
#define ARDUINOJSON_ENABLE_STD_STRING 1
|
||||||
|
|
||||||
# include <queue>
|
#include <queue>
|
||||||
int queueLength = 0;
|
int queueLength = 0;
|
||||||
unsigned long queueLengthSum = 0;
|
unsigned long queueLengthSum = 0;
|
||||||
unsigned long blockedMessages = 0;
|
unsigned long blockedMessages = 0;
|
||||||
int maxQueueLength = 0;
|
int maxQueueLength = 0;
|
||||||
# ifndef QueueSize
|
#ifndef QueueSize
|
||||||
# define QueueSize 18
|
# define QueueSize 18
|
||||||
# endif
|
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -86,18 +81,15 @@ bool ready_to_sleep = false;
|
|||||||
|
|
||||||
#include <string>
|
#include <string>
|
||||||
|
|
||||||
#if defined(ESP8266) || defined(ESP32) || defined(__AVR_ATmega2560__) || defined(__AVR_ATmega1280__)
|
|
||||||
struct JsonBundle {
|
struct JsonBundle {
|
||||||
StaticJsonDocument<JSON_MSG_BUFFER> doc;
|
StaticJsonDocument<JSON_MSG_BUFFER> doc;
|
||||||
};
|
};
|
||||||
|
|
||||||
std::queue<JsonBundle> jsonQueue;
|
std::queue<JsonBundle> jsonQueue;
|
||||||
|
|
||||||
# ifdef ESP32
|
#ifdef ESP32
|
||||||
// Mutex to protect the queue
|
// Mutex to protect the queue
|
||||||
SemaphoreHandle_t xQueueMutex;
|
SemaphoreHandle_t xQueueMutex;
|
||||||
# endif
|
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
StaticJsonDocument<JSON_MSG_BUFFER> modulesBuffer;
|
StaticJsonDocument<JSON_MSG_BUFFER> modulesBuffer;
|
||||||
@@ -440,7 +432,6 @@ void enqueueJsonObject(const StaticJsonDocument<JSON_MSG_BUFFER>& jsonDoc) {
|
|||||||
Log.error(F("Empty JSON, skipping" CR));
|
Log.error(F("Empty JSON, skipping" CR));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
#if defined(ESP8266) || defined(ESP32) || defined(__AVR_ATmega2560__) || defined(__AVR_ATmega1280__)
|
|
||||||
if (queueLength >= QueueSize) {
|
if (queueLength >= QueueSize) {
|
||||||
Log.warning(F("%d Doc(s) in queue, doc blocked" CR), queueLength);
|
Log.warning(F("%d Doc(s) in queue, doc blocked" CR), queueLength);
|
||||||
blockedMessages++;
|
blockedMessages++;
|
||||||
@@ -451,11 +442,6 @@ void enqueueJsonObject(const StaticJsonDocument<JSON_MSG_BUFFER>& jsonDoc) {
|
|||||||
bundle.doc = jsonDoc;
|
bundle.doc = jsonDoc;
|
||||||
jsonQueue.push(bundle);
|
jsonQueue.push(bundle);
|
||||||
Log.trace(F("Queue length: %d" CR), jsonQueue.size());
|
Log.trace(F("Queue length: %d" CR), jsonQueue.size());
|
||||||
#else
|
|
||||||
// Pub to main core
|
|
||||||
JsonObject jsonObj = jsonDoc.to<JsonObject>();
|
|
||||||
pubMainCore(jsonObj); // Arduino UNO or other boards with small memory, we don't store and directly publish
|
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef ESP32
|
#ifdef ESP32
|
||||||
@@ -483,8 +469,6 @@ bool handleJsonEnqueue(const StaticJsonDocument<JSON_MSG_BUFFER>& jsonDoc) {
|
|||||||
return handleJsonEnqueue(jsonDoc, QueueSemaphoreTimeOutLoop);
|
return handleJsonEnqueue(jsonDoc, QueueSemaphoreTimeOutLoop);
|
||||||
}
|
}
|
||||||
|
|
||||||
#if defined(ESP8266) || defined(ESP32) || defined(__AVR_ATmega2560__) || defined(__AVR_ATmega1280__)
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Add the jsonObject id as a topic to the jsonObject origin
|
* Add the jsonObject id as a topic to the jsonObject origin
|
||||||
*
|
*
|
||||||
@@ -503,7 +487,7 @@ void buildTopicFromId(JsonObject& Jsondata, const char* origin) {
|
|||||||
topic.erase(pos, 1);
|
topic.erase(pos, 1);
|
||||||
pos = topic.find(":", pos);
|
pos = topic.find(":", pos);
|
||||||
}
|
}
|
||||||
# ifdef ZgatewayBT
|
#ifdef ZgatewayBT
|
||||||
if (BTConfig.pubBeaconUuidForTopic && !BTConfig.extDecoderEnable && Jsondata.containsKey("model_id") && Jsondata["model_id"].as<std::string>() == "IBEACON") {
|
if (BTConfig.pubBeaconUuidForTopic && !BTConfig.extDecoderEnable && Jsondata.containsKey("model_id") && Jsondata["model_id"].as<std::string>() == "IBEACON") {
|
||||||
if (Jsondata.containsKey("uuid")) {
|
if (Jsondata.containsKey("uuid")) {
|
||||||
topic = Jsondata["uuid"].as<std::string>();
|
topic = Jsondata["uuid"].as<std::string>();
|
||||||
@@ -514,7 +498,7 @@ void buildTopicFromId(JsonObject& Jsondata, const char* origin) {
|
|||||||
|
|
||||||
if (BTConfig.extDecoderEnable && !Jsondata.containsKey("model"))
|
if (BTConfig.extDecoderEnable && !Jsondata.containsKey("model"))
|
||||||
topic = BTConfig.extDecoderTopic.c_str();
|
topic = BTConfig.extDecoderTopic.c_str();
|
||||||
# endif
|
#endif
|
||||||
std::string subjectStr(origin);
|
std::string subjectStr(origin);
|
||||||
topic = subjectStr + "/" + topic;
|
topic = subjectStr + "/" + topic;
|
||||||
|
|
||||||
@@ -540,9 +524,6 @@ void emptyQueue() {
|
|||||||
pubMainCore(obj);
|
pubMainCore(obj);
|
||||||
queueLengthSum++;
|
queueLengthSum++;
|
||||||
}
|
}
|
||||||
#else
|
|
||||||
void emptyQueue() {}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief Publish the payload on default MQTT topic.
|
* @brief Publish the payload on default MQTT topic.
|
||||||
@@ -1192,9 +1173,7 @@ void setup() {
|
|||||||
|
|
||||||
delay(1500);
|
delay(1500);
|
||||||
#if defined(ZgatewayRF) || defined(ZgatewayPilight) || defined(ZgatewayRTL_433) || defined(ZgatewayRF2) || defined(ZactuatorSomfy)
|
#if defined(ZgatewayRF) || defined(ZgatewayPilight) || defined(ZgatewayRTL_433) || defined(ZgatewayRF2) || defined(ZactuatorSomfy)
|
||||||
# ifndef ARDUINO_AVR_UNO
|
|
||||||
setupCommonRF();
|
setupCommonRF();
|
||||||
# endif
|
|
||||||
#endif
|
#endif
|
||||||
#ifdef ZsensorBME280
|
#ifdef ZsensorBME280
|
||||||
setupZsensorBME280();
|
setupZsensorBME280();
|
||||||
@@ -1351,11 +1330,9 @@ void setup() {
|
|||||||
#endif
|
#endif
|
||||||
Log.trace(F("mqtt_max_packet_size: %d" CR), mqtt_max_packet_size);
|
Log.trace(F("mqtt_max_packet_size: %d" CR), mqtt_max_packet_size);
|
||||||
|
|
||||||
#ifndef ARDUINO_AVR_UNO // Space issues with the UNO
|
|
||||||
char jsonChar[100];
|
char jsonChar[100];
|
||||||
serializeJson(modules, jsonChar, measureJson(modules) + 1);
|
serializeJson(modules, jsonChar, measureJson(modules) + 1);
|
||||||
Log.notice(F("OpenMQTTGateway modules: %s" CR), jsonChar);
|
Log.notice(F("OpenMQTTGateway modules: %s" CR), jsonChar);
|
||||||
#endif
|
|
||||||
Log.notice(F("************** Setup OpenMQTTGateway end **************" CR));
|
Log.notice(F("************** Setup OpenMQTTGateway end **************" CR));
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -2105,47 +2082,45 @@ void loop() {
|
|||||||
#endif
|
#endif
|
||||||
connectedOnce = true;
|
connectedOnce = true;
|
||||||
connected = true;
|
connected = true;
|
||||||
#if defined(ESP8266) || defined(ESP32) || defined(__AVR_ATmega2560__) || defined(__AVR_ATmega1280__)
|
|
||||||
if (now > (timer_sys_measures + (TimeBetweenReadingSYS * 1000)) || !timer_sys_measures) {
|
if (now > (timer_sys_measures + (TimeBetweenReadingSYS * 1000)) || !timer_sys_measures) {
|
||||||
timer_sys_measures = millis();
|
timer_sys_measures = millis();
|
||||||
stateMeasures();
|
stateMeasures();
|
||||||
# ifdef ZgatewayBT
|
#ifdef ZgatewayBT
|
||||||
stateBTMeasures(false);
|
stateBTMeasures(false);
|
||||||
# endif
|
#endif
|
||||||
# ifdef ZactuatorONOFF
|
#ifdef ZactuatorONOFF
|
||||||
stateONOFFMeasures();
|
stateONOFFMeasures();
|
||||||
# endif
|
#endif
|
||||||
# ifdef ZdisplaySSD1306
|
#ifdef ZdisplaySSD1306
|
||||||
stateSSD1306Display();
|
stateSSD1306Display();
|
||||||
# endif
|
#endif
|
||||||
# ifdef ZgatewayLORA
|
#ifdef ZgatewayLORA
|
||||||
stateLORAMeasures();
|
stateLORAMeasures();
|
||||||
# endif
|
#endif
|
||||||
# if defined(ZgatewayRTL_433) || defined(ZgatewayPilight) || defined(ZgatewayRF) || defined(ZgatewayRF2) || defined(ZactuatorSomfy)
|
#if defined(ZgatewayRTL_433) || defined(ZgatewayPilight) || defined(ZgatewayRF) || defined(ZgatewayRF2) || defined(ZactuatorSomfy)
|
||||||
stateRFMeasures();
|
stateRFMeasures();
|
||||||
# endif
|
#endif
|
||||||
# if defined(ZwebUI) && defined(ESP32)
|
#if defined(ZwebUI) && defined(ESP32)
|
||||||
stateWebUIStatus();
|
stateWebUIStatus();
|
||||||
# endif
|
#endif
|
||||||
}
|
}
|
||||||
if (now > (timer_sys_checks + (TimeBetweenCheckingSYS * 1000)) || !timer_sys_checks) {
|
if (now > (timer_sys_checks + (TimeBetweenCheckingSYS * 1000)) || !timer_sys_checks) {
|
||||||
# if defined(ESP8266) || defined(ESP32)
|
#if defined(ESP8266) || defined(ESP32)
|
||||||
# if message_UTCtimestamp || message_unixtimestamp
|
# if message_UTCtimestamp || message_unixtimestamp
|
||||||
syncNTP();
|
syncNTP();
|
||||||
# endif
|
|
||||||
# endif
|
# endif
|
||||||
|
#endif
|
||||||
if (!timer_sys_checks) { // Update check at start up only
|
if (!timer_sys_checks) { // Update check at start up only
|
||||||
# if defined(ESP32) && defined(MQTT_HTTPS_FW_UPDATE)
|
#if defined(ESP32) && defined(MQTT_HTTPS_FW_UPDATE)
|
||||||
checkForUpdates();
|
checkForUpdates();
|
||||||
# endif
|
#endif
|
||||||
# ifdef ZgatewayBT
|
#ifdef ZgatewayBT
|
||||||
BTProcessLock = !BTConfig.enabled; // Release BLE processes at start if enabled
|
BTProcessLock = !BTConfig.enabled; // Release BLE processes at start if enabled
|
||||||
# endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
timer_sys_checks = millis();
|
timer_sys_checks = millis();
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
emptyQueue();
|
emptyQueue();
|
||||||
#ifdef ZsensorBME280
|
#ifdef ZsensorBME280
|
||||||
MeasureTempHumAndPressure(); //Addon to measure Temperature, Humidity, Pressure and Altitude with a Bosch BME280/BMP280
|
MeasureTempHumAndPressure(); //Addon to measure Temperature, Humidity, Pressure and Altitude with a Bosch BME280/BMP280
|
||||||
@@ -2400,55 +2375,54 @@ void eraseAndRestart() {
|
|||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if defined(ESP8266) || defined(ESP32) || defined(__AVR_ATmega2560__) || defined(__AVR_ATmega1280__)
|
|
||||||
String stateMeasures() {
|
String stateMeasures() {
|
||||||
StaticJsonDocument<JSON_MSG_BUFFER> SYSdata;
|
StaticJsonDocument<JSON_MSG_BUFFER> SYSdata;
|
||||||
|
|
||||||
SYSdata["uptime"] = uptime();
|
SYSdata["uptime"] = uptime();
|
||||||
|
|
||||||
SYSdata["version"] = OMG_VERSION;
|
SYSdata["version"] = OMG_VERSION;
|
||||||
# ifdef RGB_INDICATORS
|
#ifdef RGB_INDICATORS
|
||||||
SYSdata["rgbb"] = SYSConfig.rgbbrightness;
|
SYSdata["rgbb"] = SYSConfig.rgbbrightness;
|
||||||
# endif
|
#endif
|
||||||
# ifdef ZmqttDiscovery
|
#ifdef ZmqttDiscovery
|
||||||
SYSdata["disc"] = SYSConfig.discovery;
|
SYSdata["disc"] = SYSConfig.discovery;
|
||||||
SYSdata["ohdisc"] = SYSConfig.ohdiscovery;
|
SYSdata["ohdisc"] = SYSConfig.ohdiscovery;
|
||||||
# endif
|
#endif
|
||||||
# if defined(ESP8266) || defined(ESP32)
|
#if defined(ESP8266) || defined(ESP32)
|
||||||
SYSdata["env"] = ENV_NAME;
|
SYSdata["env"] = ENV_NAME;
|
||||||
uint32_t freeMem;
|
uint32_t freeMem;
|
||||||
uint32_t minFreeMem;
|
uint32_t minFreeMem;
|
||||||
freeMem = ESP.getFreeHeap();
|
freeMem = ESP.getFreeHeap();
|
||||||
# ifdef ZgatewayRTL_433
|
# ifdef ZgatewayRTL_433
|
||||||
// Some RTL_433 decoders have memory leak, this is a temporary workaround
|
// Some RTL_433 decoders have memory leak, this is a temporary workaround
|
||||||
if (freeMem < MinimumMemory) {
|
if (freeMem < MinimumMemory) {
|
||||||
Log.error(F("Not enough memory %d, restarting" CR), freeMem);
|
Log.error(F("Not enough memory %d, restarting" CR), freeMem);
|
||||||
ESPRestart(8);
|
ESPRestart(8);
|
||||||
}
|
}
|
||||||
# endif
|
# endif
|
||||||
SYSdata["freemem"] = freeMem;
|
SYSdata["freemem"] = freeMem;
|
||||||
SYSdata["mqttp"] = mqtt_port;
|
SYSdata["mqttp"] = mqtt_port;
|
||||||
SYSdata["mqtts"] = mqtt_secure;
|
SYSdata["mqtts"] = mqtt_secure;
|
||||||
SYSdata["msgprc"] = queueLengthSum;
|
SYSdata["msgprc"] = queueLengthSum;
|
||||||
SYSdata["msgblck"] = blockedMessages;
|
SYSdata["msgblck"] = blockedMessages;
|
||||||
SYSdata["maxq"] = maxQueueLength;
|
SYSdata["maxq"] = maxQueueLength;
|
||||||
# ifdef ESP32
|
# ifdef ESP32
|
||||||
minFreeMem = ESP.getMinFreeHeap();
|
minFreeMem = ESP.getMinFreeHeap();
|
||||||
SYSdata["minmem"] = minFreeMem;
|
SYSdata["minmem"] = minFreeMem;
|
||||||
# ifndef NO_INT_TEMP_READING
|
# ifndef NO_INT_TEMP_READING
|
||||||
SYSdata["tempc"] = round2(intTemperatureRead());
|
SYSdata["tempc"] = round2(intTemperatureRead());
|
||||||
# endif
|
|
||||||
SYSdata["freestck"] = uxTaskGetStackHighWaterMark(NULL);
|
|
||||||
# endif
|
# endif
|
||||||
|
SYSdata["freestck"] = uxTaskGetStackHighWaterMark(NULL);
|
||||||
|
# endif
|
||||||
|
|
||||||
SYSdata["eth"] = ethConnected;
|
SYSdata["eth"] = ethConnected;
|
||||||
if (ethConnected) {
|
if (ethConnected) {
|
||||||
# ifdef ESP32_ETHERNET
|
# ifdef ESP32_ETHERNET
|
||||||
SYSdata["mac"] = (char*)ETH.macAddress().c_str();
|
SYSdata["mac"] = (char*)ETH.macAddress().c_str();
|
||||||
SYSdata["ip"] = ip2CharArray(ETH.localIP());
|
SYSdata["ip"] = ip2CharArray(ETH.localIP());
|
||||||
ETH.fullDuplex() ? SYSdata["fd"] = (bool)"true" : SYSdata["fd"] = (bool)"false";
|
ETH.fullDuplex() ? SYSdata["fd"] = (bool)"true" : SYSdata["fd"] = (bool)"false";
|
||||||
SYSdata["linkspeed"] = (int)ETH.linkSpeed();
|
SYSdata["linkspeed"] = (int)ETH.linkSpeed();
|
||||||
# endif
|
# endif
|
||||||
} else {
|
} else {
|
||||||
SYSdata["rssi"] = (long)WiFi.RSSI();
|
SYSdata["rssi"] = (long)WiFi.RSSI();
|
||||||
SYSdata["SSID"] = (char*)WiFi.SSID().c_str();
|
SYSdata["SSID"] = (char*)WiFi.SSID().c_str();
|
||||||
@@ -2457,19 +2431,19 @@ String stateMeasures() {
|
|||||||
SYSdata["mac"] = (char*)WiFi.macAddress().c_str();
|
SYSdata["mac"] = (char*)WiFi.macAddress().c_str();
|
||||||
}
|
}
|
||||||
|
|
||||||
# endif
|
#endif
|
||||||
# ifdef ZgatewayBT
|
#ifdef ZgatewayBT
|
||||||
# ifdef ESP32
|
# ifdef ESP32
|
||||||
SYSdata["lowpowermode"] = (int)lowpowermode;
|
SYSdata["lowpowermode"] = (int)lowpowermode;
|
||||||
# endif
|
|
||||||
# endif
|
# endif
|
||||||
# ifdef ZboardM5STACK
|
#endif
|
||||||
|
#ifdef ZboardM5STACK
|
||||||
M5.Power.begin();
|
M5.Power.begin();
|
||||||
SYSdata["m5battlevel"] = (int8_t)M5.Power.getBatteryLevel();
|
SYSdata["m5battlevel"] = (int8_t)M5.Power.getBatteryLevel();
|
||||||
SYSdata["m5ischarging"] = (bool)M5.Power.isCharging();
|
SYSdata["m5ischarging"] = (bool)M5.Power.isCharging();
|
||||||
SYSdata["m5ischargefull"] = (bool)M5.Power.isChargeFull();
|
SYSdata["m5ischargefull"] = (bool)M5.Power.isChargeFull();
|
||||||
# endif
|
#endif
|
||||||
# if defined(ZboardM5STICKC) || defined(ZboardM5STICKCP) || defined(ZboardM5TOUGH)
|
#if defined(ZboardM5STICKC) || defined(ZboardM5STICKCP) || defined(ZboardM5TOUGH)
|
||||||
M5.Axp.EnableCoulombcounter();
|
M5.Axp.EnableCoulombcounter();
|
||||||
SYSdata["m5batvoltage"] = (float)M5.Axp.GetBatVoltage();
|
SYSdata["m5batvoltage"] = (float)M5.Axp.GetBatVoltage();
|
||||||
SYSdata["m5batcurrent"] = (float)M5.Axp.GetBatCurrent();
|
SYSdata["m5batcurrent"] = (float)M5.Axp.GetBatCurrent();
|
||||||
@@ -2481,7 +2455,7 @@ String stateMeasures() {
|
|||||||
SYSdata["m5batpower"] = (float)M5.Axp.GetBatPower();
|
SYSdata["m5batpower"] = (float)M5.Axp.GetBatPower();
|
||||||
SYSdata["m5batchargecurrent"] = (float)M5.Axp.GetBatChargeCurrent();
|
SYSdata["m5batchargecurrent"] = (float)M5.Axp.GetBatChargeCurrent();
|
||||||
SYSdata["m5apsvoltage"] = (float)M5.Axp.GetAPSVoltage();
|
SYSdata["m5apsvoltage"] = (float)M5.Axp.GetAPSVoltage();
|
||||||
# endif
|
#endif
|
||||||
SYSdata["modules"] = modules;
|
SYSdata["modules"] = modules;
|
||||||
|
|
||||||
SYSdata["origin"] = subjectSYStoMQTT;
|
SYSdata["origin"] = subjectSYStoMQTT;
|
||||||
@@ -2504,7 +2478,6 @@ String stateMeasures() {
|
|||||||
serializeJson(SYSdata, output);
|
serializeJson(SYSdata, output);
|
||||||
return output;
|
return output;
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
|
|
||||||
#if defined(ZgatewayRF) || defined(ZgatewayIR) || defined(ZgatewaySRFB) || defined(ZgatewayWeatherStation) || defined(ZgatewayRTL_433)
|
#if defined(ZgatewayRF) || defined(ZgatewayIR) || defined(ZgatewaySRFB) || defined(ZgatewayWeatherStation) || defined(ZgatewayRTL_433)
|
||||||
/**
|
/**
|
||||||
@@ -3119,7 +3092,6 @@ void MQTTtoSYS(char* topicOri, JsonObject& SYSdata) { // json object decoding
|
|||||||
}
|
}
|
||||||
|
|
||||||
#if valueAsATopic && !defined(ZgatewayPilight)
|
#if valueAsATopic && !defined(ZgatewayPilight)
|
||||||
# if defined(ESP32) || defined(ESP8266) || defined(__AVR_ATmega2560__) || defined(__AVR_ATmega1280__)
|
|
||||||
String toString(uint64_t input) {
|
String toString(uint64_t input) {
|
||||||
String result = "";
|
String result = "";
|
||||||
uint8_t base = 10;
|
uint8_t base = 10;
|
||||||
@@ -3137,12 +3109,11 @@ String toString(uint64_t input) {
|
|||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
# else
|
#else
|
||||||
|
|
||||||
String toString(uint32_t input) {
|
String toString(uint32_t input) {
|
||||||
String result = String(input);
|
String result = String(input);
|
||||||
|
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
# endif
|
|
||||||
#endif
|
#endif
|
||||||
@@ -119,7 +119,6 @@ rc-switch = https://github.com/1technophile/rc-switch.git#98537e9
|
|||||||
newremoteswitch = https://github.com/1technophile/NewRemoteSwitch.git#8eb980e
|
newremoteswitch = https://github.com/1technophile/NewRemoteSwitch.git#8eb980e
|
||||||
ble = https://github.com/h2zero/NimBLE-Arduino.git#1.4.1
|
ble = https://github.com/h2zero/NimBLE-Arduino.git#1.4.1
|
||||||
irremoteesp = IRremoteESP8266@2.8.2
|
irremoteesp = IRremoteESP8266@2.8.2
|
||||||
irremote = https://github.com/z3t0/Arduino-IRremote.git#1c08a37
|
|
||||||
lora = https://github.com/sandeepmistry/arduino-LoRa.git#f4a1d27
|
lora = https://github.com/sandeepmistry/arduino-LoRa.git#f4a1d27
|
||||||
esppilight = ESPiLight@0.17.0
|
esppilight = ESPiLight@0.17.0
|
||||||
rfWeatherStation = WeatherStationDataRx@0.3.1
|
rfWeatherStation = WeatherStationDataRx@0.3.1
|
||||||
|
|||||||
Reference in new issue
Block a user