38 #define MY_NODE_ID 254
42 #define RADIO_ERROR_LED_PIN 4 // Error led pin
43 #define RADIO_RX_LED_PIN 6 // Receive led pin
44 #define RADIO_TX_LED_PIN 5 // the PCB, on board LED
50 #define SKETCH_NAME "MockMySensors "
51 #define SKETCH_VERSION "v0.5"
68 #define ID_S_ARMED 0 // dummy to control armed stated for several sensors
109 uint32_t SLEEP_TIME = 900000;
120 #ifdef ID_S_DOOR // V_TRIPPED, V_ARMED
121 MyMessage msg_S_DOOR_T(ID_S_DOOR,V_TRIPPED);
122 MyMessage msg_S_DOOR_A(ID_S_DOOR,V_ARMED);
125 #ifdef ID_S_MOTION // V_TRIPPED, V_ARMED
126 MyMessage msg_S_MOTION_A(ID_S_MOTION,V_ARMED);
127 MyMessage msg_S_MOTION_T(ID_S_MOTION,V_TRIPPED);
130 #ifdef ID_S_SMOKE // V_TRIPPED, V_ARMED
131 MyMessage msg_S_SMOKE_T(ID_S_SMOKE,V_TRIPPED);
132 MyMessage msg_S_SMOKE_A(ID_S_SMOKE,V_ARMED);
136 MyMessage msg_S_LIGHT(ID_S_LIGHT,V_LIGHT);
141 MyMessage msg_S_DIMMER(ID_S_DIMMER,V_DIMMER);
146 MyMessage msg_S_COVER_U(ID_S_COVER,V_UP);
147 MyMessage msg_S_COVER_D(ID_S_COVER,V_DOWN);
148 MyMessage msg_S_COVER_S(ID_S_COVER,V_STOP);
149 MyMessage msg_S_COVER_V(ID_S_COVER,V_VAR1);
162 MyMessage msg_S_BARO_P(ID_S_BARO,V_PRESSURE);
163 MyMessage msg_S_BARO_F(ID_S_BARO,V_FORECAST);
167 MyMessage msg_S_WIND_S(ID_S_WIND,V_WIND);
168 MyMessage msg_S_WIND_G(ID_S_WIND,V_GUST);
169 MyMessage msg_S_WIND_D(ID_S_WIND,V_DIRECTION);
173 MyMessage msg_S_RAIN_A(ID_S_RAIN,V_RAIN);
174 MyMessage msg_S_RAIN_R(ID_S_RAIN,V_RAINRATE);
182 MyMessage msg_S_WEIGHT(ID_S_WEIGHT,V_WEIGHT);
186 MyMessage msg_S_POWER_W(ID_S_POWER,V_WATT);
187 MyMessage msg_S_POWER_K(ID_S_POWER,V_KWH);
195 MyMessage msg_S_HEATER_SET_POINT(ID_S_HEATER,
196 V_HVAC_SETPOINT_HEAT);
197 MyMessage msg_S_HEATER_FLOW_STATE(ID_S_HEATER,
203 float heater_setpoint=21.5;
204 String heater_flow_state=
"Off";
218 MyMessage msg_S_DISTANCE(ID_S_DISTANCE,V_DISTANCE);
221 #ifdef ID_S_LIGHT_LEVEL
222 MyMessage msg_S_LIGHT_LEVEL(ID_S_LIGHT_LEVEL,V_LIGHT_LEVEL);
226 MyMessage msg_S_LOCK(ID_S_LOCK,V_LOCK_STATUS);
232 MyMessage msg_S_IR_R(ID_S_IR,V_IR_RECEIVE);
237 MyMessage msg_S_WATER_F(ID_S_WATER,V_FLOW);
238 MyMessage msg_S_WATER_V(ID_S_WATER,V_VOLUME);
241 #ifdef ID_S_AIR_QUALITY
242 MyMessage msg_S_AIR_QUALITY(ID_S_AIR_QUALITY,V_LEVEL);
249 #ifdef ID_S_SCENE_CONTROLLER
250 MyMessage msg_S_SCENE_CONTROLLER_ON(ID_S_SCENE_CONTROLLER,V_SCENE_ON);
251 MyMessage msg_S_SCENE_CONTROLLER_OF(ID_S_SCENE_CONTROLLER,V_SCENE_OFF);
255 (
char *)
"Good Morning",
257 (
char *)
"All Lights Off",
258 (
char *)
"Music On/Off"
262 int sceneValPrevious=0;
266 #ifdef ID_S_RGB_LIGHT
267 MyMessage msg_S_RGB_LIGHT_V_RGB(ID_S_RGB_LIGHT,V_RGB);
268 MyMessage msg_S_RGB_LIGHT_V_WATT(ID_S_RGB_LIGHT,V_WATT);
269 String rgbState=
"000000";
274 #ifdef ID_S_RGBW_LIGHT
275 MyMessage msg_S_RGBW_LIGHT_V_RGBW(ID_S_RGBW_LIGHT,V_RGBW);
276 MyMessage msg_S_RGBW_LIGHT_V_WATT(ID_S_RGBW_LIGHT,V_WATT);
277 String rgbwState=
"00000000";
282 #ifdef ID_S_COLOR_SENSOR
283 MyMessage msg_S_COLOR_SENSOR_V_RGB(ID_S_COLOR_SENSOR,V_RGB);
289 MyMessage msg_S_HVAC_V_HVAC_SETPOINT_HEAT(ID_S_HVAC,V_HVAC_SETPOINT_HEAT);
290 MyMessage msg_S_HVAC_V_HVAC_SETPOINT_COOL(ID_S_HVAC,V_HVAC_SETPOINT_COOL);
291 MyMessage msg_S_HVAC_V_HVAC_FLOW_STATET(ID_S_HVAC,V_HVAC_FLOW_STATE);
292 MyMessage msg_S_HVAC_V_HVAC_FLOW_MODE(ID_S_HVAC,V_HVAC_FLOW_MODE);
293 MyMessage msg_S_HVAC_V_HVAC_SPEED(ID_S_HVAC,V_HVAC_SPEED);
295 float hvac_SetPointHeat = 16.5;
296 float hvac_SetPointCool = 25.5;
297 String hvac_FlowState =
"AutoChangeOver";
298 String hvac_FlowMode =
"Auto";
299 String hvac_Speed =
"Normal";
313 #ifdef ID_S_MULTIMETER
314 MyMessage msg_S_MULTIMETER_V_IMPEDANCE(ID_S_MULTIMETER,V_IMPEDANCE);
315 MyMessage msg_S_MULTIMETER_V_VOLTAGE(ID_S_MULTIMETER,V_VOLTAGE);
316 MyMessage msg_S_MULTIMETER_V_CURRENT(ID_S_MULTIMETER,V_CURRENT);
324 #ifdef ID_S_SPRINKLER
331 #ifdef ID_S_WATER_LEAK
335 #ifdef ID_S_VIBRATION
341 MyMessage msg_S_MOISTURE(ID_S_MOISTURE,V_LEVEL);
345 MyMessage msg_S_CUSTOM_1(ID_S_CUSTOM,V_VAR1);
346 MyMessage msg_S_CUSTOM_2(ID_S_CUSTOM,V_VAR2);
347 MyMessage msg_S_CUSTOM_3(ID_S_CUSTOM,V_VAR3);
348 MyMessage msg_S_CUSTOM_4(ID_S_CUSTOM,V_VAR4);
349 MyMessage msg_S_CUSTOM_5(ID_S_CUSTOM,V_VAR5);
358 randomSeed(analogRead(0));
361 Serial.println(
"GW Started");
367 Serial.print(
"Send Sketch Info: ");
369 Serial.print(SKETCH_NAME);
370 Serial.println(SKETCH_VERSION);
374 Serial.print(
"Get Config: ");
376 Serial.println(metric ?
"Metric":
"Imperial");
385 Serial.println(
"Presenting Nodes");
386 Serial.println(
"________________");
389 Serial.println(
" S_DOOR");
390 present(ID_S_DOOR,S_DOOR,
"Outside Door");
395 Serial.println(
" S_MOTION");
396 present(ID_S_MOTION,S_MOTION,
"Outside Motion");
401 Serial.println(
" S_SMOKE");
402 present(ID_S_SMOKE,S_SMOKE,
"Kitchen Smoke");
407 Serial.println(
" S_LIGHT");
408 present(ID_S_LIGHT,S_LIGHT,
"Hall Light");
413 Serial.println(
" S_DIMMER");
414 present(ID_S_DIMMER,S_DIMMER,
"Living room dimmer");
419 Serial.println(
" S_COVER");
420 present(ID_S_COVER,S_COVER,
"Window cover");
425 Serial.println(
" S_TEMP");
426 present(ID_S_TEMP,S_TEMP,
"House Temperarue");
431 Serial.println(
" S_HUM");
432 present(ID_S_HUM,S_HUM,
"Current Humidity");
437 Serial.println(
" S_BARO");
438 present(ID_S_BARO,S_BARO,
" Air pressure");
443 Serial.println(
" S_WIND");
444 present(ID_S_WIND,S_WIND,
"Wind Station");
449 Serial.println(
" S_RAIN");
450 present(ID_S_RAIN,S_RAIN,
"Rain Station");
455 Serial.println(
" S_UV");
456 present(ID_S_UV,S_UV,
"Ultra Violet");
461 Serial.println(
" S_WEIGHT");
462 present(ID_S_WEIGHT,S_WEIGHT,
"Outdoor Scale");
467 Serial.println(
" S_POWER");
468 present(ID_S_POWER,S_POWER,
"Power Metric");
473 Serial.println(
" S_HEATER");
474 present(ID_S_HEATER,S_HEATER,
"Garage Heater");
479 Serial.println(
" S_DISTANCE");
480 present(ID_S_DISTANCE,S_DISTANCE,
"Distance Measure");
484 #ifdef ID_S_LIGHT_LEVEL
485 Serial.println(
" S_LIGHT_LEVEL");
486 present(ID_S_LIGHT_LEVEL,S_LIGHT_LEVEL,
"Outside Light Level");
491 Serial.println(
" S_LOCK");
492 present(ID_S_LOCK,S_LOCK,
"Front Door Lock");
497 Serial.println(
" S_IR");
498 present(ID_S_IR,S_IR,
"Univeral Command");
503 Serial.println(
" S_WATER");
504 present(ID_S_WATER,S_WATER,
"Water Level");
508 #ifdef ID_S_AIR_QUALITY
509 Serial.println(
" S_AIR_QUALITY");
510 present(ID_S_AIR_QUALITY,S_AIR_QUALITY,
"Air Station");
515 Serial.println(
" S_DUST");
516 present(ID_S_DUST,S_DUST,
"Dust Level");
520 #ifdef ID_S_SCENE_CONTROLLER
521 Serial.println(
" S_SCENE_CONTROLLER");
522 present(ID_S_SCENE_CONTROLLER,S_SCENE_CONTROLLER,
"Scene Controller");
526 #ifdef ID_S_RGB_LIGHT
527 Serial.println(
" RGB_LIGHT");
528 present(ID_S_RGB_LIGHT,S_RGB_LIGHT,
"Mood Light");
532 #ifdef ID_S_RGBW_LIGHT
533 Serial.println(
" RGBW_LIGHT");
534 present(ID_S_RGBW_LIGHT,S_RGBW_LIGHT,
"Mood Light 2");
538 #ifdef ID_S_COLOR_SENSOR
539 Serial.println(
" COLOR_SENSOR");
540 present(ID_S_COLOR_SENSOR,S_COLOR_SENSOR,
"Hall Painting");
545 Serial.println(
" HVAC");
546 present(ID_S_HVAC,S_HVAC,
"HVAC");
550 #ifdef ID_S_MULTIMETER
551 Serial.println(
" MULTIMETER");
552 present(ID_S_MULTIMETER,S_MULTIMETER,
"Electric Staion");
556 #ifdef ID_S_SPRINKLER
558 #ifdef ID_S_WATER_LEAK
562 #ifdef ID_S_VIBRATION
568 Serial.println(
" S_MOISTURE");
569 present(ID_S_MOISTURE,S_MOISTURE,
"Basement Sensor");
574 Serial.println(
" S_CUSTOM");
575 present(ID_S_CUSTOM,S_CUSTOM,
"Other Stuff");
581 Serial.println(
"________________");
590 Serial.println(
"#########################");
591 randNumber=random(0,101);
593 Serial.print(
"RandomNumber:");
594 Serial.println(randNumber);
596 Serial.println(
"Send Battery Level");
601 Serial.println(
"Request Time");
670 #ifdef ID_S_LIGHT_LEVEL
686 #ifdef ID_S_AIR_QUALITY
694 #ifdef ID_S_SCENE_CONTROLLER
698 #ifdef ID_S_RGB_LIGHT
702 #ifdef ID_S_RGBW_LIGHT
706 #ifdef ID_S_COLOR_SENSOR
714 #ifdef ID_S_MULTIMETER
718 #ifdef ID_S_SPRINKLER
720 #ifdef ID_S_WATER_LEAK
724 #ifdef ID_S_VIBRATION
739 Serial.println(
"#########################");
747 Serial.print(
"Time value received: ");
748 Serial.println(controllerTime);
758 Serial.print(
"Door is: " );
760 if (randNumber <= 50) {
761 Serial.println(
"Open");
762 send(msg_S_DOOR_T.
set((int16_t)1));
764 Serial.println(
"Closed");
765 send(msg_S_DOOR_T.
set((int16_t)0));
768 Serial.print(
"System is: " );
769 Serial.println((isArmed ?
"Armed":
"Disarmed"));
770 send(msg_S_DOOR_A.
set(isArmed));
779 Serial.print(
"Motion is: " );
781 if (randNumber <= 50) {
782 Serial.println(
"Active");
783 send(msg_S_MOTION_T.set(1));
785 Serial.println(
"Quiet");
786 send(msg_S_MOTION_T.set(0));
790 Serial.print(
"System is: " );
791 Serial.println((isArmed ?
"Armed":
"Disarmed"));
792 send(msg_S_MOTION_A.set(isArmed));
801 Serial.print(
"Smoke is: " );
803 if (randNumber <= 50) {
804 Serial.println(
"Active");
805 send(msg_S_SMOKE_T.set(1));
807 Serial.println(
"Quiet");
808 send(msg_S_SMOKE_T.set(0));
812 Serial.print(
"System is: " );
813 Serial.println((isArmed ?
"Armed":
"Disarmed"));
814 send(msg_S_SMOKE_A.set(isArmed));
824 Serial.print(
"Light is: " );
825 Serial.println((isLightOn ?
"On":
"Off"));
827 send(msg_S_LIGHT.set(isLightOn));
836 Serial.print(
"Dimmer is set to: " );
837 Serial.println(dimmerVal);
839 send(msg_S_DIMMER.set(dimmerVal));
848 Serial.print(
"Cover is : " );
850 if (coverState == 1) {
851 Serial.println(
"Opening");
852 send(msg_S_COVER_U.set(1));
853 }
else if (coverState == -1) {
854 Serial.println(
"Closing");
855 send(msg_S_COVER_D.set(0));
857 Serial.println(
"Idle");
858 send(msg_S_COVER_S.set(-1));
860 send(msg_S_COVER_V.set(coverState));
868 Serial.print(
"Temperature is: " );
869 Serial.println(map(randNumber,1,100,0,45));
871 send(msg_S_TEMP.set(map(randNumber,1,100,0,45)));
880 Serial.print(
"Humidity is: " );
881 Serial.println(randNumber);
883 send(msg_S_HUM.set(randNumber));
892 const char *weather[] = {
"stable",
"sunny",
"cloudy",
"unstable",
"thunderstorm",
"unknown"};
893 long pressure = map(randNumber,1,100,870,1086);
894 int forecast = map(randNumber,1,100,0,5);
896 Serial.print(
"Atmospheric Pressure is: " );
897 Serial.println(pressure);
898 send(msg_S_BARO_P.set(pressure));
900 Serial.print(
"Weather forecast: " );
901 Serial.println(weather[forecast]);
902 send(msg_S_BARO_F.set(weather[forecast]));
911 Serial.print(
"Wind Speed is: " );
912 Serial.println(randNumber);
913 send(msg_S_WIND_S.set(randNumber));
915 Serial.print(
"Wind Gust is: " );
916 Serial.println(randNumber+10);
917 send(msg_S_WIND_G.set(randNumber+10));
919 Serial.print(
"Wind Direction is: " );
920 Serial.println(map(randNumber,1,100,0,360));
921 send(msg_S_WIND_D.set(map(randNumber,1,100,0,360)));
930 Serial.print(
"Rain amount is: " );
931 Serial.println(randNumber);
933 send(msg_S_RAIN_A.set(randNumber));
935 Serial.print(
"Rain rate is: " );
936 Serial.println(randNumber/60);
938 send(msg_S_RAIN_R.set(randNumber/60,1));
947 Serial.print(
"Ultra Violet level is: " );
948 Serial.println(map(randNumber,1,100,0,15));
950 send(msg_S_UV.set(map(randNumber,1,100,0,15)));
959 Serial.print(
"Weight is: " );
960 Serial.println(map(randNumber,1,100,0,150));
962 send(msg_S_WEIGHT.set(map(randNumber,1,100,0,150)));
971 Serial.print(
"Watt is: " );
972 Serial.println(map(randNumber,1,100,0,150));
973 send(msg_S_POWER_W.set(map(randNumber,1,100,0,150)));
975 Serial.print(
"KWH is: " );
976 Serial.println(map(randNumber,1,100,0,150));
977 send(msg_S_POWER_K.set(map(randNumber,1,100,0,150)));
990 Serial.print(
"Heater flow state is: " );
991 Serial.println(heater_flow_state);
992 send(msg_S_HEATER_FLOW_STATE.set(heater_flow_state.c_str()));
1002 Serial.print(
"Heater Setpoint: " );
1003 Serial.println(heater_setpoint,1);
1004 send(msg_S_HEATER_SET_POINT.set(heater_setpoint,1));
1008 #ifdef ID_S_DISTANCE
1012 Serial.print(
"Distance is: " );
1013 Serial.println(map(randNumber,1,100,0,150));
1015 send(msg_S_DISTANCE.set(map(randNumber,1,100,0,150)));
1020 #ifdef ID_S_LIGHT_LEVEL
1024 Serial.print(
"Light is: " );
1025 Serial.println(map(randNumber,1,100,0,150));
1027 send(msg_S_LIGHT_LEVEL.set(map(randNumber,1,100,0,150)));
1036 Serial.print(
"Lock is: " );
1037 Serial.println((isLocked ?
"Locked":
"Unlocked"));
1038 send(msg_S_LOCK.set(isLocked));
1047 Serial.print(
"Infrared is: " );
1048 Serial.println(irVal);
1050 send(msg_S_IR_S.set(irVal));
1051 send(msg_S_IR_R.set(irVal));
1060 Serial.print(
"Water flow is: " );
1061 Serial.println(map(randNumber,1,100,0,150));
1063 send(msg_S_WATER_F.set(map(randNumber,1,100,0,150)));
1065 Serial.print(
"Water volume is: " );
1066 Serial.println(map(randNumber,1,100,0,150));
1068 send(msg_S_WATER_V.set(map(randNumber,1,100,0,150)));
1073 #ifdef ID_S_AIR_QUALITY
1077 Serial.print(
"Air Quality is: " );
1078 Serial.println(randNumber);
1080 send(msg_S_AIR_QUALITY.set(randNumber));
1089 Serial.print(
"Dust level is: " );
1090 Serial.println(randNumber);
1092 send(msg_S_DUST.set(randNumber));
1097 #ifdef ID_S_SCENE_CONTROLLER
1101 Serial.print(
"Scene is: " );
1102 Serial.println(scenes[sceneVal]);
1104 if(sceneValPrevious != sceneVal) {
1105 send(msg_S_SCENE_CONTROLLER_OF.set(sceneValPrevious));
1106 send(msg_S_SCENE_CONTROLLER_ON.set(sceneVal));
1107 sceneValPrevious=sceneVal;
1113 #ifdef ID_S_RGB_LIGHT
1117 Serial.print(
"RGB Light state is: " );
1118 Serial.println(rgbState);
1119 send(msg_S_RGB_LIGHT_V_RGB.set(rgbState.c_str()));
1121 Serial.print(
"RGB Light Watt is: " );
1122 Serial.println(map(randNumber,1,100,0,150));
1123 send(msg_S_RGB_LIGHT_V_WATT.set(map(randNumber,1,100,0,150)));
1128 #ifdef ID_S_RGBW_LIGHT
1132 Serial.print(
"RGBW Light state is: " );
1133 Serial.println(rgbwState);
1134 send(msg_S_RGBW_LIGHT_V_RGBW.set(rgbwState.c_str()));
1136 Serial.print(
"RGBW Light Watt is: " );
1137 Serial.println(map(randNumber,1,100,0,150));
1138 send(msg_S_RGBW_LIGHT_V_WATT.set(map(randNumber,1,100,0,150)));
1143 #ifdef ID_S_COLOR_SENSOR
1148 String red = String(random(0,256),HEX);
1149 String green = String(random(0,256),HEX);
1150 String blue = String(random(0,256),HEX);
1152 colorState=String(red + green + blue);
1154 Serial.print(
"Color state is: " );
1155 Serial.println(colorState);
1156 send(msg_S_COLOR_SENSOR_V_RGB.set(colorState.c_str()));
1171 Serial.print(
"HVAC Set Point Heat is: " );
1172 Serial.println(hvac_SetPointHeat);
1173 send(msg_S_HVAC_V_HVAC_SETPOINT_HEAT.set(hvac_SetPointHeat,1));
1175 Serial.print(
"HVAC Set Point Cool is: " );
1176 Serial.println(hvac_SetPointCool);
1177 send(msg_S_HVAC_V_HVAC_SETPOINT_COOL.set(hvac_SetPointCool,1));
1179 Serial.print(
"HVAC Flow State is: " );
1180 Serial.println(hvac_FlowState);
1181 send(msg_S_HVAC_V_HVAC_FLOW_STATET.set(hvac_FlowState.c_str()));
1183 Serial.print(
"HVAC Flow Mode is: " );
1184 Serial.println(hvac_FlowMode);
1185 send(msg_S_HVAC_V_HVAC_FLOW_MODE.set(hvac_FlowMode.c_str()));
1187 Serial.print(
"HVAC Speed is: " );
1188 Serial.println(hvac_Speed);
1189 send(msg_S_HVAC_V_HVAC_SPEED.set(hvac_Speed.c_str()));
1194 #ifdef ID_S_MULTIMETER
1197 int impedance=map(randNumber,1,100,0,15000);
1198 int volt=map(randNumber,1,100,0,380);
1199 int amps=map(randNumber,1,100,0,16);
1201 Serial.print(
"Impedance is: " );
1202 Serial.println(impedance);
1203 send(msg_S_MULTIMETER_V_IMPEDANCE.set(impedance));
1205 Serial.print(
"Voltage is: " );
1206 Serial.println(volt);
1207 send(msg_S_MULTIMETER_V_VOLTAGE.set(volt));
1209 Serial.print(
"Current is: " );
1210 Serial.println(amps);
1211 send(msg_S_MULTIMETER_V_CURRENT.set(amps));
1216 #ifdef ID_S_SPRINKLER
1218 #ifdef ID_S_WATER_LEAK
1222 #ifdef ID_S_VIBRATION
1224 #ifdef ID_S_MOISTURE
1227 #ifdef ID_S_MOISTURE
1231 Serial.print(
"Moisture level is: " );
1232 Serial.println(randNumber);
1234 send(msg_S_MOISTURE.set(randNumber));
1242 Serial.print(
"Custom value is: " );
1243 Serial.println(randNumber);
1245 send(msg_S_CUSTOM_1.set(randNumber));
1246 send(msg_S_CUSTOM_2.set(randNumber));
1247 send(msg_S_CUSTOM_3.set(randNumber));
1248 send(msg_S_CUSTOM_4.set(randNumber));
1249 send(msg_S_CUSTOM_5.set(randNumber));
1261 Serial.print(
"Incoming change for ID_S_ARMED:");
1263 Serial.print(
", New status: ");
1264 Serial.println((isArmed ?
"Armed":
"Disarmed" ));
1281 isLightOn = message.
getBool();
1282 Serial.print(
"Incoming change for ID_S_LIGHT:");
1284 Serial.print(
", New status: ");
1285 Serial.println((isLightOn ?
"On":
"Off"));
1305 Serial.println(
"V_DIMMER data invalid (should be 0..100)" );
1308 dimmerVal= message.
getInt();
1309 Serial.print(
"Incoming change for ID_S_DIMMER:");
1311 Serial.print(
", New status: ");
1312 Serial.println(message.
getInt());
1320 Serial.print(
"Incoming change for ID_S_COVER:");
1322 Serial.print(
", New status: ");
1323 Serial.println(
"V_UP");
1329 Serial.print(
"Incoming change for ID_S_COVER:");
1331 Serial.print(
", New status: ");
1332 Serial.println(
"V_DOWN");
1338 Serial.print(
"Incoming change for ID_S_COVER:");
1340 Serial.print(
", New status: ");
1341 Serial.println(
"V_STOP");
1347 case V_HVAC_SETPOINT_HEAT:
1350 if(message.
getSensor() == ID_S_HEATER) {
1351 heater_setpoint=message.
getFloat();
1353 Serial.print(
"Incoming set point for ID_S_HEATER:");
1355 Serial.print(
", New status: ");
1356 Serial.println(heater_setpoint,1);
1363 hvac_SetPointHeat=message.
getFloat();
1364 Serial.print(
"Incoming set point for ID_S_HVAC:");
1366 Serial.print(
", New status: ");
1367 Serial.println(hvac_SetPointHeat,1);
1373 case V_HVAC_FLOW_STATE:
1375 if(message.
getSensor() == ID_S_HEATER) {
1377 Serial.print(
"Incoming flow state change for ID_S_HEATER:");
1379 Serial.print(
", New status: ");
1380 Serial.println(heater_flow_state);
1389 Serial.print(
"Incoming set point for ID_S_HVAC:");
1391 Serial.print(
", New status: ");
1392 Serial.println(hvac_FlowState);
1401 Serial.print(
"Incoming change for ID_S_LOCK:");
1403 Serial.print(
", New status: ");
1404 Serial.println(message.
getBool()?
"Locked":
"Unlocked");
1412 Serial.print(
"Incoming change for ID_S_IR:");
1414 Serial.print(
", New status: ");
1415 Serial.println(irVal);
1420 Serial.print(
"Incoming change for ID_S_IR:");
1422 Serial.print(
", New status: ");
1423 Serial.println(irVal);
1428 #ifdef ID_S_SCENE_CONTROLLER
1430 sceneVal = message.
getInt();
1431 Serial.print(
"Incoming change for ID_S_SCENE_CONTROLLER:");
1433 Serial.print(
", New status: ");
1434 Serial.print(scenes[sceneVal]);
1435 Serial.println(
" On");
1439 sceneVal = message.
getInt();
1440 Serial.print(
"Incoming change for ID_S_SCENE_CONTROLLER:");
1442 Serial.print(
", New status: ");
1443 Serial.print(scenes[sceneVal]);
1444 Serial.println(
" Off");
1449 #ifdef ID_S_RGB_LIGHT
1452 Serial.print(
"Incoming flow state change for ID_S_RGB_LIGHT:");
1454 Serial.print(
", New status: ");
1455 Serial.println(rgbState);
1461 #ifdef ID_S_RGBW_LIGHT
1464 Serial.print(
"Incoming flow state change for ID_S_RGBW_LIGHT:");
1466 Serial.print(
", New status: ");
1467 Serial.println(rgbwState);
1479 case V_HVAC_SETPOINT_COOL:
1480 hvac_SetPointCool=message.
getFloat();
1482 Serial.print(
"Incoming set point for ID_S_HVAC:");
1484 Serial.print(
", New status: ");
1485 Serial.println(hvac_SetPointCool,1);
1489 case V_HVAC_FLOW_MODE:
1492 Serial.print(
"Incoming set point for ID_S_HVAC:");
1494 Serial.print(
", New status: ");
1495 Serial.println(hvac_Speed);
1502 Serial.print(
"Incoming set point for ID_S_HVAC:");
1504 Serial.print(
", New status: ");
1505 Serial.println(hvac_FlowMode);
1511 Serial.print(
"Unknown/Unimplemented message type: ");
1512 Serial.println(message.
getType());