-
-
Notifications
You must be signed in to change notification settings - Fork 46
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
webOS <4.0 doesn't run startup.sh, hence no SSH or Telnet #124
Comments
* adding discovery endpoint * updated startup * changed autostart endpoint name * installs startup.sh if not present
In my case, I've a running Homebrew + startup with the companion app I built myself and managed to manually run the |
Hi, I think the previewMetadata was working on webOS 4 and above. Did it stop working recently? |
It doesn't work for me on webOs 4.4 - and most likely not working before? |
I was using webOS 4.9 and 5.3 and it worked. Could you install Netflix and see if there are suggestions when you focus the icon? |
It may be possible that with webOS4.4 we are stick in a limbo where none of the previous startup method works (extra_conf.sh or start_devmode.sh) as they patched this but the firmware is too old to support new features like the previewMetadata. Also, what I've noticed after some usage is that Homebrew stops working and all INSTALL options are greyed-out. After some digging I found out that's because the LunaBus stop being responsive, causing no luna-message to be dispatched (by looking at ls-monitor). |
That's really unfortunate. I think in such case only |
Isn't crashd method only to gain root? |
IIRC if the file is there it will always work. |
I'm on same boat with kopiro, with SK8500PLA, MY2018 tv, with webos 4.4 as well. |
Similar boat to @kopiro and @fryc88 here. Managed to Unlike @kopiro though, I do seem to get suggestions when hovering over home icons like Netflix as suggested earlier ( #124 (comment)) |
If you can't access the telnet via homebrew app, add this repo |
@mariotaku yes, the file is there and you can get root - but no startup scripts. |
I'm facing the exact same issue. Successfully rooted via |
It's not something that can really be "fixed", since webOS 4.[0-4] is missing the feature we're currently using for autostart functionality. There are other ways of hooking into the boot process, but only for newer versions of webOS. The next version of Homebrew Channel will try to work around this to a limited extent by running If anyone wants to look for new boot hooks, it would be greatly appreciated. |
Hello; I'll share the solution that works for me. The main problem with not having autostart so far is only that PicCap and Hyperion/HDR don't start automatically, hence no LEDs. What you only need is a device that is always on in your network - example: a raspberry Pi. Generic solutionInstall https://github.com/merdok/homebridge-webos-tv using I recently added support for sending raw luna-messages, we're going to use that. Create a binary on your system with the following (example: #!/bin/sh
TV_IP=192.168.0.40
TV_MAC=AA-BB-CC-DD-EE-FF
if ! ping $TV_IP; then
echo "TV is off"
exit 1
fi
if curl -s "http://$TV_IP:8090/json-rpc?request=%7B%22command%22:%22serverinfo%22%7D"; then
echo "TV already rooted"
exit 2
fi
echo "Calling autostart"
webostv luna-message $TV_IP $TV_MAC luna://org.webosbrew.hbchannel.service/autostart '{}' And of course Now, what you're going to do with this binary is really up to you. Solution 0: Call this script in a CRONWell, simply enough, setup a CRON that calls Solution 1: Use HomeBridge create a switch that you can use when you want to switch LEDs on/offSince I don't always want the LEDs on (especially during daylight), I've setup a switch using in HomeKit so that I can just say "Hey Siri, switch on TV LEDs" or use the Homekit app in order to switch them on-off. The script i'm using is a bit more complex than the one above, since it's also controlling HyperHDR status on/off - you can find it here and put it in Then, install the plugin "homebridge-cmdswitch2" and add the following: {
"platform": "cmdSwitch2",
"name": "homebridge-cmdswitch2",
"switches": [
{
"name": "TV LED",
"on_cmd": "/usr/local/bin/tv-hyperhdr on",
"off_cmd": "/usr/local/bin/tv-hyperhdr off",
"state_cmd": "/usr/local/bin/tv-hyperhdr status",
"polling": true,
"interval": 30,
"timeout": 15,
"manufacturer": "HyperHDR"
}
]
} Now that you have this switch, you can leave it there to manually call it, or, for example, you can configure it to run when TV get switched on, if you also have the TV in HomeKit. |
The |
Hello - I can confirm you that this behaviour is "everything is locked" happened to me as well, but not because of the luna message you just sent. It may be that the luna bus is a bit buggy with this webOS version, and messages don't get delivered - therefore, also the "install app" message is not delivered, or the "get root status" message is never delivered and is always shown as pending. I'm not sure if this is a specific webOS issue or a problem with the homebrew service itself (with this version). - perhaps @Informatic knows more :) |
As a workaround for anyone that uses the LG integration within Home Assistant:
|
My workaround also uses Home Assistant but with a custom component: https://github.com/panic175/webosbrew-autostart-helper |
@panic175 tried your custom integration, sadly it doesn't work. The first time the remote control Dialog was presented on the tv. I clicked yes and nothing happens. Also she i run the custom component service again. When I'll open HBC autostart apps will be launched. So my setup works, except autostart . Any hints i can debug this? |
@popy2k14 Do you see any errors from the custom component in your Home Assistant Logs? |
@panic175 sorry for hijacking your thread. I have webOS 6.3.1-411 (kisscurl-kinglake). In my case i had to uncheck all EULAs and retry (incl. reboot) until they are unchecked (two times in my case). Then enabled the TOP one and autostart is working again. Just if anybody like me has this issue and needs this information. thx again |
hi there! I think I found a way: luna-send -f -n 1 -m org.webosbrew.hbchannel.service luna://com.webos.service.activitymanager/create '{
"activity": {
"name": "org.webosbrew.hbchannel.service.autostart",
"description": "who cares",
"type": {
"foreground": true,
"persist": true,
"continuous": true
},
"trigger": {
"method": "luna://com.webos.bootManager/getBootStatus",
"params": {
"subscribe": true
},
"where": {
"prop": [
"signals",
"core-boot-done"
],
"op": "=",
"val": true
}
},
"callback": {
"method": "luna://org.webosbrew.hbchannel.service/autostart",
"params": {}
}
},
"replace": true,
"start": true
}' I haven't tested this on 4.4. |
On my webOS TV (version 4.4.2), this above worked perfectly, I could finally disable my HomeAssistant automation :D |
that was quick! thank you for the feedback. follow #143 👀 |
Massive thanks for this. It helped me find the syntax needed to run the PicCap service directly from Home Assistant, as it doesn't autorun in my webOS 3.4.0. Might be that the createAlert method doesn't exist in that version? However, your script doesn't work for me. The button step works, but the toast alert doesn't appear at any time. Any idea why?
|
Hmm, yes, it seems that the method is not found on your OS. But the error message also indicates, that you do not have the right permissions to execute? Not sure what's the issue here. All available methods are listed here, but without OS version support information: https://github.com/bendavid/aiopylgtv/blob/master/aiopylgtv/endpoints.py |
@soeren-a Yeah, I have been checking that and testing all I can think of. But can't make it work. createToast works fine, but createAlert doesn't. Isn't there any other way to send the command to start SSH from HA? |
Not that I'm aware of. As far as I know, a user interaction like a button click is needed to execute the call. Showing a toast with a button and click it was the easiest way to achieve that. |
I face same issue. |
Opening recent versions of Homebrew Channel will execute |
@kitsuned, I have a C8 on 4.4.2, and this solved the issue for me as well. |
I would like to thank you for your solution as it worked like a charm, after reboot everything that is supposed to auto start runs as it should, including hyperhdr and picap.... WebOS V-4.4-x. thanks a lot dude! TV model from 2019 updated to last webOS available for its gen :) |
Hey thanks a lot, I was struggling all day to try to ssh into my B8 running 4.4.2 and this advice helped. I ran the homebrew updater and when I rebooted it popped up with a message saying that "autostart.sh has been updated" or something. Once that happened, I was able to ssh into it. Also handy that the updater allows you to open an emergency telnet session". |
@kitsuned |
It looks like that 804f947 fixed this - we can close this issue! |
It's not fixed on webOS <4.0. |
Sorry! :) |
I would like to get this going on |
How do I use this? Auto start doesn't work on my TV |
It seems to take a few moments after turning the TV on to initialize (judging by lginputhook key binds activation), but ultimately works. Thanks!
SSH into TV and execute the code |
I tried that and it didn't work on my OLED C7 so I thought I was doing it wrong. Seems no way to get autostart working on my TV. Everything starts working correctly after I open the Homebrew channel. |
Not work for me. Device Model Device OS Software version Hbchannel version |
I had a working version of Homebrew until I decided to upgrade to 05.50 system software, now webOS 4.4.2 (from 05.40).
The initial symptoms after upgrading are that SSH server is not working, Telnet is not working and also PicCap doesn't auto-start - but I still have elevated privileges.
After some debugging, it looks like that the
autostart
service registered by Homebrew is not being called; hence nostartup.sh
called.I built a companion app that tries to call the autostart service via LunaBus; once installed, you can see that the first call to the autostart services fails because of a LunaBus error - but trying again it works.
Our assumption is that probably the service doesn't get registered in time or there are some overloads of the LunaBus at startup.
The error we get from LunaBus is this: https://github.com/webosose/luna-service2/blob/master/src/libluna-service2/transport.c#L239
Most likely, this new method of using
previewMetadata
in theappinfo.json
doesn't work on webOS 4+, and the startup method was working in the previous firmware because of the presence of/etc/wam/plugins/conf.sh
that called our script in the$EXTRA_CONF
path:That has now been removed from the 4.4 firmware.
The text was updated successfully, but these errors were encountered: