Read command from server esp8266

Post Reply
micdj
Posts: 11
Joined: Wed Jan 06, 2021 2:23 am

Hello, thank you for your work, I realize persianas project simply, now I've a problem, how can I read command from supla server?, for example if I switch on the lamp on channel 0, how can I use this class

Code: Select all

void SuplaDeviceClass::channelValueChanged(int channel_number, char v, double d, char var)
to read channel number, and value?


I try to insert

Code: Select all

void channelvalue(int channel_number, char v, double d, char var)

SuplaDevice.setStatusFuncImpl(&channelvalue);
or
SuplaDevice.setTimerFuncImpl(&channelvalue);
Thank you
User avatar
pzygmunt
Posts: 18207
Joined: Tue Jan 19, 2016 9:26 am
Location: Paczków
Contact:

Use a newer version of the library

https://github.com/SUPLA/arduino/tree/develop
micdj
Posts: 11
Joined: Wed Jan 06, 2021 2:23 am

Hello! thank you for answer!

I will try to understand, but library is very different.

I hope someone can help me.
User avatar
pzygmunt
Posts: 18207
Joined: Tue Jan 19, 2016 9:26 am
Location: Paczków
Contact:

Do not use an old library that will be retired.
User avatar
klew
Posts: 8177
Joined: Thu Jun 27, 2019 12:16 pm
Location: Wrocław

micdj wrote: Wed Jan 06, 2021 11:06 am Hello! thank you for answer!

I will try to understand, but library is very different.

I hope someone can help me.
Could you please elaborate a little bit more what you want to achive?
Widzimy się na Supla Offline Party vol. 2 :!:
Post Reply

Return to “General discussion”