Open markmghali opened 1 year ago
I am able to ssh to the TV. But trying to figure what where or what to do with these steps is confusing. Any assistance would be helpful?
ok I got it installed using a Linux machine instead of windows. and I created the sensors in home assistant but I am not seeing the sensors output anything in home Assistant
Okay I have the application installed but I cannot tell if it is starting when I press start. I have hyperhdr on the TV already and I see it in my mqtt broker but not this application.
Thank you for the work on this !
Hey! Sorry for my late response! You should be able to install the app by following the steps as described in the readme. When installed there should be an app on your tv's homescreen, that should show the state of the service.
Thank you for the reply. I did get it complied and installed but nothing happens when I try and start the service on the TV.
This app could be incredibly useful! Thank you for all the work! I really want to get my play pause state from my TV.
My TV is rooted You could also add this app to the homebrew-channel to make adoption even easier. I guess you would need to be able to configure it within the app itself first.
so got the new version installed but nothing happens no logs nothing when I press start on the TV APP.
I also could not find what file to change these values in:
const host = 'YOUR MQTT BROKER HOST'; const port = '1883'; // OR THE POR OF THE BROKER const username = 'YOUR MQTT USERNAME'; const password = 'YOUR MQTT PASSWORD';
EDIT: nevermind found it in index.js in the tv-service folder
formatted const host = 'mqtt://YOUR MQTT BROKER HOST';
is that correct to have the mqtt:// then IP Address?
still not getting it to work.
I am using mqtt from the tv already for hyperhdr I am assuming that is not a conflict? I can see it connecting o my mqtt broker host for hyperhdr.
Sorry for all the questions. I just really want to get this working
@szymon3 did you get yours working?
I am trying to run as root and not in dev mode?
after installing on my tv the service is failing to start
Hmm, you see nothing happening on the screen? No logs, no errors, no state?
In the latest version, you should update the config to something like this:
const config: LgTvMqttConfig = { host: '192.168.1.XX', port: 1883, username: 'A_USERNAME', password: 'A_PASSWORD', deviceID: 'webOSTVService' };
Where host should be the host of your MQTT broker, and username/password as you've setup in the broker.
But before that should be logged that it's trying to connect...
Yeah I don't see that it's trying to connect. I push start and nothing happens no logs or anything.
Let me check the code on the file later today. I believe I tried that.
So this in the index.js file in the tv-service folder. do I add it anywhere else?
Also here is a video of running the app on my TV
No, that should be the place.
I've pushed some updates. Can you try it with the latest version?
yes let me try
silly question leave the single quotes there correct?
like this:
Yes!
not fully understanding these steps?
Update package-and-install.bat with the id of your tv, if needed
I did not change the deviceID in index.ts so I would not need to do above step correct?
Run package-and-install.bat
Are you meaning run in a terminal like ./package-and-install.bat?
instead of the ares-install ./com.slg.lgtv2mqttxxxxxxxxx command
Yes! I've updated the code to Typescript, so that requires a few additional steps. I've automated that in the bat file. If you're on Linux, you cannot use the .bat, and should have a .sh.
I am on a linux VM yeah. do I just change the extension from .bat to ,sh?
I did try that and it didn't work
I also am trying the instructions from beginning and not sure where to run the npm install command? tried running it and getting an error it cannot find the package.json file
I've added a .sh file that you should be able to run. It shouldn;t be necessary to run the npm instal command yourself enymore.
ok so I want to properties on the .sh file and enabled executable as program
than I ran it and got the ipk file. it did not push it to the TV
I than ran this and it installed it
trying it now on the TV
I like the new icon! however same behavior it didn't work. I am guessing it is some lack of knowledge on my end maybe?
here is the output of running the .sh file
then it still creates the .ipk after that
Hmm, those errors are not what you expect. I've updated the script a little. Can you give it another try?
Yes, I'll try again! Really appreciate you walking me through all this!
On Thu, Nov 30, 2023, 1:21 PM Sietse Ludger Geertsema < @.***> wrote:
Hmm, those errors are not what you expect. I've updated the script a little. Can you give it another try?
— Reply to this email directly, view it on GitHub https://github.com/SLG/lgtv2mqtt/issues/4#issuecomment-1834409239, or unsubscribe https://github.com/notifications/unsubscribe-auth/AEENN4GYFWZQIA2FHDDK56DYHDMEHAVCNFSM6AAAAAAUX5RN36VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTQMZUGQYDSMRTHE . You are receiving this because you authored the thread.Message ID: @.***>
Ok so the compile looks better
the install failed so I pushed it manually and that worked see above screenshot.
Also the ipk size looks better about 8mb before it was much smaller. waiting to test it on the TV in a moment.
well darn it is still not doing anything when I press start on the TV. not sure where to go from here. LG C9 is not on webos6 just FYI but figured it would work.
Hi,
Also tried on C9 and here I am with the same results. Nothing happens when clicking on buttons. I tried to use webOS TV 6.0 Simulator and, strangely, I get the same behavior.
I can debug the App with the inspector, but I don't know how to debug the service. When I call the functions in the console, nothing happens. I only get an error when the name of the package is invalid, so I know it's loaded at least.
I wanted to see if some errors could be fixed to make it work on webOS 4.x, but if cannot even make it work on the 6.0 Simulator, I don't think I'll manage to do that.
@SLG How did you debug the service during its development?
Yes I would love to get this working on my C9! Let me know how I can help!
On Sat, Apr 20, 2024, 12:27 PM Julien Ehrhart @.***> wrote:
Hi,
Also tried on C9 and here I am with the same results. Nothing happens when clicking on buttons. I tried to use webOS TV 6.0 Simulator and, strangely, I get the same behavior.
I can debug the App with the inspector, but I don't know how to debug the service. When I call the functions in the console, nothing happens. I only get an error when the name of the package is invalid, so I know it's loaded at least.
I wanted to see if some errors could be fixed to make it work on webOS 4.x, but if cannot even make it work on the 6.0 Simulator, I don't think I'll manage to do that.
@SLG https://github.com/SLG How did you debug the service during its development?
— Reply to this email directly, view it on GitHub https://github.com/SLG/lgtv2mqtt/issues/4#issuecomment-2067736133, or unsubscribe https://github.com/notifications/unsubscribe-auth/AEENN4ASBFQ2UTM7SB6FFZ3Y6KQRPAVCNFSM6AAAAAAUX5RN36VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDANRXG4ZTMMJTGM . You are receiving this because you authored the thread.Message ID: @.***>
Did you try the latest version? I'm on a C1, so it's a lot older than the C9...
I didn't really debug, I added a lot of logging on screen, to see what's going on.
Annoying that even the simulator is not working! What is the exact error? Maybe they have enforced some specific format for the package name/path?
Sadly, that's not the case, C9 is older. C9 is from 2019 and it's running WebOS 4.9 as the latest version. C1 is from 2021 and it's running WebOS 6.0. C9 and C1 are reference to the last digit of the year.
The oldest version of the "Simulator" is for webOS TV 6.0.
Before that, LG only provided an "Emulator", which is a VM + Java app for the remote.
I just managed to run it with the remote, but I still don't know how to debug the service part of an application, maybe with one of the ares commands, like ares-log
if it was already there in this version.
Ah, I thought that the C9 would be newer! I've just tried with the Emulator too, but indeed, it does not work. And I think I know the problem: https://webostv.developer.lge.com/develop/guides/js-service-basics#supported-nodejs-version The current service is based on a newer Node version. I could have a look to see if I can add support for this older version.
To add least get the app on the Emulator, you should do this:
tsconfig.json
: update target
to "ES3" or "ES5"package-and-install.bat
: replace -d tv
with -d emulator
ares-launch -d emulator -r
. Here you should see com.slg.lgtv2mqtt
So somehow the service is not starting. I'm not really sure how to debug this. Maybe we can access the logs somehow.
Hello,
I am trying to get this setup on my rooted TV. I am not understanding steps 2 and 3 to enable ares-cli. Is this via putty on a computer to the TV? Is there an app I can install from the homebrew store to set this all up?
Thank you