Ejemplo n.º 1
0
        private void CreateInfoOnlyAnalog(INodeTemplateFactory factory)
        {
            var infoOnlyAnalog = new Guid("f72d524f-1fdc-4e0b-b1b6-ede9c500e61d");

            factory.CreateInterfaceType(infoOnlyAnalog, "LOXONE.MINISERVER.INFO_ONLY_ANALOG.NAME", "LOXONE.MINISERVER.INFO_ONLY_ANALOG.DESCRIPTION", 1, int.MaxValue, false);
            factory.CreateNodeTemplate(InfoOnlyAnlogNode, "LOXONE.MINISERVER.INFO_ONLY_ANALOG.NAME", "LOXONE.MINISERVER.INFO_ONLY_ANALOG.DESCRIPTION", "loxone-info-only-analog", FolderNodeInterface, GuidTemplateTypeAttribute.GetFromEnum(InterfaceTypeEnum.Value), false, true, true, false, true, NodeDataType.Double, int.MaxValue, false);
            CreateUuidProperty(factory, InfoOnlyAnlogNode);
        }
Ejemplo n.º 2
0
        public override void InitTemplates(INodeTemplateFactory factory)
        {
            factory.CreateNodeTemplate(DriverGuid, "MODBUS.SLAVE.TCP.NAME", "MODBUS.SLAVE.TCP.DESCRIPTION", "modbus-slave-tcp", GuidTemplateTypeAttribute.GetFromEnum(InterfaceTypeEnum.Ethernet),
                                       DeviceInterface, false, false, true, false, true, NodeDataType.NoAttribute, int.MaxValue, false);

            factory.CreatePropertyTemplate(new Guid("8c7eb99d-93db-4544-9ed3-2178a8ccd1e7"), "COMMON.PROPERTY.IPPORT.NAME", "COMMON.PROPERTY.IPPORT.DESCRIPTION", "modbus-port", PropertyTemplateType.Range,
                                           DriverGuid, "COMMON.CATEGORY.ADDRESS", true, false, PropertyHelper.CreateRangeMetaString(1, ushort.MaxValue), 502, 1, 1);

            factory.CreatePropertyTemplate(new Guid("d04ab318-dc1b-46ee-ab88-bcc4b4d9d438"), "MODBUS.PROPERTY.IGNORE_DEVICE_ID.NAME", "MODBUS.PROPERTY.IGNORE_DEVICE_ID.DESCRIPTION", "modbus-ignoreDeviceId", PropertyTemplateType.Bool,
                                           DriverGuid, "COMMON.CATEGORY.ADDRESS", true, false, "", true, 1, 1);

            factory.CreatePropertyTemplate(new Guid("ee6faef8-65a7-4c77-b653-28db70a6152d"), "type", "type", "modbus-type", PropertyTemplateType.Text,
                                           DriverGuid, "405e97a3-c039-426f-80f6-4be1554f154b", false, true, null, "MODBUS-SLAVE", 0, 0);
        }
Ejemplo n.º 3
0
        private void CreatePushButton(INodeTemplateFactory factory)
        {
            var pushButton = new Guid("ceae14b6-3574-4df9-9d92-f557912922dc");

            factory.CreateInterfaceType(pushButton, "LOXONE.MINISERVER.PUSH_BUTTON.NAME", "LOXONE.MINISERVER.PUSH_BUTTON.DESCRIPTION", 1, int.MaxValue, false);
            factory.CreateNodeTemplate(PushButtonNode, "LOXONE.MINISERVER.PUSH_BUTTON.NAME", "LOXONE.MINISERVER.PUSH_BUTTON.DESCRIPTION", "loxone-push-button", FolderNodeInterface, GuidTemplateTypeAttribute.GetFromEnum(InterfaceTypeEnum.Value), false, true, true, true, false, NodeDataType.Integer, int.MaxValue, false);
            factory.ChangeDefaultVisuTemplate(PushButtonNode, VisuMobileObjectTemplateTypes.ToggleButton);

            CreateUuidProperty(factory, PushButtonNode);
        }
Ejemplo n.º 4
0
        private void CreateDimmer(INodeTemplateFactory factory)
        {
            var dimmer = new Guid("fd70966f-d53b-4d7d-a625-1b0113364eef");

            factory.CreateInterfaceType(dimmer, "LOXONE.MINISERVER.DIMMER.NAME", "LOXONE.MINISERVER.DIMMER.DESCRIPTION", 1, int.MaxValue, false);
            factory.CreateNodeTemplate(DimmerNode, "LOXONE.MINISERVER.DIMMER.NAME", "LOXONE.MINISERVER.DIMMER.DESCRIPTION", "loxone-dimmer", FolderNodeInterface, GuidTemplateTypeAttribute.GetFromEnum(InterfaceTypeEnum.Value), false, true, true, true, false, NodeDataType.Integer, int.MaxValue, false);
            factory.ChangeDefaultVisuTemplate(DimmerNode, VisuMobileObjectTemplateTypes.Slider);

            CreateUuidProperty(factory, DimmerNode);
        }
Ejemplo n.º 5
0
        private void CreateConnectionState(INodeTemplateFactory factory)
        {
            var connected = new Guid("d101bcce-be51-4aad-bf1f-11d756674b53");

            factory.CreateInterfaceType(connected, "LOXONE.MINISERVER.CONNECTED.NAME", "LOXONE.MINISERVER.CONNECTED.DESCRIPTION", 1, int.MaxValue, false);
            var connectedNode = new Guid("3887cc34-6103-4dc7-aaec-ba30e6e42710");

            factory.CreateNodeTemplate(connectedNode, "LOXONE.MINISERVER.CONNECTED.NAME", "LOXONE.MINISERVER.CONNECTED.DESCRIPTION", "loxone-connected", DriverGuid, GuidTemplateTypeAttribute.GetFromEnum(InterfaceTypeEnum.Value), true, true, true, false, true, NodeDataType.Boolean, 1, false, false);
        }
Ejemplo n.º 6
0
        public override void InitNodeTemplates(INodeTemplateFactory factory)
        {
            factory.CreateInterfaceType(DriverGuid, "LOXONE.MINISERVER.NAME", "LOXONE.MINISERVER.DESCRIPTION", int.MaxValue, int.MaxValue, true);

            factory.CreateNodeTemplate(DriverGuid, "LOXONE.MINISERVER.NAME", "LOXONE.MINISERVER.DESCRIPTION", "loxone-miniserver", GuidTemplateTypeAttribute.GetFromEnum(InterfaceTypeEnum.Ethernet), DriverGuid, false, false, true, false, true, NodeDataType.NoAttribute, int.MaxValue, false);

            factory.CreatePropertyTemplate(new Guid("15d8489a-904a-4190-be6b-c7f26e0689f1"), "LOXONE.MINISERVER.PROPERTY.IP.NAME", "LOXONE.MINISERVER.PROPERTY.IP.DESCRIPTION", "ip-address", PropertyTemplateType.Ip, DriverGuid, "COMMON.CATEGORY.ADDRESS", true, false, null, "", 1, 1);
            factory.CreatePropertyTemplate(new Guid("846128c7-1094-4277-8303-e1b16e5deea2"), "LOXONE.MINISERVER.PROPERTY.PORT.NAME", "LOXONE.MINISERVER.PROPERTY.PORT.DESCRIPTION", "port", PropertyTemplateType.Range, DriverGuid, "COMMON.CATEGORY.ADDRESS", true, false, PropertyHelper.CreateRangeMetaString(0, short.MaxValue), "80", 1, 1);
            factory.CreatePropertyTemplate(new Guid("251af9bc-a8ab-460f-a7c0-c43493e102c4"), "LOXONE.MINISERVER.PROPERTY.USER.NAME", "LOXONE.MINISERVER.PROPERTY.USER.DESCRIPTION", "user", PropertyTemplateType.Text, DriverGuid, "COMMON.CATEGORY.ADDRESS", true, false, null, "", 1, 2);
            factory.CreatePropertyTemplate(new Guid("91c6148a-ce94-4240-abf3-2eec52c46e3e"), "LOXONE.MINISERVER.PROPERTY.PASSWORD.NAME", "LOXONE.MINISERVER.PROPERTY.PASSWORD.DESCRIPTION", "password", PropertyTemplateType.Password, DriverGuid, "COMMON.CATEGORY.ADDRESS", true, false, null, "", 1, 3);

            factory.CreatePropertyTemplate(new Guid("f51d380a-2a89-4a70-b63e-35e91ef810b5"), "LOXONE.MINISERVER.PROPERTY.SCAN.NAME", "LOXONE.MINISERVER.PROPERTY.SCAN.DESCRIPTION", "scan", PropertyTemplateType.Scan, DriverGuid, "COMMON.CATEGORY.ADDRESS", true, false, null, "", 1, 4);

            CreateFolder(factory);

            CreateConnectionState(factory);
            CreateInfoOnlyAnalog(factory);
            CreateSwitch(factory);
            CreateDimmer(factory);
            CreateInfoOnlyDigital(factory);
            CreatePushButton(factory);
        }
Ejemplo n.º 7
0
        private void CreateInfoOnlyDigital(INodeTemplateFactory factory)
        {
            var infoOnlyDigital = new Guid("3358d7e0-592c-4489-be23-b7f5942c9d2b");

            factory.CreateInterfaceType(infoOnlyDigital, "LOXONE.MINISERVER.INFO_ONLY_DIGITAL.NAME", "LOXONE.MINISERVER.INFO_ONLY_DIGITAL.DESCRIPTION", 1, int.MaxValue, false);
            factory.CreateNodeTemplate(InfoOnlyDigitalNode, "LOXONE.MINISERVER.INFO_ONLY_DIGITAL.NAME", "LOXONE.MINISERVER.INFO_ONLY_DIGITAL.DESCRIPTION", "loxone-info-only-digital", FolderNodeInterface, GuidTemplateTypeAttribute.GetFromEnum(InterfaceTypeEnum.Value), false, true, true, false, true, NodeDataType.Double, int.MaxValue, false);
            CreateUuidProperty(factory, InfoOnlyDigitalNode);
        }
Ejemplo n.º 8
0
        private void CreateSwitch(INodeTemplateFactory factory)
        {
            var switchGuid = new Guid("7a99a720-e031-4a76-b7ef-d734cf7e46a3");

            factory.CreateInterfaceType(switchGuid, "LOXONE.MINISERVER.SWITCH.NAME", "LOXONE.MINISERVER.SWITCH.DESCRIPTION", 1, int.MaxValue, false);
            factory.CreateNodeTemplate(SwitchNodeGuid, "LOXONE.MINISERVER.SWITCH.NAME", "LOXONE.MINISERVER.SWITCH.DESCRIPTION", "loxone-switch", FolderNodeInterface, GuidTemplateTypeAttribute.GetFromEnum(InterfaceTypeEnum.Value), false, true, true, true, false, NodeDataType.Boolean, int.MaxValue, false);
            factory.ChangeDefaultVisuTemplate(SwitchNodeGuid, VisuMobileObjectTemplateTypes.ToggleButton);

            CreateUuidProperty(factory, SwitchNodeGuid);
        }
Ejemplo n.º 9
0
        public override void InitNodeTemplates(INodeTemplateFactory factory)
        {
            factory.CreateInterfaceType(DriverGuid, "IKEA.TRADFRI.NAME", "IKEA.TRADFRI.DESCRIPTION", int.MaxValue, 1, true);
            factory.CreateNodeTemplate(DriverGuid, "IKEA.TRADFRI.NAME", "IKEA.TRADFRI.DESCRIPTION", "ikea.tradfri", GuidTemplateTypeAttribute.GetFromEnum(InterfaceTypeEnum.Ethernet),
                                       DriverGuid, false, false, true, false, true, NodeDataType.NoAttribute, Int32.MaxValue, false);

            factory.CreatePropertyTemplate(new Guid("b6b5e4ff-8511-44f4-aceb-bd80d01a141b"), "IKEA.TRADFRI.SCAN.NAME", "IKEA.TRADFRI.SCAN.DESCRIPTION",
                                           "scan", PropertyTemplateType.Scan, DriverGuid, "COMMON.CATEGORY.DISCOVERY", true, false, "", null, 0,
                                           0);

            var gwInterface = new Guid("f15cca2e-7fe5-43f6-ad8a-ea4b60fc7b56");

            factory.CreateInterfaceType(gwInterface, "IKEA.TRADFRI.GATEWAY.NAME", "IKEA.TRADFRI.GATEWAY.DESCRIPTION", int.MaxValue, int.MaxValue, true);
            factory.CreateNodeTemplate(GatewayGuid, "IKEA.TRADFRI.GATEWAY.NAME", "IKEA.TRADFRI.GATEWAY.NAME", "ikea-tradfri-gateway", DriverGuid, gwInterface, false, false, true, false, true, NodeDataType.NoAttribute, int.MaxValue, false);

            factory.CreatePropertyTemplate(new Guid("594be0ff-63c4-4e46-9cc8-37ff7ccf80a2"), "IKEA.TRADFRI.GATEWAY.ID.NAME",
                                           "IKEA.TRADFRI.GATEWAY.ID.DESCRIPTION", IdAddressPropertyKey, PropertyTemplateType.Text, GatewayGuid,
                                           "COMMON.CATEGORY.ADDRESS", true, false, "", null, 1, 0);

            factory.CreatePropertyTemplate(new Guid("330b668e-2f46-42c3-b44e-b42a149a2a0d"), "IKEA.TRADFRI.GATEWAY.SECRET.NAME",
                                           "IKEA.TRADFRI.GATEWAY.SECRET.DESCRIPTION", SecretPropertyKey, PropertyTemplateType.Text,
                                           GatewayGuid, "COMMON.CATEGORY.ADDRESS", true, false, "", null, 1, 1);

            factory.CreatePropertyTemplate(new Guid("22438ff2-4739-4fd0-a2a0-abe691dfe1b4"), "IKEA.TRADFRI.GATEWAY.CONNECTION_KEY.NAME",
                                           "IKEA.TRADFRI.GATEWAY.CONNECTION_KEY.DESCRIPTION", ConnectionPropertyKey, PropertyTemplateType.Text,
                                           GatewayGuid, "COMMON.CATEGORY.ADDRESS", false, true, "", null, 1, 2);

            factory.CreatePropertyTemplate(new Guid("252d18ed-af14-447c-8472-2d3d0d15ff0d"), "IKEA.TRADFRI.GATEWAY.SCAN.NAME", "IKEA.TRADFRI.GATEWAY.SCAN.DESCRIPTION",
                                           "scan", PropertyTemplateType.Scan, GatewayGuid, "COMMON.CATEGORY.DISCOVERY", true, false, "", null, 2,
                                           0);

            CreateSwitch(factory, gwInterface);
            CreateLight(factory, gwInterface);
        }