espeasy sonoff pulse counter Metern

megamarco83
Posts: 97
Joined: Tue Apr 14, 2015 9:25 am

Re: espeasy sonoff pulse counter Metern

Post by megamarco83 » Sun Dec 01, 2019 1:54 pm

hi JM, thanks for patience and reply, but it's not a matter of lazy, but the problem is how to use the wiki, that, for me, are not so clear.
i mean, i tested after the timer the command:

Code: Select all

systemctl list-timers
NEXT                         LEFT          LAST                         PASSED   UNIT                         ACTIVATES
Sun 2019-12-01 14:09:00 CET  23min left    Sun 2019-12-01 13:39:01 CET  6min ago phpsessionclean.timer        phpsessionclean.service
Sun 2019-12-01 16:26:24 CET  2h 41min left Sat 2019-11-30 21:54:01 CET  15h ago  apt-daily.timer              apt-daily.service
Sun 2019-12-01 20:36:41 CET  6h left       Sat 2019-11-30 20:36:41 CET  17h ago  systemd-tmpfiles-clean.timer systemd-tmpfiles-clean.service
Mon 2019-12-02 06:37:28 CET  16h left      Sun 2019-12-01 06:14:11 CET  7h ago   apt-daily-upgrade.timer      apt-daily-upgrade.service

4 timers listed.
Pass --all to see loaded but inactive timers, too.
and i expect to see ping_metern.

so i try to very if the process was running with pid, so i used "old" pgrep command.

anyway i also tested yout suggestion:

Code: Select all

pi@raspberrypi:~ $ systemctl status ping_metern.timer
● ping_metern.timer - ping_metern
   Loaded: loaded (/etc/systemd/system/ping_metern.timer; enabled; vendor preset
   Active: inactive (dead)
lines 1-3/3 (END)...skipping...
● ping_metern.timer - ping_metern
   Loaded: loaded (/etc/systemd/system/ping_metern.timer; enabled; vendor preset: enabled)
   Active: inactive (dead)
~
~
it seams that is not active...but i do not understand why....
when i create the timer i used:
sudo nano /etc/systemd/system/ping_metern.timer
coudl be "sudo" the problem? or some owner / chmod ?

Code: Select all

[Unit]
Description=ping_metern

[Timer]
OnBootSec=1min
#OnCalendar=5min
OnUnitActiveSec=5min
Unit=ping_metern.service

[Install]
WantedBy=multi-user.target
i also check

Code: Select all

pi@raspberrypi:~ $ systemctl status ping_metern.timer
● ping_metern.timer - ping_metern
   Loaded: loaded (/etc/systemd/system/ping_metern.timer; enabled; vendor preset: enabled)
   Active: inactive (dead)
but i do not understand wjy is inactive....

maybe i need to change the timer using:

minutely → *-*-* *:*:00

jeanmarc
Posts: 1866
Joined: Thu Aug 29, 2013 7:16 am

Re: espeasy sonoff pulse counter Metern

Post by jeanmarc » Sun Dec 01, 2019 3:21 pm

sorry if i sound rude but it's time consumming. Give me a temporary access to your logger (PM me details) if you wish more help.

Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest