Commit Graph
412 Commits
Author SHA1 Message Date
Florian 115fdf80aa [BT] Improve conditions of adaptive scanning (#1450)
To avoid setting several times the BLEinterval for one sensor
2023-02-10 17:54:56 -06:00
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 7c0fafd48e [BT] Continuous active scanning when adaptive scanning is false (#1448)
Set `interval` and `intervalacts` to the minimum when adaptive scanning is deactivated. When the user encounters a situation on which a device is not detected due to adaptive scanning, we set the gateway to continuous active to maximize the chance to detect the device.
2023-02-10 17:05:52 -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 799d8e2e85 [WIFI] Increase delay between first wifi connection attempt (#1446)
This improves the chances of reconnection with this mode (before doing it with the wifi manager part)
2023-02-09 16:19:12 -06:00
Florian 1b0778dc0a [LPM] - Update state (#1445)
When issuing a low power mode change update the state to the controller
2023-02-09 16:18:39 -06:00
Florian 26c0cca614 [LPM] - Fix reboot loop when low power is used (#1444)
By not deinitializing BLE at the start, if it has not been initialized. Setting the time between waking up from the macro rather than the config interval.
This one does not have a value at the start.
2023-02-09 15:19:09 -06:00
Florian 53e4473810 [HA Discovery] - Optimize low power mode discovery (#1443)
Merge the sensor and the switch in one entity
2023-02-09 14:45:18 -06:00
Northern Man efd24735a7 First Pass (#1442) 2023-02-09 13:33:55 -06:00
FlorianandDigiH f283327998 [BT] - Adaptive scan (#1440)
* [BT] Adaptive scan

Add adaptive scan to avoid users setting parameters and deduct automatically the scan requirements from the list of devices

---------
Co-authored-by: DigiH <github@digih.net>
2023-02-07 17:36:18 -06:00
DigiH 05f83c5f80 Active Scan Interval (#1433) 2023-02-07 12:25:40 -06:00
DigiH bd9dcf1ec8 Tag properties visibility (#1432)
Tag properties visibility to be included with "pubadvdata" setting
2023-02-01 19:41:01 -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 23160ad8b4 [ONOFF] Publish state at start and at a given frequency (#1427)
To update state of the controllers
2023-01-26 20:13:16 -06:00
Florian 51357191df [ONOFF] Add overcurrent protection (#1426)
Add a function that switches OFF the actuator if the current measured is more than MAX_CURRENT_ACTUATOR
2023-01-26 19:51:12 -06:00
Florian 4e885a7cd0 [BT] Regular BT connect based on time (#1423)
instead of number of scans, as users changing the interval to continuous scanning may have connect attempts to frequently
2023-01-26 09:28:16 -06:00
Florian a64acab7c8 [BT] Regular BLE system parameter pub (#1422)
Publish BT config parameter at start so as to update the switch statuses in the controller
Also publish regularly in case of controller restart
Also move btqsum, btqsnd and btqavg to BTtoMQTT topic instead of SYStoMQTT as they are more relevant here
2023-01-26 08:18:44 -06:00
Northern Man 150603555c Update to ZdisplaySSD1306 to reduce overall resource usage, and enable message queuing (#1417) 2023-01-26 08:17:53 -06:00
Merijn 6e3e8c3330 [RS232] add JSON parsing and hardware serial support to RS232 gateway (#1409)
* add JSON parse option to RS232 gateway

* add hardware UART support to RS232 gateway

* changed default RS232toMQTTmode to raw (instead of JSON)

* removed reference to Arduino Mega in RS232 gateway config

* update RS232 gateway doc
2023-01-25 16:43:53 -06:00
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