How to switch on a electric bulb with ESP8266 board?
Re: How to switch on a electric bulb with ESP8266 board?
@RajaRamesh:
You simply switch on or off the Pin which is connected to the Relay. There is no magic involved here!
You simply switch on or off the Pin which is connected to the Relay. There is no magic involved here!
-
- Posts: 51
- Joined: Wed May 08, 2019 10:54 am
Re: How to switch on a electric bulb with ESP8266 board?
Thank you Thomas...i will try and get back to you.
-
- Posts: 51
- Joined: Wed May 08, 2019 10:54 am
Re: How to switch on a electric bulb with ESP8266 board?
Hi,
is it possible to schedule the code to run particular day,time on esp8266 board ?
Thanks
is it possible to schedule the code to run particular day,time on esp8266 board ?
Thanks
Re: How to switch on a electric bulb with ESP8266 board?
Have a look at https://docs.micropython.org/en/latest/ ... e.RTC.html
Note you'll need a way to set the current time -- there's an ntptime module available as a frozen module: https://github.com/micropython/micropyt ... ntptime.py
Note you'll need a way to set the current time -- there's an ntptime module available as a frozen module: https://github.com/micropython/micropyt ... ntptime.py
-
- Posts: 51
- Joined: Wed May 08, 2019 10:54 am
Re: How to switch on a electric bulb with ESP8266 board?
Hi ,jimmo wrote: ↑Sat May 18, 2019 12:23 amHave a look at https://docs.micropython.org/en/latest/ ... e.RTC.html
Note you'll need a way to set the current time -- there's an ntptime module available as a frozen module: https://github.com/micropython/micropyt ... ntptime.py
i gone through the links and understand machine.RTC one and build as below.
rtc=machine.RTC()
rtc.datetime((2019,5,20,9,0,0,0,0))
rtc.datetime() # displays current time but it is showing different time stamp.how can i get IST standard?
Now i am trying to display year alone and month...etc and receiving error as below. how can i get year/ month/day/hour/....?
>>> print(rtc.datetime('year'))
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
TypeError: object 'str' is not a tuple or list
-
- Posts: 969
- Joined: Sat Feb 03, 2018 7:02 pm
Re: How to switch on a electric bulb with ESP8266 board?
Code: Select all
t = time.localtime()
t = t[0:3] + (0,) + (t[3] + TIMEZONE_OFFSET,) + t[4:6] + (0,)
print("{}-{:02d}-{:02d} {:02d}:{:02d}:{:02d}".format(t[0], t[1], t[2], t[3],t[4],t[5])
Kevin Köck
Micropython Smarthome Firmware (with Home-Assistant integration): https://github.com/kevinkk525/pysmartnode
Micropython Smarthome Firmware (with Home-Assistant integration): https://github.com/kevinkk525/pysmartnode
-
- Posts: 51
- Joined: Wed May 08, 2019 10:54 am
Re: How to switch on a electric bulb with ESP8266 board?
Thank you for sharing the details Kevin.kevinkk525 wrote: ↑Mon May 20, 2019 4:51 pmCreates this output: 2019-05-20 14:56:03 (YYYY-MM-DD HH:mm:SS)Code: Select all
t = time.localtime() t = t[0:3] + (0,) + (t[3] + TIMEZONE_OFFSET,) + t[4:6] + (0,) print("{}-{:02d}-{:02d} {:02d}:{:02d}:{:02d}".format(t[0], t[1], t[2], t[3],t[4],t[5])
is it possible for esp8266 to communicate with high power ....meaning 3-phase power supply 415v for heavy loads. if yes what kind of relays we can use.
-
- Posts: 969
- Joined: Sat Feb 03, 2018 7:02 pm
Re: How to switch on a electric bulb with ESP8266 board?
If you find the right relay, it surely can. But I don't know about that kind of relay. I only bought ones for 230VRajaRamesh wrote: ↑Wed May 22, 2019 4:06 pmis it possible for esp8266 to communicate with high power ....meaning 3-phase power supply 415v for heavy loads. if yes what kind of relays we can use.
Kevin Köck
Micropython Smarthome Firmware (with Home-Assistant integration): https://github.com/kevinkk525/pysmartnode
Micropython Smarthome Firmware (with Home-Assistant integration): https://github.com/kevinkk525/pysmartnode
Re: How to switch on a electric bulb with ESP8266 board?
I'm sorry to keep going on about this and I absolutely mean this with best intentions in a "this might save your life" way.. but if you have to ask that then you probably shouldn't be doing it.RajaRamesh wrote: ↑Wed May 22, 2019 4:06 pmis it possible for esp8266 to communicate with high power ....meaning 3-phase power supply 415v for heavy loads. if yes what kind of relays we can use.
I strongly recommend finding an existing product designed for this purpose that supports interfacing with it over a low voltage, well isolated and documented digital interface.
-
- Posts: 51
- Joined: Wed May 08, 2019 10:54 am