Git Product home page Git Product logo

Comments (29)

wehrstedt avatar wehrstedt commented on September 6, 2024 4

I investigated a workaround to autostart the capture service without rebooting the tv or disabling the quick start. I used home assistant to turn off and on the capture service once the tv turned on. If someone is interested in it .. Don't know if this is the right place for this.

yes i am interested in can you post it ?

  1. Enable SSH access on your tv.
  2. Place your public key on your tv for connecting via ssh without password
  3. Create the following script in /home/root on your tv:
root@LGwebOSTV:~# cat my-piccap-service.sh
#!/bin/bash

set -e
luna-send -d -n 1 "luna://org.webosbrew.piccap.service/$1" "{ \"method\": \"$1\"}" &
  1. Create a shell command in home assistant (configuration.yaml). You have to change the path to your private key (im using docker and had to mount my key in the home assistant container):
shell_command:
  piccap_capture_service: 'ssh -i "/config/.ssh/id_rsa" -o "StrictHostKeyChecking=no" root@<your-tv-ip> "bash my-piccap-service.sh {{ command }}"'
  1. Create an automation which triggers when your tv turns on:
- service: shell_command.piccap_capture_service
  data:
    command: stop
- delay:
    hours: 0
    minutes: 0
    seconds: 5
    milliseconds: 0
- service: shell_command.piccap_capture_service
  data:
    command: start

I don't know if its necessary to stop the service first. But it works. And I dont know why the luna command has to be launched as a background service (&). But without the command gets not executed.

from piccap.

wehrstedt avatar wehrstedt commented on September 6, 2024 3

I investigated a workaround to autostart the capture service without rebooting the tv or disabling the quick start. I used home assistant to turn off and on the capture service once the tv turned on. If someone is interested in it .. Don't know if this is the right place for this.

from piccap.

denimjeans avatar denimjeans commented on September 6, 2024 1

@TBSniller thank you. issues opened here ->
#webosbrew/hyperion-webos#95

for everyone who has the same issue. I know that there are at least 2 ppl with the same issue

from piccap.

gomble avatar gomble commented on September 6, 2024

I have exactly the same problem

from piccap.

Informatic avatar Informatic commented on September 6, 2024

I assume both of you are using libdile_vt?

Have you used some older piccap version? If so, then please try running rm /var/lib/webosbrew/init.d/piccapautostart, then go to piccap settings, disable autostart, save, reenable autostart, save... I think we still have a minor bug in autostart handling which fails when some old piccap version (before 0.2.x) was installed before and left some files on the filesystem.

from piccap.

gomble avatar gomble commented on September 6, 2024

I assume both of you are using libdile_vt?

Have you used some older piccap version? If so, then please try running rm /var/lib/webosbrew/init.d/piccapautostart, then go to piccap settings, disable autostart, save, reenable autostart, save... I think we still have a minor bug in autostart handling which fails when some old piccap version (before 0.2.x) was installed before and left some files on the filesystem.

yes i had 2 older versions of picap on my lg. I will test this and come backk

from piccap.

denimjeans avatar denimjeans commented on September 6, 2024

did that, but for me it seems not to fix the issue.
Autostart seems to working, but not connecting to the hyperion server. via manual start it works.
how can i deinstall completely and install again?

it looks like it does not load a config, only when manual restart then it does... at least this describes my issue

from piccap.

TBSniller avatar TBSniller commented on September 6, 2024

Do you guys have some more information for us?
Which settings are you using?

from piccap.

gomble avatar gomble commented on September 6, 2024

I investigated a workaround to autostart the capture service without rebooting the tv or disabling the quick start. I used home assistant to turn off and on the capture service once the tv turned on. If someone is interested in it .. Don't know if this is the right place for this.

yes i am interested in can you post it ?

from piccap.

gomble avatar gomble commented on September 6, 2024

in which format is your ssh key ? i got following error:
➜ /config ssh -i "/ssl/lg_homeassistant_private" -o "StrictHostKeyChecking=no" [email protected] "bash my-piccap-service.sh {{ command }}"
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@ WARNING: UNPROTECTED PRIVATE KEY FILE! @
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
Permissions 0744 for '/ssl/lg_homeassistant_private' are too open.
It is required that your private key files are NOT accessible by others.
This private key will be ignored.
Load key "/ssl/lg_homeassistant_private": bad permissions

My Public key: lg_homeassistant_private
image

public key in authorization file:
image

from piccap.

Informatic avatar Informatic commented on September 6, 2024

Permissions 0744 for '/ssl/lg_homeassistant_private' are too open.
That's a good summary.
You first need to run:

chmod 0600 /ssl/lg_homeassistant_private

from piccap.

gomble avatar gomble commented on September 6, 2024

Permissions 0744 for '/ssl/lg_homeassistant_private' are too open. That's a good summary. You first need to run:

chmod 0600 /ssl/lg_homeassistant_private

okay its working thank you 👍

from piccap.

Laudings avatar Laudings commented on September 6, 2024

Hello,

i have also the problem that the autostart doesn't work. If i open piccap manuel, than it works.
Setting is new 2020+ tv / video capture / graphic capture.
I think it worked until there was a update from the tv. but root is still ok says webosbrew.
Can I just root the TV again to be sure that this is not the problem or will this cause other problems?
Thank you in advance!

from piccap.

Larsen23 avatar Larsen23 commented on September 6, 2024

Hi
Is there any other solution to this issue? Because the app doesn't start for me either. It only works if you send the TV to the reboot from the app itself.
Larsen

from piccap.

lightzhuk avatar lightzhuk commented on September 6, 2024

I investigated a workaround to autostart the capture service without rebooting the tv or disabling the quick start. I used home assistant to turn off and on the capture service once the tv turned on. If someone is interested in it .. Don't know if this is the right place for this.

yes i am interested in can you post it ?

  1. Enable SSH access on your tv.
  2. Place your public key on your tv for connecting via ssh without password
  3. Create the following script in /home/root on your tv:
root@LGwebOSTV:~# cat my-piccap-service.sh
#!/bin/bash

set -e
luna-send -d -n 1 "luna://org.webosbrew.piccap.service/$1" "{ \"method\": \"$1\"}" &
  1. Create a shell command in home assistant (configuration.yaml). You have to change the path to your private key (im using docker and had to mount my key in the home assistant container):
shell_command:
  piccap_capture_service: 'ssh -i "/config/.ssh/id_rsa" -o "StrictHostKeyChecking=no" root@<your-tv-ip> "bash my-piccap-service.sh {{ command }}"'
  1. Create an automation which triggers when your tv turns on:
- service: shell_command.piccap_capture_service
  data:
    command: stop
- delay:
    hours: 0
    minutes: 0
    seconds: 5
    milliseconds: 0
- service: shell_command.piccap_capture_service
  data:
    command: start

I don't know if its necessary to stop the service first. But it works. And I dont know why the luna command has to be launched as a background service (&). But without the command gets not executed.

Welcome. This looks like exactly what I need. but lack of knowledge to setup ssh connection(

from piccap.

TBSniller avatar TBSniller commented on September 6, 2024

Autostart is already fixed in newer development versions. If you aren't able to connect to your TV using SSH, just wait a bit more until release.

from piccap.

denimjeans avatar denimjeans commented on September 6, 2024

@TBSniller :

  1. how to we start & stop the service.
  2. As the autorun does not work, therefore I need to STOP and START manually, sometimes it happens that the service does not start anymore, then I need to reboot completely, any chance via SSH? What the exact command to start / stop the service
  3. Are there any precompiled more recent development versions avaiable? I dont have any enviroment setup yet, therefore I am asking. When is the new release planned approx?

from piccap.

mksy avatar mksy commented on September 6, 2024

2. sometimes it happens that the service does not start anymore, then I need to reboot completely

try killall -9 hyperion-webos via ssh and start should work

from piccap.

denimjeans avatar denimjeans commented on September 6, 2024
  1. sometimes it happens that the service does not start anymore, then I need to reboot completely

try killall -9 hyperion-webos via ssh and start should work

thank you, and restarting (starting) ? hyperion-webos & ?

from piccap.

mksy avatar mksy commented on September 6, 2024

luna-send -n 1 'luna://org.webosbrew.piccap.service/start' '{}'

from piccap.

mksy avatar mksy commented on September 6, 2024

in my case, I created a script on the TV, and call it via SSH twice if the autostart does not work

#!/usr/bin/sh
pc_status=`luna-send -n 1 'luna://org.webosbrew.piccap.service/start' '{}'`
if echo $pc_status | grep -q '{"returnValue":false}'; then
	killall -9 hyperion-webos
	luna-send -n 1 'luna://org.webosbrew.piccap.service/stop' '{}'
fi

from piccap.

denimjeans avatar denimjeans commented on September 6, 2024

thanks @mksy, I will give it a try. Looks good.

from piccap.

TBSniller avatar TBSniller commented on September 6, 2024

With latest release we reworked almost anything. Please check it out, it should work now for webOS 3.4 and above.

from piccap.

denimjeans avatar denimjeans commented on September 6, 2024

Thanks for the new version. But its now even worse. Need to reboot to get it working. Before manul restarting worked at least with 0.23

from piccap.

TBSniller avatar TBSniller commented on September 6, 2024

@denimjeans Can you please create an issue here https://github.com/webosbrew/hyperion-webos/issues ?
We would also need some logs. You can get them in Log Tab in PicCap -> First set it up using buttons in log tab -> Then produce your problem -> then get last log -> Put the picture in your issue.

You can also get logs directly from CLI by manually running it: https://github.com/webosbrew/hyperion-webos#running
Make sure to kill proccess kill -9 $(pidof hyperion-webos) and PicCap before

from piccap.

denimjeans avatar denimjeans commented on September 6, 2024

@TBSniller one thing more: could you please let me know on how to downgrade from 0.41 to 0.23. I have managed to copy the 0.23 ipk file to /tmp. But not sure on how to install now? ipkg and opkg not working here. thanks

from piccap.

TBSniller avatar TBSniller commented on September 6, 2024

@TBSniller one thing more: could you please let me know on how to downgrade from 0.41 to 0.23. I have managed to copy the 0.23 ipk file to /tmp. But not sure on how to install now? ipkg and opkg not working here. thanks

@denimjeans sure, you can use Install command mentioned here: https://github.com/TBSniller/piccap#manual-way
Just replace it with your filename. When its finished you can exit it with CTRL+C

Btw Just make sure to uninstall latest version before installing the old one

from piccap.

finipini avatar finipini commented on September 6, 2024
luna://org.webosbrew.piccap.service/$1

hey this still works for you?

I would like to turn on and off piccap from ha but i am missing something copying your way. I put a public key in my tv, and placed the private one in a file in ha but the shell command always gives de error 255.

edit. actually i wanted to ask that to @lightzhuk, since i was trying to do the way he didi it, sorry.

from piccap.

shedman214 avatar shedman214 commented on September 6, 2024
command: stop

I'm getting an error when i call service of the shell command

Identity file /config/.ssh/id_rsa not accessible: No such file or
  directory.

image

from piccap.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.