RPi 2(RTC module): from unruly Stepchild to Wunderkind

  • It doesn't change files. The reboot just writes the data to disk once a week. You can use whatever interval you want but I am doing it weekly. The flash plugin (folder2ram) does not write to disk until there is a reboot. So if you have a power failure the data is lost. The reboot once a week would insure that you could not loose more then 7 days of data. It at least prevents big gaps in the graphs. When I was first using the RTC module I lost 3 months of graphs one time on power failure. That is why I am doing the weekly reboot.

    • Offizieller Beitrag

    Why not folder2ram -syncall daily or once a week from the scheduled tasks thread instead of rebooting? Rebooting is Windows thinking :D

    omv 7.0.4-2 sandworm | 64 bit | 6.5 proxmox kernel

    plugins :: omvextrasorg 7.0 | kvm 7.0.10 | compose 7.1.2 | k8s 7.0-6 | cputemp 7.0 | mergerfs 7.0.3


    omv-extras.org plugins source code and issue tracker - github


    Please try ctrl-shift-R and read this before posting a question.

    Please put your OMV system details in your signature.
    Please don't PM for support... Too many PMs!

  • We discussed this in another thread. I forgot. My pi still has OMV 1. :(


    I just checked if there was a feature like this in fs2ram. Nadda. Aaron is right though. That would be a better method for OMV 2 and up.
    The thing is running flawlessly for my needs and don't feel like messing with it.

  • Hi there,
    when trying to follow your steps, I get an error when installing i2c-tools:
    /run/udev or .udevdb or .udev presence implies active udev. Aborting MAKEDEV invocation.


    "lsmod | grep i2c" gives as output:
    i2c_dev 6386 0
    i2c_bcm2708 5988 0


    I'm using RPi1 B+. Any idea whats wrong?

  • Hi there,
    when trying to follow your steps, I get an error when installing i2c-tools:
    /run/udev or .udevdb or .udev presence implies active udev. Aborting MAKEDEV invocation.


    Hi badda and tekkb - I have just installed an RTC On my RPI 2 and am getting the same problem:


    Unpacking i2c-tools (from .../i2c-tools_3.1.1+svn-1_armhf.deb) ...
    Processing triggers for man-db ...
    Setting up i2c-tools (3.1.1+svn-1) ...
    /run/udev or .udevdb or .udev presence implies active udev. Aborting MAKEDEV invocation.


    A quick search on the internet suggests something has changed in Jessy which is leaving i2c-dev not loaded even if you set it on raspi-config. You can start it manually using "modprobe i2c-dev" but not clear yet how to make it start by itself. I will check the RTC is working then do a reboot and see what happens.

  • I rebooted, it wasn't started so checked RPi forum again and this says to add "i2c_arm=on" to /boot/config.txt. Did this and rebooted and I still cannot talk to the RTC without the modprobe command being done manually. Since I re-enabled using the time server after fitting the RTC, the date which is currently 5 JUN 2016 09:25 or so shows Tue Jun 2 19:45:11 BST 2015. Doh!


    EDIT: OK as far as the wrong date is concerned, I redid the instructions on the very first page of this topic and that sorted it out (messing with RTP on the front panel obviously did something bad!). Now to try another reboot!


    EDIT2: Restart and i2c commands still don't work but I have the correct date and time. Is OMV taking notice of the RTC anyway or is there still an extra something to be done?


    EDIT FINAL: Now I did the more detailed instructions on the first page and it appears that everything works fine now. Thanks tekkb! :)

  • Sorry to cross post but I think my question is best answered in this thread


    I am struggling with getting the RTC module working properly and system time/date changes a number of times when OMV boots.


    I have followed the instructions on page 1 of this post a couple of times and I'm sure that I haven't missed anything
    I have installed the RTC module I think it is working fine as I can execute the command hwclock -r and it responds with the correct time.
    I can run the i2cdetect command and this also looks OK with either the 68 or UU showing in the output
    I can execute hwclock.sh and it works for all of the input parameters (show, start, stop, reload etc).


    When i boot the pi something is going wrong. During the boot process, date/time changes a few times. I noticed a ntpdate command in the boot sequence but I have removed ntpdate as per the guide. As the date is changing during boot, it causes an issue with


    after boot has completed, time is correct but the command hwclock -r fails with the error 'Cannot access the Hardware Clock via any known method'


    If i then execute hwclock.sh show it has a strange output the first time i run the command
    '/etc/init.d/hwclock.sh: 37: /etc/init.d/hwclock.sh: log_action_msg: not found' but then shows the time


    If i run the same command again it works fine. then if i execute hwclock -r this now works.


    any suggestions?

  • apt-get install ntpdate
    update-rc.d -f ntpdate remove
    apt-get remove ntpdate


    That should definitely get it out of the boot sequence.


    I just checked my RPi 2 for leftover runlevel symlinks. There was nothing there. So a normal removal of the ntdpate package removed them.

  • Thanks tekkb.


    Have tried the above suggestion and I still have the issue. I'm going to do a complete new install of OMV in the following order. Can you confirm correct order/process please?


    1. physical install of the RTC module to GPIO interface (plug in the RTC chip)
    2. wipe SD card and new install of OMV 2.2 using the latest download/build
    3. complete the RTC installation following your guide/instructions
    4. reboot and review start-up logs
    5. update OMV to latest build/version (using the package update section of OMV GUI)
    6. Install and configure plugin for OpenVPN
    7. reboot and review start-up logs
    8. install and configure plugin for apple networking
    9. reboot and review start-up logs

  • I have got to step 3 above and as soon as remove ntpdate (apt-get remove ntpdate) i get the same issue as I have had previously.


    i'm using the pre-built OMV image for Raspberry Pi 2 / 3 (omv_2.2.1_rpi2_rpi3.img.gz) from the OMV ISO downloads section.


    Is this where I am going wrong? Is there another way to install OMV such as install the OMV package onto a raspbian install?

  • have you tried a reboot of the pi and even then everything looks OK? I get a 2-3 system time changes during the boot sequence.


    Can you reboot the pi and then execute hwclock -r ?


    I have followed the instructions a number of times and still get the same issue.


    I have a Pi v3 (not v2).


    maybe it is possible that the RTC i have is faulty but i don't think so.

  • There was one other forum member using a RTC module. He was having an issue. The first RTC module he tried was not working. Luckily he bought more than one module. The 2nd one he tried worked. They are so cheap I would recommend everyone buy more than one just in case they get a faulty one.


    I am not saying yours is bad jata but just want to let you know one person on the forum had a bad one. Sorry I can't help much but the markets are moving. I'm busy making money.

  • OK thanks for all the help. It's just very frustrating as i thought i would be able to fix it. It would be good to know if the RTYC module is faulty so i will try another one. Another reason I am annoyed is that I have a half configured NAS (as I started by wiping my SD cared). Might buy another SD card for testing too. haha


    good luck making money!

  • to tekkb and all using this info,


    I think i have found a small error/improvement in hwclock.sh for the config outlined in this thread.


    I had an issue with hwclock not setting up correctly at boot. I traced the issue to when the function init_rtc_device is executed in hwclock.sh


    on this thread, hwclock.sh calls 'init_rtc_device' at the start of the script before the command 'unset TZ'


    It works better if init_rtc_device is called later - during the start section of the hwclocksh function. See below.


    after making this change, the hwclock works fine.


  • Okay if tested RTC Module for a while and also with a poweroff period of 3 weeks. Everythings works fine now. Perfekt, thank you for help tekkb!! The last entry did it!


    Greetings Elluminatus

    ______________________________________________________________________________________________________________
    OMV 1: Asrock Q1900M - 8 GB Ram - 320 GB Boot Disk - 3 * 3 TB WD RED Data
    OMV 4.1.6 - Kernel 4.16.0.0 | Plugins: n.n.

  • Hello everyone.
    I found script to read theperature from DS3231 here
    https://www.raspberrypi.org/fo…opic.php?t=59808&p=469353



    It works qite good.
    I would like to do a graph in OMV to read themperature from DS3231


    Does anyone know how to do this step by step ?

Jetzt mitmachen!

Sie haben noch kein Benutzerkonto auf unserer Seite? Registrieren Sie sich kostenlos und nehmen Sie an unserer Community teil!