* Refactor announceDeviceTrigger function to improve parameter handling and documentation for optional device information
Fix null pointer references in RFtoMQTTdiscovery and update logging levels for RF signal handling
Refactor RF to MQTT discovery functions for improved clarity and parameter handling
* Update documentation for RF auto discovery and MQTT integration, correcting terminology and enhancing clarity
* Refactor enableRFReceive function to accept parameters for frequency and GPIOs, enhancing flexibility
Removal of openHAB specific MQTT discovery patch "ohdisc", as it is no longer required with openHAB 4.3 and later, and with openHAB before 4.3 MQTT discovery never was fully implemented anyway.
* When updating a device from UNKNOWN force a new scan
* update the sensorModel_id and handle if white-list is updated
* Restore unduly deleted documentation
The filter on NTWK_CONNECTED was too restrictive when asking for WiFi status.
Get the WiFi name and BSSID from the WiFi object
Co-authored-by: Florian <1technophile@users.noreply.github.com>
They are not anymore needed as we keep the scan and presence parameters always displayed
Co-authored-by: Florian <1technophile@users.noreply.github.com>
And remove restart parameter as it is not used (the ESP always restart after erase for our use cases)
Co-authored-by: Florian <1technophile@users.noreply.github.com>
* add '-DvalueAsATopic=true' to RF based environments
add '-DvalueAsATopic=true' to RF based environments. Required to support changes in zgatewayRF.ino for Home Assistant discoverability
* Modify gatewayRF to improve Home Assistant auto discoverability
Pass "recieved" as the type argument and switchRF[0] as the subtype argument to announceDeviceTrigger() which will cause recieved codes to be picked up by home assistant as triggers, i.e. When setting up automations in Home Assistant, selecting a `device` trigger and an OMG device will allow the user to select a code picked up during the autoDiscover window as the trigger for the automation, for example "1394004" recieved. In order to support this, the `'-DvalueAsATopic=true'` argument must be added to all environments using the RF Library
Also change getUniqueId() call to remove leading '-' which will prevent MQTT topics having '--' in them
---------
Co-authored-by: James Carey <james.carey@uws.ac.uk>
Erasing the nvs before the start of WM prevent WM from starting, revert a part of #2075
Also remove the erase from setupWiFiManager method
Co-authored-by: Florian <1technophile@users.noreply.github.com>
-Add a semaphore to avoid msg overlap
-Clean partial buffer
-Enable erase and restart of the secondary module from the primary
Co-authored-by: Florian <1technophile@users.noreply.github.com>
Before this fix, connections with Index 1 and 2 were supposed valid when not present in the configuration, generating attempts to connect with those indexes.
Also improve the erase config by adding an erase when the config file is not present (ESP is connected to WiFi without the config file). This way the ESP will not reconnect to the WiFi AP.
Co-authored-by: Florian <1technophile@users.noreply.github.com>
And enable to launch the loop when offline: false and serial communication layer is activated
Co-authored-by: Florian <1technophile@users.noreply.github.com>
Add Serial as a communication layer so as to transmit data to/from serial
Enable discovery of BT sensors through serial
Add serial heartbeat
Change discovery principle for interval and intervalacts, keep them always discovered and deactivate adaptivescan when changed. Instead of removing their discovery when adaptive scan is activated
Increase JSON_MSG_BUFFER_MAX as we are now using const char* and it requires more memory for Arduino Json Deserialization
Co-authored-by: Florian <1technophile@users.noreply.github.com>
Refactor LED handling into a library
Use a task instead of relying on the loop for precise timing
Co-authored-by: Florian <1technophile@users.noreply.github.com>
Add also a msgrcv (messages received) indicators into SYStoMQTT to measure the performances
Co-authored-by: Florian <1technophile@users.noreply.github.com>