• 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
problems compiling pilight on Odroid C2
#1
this thread is a copy of one that I posted on the dietpi forum

Guys, help is appreciated!

Goal is to run Homeassistant, in combination with pilight.
Homeassistant is installed successful and running.

pilight is compiled from source, but compiles with an error.
I followed the installation instructoin as decribed on this site
with this modification:

forum.odroid.com/viewtopic.php?t=27112

in additino, WiringX was installed

pilight runs anyway, can configure config.json, and can select Odroidc2 as board and pilight starts as a service.

Now, when I select 433GPIO as hardware, pilight does not start and I get an error.

back to the error when compiling±
The message I get is: "looking for libluajit - not found"

now, I checked, liblua5.3 and liblua5.3-dev are correctly installed, but apperantly libluajit is not, and I cant install it via apt-get

any suggestions?
I have the same configuration running on a RPi 1B+ so I can look things up..
 
Reply
#2
Problem was fixed.

Turned out WiringX needed to be compiled from source:
forum.odroid.com/viewtopic.php?f=115&t=7533

after this pilight could be installed through apt-get see pilight installation instruction

compiling piligth from source was no success, resulting in lubluajit not being found

solution is not tested yet, since nothing is hooked up to GPIO at the moment.
 
Reply
#3
Problem was not solved, pilight was running but not detected by homeassistant.

re-installed odroid and compiled wiringX from source

installation of pilight through apt-get fails, I get the report that the repository does not support aarch64 architecture of the odroid.

now, installing pilight from source, master or development branch gives

CMake Error at CMakeLists.txt:307 (message):

  Looking for libluajit - not found

now, trying to compile libluajit for aarch64 from
luajit.org/install.html
or from
github.com/cbaylis/luajit-aarch64
but that gives the error

lj_arch.h:55:2: error: #error "No support for this architecture (yet)"

 #error "No support for this architecture (yet)"

next, download aarch64-v2.1 branch from github.com/cbaylis/luajit-aarch64
compiles and installs fine

install pilight again:
CMake Error at CMakeLists.txt:307 (message):

  Looking for libluajit - not found

so.... stuck again...
will keep you posted for result
 
Reply
#4
still no success, but below the full order of installation for Odroid C2

wiringX:

Code:
sudo apt-get install build-essential cmake git dialog
git clone --depth 5 -b master github.com/pilight/pilight.git

cd wiringX
mkdir build
cd build
cmake ..
make

cpack -G DEB
dpkg -i libwiringx*.deb


pilight
Code:
apt-get install libpcap0.8 libpcap0.8-dev libmbedtls10 libmbedtls-dev libmbedx509-0 libmbedcrypto0 liblua5.1 liblua5.1-dev libunwind-dev
apt-get -t stretch-backports install libluajit-5.1

git clone --depth 5 -b master github.com/pilight/pilight.git

cd pilight
mkdir build
cd build
cmake .. -DCMAKE_C_FLAGS=-fomit-frame-pointer
make install

ldconfig
service pilight start
service pilight stop


in case of libluajit error during CMake:

check CMakeList.txt and compare to /usr/lib/aarch64-linux-gnu/ for the correct file reference
in CMakeList.txt the referene is to libluajit-5.1, so if you install libluajit-5.1.2 it wont find the library

in case of compile error during make install:

change
lua.h reference in 
pilight/libs/pilight/lua/lua.h
to
/usr/include/lua5.1/lua.h
to to lua5.3/lua.h in the case you installed the package liblua5.3
 
Reply
#5
indication of the problem: 
when I look at the Daemon on my RPi B+ it looks like this:

Code:
● pilight.service - pilight
  Loaded: loaded (/etc/systemd/system/pilight.service; enabled; vendor preset: enabled)
  Active: active (running) since Sun 2018-07-22 17:17:27 CEST; 2 days ago
 Process: 235 ExecStart=/usr/local/sbin/pilight-daemon (code=exited, status=0/SUCCESS)
Main PID: 598 (pilight-daemon)
  CGroup: /system.slice/pilight.service
          └─598 /usr/local/sbin/pilight-daemon

While on the OdroidC2 it looks like this
Code:
● pilight.service - LSB: Starts pilight-daemon
  Loaded: loaded (/etc/init.d/pilight; generated; vendor preset: enabled)
  Active: active (exited) since Sun 2018-07-22 12:45:24 BST; 2 days ago
    Docs: man:systemd-sysv-generator(8)
 Process: 463 ExecStart=/etc/init.d/pilight start (code=exited, status=0/SUCCESS)
  CGroup: /system.slice/pilight.service

it looks like on Pi the daemon is initiated from systemd while in the odroid it is from init.d
but now I really could use some help what is going wrong. Both run the latest version of DietPi
 
Reply
#6
You should start the pilight daemon in debug mode and check what's going on and why it won't start. Check the manual for more information.
 
Reply
#7
(07-24-2018, 08:35 PM)curlymo Wrote: You should start the pilight daemon in debug mode and check what's going on and why it won't start. Check the manual for more information.

Thanx,
I get a lot of pilight-daemon: DEBUG messages and 1 pilight-daemon: ERROR: config is not in a valid json format


ill throw away current config.json and restart
 
Reply
#8
still same status: active (exited)
no new config.json file is created, error now is
pilight-daemon: ERROR: the config file /etc/pilight/config.json does not exist

made new file (blank)


now running pilight-daemon -D gives a lot of debug, but no errors, and the config.json is filled with more entries.

it now continuously gives 3 debug messages
debug: broadcasted...
debug: cpu..
debug: socket write succeeded

however: if I fall back to command prompt and look at 
service pilight status 
I still get status: active (exited)
 
Reply
#9
I'm not a WitchDoctor, so without posting some actual debug output i have no clue what you're talking about.
 
Reply
#10
(07-25-2018, 09:30 AM)curlymo Wrote: I'm not a WitchDoctor, so without posting some actual debug output i have no clue what you're talking about.

my bad.
upon reboot I found out that I had a working webinterface, so maybe success already. 
I did another pilight-daemon -D and this is the outcome
Code:
[Jul 25 20:30:14:609004] pilight-daemon: DEBUG: loaded event function /usr/local/lib/pilight/functions/random.lua v2.1
[Jul 25 20:30:14:609624] pilight-daemon: DEBUG: loaded event function /usr/local/lib/pilight/functions/date_format.lua v1.0
[Jul 25 20:30:14:610243] pilight-daemon: DEBUG: loaded event function /usr/local/lib/pilight/functions/date_add.lua v2.0
[Jul 25 20:30:14:610635] pilight-daemon: DEBUG: loaded event operator /usr/local/lib/pilight/operators/divide.lua v1.0
[Jul 25 20:30:14:610919] pilight-daemon: DEBUG: loaded event operator /usr/local/lib/pilight/operators/minus.lua v1.0
[Jul 25 20:30:14:611154] pilight-daemon: DEBUG: loaded event operator /usr/local/lib/pilight/operators/multiply.lua v1.0
[Jul 25 20:30:14:611375] pilight-daemon: DEBUG: loaded event operator /usr/local/lib/pilight/operators/eq.lua v1.0
[Jul 25 20:30:14:611584] pilight-daemon: DEBUG: loaded event operator /usr/local/lib/pilight/operators/lt.lua v1.0
[Jul 25 20:30:14:611855] pilight-daemon: DEBUG: loaded event operator /usr/local/lib/pilight/operators/gt.lua v1.0
[Jul 25 20:30:14:612078] pilight-daemon: DEBUG: loaded event operator /usr/local/lib/pilight/operators/plus.lua v1.0
[Jul 25 20:30:14:612311] pilight-daemon: DEBUG: loaded event operator /usr/local/lib/pilight/operators/or.lua v1.0
[Jul 25 20:30:14:612543] pilight-daemon: DEBUG: loaded event operator /usr/local/lib/pilight/operators/le.lua v1.0
[Jul 25 20:30:14:612857] pilight-daemon: DEBUG: loaded event operator /usr/local/lib/pilight/operators/intdivide.lua v1.0
[Jul 25 20:30:14:613393] pilight-daemon: DEBUG: loaded event operator /usr/local/lib/pilight/operators/and.lua v1.0
[Jul 25 20:30:14:613792] pilight-daemon: DEBUG: loaded event operator /usr/local/lib/pilight/operators/ge.lua v1.0
[Jul 25 20:30:14:614189] pilight-daemon: DEBUG: loaded event operator /usr/local/lib/pilight/operators/ne.lua v1.0
[Jul 25 20:30:14:614440] pilight-daemon: DEBUG: loaded event operator /usr/local/lib/pilight/operators/modulus.lua v1.0
[Jul 25 20:30:14:614636] pilight-daemon: DEBUG: loaded event operator /usr/local/lib/pilight/operators/concat.lua v1.0
[Jul 25 20:30:14:615239] pilight-daemon: DEBUG: loaded event action /usr/local/lib/pilight/actions/sendmail.lua v4.1
[Jul 25 20:30:14:616296] pilight-daemon: DEBUG: loaded event action /usr/local/lib/pilight/actions/switch.lua v4.1
[Jul 25 20:30:14:616841] pilight-daemon: DEBUG: loaded event action /usr/local/lib/pilight/actions/pushover.lua v1.0
[Jul 25 20:30:14:617196] pilight-daemon: DEBUG: loaded event action /usr/local/lib/pilight/actions/pushbullet.lua v1.0
[Jul 25 20:30:14:618259] pilight-daemon: DEBUG: loaded event action /usr/local/lib/pilight/actions/label.lua v4.1
[Jul 25 20:30:14:619406] pilight-daemon: DEBUG: loaded event action /usr/local/lib/pilight/actions/toggle.lua v4.1
[Jul 25 20:30:14:620811] pilight-daemon: DEBUG: loaded event action /usr/local/lib/pilight/actions/dim.lua v4.1
[Jul 25 20:30:14:622135] pilight-daemon: INFO: version v8.1.2-nightly-271a0ad
[Jul 25 20:30:14:622215] pilight-daemon: NOTICE: already active (pid 521)
then Service pilight stop and again pilight-daemon -D
Code:
[Jul 25 20:31:57:420038] pilight-daemon: DEBUG: loaded event function /usr/local/lib/pilight/functions/random.lua v2.1
[Jul 25 20:31:57:420621] pilight-daemon: DEBUG: loaded event function /usr/local/lib/pilight/functions/date_format.lua v1.0
[Jul 25 20:31:57:421070] pilight-daemon: DEBUG: loaded event function /usr/local/lib/pilight/functions/date_add.lua v2.0
[Jul 25 20:31:57:421417] pilight-daemon: DEBUG: loaded event operator /usr/local/lib/pilight/operators/divide.lua v1.0
[Jul 25 20:31:57:421684] pilight-daemon: DEBUG: loaded event operator /usr/local/lib/pilight/operators/minus.lua v1.0
[Jul 25 20:31:57:421897] pilight-daemon: DEBUG: loaded event operator /usr/local/lib/pilight/operators/multiply.lua v1.0
[Jul 25 20:31:57:422108] pilight-daemon: DEBUG: loaded event operator /usr/local/lib/pilight/operators/eq.lua v1.0
[Jul 25 20:31:57:422307] pilight-daemon: DEBUG: loaded event operator /usr/local/lib/pilight/operators/lt.lua v1.0
[Jul 25 20:31:57:422570] pilight-daemon: DEBUG: loaded event operator /usr/local/lib/pilight/operators/gt.lua v1.0
[Jul 25 20:31:57:422829] pilight-daemon: DEBUG: loaded event operator /usr/local/lib/pilight/operators/plus.lua v1.0
[Jul 25 20:31:57:423069] pilight-daemon: DEBUG: loaded event operator /usr/local/lib/pilight/operators/or.lua v1.0
[Jul 25 20:31:57:423295] pilight-daemon: DEBUG: loaded event operator /usr/local/lib/pilight/operators/le.lua v1.0
[Jul 25 20:31:57:423538] pilight-daemon: DEBUG: loaded event operator /usr/local/lib/pilight/operators/intdivide.lua v1.0
[Jul 25 20:31:57:423930] pilight-daemon: DEBUG: loaded event operator /usr/local/lib/pilight/operators/and.lua v1.0
[Jul 25 20:31:57:424228] pilight-daemon: DEBUG: loaded event operator /usr/local/lib/pilight/operators/ge.lua v1.0
[Jul 25 20:31:57:424587] pilight-daemon: DEBUG: loaded event operator /usr/local/lib/pilight/operators/ne.lua v1.0
[Jul 25 20:31:57:424815] pilight-daemon: DEBUG: loaded event operator /usr/local/lib/pilight/operators/modulus.lua v1.0
[Jul 25 20:31:57:424989] pilight-daemon: DEBUG: loaded event operator /usr/local/lib/pilight/operators/concat.lua v1.0
[Jul 25 20:31:57:425571] pilight-daemon: DEBUG: loaded event action /usr/local/lib/pilight/actions/sendmail.lua v4.1
[Jul 25 20:31:57:426542] pilight-daemon: DEBUG: loaded event action /usr/local/lib/pilight/actions/switch.lua v4.1
[Jul 25 20:31:57:427060] pilight-daemon: DEBUG: loaded event action /usr/local/lib/pilight/actions/pushover.lua v1.0
[Jul 25 20:31:57:427406] pilight-daemon: DEBUG: loaded event action /usr/local/lib/pilight/actions/pushbullet.lua v1.0
[Jul 25 20:31:57:428448] pilight-daemon: DEBUG: loaded event action /usr/local/lib/pilight/actions/label.lua v4.1
[Jul 25 20:31:57:429437] pilight-daemon: DEBUG: loaded event action /usr/local/lib/pilight/actions/toggle.lua v4.1
[Jul 25 20:31:57:430705] pilight-daemon: DEBUG: loaded event action /usr/local/lib/pilight/actions/dim.lua v4.1
[Jul 25 20:31:57:431938] pilight-daemon: INFO: version v8.1.2-nightly-271a0ad
[Jul 25 20:31:57:432152] pilight-daemon: DEBUG: ssdp sent search
[Jul 25 20:31:57:532776] pilight-daemon: NOTICE: a pilight daemon was found @192.168.168.2, clientizing
[Jul 25 20:31:57:556577] pilight-daemon: DEBUG: new thread node, 1 thread running
[Jul 25 20:31:57:556704] pilight-daemon: DEBUG: new thread sender, 2 threads running
[Jul 25 20:31:57:556774] pilight-daemon: DEBUG: new thread broadcaster, 3 threads running
[Jul 25 20:31:57:556814] pilight-daemon: DEBUG: ssdp sent search
[Jul 25 20:31:57:556867] pilight-daemon: DEBUG: new thread receive parser, 4 threads running
[Jul 25 20:31:57:654750] pilight-daemon: DEBUG: socket write succeeded: {"action":"identify","uuid":"0000-00-1e-06-361711","options":{"receiver":1,"forward":1,"config":1}}

[Jul 25 20:31:57:670974] pilight-daemon: DEBUG: socket recv: {"status":"success"}
[Jul 25 20:31:57:671019] pilight-daemon: DEBUG: socket write succeeded: {"action":"request config"}

[Jul 25 20:31:57:682959] pilight-daemon: DEBUG: socket recv: {"message":"config","config":{"devices":{},"rules":{},"gui":{},"settings":{"log-level":6,"pid-file":"/var/run/pilight.pid","log-file":"/var/log/pilight.log","webserver-enable":1,"webserver-root":"/usr/local/share/pilight/webgui","webserver-http-port":5001,"webserver-https-port":5002,"webserver-cache":1,"port":5000,"gpio-platform":"raspberrypi1b+"},"hardware":{"433gpio":{"sender":15,"receiver":-1}},"registry":{"webserver":{"ssl":{"certificate":{"secure":0,"location":"/etc/pilight/pilight.pem"}}},"pilight":{"version":{"current":"8.0.10"}}}}}
[Jul 25 20:31:57:683117] pilight-daemon: DEBUG: garbage collected config gui library
[Jul 25 20:31:57:683132] pilight-daemon: DEBUG: garbage collected config devices library
[Jul 25 20:31:57:683146] pilight-daemon: DEBUG: garbage collected config rules library
[Jul 25 20:31:57:683164] pilight-daemon: DEBUG: garbage collected config registry library
[Jul 25 20:31:57:683199] pilight-daemon: DEBUG: loaded master configuration
[Jul 25 20:31:58:412471] pilight-daemon: DEBUG: cpu: 0.000000%
[Jul 25 20:31:58:412965] pilight-daemon: DEBUG: socket write succeeded: {"values":{"cpu":0.0000000036812485},"origin":"core","type":-1,"uuid":"0000-00-1e-06-361711","action":"update"}

[Jul 25 20:31:58:413065] pilight-daemon: DEBUG: broadcasted: {"values":{"cpu":0.0000000036812485},"origin":"core","type":-1,"uuid":"0000-00-1e-06-361711"}
[Jul 25 20:32:01:415409] pilight-daemon: DEBUG: cpu: 0.029372%
[Jul 25 20:32:01:416263] pilight-daemon: DEBUG: socket write succeeded: {"values":{"cpu":0.0293715875813135},"origin":"core","type":-1,"uuid":"0000-00-1e-06-361711","action":"update"}

[Jul 25 20:32:01:416385] pilight-daemon: DEBUG: broadcasted: {"values":{"cpu":0.0293715875813135},"origin":"core","type":-1,"uuid":"0000-00-1e-06-361711"}
[Jul 25 20:32:04:418738] pilight-daemon: DEBUG: cpu: 0.059600%
[Jul 25 20:32:04:418982] pilight-daemon: DEBUG: socket write succeeded: {"values":{"cpu":0.0596004108947439},"origin":"core","type":-1,"uuid":"0000-00-1e-06-361711","action":"update"}

[Jul 25 20:32:04:419005] pilight-daemon: DEBUG: broadcasted: {"values":{"cpu":0.0596004108947439},"origin":"core","type":-1,"uuid":"0000-00-1e-06-361711"}
etc
 
Reply
  


Possibly Related Threads...
Thread Author Replies Views Last Post
  [Fixed] High CPU usage when pilight usb nano disconnects DieterK 1 89 08-13-2019, 05:43 PM
Last Post: curlymo
  pilight Nano USB interface curlymo 228 95,096 07-10-2019, 06:14 PM
Last Post: curlymo
  pilight 8 what chages for custom protocols? polo 11 2,762 02-15-2019, 06:22 PM
Last Post: polo
  pilight-debug shows nothing minhdomanh 3 501 10-18-2018, 07:01 AM
Last Post: felfert
  pilight-send and pilight-daemon DieterK 0 527 06-20-2018, 12:44 AM
Last Post: DieterK
  Lights not switched on or off by rules in pilight 8.1.0 rorie 22 2,376 06-12-2018, 03:56 PM
Last Post: curlymo
  Odroid C2 support on Kernel 4.14 Jojo 5 655 06-01-2018, 03:19 PM
Last Post: curlymo
  check API in pilight 8 stratege-0815 4 1,337 02-11-2018, 09:34 AM
Last Post: stratege-0815
  pilight-receive terminates zackdvd 8 1,571 12-30-2017, 09:07 PM
Last Post: curlymo
  pilight 8.0 / wiringx wupperpi 2 1,791 12-18-2017, 03:25 PM
Last Post: wupperpi

Forum Jump:


Browsing: 2 Guest(s)