public void switchPin(Pin pin, Object value) throws IOException {
   sendMessage(
       new Message(
           this.topic + typeMap.get(pin.getType()) + pin.pinNum() + "/value/set",
           String.valueOf(value)));
 }
Example #2
0
 private String getType(Pin pin) {
   return typeMap.get(pin.getType());
 }
Example #3
0
 private void switchPin(String type, Pin pin, Object value) throws IOException {
   publish(topic + type + pin.pinNum() + "/value/set", value);
 }
Example #4
0
 private String controlTopic(Pin pin) {
   return topic + "system/listening/" + getType(pin) + pin.pinNum() + "/value/set";
 }