Hello everybody!
I am newbie in IOT. It is my first project and I started with installation of Web Things gateway on Raspberry Pi. Everything works fine
and I paired my WiFi and z-wave things with the gateway and played with rules a little bit.
Now I am trying to make the sketch for my Thing on ESP 8266 having three “OnOff” properties. As the base for this sketch I used
LED example with three properties:
https://github.com/mozilla-iot/webthing-arduino/blob/master/examples/RGBLamp/RGBLamp.ino
I paired the example LED Thing with “Level", “OnOff" and “Color" properties to the gateway and saw that graphically it is displayed
in the form of three controls.
But when I tried to make the Thing with three “OnOff" properties it was displayed in form of one on-off switch.
Is it possible to use several same properties for one web thing?
For properties description I used the code:
WebThingAdapter* adapter;
const char* deviceTypes[] = {“OnOffSwitch”, “OnOffSwitch”, “OnOffSwitch”, nullptr};
ThingDevice device(“switch1-switch2-switch3”, “OnOffSwitch OnOffSwitch OnOffSwitch”, deviceTypes);
ThingProperty switch1(“on”, “Whether the pumpone is turned on”, BOOLEAN, “OnOffProperty”);
ThingProperty switch2(“on”, “Whether the pumptwo is turned on”, BOOLEAN, “OnOffProperty”);
ThingProperty switch3(“on”, “Whether the pumpthree is turned on”, BOOLEAN, "OnOffProperty”);
Please advise what’s wrong with this code.
Thank you for support!