@@ -43,15 +43,15 @@ static Device my_device("Air Cooler", "my.device.air-cooler", NULL);
43
43
44
44
void sysProvEvent (arduino_event_t *sys_event)
45
45
{
46
- switch (sys_event->event_id ) {
46
+ switch (sys_event->event_id ) {
47
47
case ARDUINO_EVENT_PROV_START:
48
48
#if CONFIG_IDF_TARGET_ESP32S2
49
49
Serial.printf (" \n Provisioning Started with name \" %s\" and PoP \" %s\" on SoftAP\n " , service_name, pop);
50
50
printQR (service_name, pop, " softap" );
51
51
#else
52
52
Serial.printf (" \n Provisioning Started with name \" %s\" and PoP \" %s\" on BLE\n " , service_name, pop);
53
53
printQR (service_name, pop, " ble" );
54
- #endif
54
+ #endif
55
55
break ;
56
56
default :;
57
57
}
@@ -114,7 +114,7 @@ void setup()
114
114
pinMode (gpio_speed, OUTPUT);
115
115
analogWrite (gpio_speed, DEFAULT_SPEED);
116
116
117
- Node my_node;
117
+ Node my_node;
118
118
my_node = RMaker.initNode (" ESP RainMaker Node" );
119
119
120
120
// Create custom air cooler device
@@ -138,20 +138,22 @@ void setup()
138
138
my_device.addParam (mode_param);
139
139
140
140
my_device.addCb (write_callback);
141
-
142
- // Add custom Air Cooler device to the node
141
+
142
+ // Add custom Air Cooler device to the node
143
143
my_node.addDevice (my_device);
144
144
145
- // This is optional
145
+ // This is optional
146
146
// RMaker.enableOTA(OTA_USING_PARAMS);
147
- // If you want to enable scheduling, set time zone for your region using setTimeZone().
147
+ // If you want to enable scheduling, set time zone for your region using setTimeZone().
148
148
// The list of available values are provided here https://rainmaker.espressif.com/docs/time-service.html
149
149
// RMaker.setTimeZone("Asia/Shanghai");
150
150
// Alternatively, enable the Timezone service and let the phone apps set the appropriate timezone
151
151
// RMaker.enableTZService();
152
152
153
153
RMaker.enableSchedule ();
154
154
155
+ RMaker.enableScenes ();
156
+
155
157
RMaker.start ();
156
158
157
159
WiFi.onEvent (sysProvEvent);
0 commit comments