This forum uses cookies
This forum makes use of cookies to store your login information if you are registered, and your last visit if you are not. Cookies are small text documents stored on your computer; the cookies set by this forum can only be used on this website and pose no security risk. Cookies on this forum also track the specific topics you have read and when you last read them. Please confirm that you accept these cookies being set.

LM App for Home Kit
#1
Hello,
I've successfully compiled HAPĀ for LM and want to distribute it with configurator and daemon like Alexa app.
Configurator would be written in lua, but HAP is binary file with server inside. How can I run binary file as LM App daemon?
Reply
#2
You can add os.execute(...) to daemon.lua which will execute your binary.
Reply
#3
(27.11.2018, 12:38)admin Wrote: You can add os.execute(...) to daemon.lua which will execute your binary.

I think it tries to launch app every moment in a loop.
Load averages: 2.20 0.92 0.36
Reply
#4
This can happen if your app is either executed in background (via & at the end of the command) or daemonizes itself. Can you run your app in foreground? This way os.execute will wait until app finishes execution and only then it will be started again. This is useful if you experience crashes for some reason.
Reply
#5
(27.11.2018, 12:38)admin Wrote: You can add os.execute(...) to daemon.lua which will execute your binary.

It didn't work until I gave 0777 file permission using os.execute('chmod...').
It's very difficult to debug app on LM without ssh access.
Reply


Forum Jump: