Skip to content

Commit

Permalink
Merge pull request #22 from anton-johansson/18-pan16-smart-energy-plu…
Browse files Browse the repository at this point in the history
…g-in-switch

Support for Philio's PAN16 Smart Energy Plug In Switch
  • Loading branch information
whizzosoftware authored Jan 4, 2018
2 parents 0e9ba82 + 8df8e76 commit e396de6
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@ public boolean addFrame(ZWaveChannelContext ctx, Frame bs) {
// sometimes the ApplicationCommand is returned before the SendData callback; flag that case here
applicationCommandReceived = true;
} else {
logger.warn("Received unexpected frame for STATE_RETVAL_RECEIVED: {}", bs);
logger.warn("Received unexpected frame for STATE_RESPONSE_RECEIVED: {}", bs);
}
break;

Expand All @@ -152,7 +152,7 @@ public boolean addFrame(ZWaveChannelContext ctx, Frame bs) {
completeTransaction(ctx, (DataFrame)bs);
return true;
} else {
logger.warn("Received unexpected frame for STATE_REQUEST_RECEIVED: {}", bs);
logger.warn("Received unexpected frame for STATE_CALLBACK_RECEIVED: {}", bs);
}
break;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ public class ProductRegistry {
public final static String M_FIBARGROUP = "Fibargroup";

public final static String P_PAN11 = "Smart Energy Plug In Switch (PAN11)";
public final static String P_PAN16 = "Smart Energy Plug In Switch (PAN16)";
public final static String P_45604_OUTDOOR_MODULE = "45604 Outdoor Module";
public final static String P_45609_RELAY_SWITCH = "45609 On/Off Relay Switch";
public final static String P_45612_DIMMER_SWITCH = "45612 Dimmer Switch";
Expand Down Expand Up @@ -144,6 +145,9 @@ static public ProductInfo lookupProduct(Integer manufacturerId, Integer productT
case 17:
info.setName(P_PAN11);
break;
case 41:
info.setName(P_PAN16);
break;
}
break;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
import static org.junit.Assert.*;

/**
* Tests of ProductRegistry
* Tests of {@link ProductRegistry}.
*
* @author Linus Brimstedt
*/
Expand All @@ -34,4 +34,11 @@ public void testLookupProductKnown() throws Exception {
assertTrue(info.isComplete());
}

@Test
public void testLookupPhilioPan16() {
ProductInfo info = ProductRegistry.lookupProduct(316, 1, 41);
assertEquals("Philio Technology Corporation", info.getManufacturer());
assertEquals("Smart Energy Plug In Switch (PAN16)", info.getName());
assertTrue(info.isComplete());
}
}

0 comments on commit e396de6

Please sign in to comment.