问题
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