changes for generial input/output via mqtt

This commit is contained in:
technyon
2023-06-03 21:20:19 +02:00
parent 16a7f6fc78
commit a5e334d4c1
23 changed files with 534 additions and 30 deletions

View File

@@ -180,11 +180,16 @@ void setup()
restartTs = preferences->getInt(preference_restart_timer) * 60 * 1000;
}
gpio = new Gpio(preferences);
String gpioDesc;
gpio->getConfigurationText(gpioDesc, gpio->pinConfiguration(), "\n\r");
Serial.print(gpioDesc.c_str());
lockEnabled = preferences->getBool(preference_lock_enabled);
openerEnabled = preferences->getBool(preference_opener_enabled);
const String mqttLockPath = preferences->getString(preference_mqtt_lock_path);
network = new Network(preferences, mqttLockPath, CharBuffer::get(), CHAR_BUFFER_SIZE);
network = new Network(preferences, gpio, mqttLockPath, CharBuffer::get(), CHAR_BUFFER_SIZE);
network->initialize();
networkLock = new NetworkLock(network, preferences, CharBuffer::get(), CHAR_BUFFER_SIZE);
@@ -209,11 +214,6 @@ void setup()
bleScanner->initialize("NukiHub");
bleScanner->setScanDuration(10);
gpio = new Gpio(preferences);
String gpioDesc;
gpio->getConfigurationText(gpioDesc, gpio->pinConfiguration(), "\n\r");
Serial.print(gpioDesc.c_str());
Log->println(lockEnabled ? F("NUKI Lock enabled") : F("NUKI Lock disabled"));
if(lockEnabled)
{