Commit Graph
393 Commits
Author SHA1 Message Date
Northern Man dcb4d5551e Add device_class to MQTT Discovery for rtl_433_ESP (#1419)
* Add device_class to rtl_433_ESP discovery
2023-01-25 09:58:18 -06:00
Florian a3603c6a78 [BLE] Simplify the publication of advertisement data (#1408)
With only one control that enables the publication of all the advertisement data, default: false
Note that if the sensor is not recognized, we will no longer publish its advertisement data unless the control is true. This is for the sake of traffic reduction.
2023-01-20 14:30:11 -06:00
Florian b4003d4ea1 Fix actuator manual control with button press and overheat protection (#1403)
Manual control with a button press triggered the relay but 2 times (when pressing and releasing), fixing this.

Check that we have two consecutive readings of temperature above the threshold to trigger the actuator to OFF
And remove it by default to the shelly, as I see unjustified jumps of temperature above 80C.
2023-01-18 18:10:54 -06:00
Florian 76724240f4 Add a check on device id before concatenating it to the device name (#1398)
to avoid concatenating an unknown array
2023-01-16 10:17:59 -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
Dattel 5fcf02af5a Small fix on BME280 Config & CC1101-TXPower Throttle (#1382)
* https://github.com/1technophile/OpenMQTTGateway/issues/1380
CC1101 TXPower selection

* Creates the possability the define SDA/SCL Pins correct through a compiler switch from the platformio.ini
Sample:
  '-DBME280_PIN_SDA=0'
  '-DBME280_PIN_SCL=2'
2023-01-10 20:13:06 +01:00
Florian c1cedcf333 Add ESP32 internal temperature measurement and automatic Actuator switch Off (#1384)
* Add automatic stop of relay following ESP32 temperature

To avoid overheating when too much current goes through the device.

Add internal temperature reporting to SYStoMQTT

This function is not available with ESP32 S3 and C3

* Temp update and error log

Update of the temperature to get closer to the datasheet of the ESP32 -40 +85C
and add the module name to the error log
2023-01-10 11:32:56 -06:00
Florian 31ffdf1e2b Add SHELLY PLUS 1 board with support of relay, switch, BT gateway (#1349)
So that you know, the overtemperature protection is not implemented in the firmware.
2023-01-10 07:18:59 -06:00
DigiH 8a767cf4b8 Typo fixes (#1381) 2023-01-08 07:43:15 -06:00
FlorianandNorthernMan54 16815f51da Add RTL_433 discovery with Home Assistant convention inspired from rtl_433_mqtt_hass.py (#1379)
This also changes the topic structure when using the macro valueAsATopic=true, it adds as sub-topics the `type, subtype, and channel` when they exist.
The id is the last subtopic to facilitate filtering, as it may change when replacing the batteries.

Co-authored-by: NorthernMan54 <19808920+NorthernMan54@users.noreply.github.com>
2023-01-07 20:34:43 -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
Florian 85a4fd6e15 Remove auto discovery switch (#1365)
I don't think there is usage for such a switch into HA, if you see it, auto discovery was already activated and all the entities created, so you will have to go to the mqtt client to remove the retained messages.
If you don't want auto discovery as an HA user you would have to go to the mqtt client to send the discovery message deactivation.
So either way as a HA user you have to go to a client.
And as people not wanting to use auto discovery with HA are the people that are not using HA this switch as a little value.
2022-12-19 08:51:36 -06:00
Florian 25d921580d [HA discovery] Save the BLE settings and change switch to optimistic false (#1364)
The current way of saving settings is through the retain flag of the MQTT commands, unfortunately if several commands are issues they may overwrite each other. So as to prevent it, we now leverage the memory saving introduced earlier to store the BLE settings.
Also leverage the config status publication to show the state through the button position (optimistic false)
2022-12-19 08:44:14 -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
Florian 8dde777fb7 [BLE] Add dynamic active scan runtime setting (#1360)
This commit add the capability to set passive scanning during runtime, versus buildtime before, so as to improve energy consumption of sensors when they don't require active scanning
2022-12-14 17:03:34 -06:00
DigiH 807c668489 Small typo fixes (#1359)
A few small typo fixes
2022-12-12 22:58:51 +01:00
Florian 2490ba75ab Add the possibility to set LOG_LEVEL_LCD and LOG_TO_LCD for M5 boards from PIO (#1358) 2022-12-12 15:41:48 -06:00
Florian 31403d8623 HA auto discovery - Add numbers for interval and scans netween connects (#1357)
To be able to set those values directly through the HA interface
2022-12-12 15:41:30 -06:00
Florian 1aabfb8cb8 HA auto discovery - Transform switch discovery to button when relevant (#1356)
BLE force scan, restart and erase of the gateway can be triggered with a button instead of a switch
2022-12-12 14:35:14 -06:00
melyux b2666dcc83 Add BMP280 support, compiler directive support for oversampling (#1344) 2022-12-05 09:51:45 -06:00
h2zero b9e6c4faba Workaround unsecure AP bug on restart. (#1343) 2022-12-04 18:21:12 -06:00
FlorianandFlorian 4bbdeadb53 Update RN8209 sensors names (#1342)
to NRG to be more generic

Co-authored-by: Florian <1technophile@users.noreply.github.com>
2022-12-01 11:13:41 -06:00
DigiH 07b2a051ec Typo and clarification (#1340) 2022-11-30 20:13:45 -06:00
Florian 5a42b02ad8 Enable to configure the OTA password from the Wifi Manager portal (#1339)
So as to enable the user to change the default one when setting up the gateway
2022-11-30 14:51:37 -06:00
Florian dee3ef4de5 Improve reset mechanism when MQTT is not connected (#1338)
This enables to wait less for the reset to trigger
2022-11-30 14:27:27 -06:00
Florianandh2zero 8ee1c4e524 RN8209 energy sensor support with watt, voltage and current. (#1337)
Co-authored-by: h2zero <powellperalta@gmail.com>
2022-11-29 18:41:47 -06:00
Florian 145896516d Enable to set Manufacturer and Model (#1336)
from macros
2022-11-29 10:48:00 -06:00
Florian 8714141630 Remove the devices that have Random Mac from the internal memory (#1335)
So as to avoid to have a growing memory consumption, indeed each time these devices change their MAC it will create a new entry into the list. This increase continuously the memory consumption of the list. And as these devices can't be discovered and doesn't have interest to be white or black listed we don't store them
2022-11-28 20:29:07 -06:00
Florian c58e765253 Enable to keep actuator on off state in case of restart (#1334)
and publish status as a json when triggering actuator on off through a button
2022-11-28 20:28:40 -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 3e9fbb21ff Move the button check at start of the program (#1330)
So as to enable to trigger the wm portal before the setup of all the modules
2022-11-28 20:04:48 -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
Radim 4afb4a972f Adc bugfix (#1328) 2022-11-28 11:35:11 -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
h2zero 9d7086558b Update Arduino core and BLE/WiFiManager libs. (#1310)
* Update Arduino core and BLE/WiFiManager libs.

* Add esp32-s3 and esp32-c3 environments.

* Update build script to use matrix.

* Update release build.

* Fix WiFiManager crash

* Use espressif32 version 3.5.0 for standard ESP32.

* Resolves BLE scan_evt timeout issue with latest version (5.2.0).

* ESP32C3 and ESP32S3 Env's use espressif32 version 5.2.0.

* Update LED pins for C3/S3 environments.
2022-11-13 12:35:18 -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
Radim d392964b90 ADC improvement & fix (#1314)
* fix when ADC_DIVIDER is defined
NEW multiple readings option

* publish at least every 1min

* define minimum pub adc interval
2022-11-10 06:21:05 -06:00
crasu 7c8b85f9f4 fix rf gateway f strings (#1313)
Signed-off-by: Christian Krämer <christian.kraemer@tngtech.com>
2022-11-07 10:30:51 -06:00
crasu 567c2053c0 check spi connectivity for c1101 (#1287)
Signed-off-by: Christian Krämer <christian.kraemer@tngtech.com>
2022-11-03 07:45:08 -05:00
Radim 7d10502b8d fix pub of res field (#1311) 2022-11-03 07:40:51 -05:00
Florian c612169ba8 Fix discovery duplicates for BT devices (#1297)
Fix isdisc = true identification, introduced by https://github.com/1technophile/OpenMQTTGateway/commit/25b8123ff6471352951d3def22c815017f5f11e1
2022-10-23 13:37:20 -05:00
Northern Man 19d58e01e0 Defensive code for Heltec Display (#1296)
Added to Heltec board display code logic to reduce corruption of messages on the display

Two piece of defensive code were added

- Only display messages to the display when operating on Core 1 ( Default Arduino ESP32 CONFIG_ARDUINO_RUNNING_CORE )

- Only display one character/string at a time

In the event of failure, default to Serial output.

PS SSD1306 driver similar issues

https://github.com/ThingPulse/esp8266-oled-ssd1306/issues/326
https://github.com/ThingPulse/esp8266-oled-ssd1306/issues/352
2022-10-23 13:36:59 -05:00
Sami Salonen 941b1e109f Re-publish BTtoMQTT Theengs discovery topics on MQTT re-connect (#1290)
* Re-publish BTtoMQTT Theengs discovery topics on MQTT re-connect

- Improved version of #1274, this should re-publish more
- Handle return value of (MQTT) client.loop() to detect connection loss
  faster

Signed-off-by: Sami Salonen <ssalonen@gmail.com>
2022-10-23 10:57:39 -05: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