%sysday% not working?

Moderators: grovkillen, Stuntteam, TD-er

Post Reply
Message
Author
rayE
Normal user
Posts: 122
Joined: 12 Oct 2017, 12:53
Location: Philippines

%sysday% not working?

#1 Post by rayE » 07 Nov 2017, 09:39

Hi All,
%systime% works OK and returns HH:MM:SS but i get nothing back with %sysday% or %sysmonth%

GIT version: v2.0.0-dev12

Triggered from timer1 in system boot. Rule below.

Code: Select all

On Rules#Timer=1 do                                // When Timer1 expires, do
    GPIO,5,1                                              // Turn SerialIRQ ON 
    $Time=%systime%                                 // Send this comment out to serial
    $Day=%sysday%                                    // Send this comment out to serial 
    $Month=%sysmonth%                            // Send this comment out to serial  
    Delay 100                                            // Delay 100mS                             
    GPIO,5,0                                             // Turn SerialIRQ OFF
    timerSet,1,10                                     // Set Timer 1 for the next event in 60 second
endon
TIA
Ray

User avatar
vader
Normal user
Posts: 241
Joined: 21 Mar 2017, 17:35

Re: %sysday% not working?

#2 Post by vader » 07 Nov 2017, 11:17

Tested and works. Returns 07 and 11 today. See source code...

newString.replace(F("%sysname%"), Settings.Name);
newString.replace(F("%systime%"), getTimeString(':'));
newString.replace(F("%syshour%"), getHourString());
newString.replace(F("%sysmin%"), getMinuteString());
newString.replace(F("%syssec%"), getSecondString());
newString.replace(F("%sysday%"), getDayString());
newString.replace(F("%sysmonth%"), getMonthString());
newString.replace(F("%sysyear%"), getYearString());
newString.replace(F("%sysyears%"), getYearStringShort());
newString.replace(F("%uptime%"), String(wdcounter / 2));

rayE
Normal user
Posts: 122
Joined: 12 Oct 2017, 12:53
Location: Philippines

Re: %sysday% not working?

#3 Post by rayE » 07 Nov 2017, 12:11

Hi Vadar,
Are you using v2.0.0-dev12?

Thanks
Ray

User avatar
vader
Normal user
Posts: 241
Joined: 21 Mar 2017, 17:35

Re: %sysday% not working?

#4 Post by vader » 07 Nov 2017, 13:09

Yep. Self-compiled version with sources from GIT.

%sysday%.%sysmonth%.%sysyear%
HELLO

on OLED shows this:
Attachments
Display.jpg
Display.jpg (12.06 KiB) Viewed 2743 times

rayE
Normal user
Posts: 122
Joined: 12 Oct 2017, 12:53
Location: Philippines

Re: %sysday% not working?

#5 Post by rayE » 07 Nov 2017, 13:43

newString.replace(F("%sysname%"), Settings.Name);
newString.replace(F("%systime%"), getTimeString(':'));
newString.replace(F("%syshour%"), getHourString());
newString.replace(F("%sysmin%"), getMinuteString());
newString.replace(F("%syssec%"), getSecondString());
newString.replace(F("%sysday%"), getDayString());
newString.replace(F("%sysmonth%"), getMonthString());
newString.replace(F("%sysyear%"), getYearString());
newString.replace(F("%sysyears%"), getYearStringShort());
newString.replace(F("%uptime%"), String(wdcounter / 2));
All that works on mine from the list above is............
sysname
systime
uptime

I have searched all the source files in V2.0.0 dev12 and can find no reference to the non working sys names. Is the code snippet you posted in the Misc.ino file?

Cheers
Ray

rayE
Normal user
Posts: 122
Joined: 12 Oct 2017, 12:53
Location: Philippines

Re: %sysday% not working?

#6 Post by rayE » 07 Nov 2017, 13:46

AH self compiled version :-)

i don't suppose you could be a real star and share your compiled version with me? im a newby and have not gone down the "build road" yet. If you could id send you a "virtual" cold beer :-)

Ray

jjansen
Normal user
Posts: 20
Joined: 17 Oct 2016, 14:20

Re: %sysday% not working?

#7 Post by jjansen » 07 Nov 2017, 14:48

Are you sure a date is present in the system? Is NTP-time enabled in settings?

rayE
Normal user
Posts: 122
Joined: 12 Oct 2017, 12:53
Location: Philippines

Re: %sysday% not working?

#8 Post by rayE » 07 Nov 2017, 14:59

Hi,
Yes NTP is enabled and i can get %systime%. I have searched all the source files in V2.0.0 dev12 and can find no reference to the non working sys names. Im guessing %sysdate% etc is supposed to be in Misc.ino file?

Ray

jjansen
Normal user
Posts: 20
Joined: 17 Oct 2016, 14:20

Re: %sysday% not working?

#9 Post by jjansen » 07 Nov 2017, 16:32

Yes, misc.ino line 1726
https://github.com/letscontrolit/ESPEas ... .ino#L1726


But only submitted so long ago... https://github.com/letscontrolit/ESPEasy/pull/485
So I guess it is not included in your version.

User avatar
vader
Normal user
Posts: 241
Joined: 21 Mar 2017, 17:35

Re: %sysday% not working?

#10 Post by vader » 07 Nov 2017, 18:36

jjansen wrote:
07 Nov 2017, 16:32
Yes, misc.ino line 1726
https://github.com/letscontrolit/ESPEas ... .ino#L1726


But only submitted so long ago... https://github.com/letscontrolit/ESPEasy/pull/485
So I guess it is not included in your version.
1. That's the same as I already posted in #2!
2. How would you explain, that it works with my version from GIT? See #4
3. You wrote: Are you sure a date is present in the system? Is NTP-time enabled in settings?
Read #1: %systime% works OK and returns HH:MM:SS

You should read all posts first before answering!

jjansen
Normal user
Posts: 20
Joined: 17 Oct 2016, 14:20

Re: %sysday% not working?

#11 Post by jjansen » 07 Nov 2017, 20:35

vader wrote:
07 Nov 2017, 18:36
jjansen wrote:
07 Nov 2017, 16:32
Yes, misc.ino line 1726
https://github.com/letscontrolit/ESPEas ... .ino#L1726


But only submitted so long ago... https://github.com/letscontrolit/ESPEasy/pull/485
So I guess it is not included in your version.
1. That's the same as I already posted in #2!
2. How would you explain, that it works with my version from GIT? See #4
3. You wrote: Are you sure a date is present in the system? Is NTP-time enabled in settings?
Read #1: %systime% works OK and returns HH:MM:SS

You should read all posts first before answering!
Oh, I did.
1. rayE responded to that with
I have searched all the source files in V2.0.0 dev12 and can find no reference to the non working sys names. Im guessing %sysdate% etc is supposed to be in Misc.ino file?
Apparently it is not in his source files.
2. I guess rayE uses the dev12 release downloaded from https://github.com/letscontrolit/ESPEas ... .0.0-dev12. You use the last source from github?
3. Fair enough, just to be sure...

User avatar
vader
Normal user
Posts: 241
Joined: 21 Mar 2017, 17:35

Re: %sysday% not working?

#12 Post by vader » 07 Nov 2017, 21:31

Yep, that's the same source I compiled my version from. It's in the Misc.ino, as you already know... ;)

rayE
Normal user
Posts: 122
Joined: 12 Oct 2017, 12:53
Location: Philippines

Re: %sysday% not working?

#13 Post by rayE » 07 Nov 2017, 23:56

Thanks for the help from you BOTH. I will go down the "build" road today and fix the issue.

@ Vandar, Having never used GTI or compiled my own version of ESP Easy the question i posted may have seemed DUMB but we have all been there at one point, correct!

Anyway thanks again.
Ray

adval40
Normal user
Posts: 23
Joined: 04 Apr 2017, 23:14

Re: %sysday% not working?

#14 Post by adval40 » 08 Nov 2017, 00:39

I have found my problem

i didn't have the mega version

rayE
Normal user
Posts: 122
Joined: 12 Oct 2017, 12:53
Location: Philippines

Re: %sysday% not working?

#15 Post by rayE » 08 Nov 2017, 08:29

Hi,
Well i went down the build path and followed the instructions exactly................Atom/Platformio is the MOST BUGGY and HORRIBLE installation i have EVER performed (Win7 64). It took 3 attempts before it "felt" like it "may" be working, Even the uninstall procedure is pretty "wild". BUT after much swearing and at least 6 computer "CRASHES" and 4 hours it now somehow seems to work and i just performed my first successful build :-)

And by the way i now have the system vars i was originally looking for. If anyone wants a copy of the build 2.0.0 V12_Normal_4096 with the added system vars then just ask.

Ray

bthome
Normal user
Posts: 1
Joined: 20 Nov 2017, 18:35

Re: %sysday% not working?

#16 Post by bthome » 20 Nov 2017, 18:41

rayE wrote:
08 Nov 2017, 08:29
Hi,
Well i went down the build path and followed the instructions exactly................Atom/Platformio is the MOST BUGGY and HORRIBLE installation i have EVER performed (Win7 64). It took 3 attempts before it "felt" like it "may" be working, Even the uninstall procedure is pretty "wild". BUT after much swearing and at least 6 computer "CRASHES" and 4 hours it now somehow seems to work and i just performed my first successful build :-)

And by the way i now have the system vars i was originally looking for. If anyone wants a copy of the build 2.0.0 V12_Normal_4096 with the added system vars then just ask.

Ray
@rayE Would appreciate a link to your build or your best instructions on how to build. Would be nice if this could be put together in a Docker. :-)

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

Re: %sysday% not working?

#17 Post by TD-er » 20 Nov 2017, 19:32

In my experience it is best to disable the virusscanner during install of PlatformIO

speedie
Normal user
Posts: 1
Joined: 23 Nov 2017, 11:22

Re: %sysday% not working?

#18 Post by speedie » 23 Nov 2017, 11:35

Ray can you share your working copy of the build 2.0.0 V12?

Post Reply

Who is online

Users browsing this forum: No registered users and 19 guests