@@ -6986,6 +6986,10 @@ namespace http {
6986
6986
root[" result" ][ii][" XOffset" ] = sd[24 ].c_str ();
6987
6987
root[" result" ][ii][" YOffset" ] = sd[25 ].c_str ();
6988
6988
root[" result" ][ii][" PlanID" ] = sd[26 ].c_str ();
6989
+ root[" result" ][ii][" AddjValue" ] = AddjValue;
6990
+ root[" result" ][ii][" AddjMulti" ] = AddjMulti;
6991
+ root[" result" ][ii][" AddjValue2" ] = AddjValue2;
6992
+ root[" result" ][ii][" AddjMulti2" ] = AddjMulti2;
6989
6993
sprintf (szData, " %d, %s" , nValue, sValue .c_str ());
6990
6994
root[" result" ][ii][" Data" ] = szData;
6991
6995
@@ -7097,14 +7101,7 @@ namespace http {
7097
7101
7098
7102
root[" result" ][ii][" IsSubDevice" ] = bIsSubDevice;
7099
7103
7100
- if (switchtype == STYPE_OnOff)
7101
- {
7102
- root[" result" ][ii][" AddjValue" ] = AddjValue;
7103
- root[" result" ][ii][" AddjMulti" ] = AddjMulti;
7104
- root[" result" ][ii][" AddjValue2" ] = AddjValue2;
7105
- root[" result" ][ii][" AddjMulti2" ] = AddjMulti2;
7106
- }
7107
- else if (switchtype == STYPE_Doorbell)
7104
+ if (switchtype == STYPE_Doorbell)
7108
7105
{
7109
7106
root[" result" ][ii][" TypeImg" ] = " doorbell" ;
7110
7107
root[" result" ][ii][" Status" ] = " " ;// "Pressed";
@@ -7121,20 +7118,12 @@ namespace http {
7121
7118
lstatus = " Closed" ;
7122
7119
}
7123
7120
root[" result" ][ii][" Status" ] = lstatus;
7124
- root[" result" ][ii][" AddjValue" ] = AddjValue;
7125
- root[" result" ][ii][" AddjMulti" ] = AddjMulti;
7126
- root[" result" ][ii][" AddjValue2" ] = AddjValue2;
7127
- root[" result" ][ii][" AddjMulti2" ] = AddjMulti2;
7128
7121
}
7129
7122
else if (switchtype == STYPE_PushOn)
7130
7123
{
7131
7124
root[" result" ][ii][" TypeImg" ] = " push" ;
7132
7125
root[" result" ][ii][" Status" ] = " " ;
7133
7126
root[" result" ][ii][" InternalState" ] = (IsLightSwitchOn (lstatus) == true ) ? " On" : " Off" ;
7134
- root[" result" ][ii][" AddjValue" ] = AddjValue;
7135
- root[" result" ][ii][" AddjMulti" ] = AddjMulti;
7136
- root[" result" ][ii][" AddjValue2" ] = AddjValue2;
7137
- root[" result" ][ii][" AddjMulti2" ] = AddjMulti2;
7138
7127
}
7139
7128
else if (switchtype == STYPE_PushOff)
7140
7129
{
@@ -7148,10 +7137,6 @@ namespace http {
7148
7137
root[" result" ][ii][" TypeImg" ] = " smoke" ;
7149
7138
root[" result" ][ii][" SwitchTypeVal" ] = STYPE_SMOKEDETECTOR;
7150
7139
root[" result" ][ii][" SwitchType" ] = Switch_Type_Desc (STYPE_SMOKEDETECTOR);
7151
- root[" result" ][ii][" AddjValue" ] = AddjValue;
7152
- root[" result" ][ii][" AddjMulti" ] = AddjMulti;
7153
- root[" result" ][ii][" AddjValue2" ] = AddjValue2;
7154
- root[" result" ][ii][" AddjMulti2" ] = AddjMulti2;
7155
7140
}
7156
7141
else if (switchtype == STYPE_Contact)
7157
7142
{
@@ -7164,10 +7149,6 @@ namespace http {
7164
7149
lstatus = " Closed" ;
7165
7150
}
7166
7151
root[" result" ][ii][" Status" ] = lstatus;
7167
- root[" result" ][ii][" AddjValue" ] = AddjValue;
7168
- root[" result" ][ii][" AddjMulti" ] = AddjMulti;
7169
- root[" result" ][ii][" AddjValue2" ] = AddjValue2;
7170
- root[" result" ][ii][" AddjMulti2" ] = AddjMulti2;
7171
7152
}
7172
7153
else if (switchtype == STYPE_Media)
7173
7154
{
@@ -7222,18 +7203,10 @@ namespace http {
7222
7203
else if (switchtype == STYPE_Dimmer)
7223
7204
{
7224
7205
root[" result" ][ii][" TypeImg" ] = " dimmer" ;
7225
- root[" result" ][ii][" AddjValue" ] = AddjValue;
7226
- root[" result" ][ii][" AddjMulti" ] = AddjMulti;
7227
- root[" result" ][ii][" AddjValue2" ] = AddjValue2;
7228
- root[" result" ][ii][" AddjMulti2" ] = AddjMulti2;
7229
7206
}
7230
7207
else if (switchtype == STYPE_Motion)
7231
7208
{
7232
7209
root[" result" ][ii][" TypeImg" ] = " motion" ;
7233
- root[" result" ][ii][" AddjValue" ] = AddjValue;
7234
- root[" result" ][ii][" AddjMulti" ] = AddjMulti;
7235
- root[" result" ][ii][" AddjValue2" ] = AddjValue2;
7236
- root[" result" ][ii][" AddjMulti2" ] = AddjMulti2;
7237
7210
}
7238
7211
if (llevel != 0 )
7239
7212
sprintf (szData, " %s, Level: %d %%" , lstatus.c_str (), llevel);
@@ -7267,19 +7240,7 @@ namespace http {
7267
7240
root[" result" ][ii][" SwitchTypeVal" ] = STYPE_SMOKEDETECTOR;
7268
7241
root[" result" ][ii][" TypeImg" ] = " smoke" ;
7269
7242
root[" result" ][ii][" SwitchType" ] = Switch_Type_Desc (STYPE_SMOKEDETECTOR);
7270
- root[" result" ][ii][" AddjValue" ] = AddjValue;
7271
- root[" result" ][ii][" AddjMulti" ] = AddjMulti;
7272
- root[" result" ][ii][" AddjValue2" ] = AddjValue2;
7273
- root[" result" ][ii][" AddjMulti2" ] = AddjMulti2;
7274
- }
7275
- if (switchtype == STYPE_Motion)
7276
- {
7277
- root[" result" ][ii][" AddjValue" ] = AddjValue;
7278
- root[" result" ][ii][" AddjMulti" ] = AddjMulti;
7279
- root[" result" ][ii][" AddjValue2" ] = AddjValue2;
7280
- root[" result" ][ii][" AddjMulti2" ] = AddjMulti2;
7281
7243
}
7282
-
7283
7244
sprintf (szData, " %s" , lstatus.c_str ());
7284
7245
root[" result" ][ii][" Data" ] = szData;
7285
7246
root[" result" ][ii][" HaveTimeout" ] = false ;
@@ -7355,11 +7316,6 @@ namespace http {
7355
7316
if (strarray.size ()>=3 )
7356
7317
{
7357
7318
int i=0 ;
7358
- root[" result" ][ii][" AddjValue" ]=AddjValue;
7359
- root[" result" ][ii][" AddjMulti" ]=AddjMulti;
7360
- root[" result" ][ii][" AddjValue2" ]=AddjValue2;
7361
- root[" result" ][ii][" AddjMulti2" ]=AddjMulti2;
7362
-
7363
7319
double tempCelcius=atof (strarray[i++].c_str ());
7364
7320
double temp=ConvertTemperature (tempCelcius,tempsign);
7365
7321
double tempSetPoint;
@@ -7398,8 +7354,6 @@ namespace http {
7398
7354
}
7399
7355
else if ((dType == pTypeTEMP) || (dType == pTypeRego6XXTemp))
7400
7356
{
7401
- root[" result" ][ii][" AddjValue" ] = AddjValue;
7402
- root[" result" ][ii][" AddjMulti" ] = AddjMulti;
7403
7357
double tvalue = ConvertTemperature (atof (sValue .c_str ()), tempsign);
7404
7358
root[" result" ][ii][" Temp" ] = tvalue;
7405
7359
sprintf (szData, " %.1f %c" , tvalue, tempsign);
@@ -7421,10 +7375,6 @@ namespace http {
7421
7375
}
7422
7376
else if ((dType == pTypeRFXSensor) && (dSubType == sTypeRFXSensorTemp ))
7423
7377
{
7424
- root[" result" ][ii][" AddjValue" ] = AddjValue;
7425
- root[" result" ][ii][" AddjMulti" ] = AddjMulti;
7426
- root[" result" ][ii][" AddjValue2" ] = AddjValue2;
7427
- root[" result" ][ii][" AddjMulti2" ] = AddjMulti2;
7428
7378
double tvalue = ConvertTemperature (atof (sValue .c_str ()), tempsign);
7429
7379
root[" result" ][ii][" Temp" ] = tvalue;
7430
7380
sprintf (szData, " %.1f %c" , tvalue, tempsign);
@@ -7446,11 +7396,6 @@ namespace http {
7446
7396
StringSplit (sValue , " ;" , strarray);
7447
7397
if (strarray.size () == 3 )
7448
7398
{
7449
- root[" result" ][ii][" AddjValue" ] = AddjValue;
7450
- root[" result" ][ii][" AddjMulti" ] = AddjMulti;
7451
- root[" result" ][ii][" AddjValue2" ] = AddjValue2;
7452
- root[" result" ][ii][" AddjMulti2" ] = AddjMulti2;
7453
-
7454
7399
double tempCelcius = atof (strarray[0 ].c_str ());
7455
7400
double temp = ConvertTemperature (tempCelcius, tempsign);
7456
7401
int humidity = atoi (strarray[1 ].c_str ());
@@ -7474,11 +7419,6 @@ namespace http {
7474
7419
StringSplit (sValue , " ;" , strarray);
7475
7420
if (strarray.size () == 5 )
7476
7421
{
7477
- root[" result" ][ii][" AddjValue" ] = AddjValue;
7478
- root[" result" ][ii][" AddjMulti" ] = AddjMulti;
7479
- root[" result" ][ii][" AddjValue2" ] = AddjValue2;
7480
- root[" result" ][ii][" AddjMulti2" ] = AddjMulti2;
7481
-
7482
7422
double tempCelcius = atof (strarray[0 ].c_str ());
7483
7423
double temp = ConvertTemperature (tempCelcius, tempsign);
7484
7424
int humidity = atoi (strarray[1 ].c_str ());
@@ -7529,11 +7469,6 @@ namespace http {
7529
7469
StringSplit (sValue , " ;" , strarray);
7530
7470
if (strarray.size () >= 3 )
7531
7471
{
7532
- root[" result" ][ii][" AddjValue" ] = AddjValue;
7533
- root[" result" ][ii][" AddjMulti" ] = AddjMulti;
7534
- root[" result" ][ii][" AddjValue2" ] = AddjValue2;
7535
- root[" result" ][ii][" AddjMulti2" ] = AddjMulti2;
7536
-
7537
7472
double tvalue = ConvertTemperature (atof (strarray[0 ].c_str ()), tempsign);
7538
7473
root[" result" ][ii][" Temp" ] = tvalue;
7539
7474
int forecast = atoi (strarray[2 ].c_str ());
@@ -7560,11 +7495,6 @@ namespace http {
7560
7495
root[" result" ][ii][" UVI" ] = strarray[0 ];
7561
7496
if (dSubType == sTypeUV3 )
7562
7497
{
7563
- root[" result" ][ii][" AddjValue" ] = AddjValue;
7564
- root[" result" ][ii][" AddjMulti" ] = AddjMulti;
7565
- root[" result" ][ii][" AddjValue2" ] = AddjValue2;
7566
- root[" result" ][ii][" AddjMulti2" ] = AddjMulti2;
7567
-
7568
7498
double tvalue = ConvertTemperature (atof (strarray[1 ].c_str ()), tempsign);
7569
7499
7570
7500
root[" result" ][ii][" Temp" ] = tvalue;
@@ -7602,10 +7532,6 @@ namespace http {
7602
7532
}
7603
7533
if ((dSubType == sTypeWIND4 ) || (dSubType == sTypeWINDNoTemp ))
7604
7534
{
7605
- root[" result" ][ii][" AddjValue" ] = AddjValue;
7606
- root[" result" ][ii][" AddjMulti" ] = AddjMulti;
7607
- root[" result" ][ii][" AddjValue2" ] = AddjValue2;
7608
- root[" result" ][ii][" AddjMulti2" ] = AddjMulti2;
7609
7535
if (dSubType == sTypeWIND4 )
7610
7536
{
7611
7537
double tvalue = ConvertTemperature (atof (strarray[4 ].c_str ()), tempsign);
@@ -7657,11 +7583,6 @@ namespace http {
7657
7583
}
7658
7584
if (result2.size () > 0 )
7659
7585
{
7660
- root[" result" ][ii][" AddjValue" ] = AddjValue;
7661
- root[" result" ][ii][" AddjMulti" ] = AddjMulti;
7662
- root[" result" ][ii][" AddjValue2" ] = AddjValue2;
7663
- root[" result" ][ii][" AddjMulti2" ] = AddjMulti2;
7664
-
7665
7586
double total_real = 0 ;
7666
7587
float rate = 0 ;
7667
7588
std::vector<std::string> sd2 = result2[0 ];
@@ -8465,8 +8386,6 @@ namespace http {
8465
8386
}
8466
8387
else if (dSubType == sTypeSystemTemp )
8467
8388
{
8468
- root[" result" ][ii][" AddjValue" ] = AddjValue;
8469
- root[" result" ][ii][" AddjMulti" ] = AddjMulti;
8470
8389
double tvalue = ConvertTemperature (atof (sValue .c_str ()), tempsign);
8471
8390
root[" result" ][ii][" Temp" ] = tvalue;
8472
8391
sprintf (szData, " %.1f %c" , tvalue, tempsign);
@@ -8541,11 +8460,6 @@ namespace http {
8541
8460
}
8542
8461
else if (dSubType == sTypeBaro )
8543
8462
{
8544
- root[" result" ][ii][" AddjValue" ] = AddjValue;
8545
- root[" result" ][ii][" AddjMulti" ] = AddjMulti;
8546
- root[" result" ][ii][" AddjValue2" ] = AddjValue2;
8547
- root[" result" ][ii][" AddjMulti2" ] = AddjMulti2;
8548
-
8549
8463
sprintf (szData, " %.1f hPa" , atof (sValue .c_str ()));
8550
8464
root[" result" ][ii][" Data" ] = szData;
8551
8465
root[" result" ][ii][" TypeImg" ] = " gauge" ;
@@ -8739,10 +8653,6 @@ namespace http {
8739
8653
8740
8654
root[" result" ][ii][" Level" ] = 0 ;
8741
8655
root[" result" ][ii][" LevelInt" ] = atoi (sValue .c_str ());
8742
- root[" result" ][ii][" AddjValue" ] = AddjValue;
8743
- root[" result" ][ii][" AddjMulti" ] = AddjMulti;
8744
- root[" result" ][ii][" AddjValue2" ] = AddjValue2;
8745
- root[" result" ][ii][" AddjMulti2" ] = AddjMulti2;
8746
8656
}
8747
8657
break ;
8748
8658
case sTypeRego6XXCounter :
0 commit comments