Posts: 164
Threads: 12
Likes Received: 14 in 14 posts
Likes Received: 14 in 14 posts
Reputation:
14
Joined: Oct 2021
Country:
Rob what should i try? i don't have AC outlet connected to the controller.
Posts: 3,251
Threads: 90
Likes Received: 163 in 120 posts
Likes Received: 163 in 120 posts
Reputation:
184
Joined: Sep 2015
Country:
Well I really messed up 6.4 with the RTC and obviously didn't do enough testing. I now see a schedule set for now is being calculated as May 1 so slight delay before it triggers. I'm going to sort this out today and will send out 6.5 as it's ready. I'll post when it's done.
With that said it means issues for some if you're running Bullseye so maybe best to do a fresh install using Buster as that's what files will be compiled for going forward. I didn't realize Buster vs Bullseye was a problem. I've been recommend Buster is better choice as it's stable.
Posts: 3,251
Threads: 90
Likes Received: 163 in 120 posts
Likes Received: 163 in 120 posts
Reputation:
184
Joined: Sep 2015
Country:
Thanks Gandalf, it's ok, I definitely messed up with RTC. How are you're dosing schedules running?
EDIT: Just discovered scheduling time was correct until I added the extra month an hour ago so current users schedules should be ok.
Posts: 8
Threads: 0
Likes Received: 1 in 1 posts
Likes Received: 1 in 1 posts
Reputation:
1
Joined: Mar 2022
Country:
Sounds good Rob.
In the mean time I will throw in my Reef-Pi SD card until you get it sorted out and switch back with a fresh install of 6.4/5 on Buster when you say to try it.
Posts: 3,251
Threads: 90
Likes Received: 163 in 120 posts
Likes Received: 163 in 120 posts
Reputation:
184
Joined: Sep 2015
Country:
I do have the problem solved if you wanted to stay lol... This will save a reformat today but still needs to be done. You can do that now for 6.4 then you just need to recompile the startup.cpp and robotank.cpp files. That's the only difference for Buster and Bullseye, the c++ programs need to be compiled for each one.
Undo that other mod I mentioned in the rtc.h file.
Instead edit the schedules.h file.
Find line 724 which should be this.
std::string date = to_string(rtc.getCurrentYear()) + "-" + to_string(rtc.getCurrentMonth()) + "-" + to_string(rtc.getCurrentDay());
Replace that line with this.
std::string date = to_string(rtc.getCurrentYear()) + "-" + to_string(rtc.getCurrentMonth()+1) + "-" + to_string(rtc.getCurrentDay());
Then recompile the robotank.cpp file.
If you want a schedule to run every day you need to check each weekday box, there is a problem with X number of days when you use 1, it does 2 days. If you put 2 days or more it's ok so just another thing I didn't realize. So yeah today just ignore that.
Posts: 164
Threads: 12
Likes Received: 14 in 14 posts
Likes Received: 14 in 14 posts
Reputation:
14
Joined: Oct 2021
Country:
scheduling seems ok but i've compiled the updated RTC file only a couple of hours ago, next schedule is at 00:10 so i don't know if will run.
if you fix, please send the update file before the next release so that i can fix the scheduling
Posts: 3,251
Threads: 90
Likes Received: 163 in 120 posts
Likes Received: 163 in 120 posts
Reputation:
184
Joined: Sep 2015
Country:
You're ok, it was only my mod an hour ago that would have messed it up. If you did add that undo it or there will be a problem. Next schedule should run fine. You can apply the mod in my last post if you like, that sorts out the month when a new schedule is saved. The month number was the same throughout as was the currentWeekday.
Posts: 164
Threads: 12
Likes Received: 14 in 14 posts
Likes Received: 14 in 14 posts
Reputation:
14
Joined: Oct 2021
Country:
yes, ive already fixed the month
Posts: 3,251
Threads: 90
Likes Received: 163 in 120 posts
Likes Received: 163 in 120 posts
Reputation:
184
Joined: Sep 2015
Country:
When the c++ program starts and all that data is printed if you look at the schedule section it will look something like this.
readSchedules--------------------------------
totalSchedules - 2
scheduleID ----- 10, 8,
scheduleName ----- test, tsstrs,
scheduleTypeID ----- 2, 1,
scheduleRuleID ----- 0, 0,
schedulePinID ----- 36, 5,
scheduleOffOn ----- 0, 1,
scheduleStart ----- 10800, 41100,
scheduleSun ----- 1, 1,
scheduleMon ----- 1, 1,
scheduleTue ----- 1, 1,
scheduleWed ----- 1, 1,
scheduleThu ----- 1, 1,
scheduleFri ----- 1, 1,
scheduleSat ----- 1, 1,
scheduleRepeatDays -- 0, 0,
scheduleEnabled ----- 1, 1,
scheduleEmail ----- 0, 0,
scheduleAlert ----- 0, 0,
scheduleCreated ----- 2022-03-31, 2022-03-31,
nextScheduleTimeStamp - 1648803600000, 1648833900000,
The last line is the next run time in milliseconds for each schedule found. If you copy that number into this website it translates quick so you can verify. This is how I verify things.
https://www.epochconverter.com/
Posts: 3,251
Threads: 90
Likes Received: 163 in 120 posts
Likes Received: 163 in 120 posts
Reputation:
184
Joined: Sep 2015
Country:
(03-31-2022, 11:31 AM)gandalf Wrote: yes, ive already fixed the month
But only in the schedules.h file, not the rtc.h file.
Posts: 164
Threads: 12
Likes Received: 14 in 14 posts
Likes Received: 14 in 14 posts
Reputation:
14
Joined: Oct 2021
Country:
yes, ive already fixed the month. so i have to revert and apply the fix wrote 3 post above here.
anyway, i'm using the Daily schedule with repeat every 1 day with no issue at all...
Posts: 3,251
Threads: 90
Likes Received: 163 in 120 posts
Likes Received: 163 in 120 posts
Reputation:
184
Joined: Sep 2015
Country:
Yeah make sure to do that, the schedules.h fixes the add new schedule problem, the rtc.h mod messed up the schedule calculations which is why I panicked posted thinking it was an issue since 6.4.
The repeat every 1 day is only an issue on first day it's set. After that it's ok. So yeah your first schedule wouldn't have run.
Posts: 164
Threads: 12
Likes Received: 14 in 14 posts
Likes Received: 14 in 14 posts
Reputation:
14
Joined: Oct 2021
Country:
03-31-2022, 11:43 AM
(This post was last modified: 03-31-2022, 11:44 AM by gandalf.)
so, the +1 in rtc.h has to be removed and we have to add the fix wrote above regarding schedules.h
(one of my patches show the next schedule set directly in the web interface, there is no need to use the epoch converter website :-D )
Posts: 3,251
Threads: 90
Likes Received: 163 in 120 posts
Likes Received: 163 in 120 posts
Reputation:
184
Joined: Sep 2015
Country:
Exactly, remove +1 in rtc.h and add +1 in the schedules.h.
LOL you beat me too it, that's something I need to do. The idea is a table that shows all schedules with their next upcoming time in that order. If that shows based on those millis it will for sure go off. :)
Posts: 3,251
Threads: 90
Likes Received: 163 in 120 posts
Likes Received: 163 in 120 posts
Reputation:
184
Joined: Sep 2015
Country:
I have a logging system in place now, every action will be logs so you can verify it happened, so I am doing some things. :)
Posts: 8
Threads: 0
Likes Received: 1 in 1 posts
Likes Received: 1 in 1 posts
Reputation:
1
Joined: Mar 2022
Country:
Done.
Schedules are working.
Posts: 3,251
Threads: 90
Likes Received: 163 in 120 posts
Likes Received: 163 in 120 posts
Reputation:
184
Joined: Sep 2015
Country:
Awesome, should be smoother from here after sorting out that Linux variant issue. Thanks for all your input, very helpful.
Posts: 164
Threads: 12
Likes Received: 14 in 14 posts
Likes Received: 14 in 14 posts
Reputation:
14
Joined: Oct 2021
Country:
04-02-2022, 06:59 AM
(This post was last modified: 04-02-2022, 07:05 AM by gandalf.)
Rob, I think that after commenting the 1wire modules from the /boot/config.txt keeping only gpiopin 4 and 22, one of my temp sensor stop to work.
Fixed. has to be "dtoverlay=w1-gpio,gpiopin=23" and not "dtoverlay=w1-gpio,gpiopin=22" (the install script is broken as it write 22)
Posts: 3,251
Threads: 90
Likes Received: 163 in 120 posts
Likes Received: 163 in 120 posts
Reputation:
184
Joined: Sep 2015
Country:
Thanks for letting me know. The install script does default pins for v3 controller but when you selected v2 in app it should have replaced that.
Posts: 107
Threads: 18
Likes Received: 15 in 14 posts
Likes Received: 15 in 14 posts
Reputation:
15
Joined: Nov 2019
Country:
How can I use both versions of the old reffpi and the new version 6.4 at the same time. Because the new version is not yet fully functional
|