Wso2 iot server with raspberry pi

流过昼夜 提交于 2019-12-04 06:01:48

问题


This is the rest call for switch on off the bulb in raspberry pi.

<DeviceTypeConfiguration name="raspberrypi">
    <Features>
        <Feature code="bulb">
            <Name>Control Bulb</Name>
            <Description>Control Bulb on Raspberrypi</Description>
            <Operation context="/raspberrypi/device/{deviceId}/bulb" method="POST">
                <QueryParameters>
                    <Parameter>state</Parameter>
                </QueryParameters>
            </Operation>
        </Feature>
    </Features>

Here, the QueryParameter state stands for on & off. Like bellow.

curl -v -k -X POST "https://localhost:8243/raspberrypi/1.0.0/device/vf98e6a7atyp/bulb?state=off" -H "accept: application/json" -H "Authorization: Bearer beec80da-4d83-36a9-ad82-a33e5bdbad70"

But state can only take values on, off, ON, OFF. Can anybody tell me the name of the file which validates the value of state?

Because I want to add some more values other than on, off, ON, OFF.

Your help is very much appriciated.

来源:https://stackoverflow.com/questions/54743538/wso2-iot-server-with-raspberry-pi

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!