Closed nimroddolev closed 1 year ago
I have the same, looks like no messages are being published to the MQTT server. Would be great to have some debug logging on the service to see where it's failing.
Have you tried running the service manually? ares-shell -r "luna-send -n 1 -f luna://nl.slg.tv.service/start '{}'"
The automatic startup is also failing me sometimes.
But feel free to add any debug information and/or a PR.
would be great to get some more debug information on the console about what it's doing. This may enable us to troubleshoot
On Tue, Aug 9, 2022 at 11:49 AM Stuart Alexander @.***> wrote:
Looks like the service fails to start. After several minutes, I get this message: v-service % ares-shell -r "luna-send -n 1 -f luna://nl.slg.tv.service/start '{}'" { "serviceName": "nl.slg.tv.service", "errorCode": -1, "returnValue": false, "errorText": "nl.slg.tv.service is not running."
On Mon, Aug 8, 2022 at 3:59 PM Sietse Ludger Geertsema < @.***> wrote:
Have you tried running the service manually? ares-shell -r "luna-send -n 1 -f luna://nl.slg.tv.service/start '{}'" The automatic startup is also failing me sometimes.
But feel free to add any debug information and/or a PR.
— Reply to this email directly, view it on GitHub https://github.com/SLG/tv-service/issues/2#issuecomment-1208241253, or unsubscribe https://github.com/notifications/unsubscribe-auth/AADKNITJHYPLMUVTDUW6HNTVYEODNANCNFSM55LEBAQQ . You are receiving this because you commented.Message ID: @.***>
When I tried to run the service manually, I received the following error:
{
"serviceName": "nl.slg.tv.service",
"errorCode": -1,
"returnValue": false,
"errorText": "nl.slg.tv.service is not running."
}
same herre
luna-send -n 1 -d luna://nl.slg.tv.service/start '{}' {"serviceName":"nl.slg.tv.service","returnValue":false,"errorCode":-1,"errorText":"nl.slg.tv.service is not running."} LUNASERVICE ERROR -1: Could not cancel to unknown client (_LSTransportAddPendingMessageWithToken @ transport.c:4385)
/usr/bin/run-js-service -n /media/developer/apps/usr/palm/services/nl.slg.tv.service SERVICE_PATH is /media/developer/apps/usr/palm/services/nl.slg.tv.service
<13>Aug 19 08:50:57 root: [run-js-service] FULL_SERVICE_NAME nl.slg.tv.service Unable to get cgroup: Error: EACCES: permission denied, open '/tmp/run-js-service-no-cgroup' module.js:550 throw err; ^ Error: Cannot find module 'mqtt' at Function.Module._resolveFilename (module.js:548:15) at Function.Module._load (module.js:475:25) at Module.require (module.js:597:17) at require (internal/module.js:11:18) at Object.ok got it to work : luna-send -n 1 -f luna://nl.slg.tv.service/start '{}' { "started": true, "returnValue": true }
1- git clone the repo 2- cd into tv-service/tv-service 3- rm package-lock.json 4- npm install
then do the steps written on this repo
@MattL0 - not sure if you did something in addition to the above actions (deleting package-lock, running npm install). I'm still having the same issues as the others.
FWIW: running 6.5; confirmed that install did load app & service files to the TV; tried compiling and running from two separate dev machines (with fresh clone of repo).
Hi there! I've updated the app. I created a simple GUI, to get some information about the service:
You should be able to start and stop the MQTT connection from the app.
Hopefully this gives some insights in your situation.
@MattL0 - not sure if you did something in addition to the above actions (deleting package-lock, running npm install). I'm still having the same issues as the others.
FWIW: running 6.5; confirmed that install did load app & service files to the TV; tried compiling and running from two separate dev machines (with fresh clone of repo).
Is your tv rooted?
Not anymore, but I think it doesn't matter. It should work in either case... Rooting allows for some more options, like autostarting, but without root you should still be able to use the app and start the MQTT connection.
Yep - TV is rooted, SSH enabled, Homebrew channel installed. I can see the directory structure and confirmed by SSH that the files were installed correctly. I've tried using both the Ares CLI interface and VSCode.
Cloned, changed MQTT creds, packaged, and installed the newest version. I can see and run the new GUI application, but clicking on the buttons doesn't change anything.
My only thought is that maybe there's some conflict with some of the other rooted apps I am running (e.g. PiCap or HyperHDR) which also auto-start.
Really appreciate the work in the original app and the help here!
Do you see anything in the logging? Maybe you could add some more connecting logging, like this:
// Connect to the MQTT broker
const mqttConfig = {
clientId,
clean: true,
connectTimeout: 4000,
username,
password,
reconnectPeriod: 1000,
};
log(`connecting to mqtt server with: ${JSON.stringify(mqttConfig)}`);
client = mqtt.connect(connectUrl, mqttConfig);
Added that logging code, but don't think it makes a difference, since I cannot get the service to launch in the first place. Still getting this issue.
ares-shell -r "luna-send -n 1 -f luna://com.slg.tv.service/start '{}'"
{
"serviceName": "com.slg.tv.service",
"errorCode": -1,
"returnValue": false,
"errorText": "com.slg.tv.service is not running."
}
Might try to stand up an emulator to check things here in a bit.
With the new GUI you do not have to use the console to start the service. You can start it in the GUI. It should provide you with some feedback and logging.
So if you use the GUI to start it, what does the log say? Anything useful?
GUI app loads, but clicking the buttons doesn't seem to trigger anything.
Hmm, weird. At least the GUI should load completely... It's missing the State field. What OS (WebOS 6?) do you have? It looks different than mine.
I’m on WebOS 6.5…. maybe that’s part of the problem. Rooted, other homebrew apps working.
I've pushed a new version, with (hopefully) more debugging information. Could you give it a try?
I get the same, on screen buttons don't do anything
None of the buttons? I'd hoped that they should at least show some sort of error...
My web is is 6.0.25 btw
On Mon, 5 Sep 2022 at 15:21, Sietse Ludger Geertsema < @.***> wrote:
None of the buttons? I'd hoped that they should at least show some sort of error...
— Reply to this email directly, view it on GitHub https://github.com/SLG/tv-service/issues/2#issuecomment-1237113134, or unsubscribe https://github.com/notifications/unsubscribe-auth/AADKNIWFHLIBCBEVKESAMEDV4X6WPANCNFSM55LEBAQQ . You are receiving this because you commented.Message ID: @.***>
Hey @thestumonkey and @mattjacobson6 . I've pushed a new version, with a small fix, that probably fixed the problem.
I ran into the same problem (I saw just the buttons on screen) and added the mqtt dependency to the package.json. You should now run npm i
before running the ares-package
command, and it should work, I think.
Looks like the service fails to start. After several minutes, I get this message: v-service % ares-shell -r "luna-send -n 1 -f luna://nl.slg.tv.service/start '{}'" { "serviceName": "nl.slg.tv.service", "errorCode": -1, "returnValue": false, "errorText": "nl.slg.tv.service is not running."
On Mon, Aug 8, 2022 at 3:59 PM Sietse Ludger Geertsema < @.***> wrote:
Have you tried running the service manually? ares-shell -r "luna-send -n 1 -f luna://nl.slg.tv.service/start '{}'" The automatic startup is also failing me sometimes.
But feel free to add any debug information and/or a PR.
— Reply to this email directly, view it on GitHub https://github.com/SLG/tv-service/issues/2#issuecomment-1208241253, or unsubscribe https://github.com/notifications/unsubscribe-auth/AADKNITJHYPLMUVTDUW6HNTVYEODNANCNFSM55LEBAQQ . You are receiving this because you commented.Message ID: @.***>
Ah, that is correct! The id is changed to com.slg.tv.service
.
nl.
was apparantly not recognized by the tv.
Buttons now flash white for a short while, but do nothing. ares-shell -r "luna-send -n 1 -f luna://com.slg.tv.service/start '{}'" { "serviceName": "com.slg.tv.service", "errorCode": -1, "returnValue": false, "errorText": "com.slg.tv.service is not running." }
Still no MQTT topics
ok got it to work : luna-send -n 1 -f luna://nl.slg.tv.service/start '{}' { "started": true, "returnValue": true }
1- git clone the repo 2- cd into tv-service/tv-service 3- rm package-lock.json 4- npm install
then do the steps written on this repo
Initially had the same issue described above and these steps worked for me. On non-rooted WebOS 6.3.2. To clarify my steps were:
git clone https://github.com/SLG/tv-service.git
tv-service/index.js
updating MQTT server and credential configcd tv-service/tv-service
del package-lock.json
, Unix - rm package-lock.json
npm i
ares-package tv-app/ tv-service/
ares-install ./com.slg.tv_0.0.1_all.ipk
tv-service/playState
Hi, Were you able to make it work? I have the same result.
Currenty I'm using it almost daily. I've updated the code to be easier to use. I cannot root my tv anymore, so I've tried to find another way to use it.
I've created an automation in Home Assistant where I can start this app when the tv turns on, what works fine.
Hi, Were you able to make it work? I have the same result.
What result do you have?
Owh, and I saw this thread: https://github.com/home-assistant/core/issues/91709 Maybe you can try this, if this isn't working.
{ "serviceName": "com.slg.tv.service", "errorCode": -1, "returnValue": false, "errorText": "com.slg.tv.service is not running." }
{ "serviceName": "com.slg.tv.service", "errorCode": -1, "returnValue": false, "errorText": "com.slg.tv.service is not running." }||
Hi, Were you able to make it work? I have the same result.
What result do you have?
In my case It seems that the service nerver starts. My TV is LG no root, firmware version webos 5.4.3.36 Jhericurl-jebil I get the black screen with the four buttons. After pressing start it takes a couple of minutes an then I get the following message:
"serviceName": "com.slg.tv.service", "errorCode": -1, "returnValue": false, "errorText": "com.slg.tv.service is not running." }
I followed this instructions: https://github.com/SLG/tv-service/issues/2#issuecomment-1399270665 and have no clue what to do next to try to make it work.
Edit: Never mind. Finally it's working! Thank you very much!
What did you do to get it working?
What did you do to get it working?
I had skipped npm i before running the ares-package command. Doing it and rebuilding made the trick.
Check. I've added it to the readme. I think that this fixes the issue for now.
I successfully completed the installation guide and was able to install the tv_service app onto my TV with my MQTT broker settings, as well as add the script to start the service automatically. The app launches on my TV, however, after adding the two MQTT sensors to Home Assistant, they appear as unknown and are never updated.