
Supla for Arduino change pictogram
-
- Posts: 47
- Joined: Sat Mar 04, 2017 7:34 pm
Hi!
Hello guys! In first I want to give you my congratulats for your work, the software is really stable and simple to use. I want to ask some informations: I would like to handle the lights via a step relay with a simple switch. At the same time I have idea to use your software to command that relay, also need to detect the state of it. and change the state via the app. It will be perfect to open an electric lock of the door. One thing, is it possible to change the original pictogram of the door with mine one? One for relay closes and another for relay open?

-
- Posts: 19465
- Joined: Tue Jan 19, 2016 9:26 am
- Location: Paczków
Hi. Which platform do you want to use ? ESP8266/Arduino/Raspberry PI ?
At this moment the only way to change the pictogram is build own version of the smartphone app.
At this moment the only way to change the pictogram is build own version of the smartphone app.
-
- Posts: 47
- Joined: Sat Mar 04, 2017 7:34 pm
possible add gpio to change the relay state such feed 5volt?
-
- Posts: 19465
- Joined: Tue Jan 19, 2016 9:26 am
- Location: Paczków
For Arduino you can operate the relay in non standard way by adding your own support of digitalRead/Write
void setDigitalReadFuncImpl(_impl_arduino_digitalRead impl_arduino_digitalRead);
void setDigitalWriteFuncImpl(_impl_arduino_digitalWrite impl_arduino_digitalWrite);
or just set "bistable" parameter to "true"
bool addRelay(int relayPin1, int relayPin2, bool hiIsLo, bool bistable, _supla_int_t functions);
void setDigitalReadFuncImpl(_impl_arduino_digitalRead impl_arduino_digitalRead);
void setDigitalWriteFuncImpl(_impl_arduino_digitalWrite impl_arduino_digitalWrite);
or just set "bistable" parameter to "true"
bool addRelay(int relayPin1, int relayPin2, bool hiIsLo, bool bistable, _supla_int_t functions);
-
- Posts: 47
- Joined: Sat Mar 04, 2017 7:34 pm
Sorry, I can not. For example, chanel 0, pin 44. to convert to the state of HIGH, how should the code look like? 

-
- Posts: 19465
- Joined: Tue Jan 19, 2016 9:26 am
- Location: Paczków
Please describe what exactly you want to do
-
- Posts: 47
- Joined: Sat Mar 04, 2017 7:34 pm
Change the status of the switch programmatically. and then I can myself.
Add a pin for on off Thank you
