@@ -319,7 +319,6 @@ protected void execute() {
319
319
}
320
320
321
321
private void processYeelightResult (YeelightGetPropsResponse result , String action , String itemName ) {
322
- //JsonObject jo = parser.parse(result).getAsJsonObject();
323
322
State newState = null ;
324
323
State oldState = null ;
325
324
try {
@@ -431,7 +430,7 @@ protected void internalReceiveCommand(String itemName, Command command) {
431
430
432
431
private YeelightGetPropsResponse sendYeelightGetPropCommand (String location ) {
433
432
String result = sendYeelightCommand (location , GET_PROP , new Object []{"power" , "bright" , "ct" , "hue" , "sat" , "rgb" , "nl_br" });
434
- logger .info ("location: {}, props: {}" , location , result );
433
+ logger .debug ("location: {}, props: {}" , location , result );
435
434
return gson .fromJson (result , YeelightGetPropsResponse .class );
436
435
}
437
436
@@ -477,13 +476,13 @@ private String sendYeelightCommand(String location, String action, Object[] para
477
476
DataOutputStream outToServer = new DataOutputStream (clientSocket .getOutputStream ());
478
477
BufferedReader inFromServer = new BufferedReader (new InputStreamReader (clientSocket .getInputStream ()));
479
478
String sentence = "{\" id\" :" + msgid ++ + ",\" method\" :\" " + action + "\" ,\" params\" :[" + getProperties (params ) + "]}\r \n " ;
480
- logger .debug ("Sending sentence: " + sentence );
479
+ logger .debug ("Sending sentence: {}" , sentence );
481
480
outToServer .writeBytes (sentence );
482
481
return inFromServer .readLine ();
483
482
} catch (NoRouteToHostException e ) {
484
483
logger .debug ("Location {} is probably offline" , location );
485
484
if (action .equals (GET_PROP )) {
486
- //update switches of not found location to OFF state
485
+ //update switches if not found location to OFF state
487
486
for (Object item : getOnSwitchItems (location )) {
488
487
eventPublisher .postUpdate ((String ) item , OnOffType .OFF );
489
488
}
0 commit comments