Open majidshakhsi opened 3 years ago
Hi @majidshakhsi,
Thank you for your feedback. And sorry to answer you so late...
Your project is very interesting but, indeed, you don't necessarily need to go through a server that hosts a php web application that relies on a database. It can be much simpler with an ESP32 and WebSocket protocol. However, it also depends on what is available to control your lamps remotely... I don't know which model of connected light bulb you have, but I myself have set up a home lighting controller with a simple ESP32. I have LIFX bulbs at home, and it's pretty awesome because they all have a WiFi interface. So I can control them with a simple ESP32 that talks to them using UDP packets, following a low-level protocol defined by the manufacturer.
I plan to write a tutorial to explain how to implement this project. If you're interested, I'll give you the link here, but I don't know when... 😁
Regards, Steph
Dear Steph Thanks a lot for your response. The bulb i used is a usual lightening lamp and it is not smart. For controlling of each lamp, a wire from base (ESP32 module) is connected to change-over switch and then lto amp. it means that we have two model of control, first traditional model where lamps are controlled by switches manually and separately and the second model where lamps are controlled by web application. As you know, i used web application by host and database and now, i am going to use websocket. So, my assumption is that the bulbs are not equipped by WiFi. with such assumption, how i can develop my program? Best regards Majid
ّ
On Thu, Jan 21, 2021 at 6:46 PM m1cr0lab notifications@github.com wrote:
Hi @majidshakhsi https://github.com/majidshakhsi,
Thank you for your feedback. And sorry to answer you so late...
Your project is very interesting but, indeed, you don't necessarily need to go through a server that hosts a php web application that relies on a database. It can be much simpler with an ESP32 and WebSocket protocol. However, it also depends on what is available to control your lamps remotely... I don't know which model of connected light bulb you have, but I myself have set up a home lighting controller with a simple ESP32. I have LIFX https://www.lifx.com/ bulbs at home, and it's pretty awesome because they all have a WiFi interface. So I can control them with a simple ESP32 that talks to them using UDP packets, following a low-level protocol defined by the manufacturer.
I plan to write a tutorial to explain how to implement this project. If you're interested, I'll give you the link here, but I don't know when... 😁
Regards, Steph
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/m1cr0lab-esp32/remote-control-with-websocket/issues/9#issuecomment-764713333, or unsubscribe https://github.com/notifications/unsubscribe-auth/AQ73EWACVAWLUUJEARLSHQ3S3BAMFANCNFSM4VQMECQQ .
Hi @majidshakhsi,
If your project involves standard AC lamps, you should consider using electromechanical relays to control them remotely via an ESP32.
If you look around you will easily find tutorials on the subject. Here are two, for example, to help you get started:
Then you'll have no trouble transposing my WebSockets tutorial to control the switching of relays instead of turning an LED on or off. It's exactly the same thing.
All the best, Steph
Dear sir Thanks a lot for sharing useful and practical issues. I implemented one of RNT projects (remote control+PHP+SQL) in my home for 18 zone lighening. every 300ms, ESP32 send a request to host for exploring changes in database. but with your Websocket project, now, I know that no need to have a database or sending request. However, in your project, esp32 has rule of server while in my project, PHP+JS+HTML+CSS are inside server. I control lamps in my mobile by web addressing. I obtained a registration form. At first you need to log in. then you can observe control page with different zones. for example kitchen zone, rest room zone and so on. I also no need to control lams from two points because one of my points is control traditionally by a usual power key. Would you please tell to me how I can change your Websocket project to match to my project? Thanks