Using the Real Time Clock on the Industrial I/O board

mhafele

New member
I'm using the industrial I/O board along with a node red interface in a remote application where there is no internet access (maple syrup collection and processing). In my node-red application I use influx db and graphana locally to track and trend temperatures and flows. I just realized this morning that the time on my PI4 was off and screwing up my data collection. I know that the Industrial I/O board has a real time clock and battery. Can this be used to keep time on my PI for data collection when I'm not connected to the internet? I'm not finding much for information on how to use it.
 

alexburcea

Moderator
Staff member
Hi,
Exactly for this kind of problem, we create a script that checks the Raspberry connection to the network time and uses Industrial RTC when not present.
Check the example on GitHub and let me know if fits your needs.
 

mhafele

New member
Thanks for the info Alex. I'm back looking at this. My application (running node red on a PI4) will be running with no outside internet connections. I think I can figure out how to update the PI time with the node red dashboard (haven't tried it yet) but how then do I utilize the real time clock and battery on the board to hold that time after manually setting?
 

mhafele

New member
when I run the script I get this:
mhafele@PI3:~/megaind-rpi/rtc $ ./set_time.sh
Network time not present use the RTC
date: invalid date ‘MEGA-IND id 0 not detected’
 
Top