Inputs

The inputs (_assign.xml) file defines the inputs that must be used by the management server when a transaction is initiated. Inputs are supplied in the first message of a transaction. The _assign.xml file specifies default values for required inputs which are displayed by the console.

The contents of hue_light_assign.xml are shown here.



<?xml version="1.0"?>
<Assignments xmlns="http://IoTProtocol"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xsi:schemaLocation="http://IoTProtocol ../../../Schemas/Soti.IoT.Schema.Definitions/content/assignments.xsd">

    <Transactions>

        <Transaction idref="StartColorLoop">
            <Block idref="1">
                <Send idref="ChangeLightState">
                    <Group idref="Resource">
                        <Resource idref ="effect">
                            <Value>colorloop</Value>
                        </Resource>
                    </Group>
                    <Object idref="Command">
                        <Segment idref ="transitiontime">
                            <Value>5</Value>
                        </Segment>
                    </Object>
                </Send>
            </Block>
        </Transaction>

        <Transaction idref="StopColorLoop">
            <Block idref="1">
                <Send idref="ChangeLightState">
                    <Group idref="Resource">
                        <Resource idref ="effect">
                            <Value>none</Value>
                        </Resource>
                    </Group>
                </Send>
            </Block>
        </Transaction>

    </Transactions>

    <UserInputs>

        <Transaction idref="RegisterToBridge">
            <Block idref="1">
                <Send idref="Register">
                    <Segment idref="Resource">
                        <Value>Bridge IP address</Value>
                    </Segment>
                </Send>
            </Block>
        </Transaction>

        <Transaction idref="RenameLight">
            <Block idref="1">
                <Send idref="RenameLight">
                    <Resource idref="Resource">
                        <Value>Set New Label</Value>
                    </Resource>
                </Send>
            </Block>
        </Transaction>

        <Transaction idref="Brightness">
            <Block idref="1">
                <Send idref="ChangeLightState">
                    <Group idref="Resource">
                        <Resource idref ="bri">
                            <DefaultValue>250</DefaultValue>
                        </Resource>
                    </Group>
                </Send>
            </Block>
        </Transaction>

        <Transaction idref="Brightness(BW)">
            <Block idref="1">
                <Send idref="ChangeBWLightState">
                    <Group idref="Resource">
                        <Resource idref ="bri">
                            <DefaultValue>250</DefaultValue>
                        </Resource>
                    </Group>
                </Send>
            </Block>
        </Transaction>

        <Transaction idref="Color">
            <Block idref="1">
                <Send idref="ChangeLightState">
                    <Group idref="Resource">
                        <Resource idref ="hue">
                            <DefaultValue>0</DefaultValue>
                        </Resource>
                    </Group>
                </Send>
            </Block>
        </Transaction>

        <!--
        <Transaction idref="SetLog">
            <Block idref="1">
                <Send idref="SetLog">
                    <Group idref="Resource">
                        <Resource idref="level">
                            <DefaultValue>DEBUG</DefaultValue>
                        </Resource>
                        <Resource idref="size">
                            <DefaultValue>10MB</DefaultValue>
                        </Resource>
                        <Resource idref="layout">
                            <DefaultValue>%date %-5level - %message%newline</DefaultValue>
                        </Resource>
                    </Group>
                </Send>
            </Block>
        </Transaction>
        -->

        <!--
        <Transaction idref="ChangeLightState">
            <Block idref="1">
                <Send idref="ChangeLightState">
                    <Group idref="Resource">
                        <Resource idref ="on">
                            <DefaultValue>true</DefaultValue>
                        </Resource>
                        <Resource idref ="bri">
                            <DefaultValue>250</DefaultValue>
                        </Resource>
                        <Resource idref ="hue">
                            <DefaultValue>48000</DefaultValue>
                        </Resource>
                    </Group>
                    <Object idref="Command">
                        <Segment idref ="transitiontime">
                            <DefaultValue>1</DefaultValue>
                        </Segment>
                    </Object>
                </Send>
            </Block>
        </Transaction>
        -->

    </UserInputs>

</Assignments>