|
@@ -443,6 +443,10 @@ public class MenuBarNetworkExamples extends JMenu{
|
|
networkController.addDeviceToConnectionAndProtocol(pZigBee, inetAcces, 1);
|
|
networkController.addDeviceToConnectionAndProtocol(pZigBee, inetAcces, 1);
|
|
networkController.addConnection(inetAcces);
|
|
networkController.addConnection(inetAcces);
|
|
|
|
|
|
|
|
+
|
|
|
|
+ * ZigbeeRouter -> Broker ?
|
|
|
|
+ */
|
|
|
|
+
|
|
|
|
|
|
|
|
|
|
* Create MQTT Connection
|
|
* Create MQTT Connection
|
|
@@ -460,7 +464,7 @@ public class MenuBarNetworkExamples extends JMenu{
|
|
|
|
|
|
* Add some MQTT Devices
|
|
* Add some MQTT Devices
|
|
*/
|
|
*/
|
|
- FloatSensorDevice floatSensor = new FloatSensorDevice("Thermostat 1");
|
|
+ FloatSensorDevice floatSensor = new FloatSensorDevice("Kitchen Thermostat");
|
|
floatSensor.setFSinfoName("home/kitchen/temperature");
|
|
floatSensor.setFSinfoName("home/kitchen/temperature");
|
|
networkController.addLinkToDevice(zigbee, floatSensor);
|
|
networkController.addLinkToDevice(zigbee, floatSensor);
|
|
networkController.moveSmartDevice(floatSensor, 300, 500, 50);
|
|
networkController.moveSmartDevice(floatSensor, 300, 500, 50);
|
|
@@ -472,7 +476,36 @@ public class MenuBarNetworkExamples extends JMenu{
|
|
pFloatSensor.setLastTrigger(-357L);
|
|
pFloatSensor.setLastTrigger(-357L);
|
|
networkController.addDeviceToConnectionAndProtocol(pFloatSensor, mqtt,1);
|
|
networkController.addDeviceToConnectionAndProtocol(pFloatSensor, mqtt,1);
|
|
|
|
|
|
|
|
+
|
|
|
|
+ * Add Fridge
|
|
|
|
+ */
|
|
|
|
+ FloatSensorDevice kitchenFridge = new FloatSensorDevice("Smart Fridge");
|
|
|
|
+ kitchenFridge.setFSinfoName("home/kitchen/fridgeTemp");
|
|
|
|
+ networkController.addLinkToDevice(zigbee, kitchenFridge);
|
|
|
|
+ networkController.moveSmartDevice(kitchenFridge, 100, 600, 50);
|
|
|
|
+ kitchenFridge.setFSmin(15.0f);
|
|
|
|
+ kitchenFridge.setFSmax(32.0f);
|
|
|
|
+ networkController.addSmartDevice(kitchenFridge);
|
|
|
|
+ Port pKitchenFridge = new Port(kitchenFridge, (short)1883, 15000);
|
|
|
|
+ pKitchenFridge.setStatus(Port.SENDING);
|
|
|
|
+ pKitchenFridge.setLastTrigger(-1231L);
|
|
|
|
+ networkController.addDeviceToConnectionAndProtocol(pKitchenFridge, mqtt,1);
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+ * Add some kitchen lights
|
|
|
|
+ */
|
|
|
|
+ BoolSensorDevice kitchenLight = new BoolSensorDevice("Kitchen Light");
|
|
|
|
+ kitchenLight.setBSinfoName("home/kitchen/light");
|
|
|
|
+ networkController.addLinkToDevice(zigbee, kitchenLight);
|
|
|
|
+ networkController.moveSmartDevice(kitchenLight, 250, 400, 50);
|
|
|
|
+ networkController.addSmartDevice(kitchenLight);
|
|
|
|
+ Port pKitchenLight = new Port(kitchenLight, (short)1883, 15000);
|
|
|
|
+ pKitchenLight.setStatus(Port.SENDING);
|
|
|
|
+ pKitchenLight.setLastTrigger(-1207L);
|
|
|
|
+ networkController.addDeviceToConnectionAndProtocol(pKitchenLight, mqtt,1);
|
|
|
|
|
|
|
|
+
|
|
|
|
|
|
* Update visualization
|
|
* Update visualization
|
|
*/
|
|
*/
|