Commit Graph
97 Commits
Author SHA1 Message Date
Florian 5bcf214d68 [LPM] Add capability to deactivate the function at build time (#1449)
To enable boards with the constant power supply to don't build this function.
Change the default behavior for the mode not to be built by default.
Only the boards with batteries are keeping it
2023-02-10 17:07:28 -06:00
Florian 159d362f2a [TRIGGER] Enable reset at start when InputGPIO is used (#1447)
TimeToResetAtStart defines the start period
2023-02-10 17:04:58 -06:00
Florian e53c48dd96 [ONOFF] - Improve Led display (#1430)
Improve Led display when limits are reached
2023-01-27 14:35:39 -06:00
Florian 76b5e9269f Fix internal temperature reading on ESP32 (#1391)
The previous macro used SENS_SAR_MEAS_WAIT2_REG to identify if we have the reading capability was not working, so replacing it by a fresh one NO_INT_TEMP_READING, defined as a negation due to the fact that most of the ESP32 supports internal temperature reading.
2023-01-12 18:05:40 -06:00
Florian 4678783db5 Enable connection with encryption without certificate validation (#1386)
* Enable connection with encryption without certificate validation
* Add the cert validation for AWS env
2023-01-12 10:35:42 -06:00
Northern Man 9d6f7a0764 ssd1306 display of module messages (#1383)
* ssd1306 display of module messages

Supported Modules Include
- rtl_433
- bme280

* Switch to use convertTemp_CtoF
2023-01-11 20:31:12 -06:00
Northern Man 2e0d1708c3 Update to rtl_433_ESP 0.1.5 and support for LILYGO® LoRa32 V2.1_1.6.1 433 Mhz (#1371)
* Update to rtl_433_ESP 0.1.5

Includes support for LILYGO® LoRa32 V2.1_1.6.1 433 Mhz

* Fix lint issue

* Fix build and lint issues

* Add lilygo-rtl_433 to build.yml
2022-12-26 13:48:08 -06:00
Charles edb8d1a591 Added Thingpulse ESP32 gateways (#1369)
* added thingspulse gateways

* added thingspulse gateways, RGB  LED for tinypico

* Added some LED and Birghtness options

* Requested Changes

* fixed format
2022-12-16 21:38:13 -06:00
DigiH 07b2a051ec Typo and clarification (#1340) 2022-11-30 20:13:45 -06:00
Florian 66588149a8 Change Error color to orange on RGB (#1333)
And enable its display when entering the WM portal
2022-11-28 20:28:03 -06:00
Florian c98511ba36 Set the AP name with the short name plus the 4 first digits of the ESP mac (#1331)
so as to don't disclose the password used for WM.
Also change the wm password from MAc to be the last 8 digits, as these will change more than the first 8 ones.
Also make consistent the ifndef qnd the parsing between WM_PWD_FROM_MAC and USE_MAC_AS_GATEWAY_NAME
2022-11-28 20:06:36 -06:00
Florian 2ada47c3bc Enable to set the WM pwd from the Mac (#1323)
So as to reinforce security for AP configuration access, enable to set the Wifi Manager Password from the 8 first digits of the ESP Mac address
2022-11-28 13:21:03 -06:00
David Furey ec96b72d96 Support LM75 temperature sensor (#1327)
* First draft of LM75 sensor based on HTU21 sensor

* Initialise I2C on ESP8266

* Add LM75 sensor to test builds

So that it will be tested with the continuous integration
2022-11-28 11:31:46 -06:00
Florian ec21cbb880 Update default certificate of Github (#1322)
So as to enable updates with a payload without the cert, and add a command example. Also so change the update message to notice level
2022-11-16 15:16:32 -06:00
Florian f5ce12a641 Add rgb gpio powering pin (#1321)
* Add RGB GPIO powering pin

When the RGB Led is powered by an uC pin, enable to power it up from the led setup

* Comments improvements
2022-11-16 14:15:00 -06:00
Florian 33e162111a Add RGB Led management for errors, infos, and send receive events (#1320)
* Add RGB Led management for errors, infos, and send receive events

Add RGB led management for indicators, integrate it for M5 Atom and ESP32 C3 and S3 dev board
Update Fastled version to 3.5.0.

The default behavior is with regular LED, to use RGB Led the macro RGB_INDICATORS needs to be define, along with the FASTLED_IND_TYPE, FASTLED_IND_DATA_GPIO and FASTLED_IND_NUM_LEDS
Note that some RGB led need to have a different color scheme, so in this case it can be entered along with the data PIN definition: -DFASTLED_IND_DATA_GPIO=27,GRB

* Add FastLed library to the environments
2022-11-16 12:58:22 -06:00
Sami Salonen 3d589ffa90 Handle OTA actively when MQTT is not connected (#1307)
* Handle OTA actively when MQTT is not connected

Resolves #1292

* Fix compilation for targets not having OTA

* ArduinoOTA.handle() only with non-ESP targets

* OTA check before reboot: fix condition and add more comments


Signed-off-by: Sami Salonen <ssalonen@gmail.com>
2022-11-13 09:34:20 -06:00
Northern Man 8bc65d62dc Update of rtl_433_ESP to version 0.1.3 - Support for SX127X transceiver module (#1291)
The main features of the upgrade to 0.1.3 of rtl_433_ESP are

1 - Change Transceiver Library to RadioLib

2 - Add support for SX127X transceiver module ( I used the 433 Mhz version of this Heltec module for development ).

3 - Added automatic calibration of the RSSI Signal detection Threshold

4 - Removed dependency on loop for start and end of signal detection, and moved to a ESP32 Task

5 - Moved received signal decoding to a ESP32 Task

6 - Identified Blueline PowerCost Monitor decoder as source of significant memory overhead and disabled.

7 - Multi Receiver support has been validated with RF, RF2 and PiLight
2022-10-20 11:14:45 -05:00
Northern Man c45181ef7e Heltec SSD1306 Display Support (#1283)
My environment

[env:heltec-display]   ; Heltec ESP32 Board with SSD1306 display
platform = ${com.esp32_platform}
board = heltec_wifi_lora_32_V2
build_type = debug
monitor_filters = esp32_exception_decoder
board_build.partitions = min_spiffs.csv
extra_scripts = pre:scripts/omg_firmware_version.py
lib_deps =
  ${com-esp.lib_deps}
  ${libraries.wifimanager32}
  ${libraries.heltec}
;  ${libraries.m5stickcp}

build_flags =
  ${com-esp.build_flags}
  ${test_env.build_flags}
; *** OpenMQTTGateway Config ***
  '-UZmqttDiscovery'          ; disables MQTT Discovery
  '-DvalueAsATopic=true'
  '-DLOG_LEVEL=LOG_LEVEL_TRACE'
; *** OpenMQTTGateway Modules ***
  '-DZboardHELTEC="HELTEC"'
; *** Heltec Board Options ***
  '-DDEBUG_OLEDDISPLAY(...)=Serial.printf( __VA_ARGS__ )'
  '-DLOG_TO_LCD=true'         ; Enable log to LCD
  '-DLED_ERROR=2'
  '-DONBOARD_LED=25'          ; Onboard LED is GPIO 25 on the Heltec Board

monitor_port = /dev/cu.SLAB_USBtoUART
monitor_speed = 921600
upload_port = /dev/cu.SLAB_USBtoUART
upload_speed = 921600

1 - Set default LCD log level to WARNING
2 - Implemented a macro based displayPrint function that will be usable across different displays

- Added logo display when idle
- Fixed log-lcd mqtt function
- Enable OLED Display on Heltec Boards
2022-10-13 21:17:25 -05:00
DigiH b16fbcbef2 valueAsASubject to valueAsATopic inconsistency fix (#1260) 2022-09-03 18:51:52 -05:00
DigiH c4300a002f MQTT-MAC-IP-mDNS (#1245) 2022-07-19 12:10:51 -05:00
Bad 612c3f6322 Fix wrong base topic if gateway_name is changed (#1242)
* Rectify and match parameters sizes.
Increase mqtt_topic_max_size from 100/50 to 150/75 bytes

* Faster and safer compare in cmpToMainTopic()
2022-07-19 07:52:46 +02:00
DigiH a388f14e75 Publishing/receiving inconsistencies fix (#1229)
* Publishing/receiving inconsistencies

* General platformio.ini changes

General platformio.ini changes to allow for publishing/receiving settings to be defined in User_cofig.h instead of them only working if defined in the environments. Kept separate so far for discussion.
2022-07-01 07:17:02 -05:00
h2zero 25b8123ff6 Add option to offload decoding to an external gateway over MQTT. (#1216)
* Add option to offload decoding to an external gateway over MQTT.

* Change decode topic and add to config_bt
2022-06-12 17:44:51 -05:00
Florian 749c1592b4 Add M5Tough board (#1135) 2022-01-17 19:22:26 -06:00
Northern Man 9546f43cd6 Behaviour when MQTT and/or Wifi is not available (#1126)
* Behaviour when MQTT and/or Wifi is not available

I was looking into why all my OpenMQTTGateway devices were not responding after a recent power failure and am speculating that the ESP32 was able to restart faster than my Wifi and MQTT Server was able to restart and resume operations.  And was thinking that a generic ESP.restart may be a reasonable approach with repeated Wifi and/or MQTT connection failures.

As mentioned here https://community.openmqttgateway.com/t/behaviour-when-mqtt-and-or-wifi-is-not-available/1747

Added new variable maxRetryWatchDog, which is the maximum number of mqtt or wifi connection attempts before restarting gateway device.
2022-01-17 16:16:43 -06:00
Florian 149aa40802 Increase MQTT Packet size to enable longer certificates to pass (#1134)
* Increase MQTT Packet size to enable longer certificates to pass

through mqtt for OTA

* Enable to define the mqtt packet size with an external macro
2022-01-17 07:05:02 -06:00
Florian dcbce352be AWS IOT compatibility
implement compatibility with Amazon Web Services IOT through an MQTT connection with certificates. (#1099)
2021-11-07 07:44:50 -06:00
Florian 0ede075843 Add esp32-wt32-eth01 ethernet board (#1064)
* Add esp32-wt32-eth01 ethernet board
2021-08-17 18:48:11 -05:00
h2zeroandFlorian 702c4b7fea Allow for hiding mqtt config settings in wifimanager setup. (#1049)
* Allow for hiding mqtt config settings in wifimanager setup.

Adds the macro `WIFIMNG_HIDE_MQTT_CONFIG` that when defined will hide the mqtt configuration in the wifimanager setup.

Co-authored-by: Florian <1technophile@users.noreply.github.com>
2021-08-04 06:12:19 -05:00
h2zero 2dedabc52f Add "server_cert" parameter to firmware_update command. (#1043)
When updating from the MQTT command from a SSL enabled server this adds an option to provide
the server SSL certificate with the command.

This is useful if connecting to different servers or if the configured certificate has expired
and requires updating to not lose the ability to update via OTA.

The certificate provided will be saved to flash memory for use on subsequent restarts.
2021-07-29 16:13:30 -05:00
h2zero 4b135049a5 Set WifiManager debug level. (#1014)
This allows for setting the WiFimanager debug level for more or less verbosity using the WM_DEBUG_LEVEL macro.
Valid values are:
        DEBUG_ERROR     = 0,
        DEBUG_NOTIFY    = 1, // default
        DEBUG_VERBOSE   = 2,
        DEBUG_DEV       = 3,
        DEBUG_MAX       = 4
2021-07-10 17:42:06 -05:00
h2zero e92e468ca6 Add a macro to use the MAC address as the gateway name. (#1013)
Adds the macro USE_MAC_AS_GATEWAY_NAME, when defined the gateway name will default to
OMG_XXXXXXXXXXXX, where the X's are the mac address characters.
This can still be changed in WiFiManager.
2021-07-10 17:35:16 -05:00
h2zero 3f13984f44 Bugfix: switching brokers with self signed certs. (#1007)
* Fixes BLE scanning being disabled after switching server fails.

* Fixes crash caused by BLE scan results arriving while switching servers.

* Adds documentation to use the server switching command.
2021-07-05 19:40:40 -05:00
h2zero 05dddf42de Implement error LED and status codes. (#1006)
Merges LED_RECEIVE/LED_SEND into LED_SEND_RECEIVE pin definition.

Adds LED_ERROR to display error status based on blink times as follows:

Disconnected from Wifi: 2 seconds on 2 seconds off.
Disconnected from broker: 2 seconds on 5 seconds off.

Other status LED indications added:
WifiManager configuration web portal active: LED_INFO and LED_SEND_RECEIVE = ON.
OTA Update in progress: LED_SEND_RECIEVE and LED_ERROR = ON.
2021-07-01 13:24:20 -05:00
h2zero 2708858754 Add switching between MQTT brokers with self signed client certificates. (#993) 2021-06-24 19:46:58 -05:00
h2zero cd9ed21f9d Replace github OTA update over MQTT with settings in user_config. (#976) 2021-06-05 17:01:11 -05:00
h2zero 31efcb32ee Remove Secure Connection macro and add the config to wifimanager. (#961)
This adds the ability to specify if the MQTT broker connection is secure via a checkbox on the config page of WiFiManager.
Also added to the WiFiManager config page is a text box to enter the brokers TLS certificate.

In the case of using manual configuration a new macro is created MQTT_SECURE_DEFAULT.
When defined as true a secure connection will be requested and the certificate defined in user_config.h will be used.
2021-06-02 21:10:38 -06:00
h2zero 295d39bc27 Trigger firmware update via MQTT (ESP Only). (#953)
If enabled in user_config.h this will trigger the OMG to update it's firmware from the link
provided in the MQTT message.

Example message:
{\"version\":\"test\",\"password\":\"OMGPASSWORD\",\"url\":\"https://github.com/1technophile/OpenMQTTGateway/releases/download/v0.9.6/esp32dev-ble-cont-firmware.bin\"}

If the firmware version in the message is not the same as the current OMG version the device will self update using the link in the url of the message.
2021-05-23 16:38:52 -05:00
Northern ManandNorthern Man 2744510822 Usability Improvements for esp32 platform (#934)
* Increased ESP32 base capabilities

1 - Expose SERIAL_BAUD as an optional compiler directive.
2 - Enabled mDNS based MQTT Host name lookup for ESP32 devices.
3 - Expand capability of ESPWifiManualSetup mode for multiple SSID’s.
Tested with ESP32

* Regression testing of ESP8266 and ESP32

* Removal of Wifi Debuging

* Fix lint issue

Co-authored-by: Northern Man <sgracey@Heisenberg.local>
2021-04-28 20:16:12 -05:00
Martin KorbelandMartin Korbel 23cd2a3104 GridFree SUN-2000G (#926)
* Support for GridFree Sun-2000G inverter

* Bump version of GFSunInverter

Co-authored-by: Martin Korbel <korbel@blackserver.cz>
2021-04-23 20:40:09 -05:00
Florian 863a56b389 Change ESP8266 Json Buffer Size (#903)
768 causes core dump so go back to 512
2021-03-22 19:05:41 -05:00
Florian 46e1ee422a Increase json buffer (#898)
discovery msg and systomqtt require now a bigger buffer
2021-03-16 17:41:50 -05:00
Florian c3cdd8f04c Remove wifi protocol auto change (#882)
#575
so as to see if in conjunction with the platform update we get a better stability of wifi
2021-03-11 15:55:21 -06:00
Northern ManandNorthernMan54 57bc108da4 Initial pull request for rtl_433 support (#886)
* Initial pull request for rtl_433 support

Co-authored-by: NorthernMan54 <sgracey@Bart.local>
2021-03-11 12:43:05 -06:00
Florian cd282596e0 Correct advanced network parameter setup on ESP (#878)
#790
2021-02-26 19:44:20 -06:00
Florian 557cf340db Improve low power mode (#859)
-add switch on HASS
-avoid issue when using ESPWifiManualSetup
-Correct issue on gateway discovery on first connect
-stop processing during discovery
2021-02-05 15:19:43 -06:00
Florian e8b4c63c6c Increase TimeLedON to 1s (#857)
#534
2021-01-30 16:29:09 -06:00
Northern Man 25ea909c08 Support for changing CC1101 Receive and Transmit Frequency (#847)
* Support for changing CC1101 Receive and Transmit Frequency

* Docs

* Resolve feedback

* Update Somfy module to use Global receiveMhz

ELECHOUSE_cc1101.SpiStrobe(CC1101_SIDLE); // Idle receiver prior to
setting a new frequency
2021-01-22 05:53:39 -06:00
白月秋见心 d84f64b23f Feature/add shtc3 (#843)
* Add SHTC3

* remove adc config
2021-01-05 19:17:39 -06:00