Standalone mode

Moderators: grovkillen, Stuntteam, TD-er

Post Reply
Message
Author
mackowiakp
Normal user
Posts: 527
Joined: 07 Jun 2018, 06:47
Location: Gdynia/Poland

Standalone mode

#1 Post by mackowiakp » 24 Aug 2019, 19:03

I want to use one nodeMCU in standalone mode. Is it any possibility to use any real time clock module in easyESP ?
And second question. nodeMCU reboots itself sometimes and power supply can be loss, That is why I need to restore the state of relays before reboot or power loss. Is it possible to save it, for example, as a variable in non-volatile memory?

TD-er
Core team member
Posts: 8643
Joined: 01 Sep 2017, 22:13
Location: the Netherlands
Contact:

Re: Standalone mode

#2 Post by TD-er » 24 Aug 2019, 23:44

To answer the last question first, nope not yet.
And about the clock issue.
One thing that will work for sure, is using a GPS module.
I don't know if there is a RTC module supported. (so assume it isn't)

User avatar
enesbcs
Normal user
Posts: 587
Joined: 18 Jun 2017, 11:02
Location: Békéscsaba, Hungary
Contact:

Re: Standalone mode

#3 Post by enesbcs » 25 Aug 2019, 08:49

TD-er wrote: 24 Aug 2019, 23:44 To answer the last question first, nope not yet.
And about the clock issue.
One thing that will work for sure, is using a GPS module.
I don't know if there is a RTC module supported. (so assume it isn't)
If somebody implements plugin callable "settime()" function into ESPEasy core and time related functions will work with disabled NTP state, than i can update my DS3231 plugin. (Which did not work from last year october when the time related core functions changed.)
https://github.com/letscontrolit/ESPEas ... DS3231.ino

mackowiakp
Normal user
Posts: 527
Joined: 07 Jun 2018, 06:47
Location: Gdynia/Poland

Re: Standalone mode

#4 Post by mackowiakp » 25 Aug 2019, 08:55

Yep. But using GPS module is extremely expensive comparing to RTC module, witch costs a few cents. Additionally, such RTC`s in most cases have on-board 4k or 8k EEPROM, available on other I2C address. Of course, such EEPROM is not equivalent to "real" NVRAM but is is enough to store several parameter in case of reboot or power failure.
Anyway, be so kind treat it as a kind of "future request".

TD-er
Core team member
Posts: 8643
Joined: 01 Sep 2017, 22:13
Location: the Netherlands
Contact:

Re: Standalone mode

#5 Post by TD-er » 25 Aug 2019, 20:18

Do you have a link for such a RTC module with also I2C EEPROM?

Shardan
Normal user
Posts: 1156
Joined: 03 Sep 2016, 23:27
Location: Bielefeld / Germany

Re: Standalone mode

#6 Post by Shardan » 25 Aug 2019, 20:30

Last edited by Shardan on 25 Aug 2019, 20:33, edited 1 time in total.
Regards
Shardan

mackowiakp
Normal user
Posts: 527
Joined: 07 Jun 2018, 06:47
Location: Gdynia/Poland

Re: Standalone mode

#7 Post by mackowiakp » 25 Aug 2019, 20:32

So You have:
https://botland.com.pl/pl/moduly-rtc/12 ... iecia.html

Sorry, it is in Polish language, so use G-translator. It costs appx 1,2 Euro and have 32k of EEPROM. I use similar in my RPi but with 4k EEPROM (oldest one). It works properly (both RTC and EEPROM) with Python based driver.

TD-er
Core team member
Posts: 8643
Joined: 01 Sep 2017, 22:13
Location: the Netherlands
Contact:

Re: Standalone mode

#8 Post by TD-er » 25 Aug 2019, 20:39

So the Ali link https://www.aliexpress.com/item/1876368 ... lsrc=aw.ds

@enesbcs Is this one also compatible with your playground plugin?

mackowiakp
Normal user
Posts: 527
Joined: 07 Jun 2018, 06:47
Location: Gdynia/Poland

Re: Standalone mode

#9 Post by mackowiakp » 25 Aug 2019, 20:46

And sample of Arduino lib for RTC and EEPROM

https://github.com/fstimer/RTCLib

TD-er
Core team member
Posts: 8643
Joined: 01 Sep 2017, 22:13
Location: the Netherlands
Contact:

Re: Standalone mode

#10 Post by TD-er » 25 Aug 2019, 20:54

If the EEPROM is just another I2C device on the bus, then it should be no problem.

mackowiakp
Normal user
Posts: 527
Joined: 07 Jun 2018, 06:47
Location: Gdynia/Poland

Re: Standalone mode

#11 Post by mackowiakp » 25 Aug 2019, 21:00

Yes, it is totally separated. Except power supply of course and I2C bus.

User avatar
enesbcs
Normal user
Posts: 587
Joined: 18 Jun 2017, 11:02
Location: Békéscsaba, Hungary
Contact:

Re: Standalone mode

#12 Post by enesbcs » 25 Aug 2019, 22:25

TD-er wrote: 25 Aug 2019, 20:39 So the Ali link https://www.aliexpress.com/item/1876368 ... lsrc=aw.ds

@enesbcs Is this one also compatible with your playground plugin?
Not exactly. The DS1307 that you have linked is another type, i was unable to make it work with the same library as the DS3231 (altough there are several implications that these devices are compatible), so i've made two separated experimental plugin for testing:
https://github.com/enesbcs/ESPEasyPlugi ... DS1307.ino
https://github.com/enesbcs/ESPEasyPlugi ... DS3231.ino
The RTCLib that mackowiakp posted may solve the compatiblity issue.
Also the DS3231 is more accurate so there are no real reason to use DS1307.

The latest ESPEasy build that this plugin will compile is 2018.10.01 (version from 2018.10.18 may also work, as settime() function disappeared at 2018.Oct.19, and timestruct changed on 2018.Oct.26)

mackowiakp
Normal user
Posts: 527
Joined: 07 Jun 2018, 06:47
Location: Gdynia/Poland

Re: Standalone mode

#13 Post by mackowiakp » 26 Aug 2019, 07:03

Yes. DS3231 is more accurate then DS1307. Even I found out DS3231 based module which has better quality of quartz oscillator that guarantee 2 sec per year accuracy (as docu stands). I really dont believe in that "2 sec per year" but for sure DS3231 is better than DS1307. In case of my RPi equipped with DS1307, Python driver has possibility to enter (directly in py code) "constant drift" of RTC module. It is weekly or daily difference between RTC and real time. It strongly depends on the given RTC module and is more or less constant in room temperature. In my case it is "minus 1,6 sec per day".

TD-er
Core team member
Posts: 8643
Joined: 01 Sep 2017, 22:13
Location: the Netherlands
Contact:

Re: Standalone mode

#14 Post by TD-er » 26 Aug 2019, 09:18

So I will add this one to my queue of items on their way from Ali Express.

mackowiakp
Normal user
Posts: 527
Joined: 07 Jun 2018, 06:47
Location: Gdynia/Poland

Re: Standalone mode

#15 Post by mackowiakp » 26 Aug 2019, 14:15

I just bought similar one, in the shop near my house. Probably the same origin. That is O-CNN Company (Original China No-Name) :lol:

epost
Normal user
Posts: 33
Joined: 09 Feb 2018, 20:04

Re: Standalone mode

#16 Post by epost » 26 Aug 2019, 16:30

Pay attention!!. Do use a rechargeable Lithium battery.
A normal battery is inflated during charging.
(Or remove the diode from the circuit board)

mackowiakp
Normal user
Posts: 527
Joined: 07 Jun 2018, 06:47
Location: Gdynia/Poland

Re: Standalone mode

#17 Post by mackowiakp » 26 Aug 2019, 16:54

Yes, I know. I had little explosion few months ego. Thanks God, I have no Tesla car or electric bike. Its because I could have a fire under ... well ... a certain place.

TD-er
Core team member
Posts: 8643
Joined: 01 Sep 2017, 22:13
Location: the Netherlands
Contact:

Re: Standalone mode

#18 Post by TD-er » 27 Aug 2019, 00:40

mackowiakp wrote: 26 Aug 2019, 16:54 Yes, I know. I had little explosion few months ego. Thanks God, I have no Tesla car or electric bike. Its because I could have a fire under ... well ... a certain place.
As we say in Dutch: "Wie zijn billen brandt, moet op de blaren zitten" :)

mackowiakp
Normal user
Posts: 527
Joined: 07 Jun 2018, 06:47
Location: Gdynia/Poland

Re: Standalone mode

#19 Post by mackowiakp » 27 Aug 2019, 08:29

:D . G-Translator works properly !

Post Reply

Who is online

Users browsing this forum: Ahrefs [Bot] and 32 guests