39 #define MY_NODE_ID 254
43 #define RADIO_ERROR_LED_PIN 4 // Error led pin
44 #define RADIO_RX_LED_PIN 6 // Receive led pin
45 #define RADIO_TX_LED_PIN 5 // the PCB, on board LED
51 #define SKETCH_NAME "MockMySensors "
52 #define SKETCH_VERSION "v0.5"
69 #define ID_S_ARMED 0 // dummy to control armed stated for several sensors
110 uint32_t SLEEP_TIME = 900000;
121 #ifdef ID_S_DOOR // V_TRIPPED, V_ARMED
122 MyMessage msg_S_DOOR_T(ID_S_DOOR,V_TRIPPED);
123 MyMessage msg_S_DOOR_A(ID_S_DOOR,V_ARMED);
126 #ifdef ID_S_MOTION // V_TRIPPED, V_ARMED
127 MyMessage msg_S_MOTION_A(ID_S_MOTION,V_ARMED);
128 MyMessage msg_S_MOTION_T(ID_S_MOTION,V_TRIPPED);
131 #ifdef ID_S_SMOKE // V_TRIPPED, V_ARMED
132 MyMessage msg_S_SMOKE_T(ID_S_SMOKE,V_TRIPPED);
133 MyMessage msg_S_SMOKE_A(ID_S_SMOKE,V_ARMED);
137 MyMessage msg_S_LIGHT(ID_S_LIGHT,V_LIGHT);
142 MyMessage msg_S_DIMMER(ID_S_DIMMER,V_DIMMER);
147 MyMessage msg_S_COVER_U(ID_S_COVER,V_UP);
148 MyMessage msg_S_COVER_D(ID_S_COVER,V_DOWN);
149 MyMessage msg_S_COVER_S(ID_S_COVER,V_STOP);
150 MyMessage msg_S_COVER_V(ID_S_COVER,V_VAR1);
163 MyMessage msg_S_BARO_P(ID_S_BARO,V_PRESSURE);
164 MyMessage msg_S_BARO_F(ID_S_BARO,V_FORECAST);
168 MyMessage msg_S_WIND_S(ID_S_WIND,V_WIND);
169 MyMessage msg_S_WIND_G(ID_S_WIND,V_GUST);
170 MyMessage msg_S_WIND_D(ID_S_WIND,V_DIRECTION);
174 MyMessage msg_S_RAIN_A(ID_S_RAIN,V_RAIN);
175 MyMessage msg_S_RAIN_R(ID_S_RAIN,V_RAINRATE);
183 MyMessage msg_S_WEIGHT(ID_S_WEIGHT,V_WEIGHT);
187 MyMessage msg_S_POWER_W(ID_S_POWER,V_WATT);
188 MyMessage msg_S_POWER_K(ID_S_POWER,V_KWH);
196 MyMessage msg_S_HEATER_SET_POINT(ID_S_HEATER,
197 V_HVAC_SETPOINT_HEAT);
198 MyMessage msg_S_HEATER_FLOW_STATE(ID_S_HEATER,
204 float heater_setpoint=21.5;
205 String heater_flow_state=
"Off";
219 MyMessage msg_S_DISTANCE(ID_S_DISTANCE,V_DISTANCE);
222 #ifdef ID_S_LIGHT_LEVEL
223 MyMessage msg_S_LIGHT_LEVEL(ID_S_LIGHT_LEVEL,V_LIGHT_LEVEL);
227 MyMessage msg_S_LOCK(ID_S_LOCK,V_LOCK_STATUS);
233 MyMessage msg_S_IR_R(ID_S_IR,V_IR_RECEIVE);
238 MyMessage msg_S_WATER_F(ID_S_WATER,V_FLOW);
239 MyMessage msg_S_WATER_V(ID_S_WATER,V_VOLUME);
242 #ifdef ID_S_AIR_QUALITY
243 MyMessage msg_S_AIR_QUALITY(ID_S_AIR_QUALITY,V_LEVEL);
250 #ifdef ID_S_SCENE_CONTROLLER
251 MyMessage msg_S_SCENE_CONTROLLER_ON(ID_S_SCENE_CONTROLLER,V_SCENE_ON);
252 MyMessage msg_S_SCENE_CONTROLLER_OF(ID_S_SCENE_CONTROLLER,V_SCENE_OFF);
256 (
char *)
"Good Morning",
258 (
char *)
"All Lights Off",
259 (
char *)
"Music On/Off"
263 int sceneValPrevious=0;
267 #ifdef ID_S_RGB_LIGHT
268 MyMessage msg_S_RGB_LIGHT_V_RGB(ID_S_RGB_LIGHT,V_RGB);
269 MyMessage msg_S_RGB_LIGHT_V_WATT(ID_S_RGB_LIGHT,V_WATT);
270 String rgbState=
"000000";
275 #ifdef ID_S_RGBW_LIGHT
276 MyMessage msg_S_RGBW_LIGHT_V_RGBW(ID_S_RGBW_LIGHT,V_RGBW);
277 MyMessage msg_S_RGBW_LIGHT_V_WATT(ID_S_RGBW_LIGHT,V_WATT);
278 String rgbwState=
"00000000";
283 #ifdef ID_S_COLOR_SENSOR
284 MyMessage msg_S_COLOR_SENSOR_V_RGB(ID_S_COLOR_SENSOR,V_RGB);
290 MyMessage msg_S_HVAC_V_HVAC_SETPOINT_HEAT(ID_S_HVAC,V_HVAC_SETPOINT_HEAT);
291 MyMessage msg_S_HVAC_V_HVAC_SETPOINT_COOL(ID_S_HVAC,V_HVAC_SETPOINT_COOL);
292 MyMessage msg_S_HVAC_V_HVAC_FLOW_STATET(ID_S_HVAC,V_HVAC_FLOW_STATE);
293 MyMessage msg_S_HVAC_V_HVAC_FLOW_MODE(ID_S_HVAC,V_HVAC_FLOW_MODE);
294 MyMessage msg_S_HVAC_V_HVAC_SPEED(ID_S_HVAC,V_HVAC_SPEED);
296 float hvac_SetPointHeat = 16.5;
297 float hvac_SetPointCool = 25.5;
298 String hvac_FlowState =
"AutoChangeOver";
299 String hvac_FlowMode =
"Auto";
300 String hvac_Speed =
"Normal";
314 #ifdef ID_S_MULTIMETER
315 MyMessage msg_S_MULTIMETER_V_IMPEDANCE(ID_S_MULTIMETER,V_IMPEDANCE);
316 MyMessage msg_S_MULTIMETER_V_VOLTAGE(ID_S_MULTIMETER,V_VOLTAGE);
317 MyMessage msg_S_MULTIMETER_V_CURRENT(ID_S_MULTIMETER,V_CURRENT);
325 #ifdef ID_S_SPRINKLER
332 #ifdef ID_S_WATER_LEAK
336 #ifdef ID_S_VIBRATION
342 MyMessage msg_S_MOISTURE(ID_S_MOISTURE,V_LEVEL);
346 MyMessage msg_S_CUSTOM_1(ID_S_CUSTOM,V_VAR1);
347 MyMessage msg_S_CUSTOM_2(ID_S_CUSTOM,V_VAR2);
348 MyMessage msg_S_CUSTOM_3(ID_S_CUSTOM,V_VAR3);
349 MyMessage msg_S_CUSTOM_4(ID_S_CUSTOM,V_VAR4);
350 MyMessage msg_S_CUSTOM_5(ID_S_CUSTOM,V_VAR5);
359 randomSeed(analogRead(0));
362 Serial.println(
"GW Started");
368 Serial.print(
"Send Sketch Info: ");
370 Serial.print(SKETCH_NAME);
371 Serial.println(SKETCH_VERSION);
375 Serial.print(
"Get Config: ");
377 Serial.println(metric ?
"Metric":
"Imperial");
386 Serial.println(
"Presenting Nodes");
387 Serial.println(
"________________");
390 Serial.println(
" S_DOOR");
391 present(ID_S_DOOR,S_DOOR,
"Outside Door");
396 Serial.println(
" S_MOTION");
397 present(ID_S_MOTION,S_MOTION,
"Outside Motion");
402 Serial.println(
" S_SMOKE");
403 present(ID_S_SMOKE,S_SMOKE,
"Kitchen Smoke");
408 Serial.println(
" S_LIGHT");
409 present(ID_S_LIGHT,S_LIGHT,
"Hall Light");
414 Serial.println(
" S_DIMMER");
415 present(ID_S_DIMMER,S_DIMMER,
"Living room dimmer");
420 Serial.println(
" S_COVER");
421 present(ID_S_COVER,S_COVER,
"Window cover");
426 Serial.println(
" S_TEMP");
427 present(ID_S_TEMP,S_TEMP,
"House Temperarue");
432 Serial.println(
" S_HUM");
433 present(ID_S_HUM,S_HUM,
"Current Humidity");
438 Serial.println(
" S_BARO");
439 present(ID_S_BARO,S_BARO,
" Air pressure");
444 Serial.println(
" S_WIND");
445 present(ID_S_WIND,S_WIND,
"Wind Station");
450 Serial.println(
" S_RAIN");
451 present(ID_S_RAIN,S_RAIN,
"Rain Station");
456 Serial.println(
" S_UV");
457 present(ID_S_UV,S_UV,
"Ultra Violet");
462 Serial.println(
" S_WEIGHT");
463 present(ID_S_WEIGHT,S_WEIGHT,
"Outdoor Scale");
468 Serial.println(
" S_POWER");
469 present(ID_S_POWER,S_POWER,
"Power Metric");
474 Serial.println(
" S_HEATER");
475 present(ID_S_HEATER,S_HEATER,
"Garage Heater");
480 Serial.println(
" S_DISTANCE");
481 present(ID_S_DISTANCE,S_DISTANCE,
"Distance Measure");
485 #ifdef ID_S_LIGHT_LEVEL
486 Serial.println(
" S_LIGHT_LEVEL");
487 present(ID_S_LIGHT_LEVEL,S_LIGHT_LEVEL,
"Outside Light Level");
492 Serial.println(
" S_LOCK");
493 present(ID_S_LOCK,S_LOCK,
"Front Door Lock");
498 Serial.println(
" S_IR");
499 present(ID_S_IR,S_IR,
"Univeral Command");
504 Serial.println(
" S_WATER");
505 present(ID_S_WATER,S_WATER,
"Water Level");
509 #ifdef ID_S_AIR_QUALITY
510 Serial.println(
" S_AIR_QUALITY");
511 present(ID_S_AIR_QUALITY,S_AIR_QUALITY,
"Air Station");
516 Serial.println(
" S_DUST");
517 present(ID_S_DUST,S_DUST,
"Dust Level");
521 #ifdef ID_S_SCENE_CONTROLLER
522 Serial.println(
" S_SCENE_CONTROLLER");
523 present(ID_S_SCENE_CONTROLLER,S_SCENE_CONTROLLER,
"Scene Controller");
527 #ifdef ID_S_RGB_LIGHT
528 Serial.println(
" RGB_LIGHT");
529 present(ID_S_RGB_LIGHT,S_RGB_LIGHT,
"Mood Light");
533 #ifdef ID_S_RGBW_LIGHT
534 Serial.println(
" RGBW_LIGHT");
535 present(ID_S_RGBW_LIGHT,S_RGBW_LIGHT,
"Mood Light 2");
539 #ifdef ID_S_COLOR_SENSOR
540 Serial.println(
" COLOR_SENSOR");
541 present(ID_S_COLOR_SENSOR,S_COLOR_SENSOR,
"Hall Painting");
546 Serial.println(
" HVAC");
547 present(ID_S_HVAC,S_HVAC,
"HVAC");
551 #ifdef ID_S_MULTIMETER
552 Serial.println(
" MULTIMETER");
553 present(ID_S_MULTIMETER,S_MULTIMETER,
"Electric Staion");
557 #ifdef ID_S_SPRINKLER
559 #ifdef ID_S_WATER_LEAK
563 #ifdef ID_S_VIBRATION
569 Serial.println(
" S_MOISTURE");
570 present(ID_S_MOISTURE,S_MOISTURE,
"Basement Sensor");
575 Serial.println(
" S_CUSTOM");
576 present(ID_S_CUSTOM,S_CUSTOM,
"Other Stuff");
582 Serial.println(
"________________");
591 Serial.println(
"#########################");
592 randNumber=random(0,101);
594 Serial.print(
"RandomNumber:");
595 Serial.println(randNumber);
597 Serial.println(
"Send Battery Level");
602 Serial.println(
"Request Time");
671 #ifdef ID_S_LIGHT_LEVEL
687 #ifdef ID_S_AIR_QUALITY
695 #ifdef ID_S_SCENE_CONTROLLER
699 #ifdef ID_S_RGB_LIGHT
703 #ifdef ID_S_RGBW_LIGHT
707 #ifdef ID_S_COLOR_SENSOR
715 #ifdef ID_S_MULTIMETER
719 #ifdef ID_S_SPRINKLER
721 #ifdef ID_S_WATER_LEAK
725 #ifdef ID_S_VIBRATION
740 Serial.println(
"#########################");
748 Serial.print(
"Time value received: ");
749 Serial.println(controllerTime);
759 Serial.print(
"Door is: " );
761 if (randNumber <= 50) {
762 Serial.println(
"Open");
763 send(msg_S_DOOR_T.
set((int16_t)1));
765 Serial.println(
"Closed");
766 send(msg_S_DOOR_T.
set((int16_t)0));
769 Serial.print(
"System is: " );
770 Serial.println((isArmed ?
"Armed":
"Disarmed"));
771 send(msg_S_DOOR_A.
set(isArmed));
780 Serial.print(
"Motion is: " );
782 if (randNumber <= 50) {
783 Serial.println(
"Active");
784 send(msg_S_MOTION_T.set(1));
786 Serial.println(
"Quiet");
787 send(msg_S_MOTION_T.set(0));
791 Serial.print(
"System is: " );
792 Serial.println((isArmed ?
"Armed":
"Disarmed"));
793 send(msg_S_MOTION_A.set(isArmed));
802 Serial.print(
"Smoke is: " );
804 if (randNumber <= 50) {
805 Serial.println(
"Active");
806 send(msg_S_SMOKE_T.set(1));
808 Serial.println(
"Quiet");
809 send(msg_S_SMOKE_T.set(0));
813 Serial.print(
"System is: " );
814 Serial.println((isArmed ?
"Armed":
"Disarmed"));
815 send(msg_S_SMOKE_A.set(isArmed));
825 Serial.print(
"Light is: " );
826 Serial.println((isLightOn ?
"On":
"Off"));
828 send(msg_S_LIGHT.set(isLightOn));
837 Serial.print(
"Dimmer is set to: " );
838 Serial.println(dimmerVal);
840 send(msg_S_DIMMER.set(dimmerVal));
849 Serial.print(
"Cover is : " );
851 if (coverState == 1) {
852 Serial.println(
"Opening");
853 send(msg_S_COVER_U.set(1));
854 }
else if (coverState == -1) {
855 Serial.println(
"Closing");
856 send(msg_S_COVER_D.set(0));
858 Serial.println(
"Idle");
859 send(msg_S_COVER_S.set(-1));
861 send(msg_S_COVER_V.set(coverState));
869 Serial.print(
"Temperature is: " );
870 Serial.println(map(randNumber,1,100,0,45));
872 send(msg_S_TEMP.set(map(randNumber,1,100,0,45)));
881 Serial.print(
"Humidity is: " );
882 Serial.println(randNumber);
884 send(msg_S_HUM.set(randNumber));
893 const char *weather[] = {
"stable",
"sunny",
"cloudy",
"unstable",
"thunderstorm",
"unknown"};
894 long pressure = map(randNumber,1,100,870,1086);
895 int forecast = map(randNumber,1,100,0,5);
897 Serial.print(
"Atmospheric Pressure is: " );
898 Serial.println(pressure);
899 send(msg_S_BARO_P.set(pressure));
901 Serial.print(
"Weather forecast: " );
902 Serial.println(weather[forecast]);
903 send(msg_S_BARO_F.set(weather[forecast]));
912 Serial.print(
"Wind Speed is: " );
913 Serial.println(randNumber);
914 send(msg_S_WIND_S.set(randNumber));
916 Serial.print(
"Wind Gust is: " );
917 Serial.println(randNumber+10);
918 send(msg_S_WIND_G.set(randNumber+10));
920 Serial.print(
"Wind Direction is: " );
921 Serial.println(map(randNumber,1,100,0,360));
922 send(msg_S_WIND_D.set(map(randNumber,1,100,0,360)));
931 Serial.print(
"Rain amount is: " );
932 Serial.println(randNumber);
934 send(msg_S_RAIN_A.set(randNumber));
936 Serial.print(
"Rain rate is: " );
937 Serial.println(randNumber/60);
939 send(msg_S_RAIN_R.set(randNumber/60,1));
948 Serial.print(
"Ultra Violet level is: " );
949 Serial.println(map(randNumber,1,100,0,15));
951 send(msg_S_UV.set(map(randNumber,1,100,0,15)));
960 Serial.print(
"Weight is: " );
961 Serial.println(map(randNumber,1,100,0,150));
963 send(msg_S_WEIGHT.set(map(randNumber,1,100,0,150)));
972 Serial.print(
"Watt is: " );
973 Serial.println(map(randNumber,1,100,0,150));
974 send(msg_S_POWER_W.set(map(randNumber,1,100,0,150)));
976 Serial.print(
"KWH is: " );
977 Serial.println(map(randNumber,1,100,0,150));
978 send(msg_S_POWER_K.set(map(randNumber,1,100,0,150)));
991 Serial.print(
"Heater flow state is: " );
992 Serial.println(heater_flow_state);
993 send(msg_S_HEATER_FLOW_STATE.set(heater_flow_state.c_str()));
1003 Serial.print(
"Heater Setpoint: " );
1004 Serial.println(heater_setpoint,1);
1005 send(msg_S_HEATER_SET_POINT.set(heater_setpoint,1));
1009 #ifdef ID_S_DISTANCE
1013 Serial.print(
"Distance is: " );
1014 Serial.println(map(randNumber,1,100,0,150));
1016 send(msg_S_DISTANCE.set(map(randNumber,1,100,0,150)));
1021 #ifdef ID_S_LIGHT_LEVEL
1025 Serial.print(
"Light is: " );
1026 Serial.println(map(randNumber,1,100,0,150));
1028 send(msg_S_LIGHT_LEVEL.set(map(randNumber,1,100,0,150)));
1037 Serial.print(
"Lock is: " );
1038 Serial.println((isLocked ?
"Locked":
"Unlocked"));
1039 send(msg_S_LOCK.set(isLocked));
1048 Serial.print(
"Infrared is: " );
1049 Serial.println(irVal);
1051 send(msg_S_IR_S.set(irVal));
1052 send(msg_S_IR_R.set(irVal));
1061 Serial.print(
"Water flow is: " );
1062 Serial.println(map(randNumber,1,100,0,150));
1064 send(msg_S_WATER_F.set(map(randNumber,1,100,0,150)));
1066 Serial.print(
"Water volume is: " );
1067 Serial.println(map(randNumber,1,100,0,150));
1069 send(msg_S_WATER_V.set(map(randNumber,1,100,0,150)));
1074 #ifdef ID_S_AIR_QUALITY
1078 Serial.print(
"Air Quality is: " );
1079 Serial.println(randNumber);
1081 send(msg_S_AIR_QUALITY.set(randNumber));
1090 Serial.print(
"Dust level is: " );
1091 Serial.println(randNumber);
1093 send(msg_S_DUST.set(randNumber));
1098 #ifdef ID_S_SCENE_CONTROLLER
1102 Serial.print(
"Scene is: " );
1103 Serial.println(scenes[sceneVal]);
1105 if(sceneValPrevious != sceneVal) {
1106 send(msg_S_SCENE_CONTROLLER_OF.set(sceneValPrevious));
1107 send(msg_S_SCENE_CONTROLLER_ON.set(sceneVal));
1108 sceneValPrevious=sceneVal;
1114 #ifdef ID_S_RGB_LIGHT
1118 Serial.print(
"RGB Light state is: " );
1119 Serial.println(rgbState);
1120 send(msg_S_RGB_LIGHT_V_RGB.set(rgbState.c_str()));
1122 Serial.print(
"RGB Light Watt is: " );
1123 Serial.println(map(randNumber,1,100,0,150));
1124 send(msg_S_RGB_LIGHT_V_WATT.set(map(randNumber,1,100,0,150)));
1129 #ifdef ID_S_RGBW_LIGHT
1133 Serial.print(
"RGBW Light state is: " );
1134 Serial.println(rgbwState);
1135 send(msg_S_RGBW_LIGHT_V_RGBW.set(rgbwState.c_str()));
1137 Serial.print(
"RGBW Light Watt is: " );
1138 Serial.println(map(randNumber,1,100,0,150));
1139 send(msg_S_RGBW_LIGHT_V_WATT.set(map(randNumber,1,100,0,150)));
1144 #ifdef ID_S_COLOR_SENSOR
1149 String red = String(random(0,256),HEX);
1150 String green = String(random(0,256),HEX);
1151 String blue = String(random(0,256),HEX);
1153 colorState=String(red + green + blue);
1155 Serial.print(
"Color state is: " );
1156 Serial.println(colorState);
1157 send(msg_S_COLOR_SENSOR_V_RGB.set(colorState.c_str()));
1172 Serial.print(
"HVAC Set Point Heat is: " );
1173 Serial.println(hvac_SetPointHeat);
1174 send(msg_S_HVAC_V_HVAC_SETPOINT_HEAT.set(hvac_SetPointHeat,1));
1176 Serial.print(
"HVAC Set Point Cool is: " );
1177 Serial.println(hvac_SetPointCool);
1178 send(msg_S_HVAC_V_HVAC_SETPOINT_COOL.set(hvac_SetPointCool,1));
1180 Serial.print(
"HVAC Flow State is: " );
1181 Serial.println(hvac_FlowState);
1182 send(msg_S_HVAC_V_HVAC_FLOW_STATET.set(hvac_FlowState.c_str()));
1184 Serial.print(
"HVAC Flow Mode is: " );
1185 Serial.println(hvac_FlowMode);
1186 send(msg_S_HVAC_V_HVAC_FLOW_MODE.set(hvac_FlowMode.c_str()));
1188 Serial.print(
"HVAC Speed is: " );
1189 Serial.println(hvac_Speed);
1190 send(msg_S_HVAC_V_HVAC_SPEED.set(hvac_Speed.c_str()));
1195 #ifdef ID_S_MULTIMETER
1198 int impedance=map(randNumber,1,100,0,15000);
1199 int volt=map(randNumber,1,100,0,380);
1200 int amps=map(randNumber,1,100,0,16);
1202 Serial.print(
"Impedance is: " );
1203 Serial.println(impedance);
1204 send(msg_S_MULTIMETER_V_IMPEDANCE.set(impedance));
1206 Serial.print(
"Voltage is: " );
1207 Serial.println(volt);
1208 send(msg_S_MULTIMETER_V_VOLTAGE.set(volt));
1210 Serial.print(
"Current is: " );
1211 Serial.println(amps);
1212 send(msg_S_MULTIMETER_V_CURRENT.set(amps));
1217 #ifdef ID_S_SPRINKLER
1219 #ifdef ID_S_WATER_LEAK
1223 #ifdef ID_S_VIBRATION
1225 #ifdef ID_S_MOISTURE
1228 #ifdef ID_S_MOISTURE
1232 Serial.print(
"Moisture level is: " );
1233 Serial.println(randNumber);
1235 send(msg_S_MOISTURE.set(randNumber));
1243 Serial.print(
"Custom value is: " );
1244 Serial.println(randNumber);
1246 send(msg_S_CUSTOM_1.set(randNumber));
1247 send(msg_S_CUSTOM_2.set(randNumber));
1248 send(msg_S_CUSTOM_3.set(randNumber));
1249 send(msg_S_CUSTOM_4.set(randNumber));
1250 send(msg_S_CUSTOM_5.set(randNumber));
1262 Serial.print(
"Incoming change for ID_S_ARMED:");
1264 Serial.print(
", New status: ");
1265 Serial.println((isArmed ?
"Armed":
"Disarmed" ));
1282 isLightOn = message.
getBool();
1283 Serial.print(
"Incoming change for ID_S_LIGHT:");
1285 Serial.print(
", New status: ");
1286 Serial.println((isLightOn ?
"On":
"Off"));
1306 Serial.println(
"V_DIMMER data invalid (should be 0..100)" );
1309 dimmerVal= message.
getInt();
1310 Serial.print(
"Incoming change for ID_S_DIMMER:");
1312 Serial.print(
", New status: ");
1313 Serial.println(message.
getInt());
1321 Serial.print(
"Incoming change for ID_S_COVER:");
1323 Serial.print(
", New status: ");
1324 Serial.println(
"V_UP");
1330 Serial.print(
"Incoming change for ID_S_COVER:");
1332 Serial.print(
", New status: ");
1333 Serial.println(
"V_DOWN");
1339 Serial.print(
"Incoming change for ID_S_COVER:");
1341 Serial.print(
", New status: ");
1342 Serial.println(
"V_STOP");
1348 case V_HVAC_SETPOINT_HEAT:
1351 if(message.
getSensor() == ID_S_HEATER) {
1352 heater_setpoint=message.
getFloat();
1354 Serial.print(
"Incoming set point for ID_S_HEATER:");
1356 Serial.print(
", New status: ");
1357 Serial.println(heater_setpoint,1);
1364 hvac_SetPointHeat=message.
getFloat();
1365 Serial.print(
"Incoming set point for ID_S_HVAC:");
1367 Serial.print(
", New status: ");
1368 Serial.println(hvac_SetPointHeat,1);
1374 case V_HVAC_FLOW_STATE:
1376 if(message.
getSensor() == ID_S_HEATER) {
1378 Serial.print(
"Incoming flow state change for ID_S_HEATER:");
1380 Serial.print(
", New status: ");
1381 Serial.println(heater_flow_state);
1390 Serial.print(
"Incoming set point for ID_S_HVAC:");
1392 Serial.print(
", New status: ");
1393 Serial.println(hvac_FlowState);
1402 Serial.print(
"Incoming change for ID_S_LOCK:");
1404 Serial.print(
", New status: ");
1405 Serial.println(message.
getBool()?
"Locked":
"Unlocked");
1413 Serial.print(
"Incoming change for ID_S_IR:");
1415 Serial.print(
", New status: ");
1416 Serial.println(irVal);
1421 Serial.print(
"Incoming change for ID_S_IR:");
1423 Serial.print(
", New status: ");
1424 Serial.println(irVal);
1429 #ifdef ID_S_SCENE_CONTROLLER
1431 sceneVal = message.
getInt();
1432 Serial.print(
"Incoming change for ID_S_SCENE_CONTROLLER:");
1434 Serial.print(
", New status: ");
1435 Serial.print(scenes[sceneVal]);
1436 Serial.println(
" On");
1440 sceneVal = message.
getInt();
1441 Serial.print(
"Incoming change for ID_S_SCENE_CONTROLLER:");
1443 Serial.print(
", New status: ");
1444 Serial.print(scenes[sceneVal]);
1445 Serial.println(
" Off");
1450 #ifdef ID_S_RGB_LIGHT
1453 Serial.print(
"Incoming flow state change for ID_S_RGB_LIGHT:");
1455 Serial.print(
", New status: ");
1456 Serial.println(rgbState);
1462 #ifdef ID_S_RGBW_LIGHT
1465 Serial.print(
"Incoming flow state change for ID_S_RGBW_LIGHT:");
1467 Serial.print(
", New status: ");
1468 Serial.println(rgbwState);
1480 case V_HVAC_SETPOINT_COOL:
1481 hvac_SetPointCool=message.
getFloat();
1483 Serial.print(
"Incoming set point for ID_S_HVAC:");
1485 Serial.print(
", New status: ");
1486 Serial.println(hvac_SetPointCool,1);
1490 case V_HVAC_FLOW_MODE:
1493 Serial.print(
"Incoming set point for ID_S_HVAC:");
1495 Serial.print(
", New status: ");
1496 Serial.println(hvac_Speed);
1503 Serial.print(
"Incoming set point for ID_S_HVAC:");
1505 Serial.print(
", New status: ");
1506 Serial.println(hvac_FlowMode);
1512 Serial.print(
"Unknown/Unimplemented message type: ");
1513 Serial.println(message.
getType());