Smart Home Automation Forum
Lesson35- use SMS control relay and read temperature sensor - Printable Version

+- Smart Home Automation Forum (https://www.kincony.com/forum)
+-- Forum: Technical Support (https://www.kincony.com/forum/forumdisplay.php?fid=1)
+--- Forum: KC868-A series and Uair Smart Controller (https://www.kincony.com/forum/forumdisplay.php?fid=6)
+--- Thread: Lesson35- use SMS control relay and read temperature sensor (/showthread.php?tid=2001)



Lesson35- use SMS control relay and read temperature sensor - admin - 06-26-2022

send SMS text:

1. turn on/off one relay:

relay1-on    turn ON relay1
relay1-off    turn OFF relay1
relay2-on    turn ON relay2
relay2-off    turn OFF relay2
relay3-on    turn ON relay3
relay3-off    turn OFF relay3
relay4-on    turn ON relay4
relay4-off    turn OFF relay4
relay5-on    turn ON relay5
relay5-off    turn OFF relay5
relay6-on    turn ON relay6
relay6-off    turn OFF relay6
relay7-on    turn ON relay7
relay7-off    turn OFF relay7
relay8-on    turn ON relay8
relay8-off    turn OFF relay8

2. turn on/off all relay:

all-on  turn ON relay1-8
all-off  turn OFF relay1-8

3. read current temperature value:

temper      read DS18B20 temperature sensor data

4. digital input for sensor trigger output

a. if input1 trigger, (siren) relay1 ON -> 3 seconds -> relay1 OFF -> send SMS: door sensor is triggered,someone in the room!
b. if input2 trigger, (siren) relay1 ON -> 3 seconds -> relay1 OFF -> send SMS: window sensor is triggered,someone in the room!
c. if input3 trigger, send SMS: sensor3 is triggered,someone in the room!
d. if input4 trigger, send SMS: sensor4 is triggered,someone in the room!
e. if input5 trigger, send SMS: sensor5 is triggered,someone in the room!
f.  if input6 trigger, send SMS: sensor6 is triggered,someone in the room!
g. if input7 trigger, send SMS: sensor7 is triggered,someone in the room!
h. if input8 trigger, send SMS: sensor8 is triggered,someone in the room!


here is arduino IDE source code: 
.zip   sms-relay.zip (Size: 1.71 KB / Downloads: 360)


RE: Lesson35- use SMS control relay and read temperature sensor - saun2000 - 01-09-2023

(06-26-2022, 12:22 AM)admin Wrote: send SMS text:

1. turn on/off one relay:

relay1-on    turn ON relay1
relay1-off    turn OFF relay1
relay2-on    turn ON relay2
relay2-off    turn OFF relay2
relay3-on    turn ON relay3
relay3-off    turn OFF relay3
relay4-on    turn ON relay4
relay4-off    turn OFF relay4
relay5-on    turn ON relay5
relay5-off    turn OFF relay5
relay6-on    turn ON relay6
relay6-off    turn OFF relay6
relay7-on    turn ON relay7
relay7-off    turn OFF relay7
relay8-on    turn ON relay8
relay8-off    turn OFF relay8

2. turn on/off all relay:

all-on  turn ON relay1-8
all-off  turn OFF relay1-8

3. read current temperature value:

temper      read DS18B20 temperature sensor data

4. digital input for sensor trigger output

a. if input1 trigger, (siren) relay1 ON -> 3 seconds -> relay1 OFF -> send SMS: door sensor is triggered,someone in the room!
b. if input2 trigger, (siren) relay1 ON -> 3 seconds -> relay1 OFF -> send SMS: window sensor is triggered,someone in the room!
c. if input3 trigger, send SMS: sensor3 is triggered,someone in the room!
d. if input4 trigger, send SMS: sensor4 is triggered,someone in the room!
e. if input5 trigger, send SMS: sensor5 is triggered,someone in the room!
f.  if input6 trigger, send SMS: sensor6 is triggered,someone in the room!
g. if input7 trigger, send SMS: sensor7 is triggered,someone in the room!
h. if input8 trigger, send SMS: sensor8 is triggered,someone in the room!


here is arduino IDE source code: 

I tried to upload this "sms-relay.ino" file to my KC868-A8S esp 32 module. But i keep getting the same error message call PCF8574.h: no such file or directory.
Can you please explain how to install this pcf8574 file first.


RE: Lesson35- use SMS control relay and read temperature sensor - admin - 01-10-2023

because you have not installed PCF8574 arduino library. you can download this library zip file, unzip, copy the folder to your arduino library path.

.zip   PCF8574_library.zip (Size: 23.8 MB / Downloads: 208)


RE: Lesson35- use SMS control relay and read temperature sensor - saun2000 - 01-10-2023

I did exactly as you mentioned. But still no luck. Some where some thing is missing. I will whatsapp you a short video.

its giving me this error now. "Compilation error: DS18B20.h: No such file or directory"


RE: Lesson35- use SMS control relay and read temperature sensor - admin - 01-10-2023

so you also need to install ds18b20 arduino library.


RE: Lesson35- use SMS control relay and read temperature sensor - admin - 01-10-2023

this is ds18b20 library.

.zip   DS18B20.zip (Size: 913.87 KB / Downloads: 193)


RE: Lesson35- use SMS control relay and read temperature sensor - saun2000 - 01-10-2023

Now its giving me the following error\

In file included from C:\Users\saund\Documents\Arduino\libraries\sms-relay\sms-relay.ino:7:0:
c:\Users\saund\Documents\Arduino\libraries\DS18B20\src/DS18B20.h:5:21: fatal error: OneWire.h: No such file or directory
compilation terminated.

exit status 1

Compilation error: exit status 1


RE: Lesson35- use SMS control relay and read temperature sensor - admin - 01-10-2023

you can install this  "OneWire" library in your arduino.

.zip   OneWire.zip (Size: 20.79 KB / Downloads: 219)


RE: Lesson35- use SMS control relay and read temperature sensor - saun2000 - 01-10-2023

looks like its uploaded now. Is there any way to get the wiring schematics for this A8S module please? Thank you.


RE: Lesson35- use SMS control relay and read temperature sensor - admin - 01-11-2023

here is schematics for KC868-A8S: https://www.kincony.com/download/KC868-A8-PCBV1.4.pdf