Files
Arduino/ESP32/ESP32-HomeSpan/ESP32-HomeSpan.ino
2024-10-03 10:05:46 +02:00

34 lines
721 B
C++

#include "HomeSpan.h"
#include "LED.h"
#include "DEV_RELAY.h"
void setup() {
// put your setup code here, to run once:
Serial.begin(115200);
homeSpan.setPairingCode("11122333");
homeSpan.setQRID("111-22-333");
homeSpan.begin(Category::Bridges, "HomeSpan Bridge");
new SpanAccessory();
new Service::AccessoryInformation();
new Characteristic::Identify();
new LED(LED_BUILTIN);
// Accessory 2: Relay Switch
new SpanAccessory();
new Service::AccessoryInformation();
new Characteristic::Identify();
new DEV_RELAY(4); // instantiates a new relay
}
void loop() {
// put your main code here, to run repeatedly:
homeSpan.poll();
}