• 10 dec 2017: forum version update. In case of issues use this topic.
  • 30 nov 2017: pilight moved servers. In case of issues use this topic.
Hello There, Guest! Login Register

Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Time math compilation error
Hopefully this is the right forum part:

Running pilight V6 stable:
I followed the instructions on the wiki regarding the 3rd PARTY add on 'time math'.
Three operators objects files are generated OK, but

gcc -fPIC -shared libs/protocols/newdatetime.c -Ilibs/pilight -Ilibs/config -o newdatetime.so -DMODULE=1
returns the error:
libs/protocols/newdatetime.c: In function ‘getntptime’:
libs/protocols/newdatetime.c:125:2: error: too many arguments to function ‘host2ip’
libs/pilight/common.h:29:7: note: declared here
libs/protocols/newdatetime.c:125:33: warning: comparison between pointer and integer [enabled by default]
as a result newdatetime.so is not generated.

Someone has a clue or can send me the newdatetime.so (raspi B)?
This is not a bug. Please read tutorials carefully.
The time math tutorial states under "compatibility" that you need the development version of pilight and you say you are using the stable.
OK, I will use the development version and try again.

BTW: on the wiki - http://wiki.pilight.org/doku.php/time_math_tutorial (which I have read indeed) the master is mentioned:

Download the source code of pilight-time-stuf:
root@raspi2:/home/pi/pilight# git clone --depth 5 -b master https://github.com/n

Note that the development branch:
pilight-daemon version 6.0, commit 2eec25d
gives the following error:

gcc -fPIC -shared libs/protocols/newdatetime.c -Ilibs/pilight -Ilibs/config -o newdatetime.so -DMODULE=1
libs/protocols/newdatetime.c: In function ‘newdatetimeParse’:
libs/protocols/newdatetime.c:354:5: error: too few arguments to function ‘pilight.broadcast’

Any tips?
You are right. I see now that others have rewritten parts of the tutorial without my knowledgeConfused

My advice is not just to download the source code, but to actually install the development version. That is the way I do it and I have no problems with installation of the time math modules.

However, I will try to reproduce the error you are getting.
In one or more of the recent commits, there have been changes that affect the newdatetime protocol. Due to this, the current version of newdatetime is incompatible with these commits. I will provide an updated version on github. asap.

Thanks for reporting this issue.
No problem, hopefully there is an easy fix ...
It should be fixed now. Please try again.
Many thanx: it's working now!!

Possibly Related Threads...
Thread Author Replies Views Last Post
  Sunset state check parse error dennisvo 6 456 09-27-2019, 08:34 PM
Last Post: curlymo
  [8.1.2] variables in rules -> error terrar 1 548 09-14-2018, 05:28 PM
Last Post: curlymo
  Can't switch Relay device by rules: Error switch.lua:77 wobbi 6 1,070 07-31-2018, 06:25 AM
Last Post: curlymo
  Error in Actions with 8.1.0 tomk 1 774 05-30-2018, 06:20 AM
Last Post: curlymo
  Rule executed at wrong time philipp81 1 960 02-25-2017, 10:43 PM
Last Post: curlymo
  [Solved ]Turn off device at random time manmetdehamer 4 2,198 07-27-2016, 03:35 PM
Last Post: manmetdehamer
  event at randomized time after another event Emiks5 3 1,603 05-07-2016, 09:10 AM
Last Post: Thunder84
  Time interval between two rule checks muecke 3 1,931 04-21-2016, 02:31 PM
Last Post: pilino1234
  ERROR: rule #21 invalid: variable "label" of device "WindMax" cannot be used in even koos147 2 1,911 04-02-2016, 10:24 PM
Last Post: koos147
  Triggering device at specific time or sunrise if sunrise is after OrTiN 3 1,690 03-24-2016, 11:11 PM
Last Post: OrTiN

Forum Jump:

Browsing: 1 Guest(s)