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>
Add a Bluetooth timer to automatically disconnect the Bluetooth client
Add custom data notifications
Add AP Scan list
Change MQTTtoSYS API to accept server or port alone
Co-authored-by: Florian <1technophile@users.noreply.github.com>
* Changed jsonQueue to use json String rather than json Object
Added Mutex protection to emptyQueue()
Move Mutex protection to within enqueueJsonObject to shorten lock time
* [SERIAL] Add the capability send info to Serial instead of/added MQTT
Add the capability to send json data to Serial as a communication layer, added/instead of MQTT
* Use delay rather than vTaskDelay
---------
Co-authored-by: Florian <1technophile@users.noreply.github.com>
Gaterway states to improve LED management
Make the sleep function accessible outside BT
BREAKING remove sleep for ESP8266
BREAKING lowpowermode API changed to powermode and new mode definition
Co-authored-by: Florian <1technophile@users.noreply.github.com>