Page 2 of 6

Re: How to switch on a electric bulb with ESP8266 board?

Posted: Mon May 13, 2019 9:41 am
by ThomasChr
@RajaRamesh:
You simply switch on or off the Pin which is connected to the Relay. There is no magic involved here!

Re: How to switch on a electric bulb with ESP8266 board?

Posted: Mon May 13, 2019 5:20 pm
by RajaRamesh
Thank you Thomas...i will try and get back to you.

Re: How to switch on a electric bulb with ESP8266 board?

Posted: Fri May 17, 2019 3:50 pm
by RajaRamesh
Hi,

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?

Posted: Sat May 18, 2019 12:23 am
by jimmo
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

Re: How to switch on a electric bulb with ESP8266 board?

Posted: Mon May 20, 2019 4:04 pm
by RajaRamesh
jimmo wrote:
Sat May 18, 2019 12:23 am
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
Hi ,

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

Re: How to switch on a electric bulb with ESP8266 board?

Posted: Mon May 20, 2019 4:51 pm
by kevinkk525

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])
Creates this output: 2019-05-20 14:56:03 (YYYY-MM-DD HH:mm:SS)

Re: How to switch on a electric bulb with ESP8266 board?

Posted: Wed May 22, 2019 4:06 pm
by RajaRamesh
kevinkk525 wrote:
Mon May 20, 2019 4:51 pm

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])
Creates this output: 2019-05-20 14:56:03 (YYYY-MM-DD HH:mm:SS)
Thank you for sharing the details Kevin.
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.

Re: How to switch on a electric bulb with ESP8266 board?

Posted: Wed May 22, 2019 4:22 pm
by kevinkk525
RajaRamesh wrote:
Wed May 22, 2019 4:06 pm
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.
If you find the right relay, it surely can. But I don't know about that kind of relay. I only bought ones for 230V

Re: How to switch on a electric bulb with ESP8266 board?

Posted: Wed May 22, 2019 4:44 pm
by jimmo
RajaRamesh wrote:
Wed May 22, 2019 4:06 pm
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.
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.

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.

Re: How to switch on a electric bulb with ESP8266 board?

Posted: Thu May 23, 2019 1:23 pm
by RajaRamesh
jimmo wrote:
Wed May 22, 2019 4:44 pm

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.
Ok....i will try for existing product for this.