maxvandelaar / homey-webos-plus Goto Github PK
View Code? Open in Web Editor NEWImproved LG WebOS integration for Homey
License: GNU General Public License v3.0
Improved LG WebOS integration for Homey
License: GNU General Public License v3.0
Is your feature request related to a problem? Please describe.
I can't change the channel from a flow
Describe the solution you'd like
To have an action flow card to change the channels by number or selection from a list in case of digital channels
You have the minimum polling interval set to 120s.
In my opinion this is to long to detect on/off state since it makes the reaction to events way to slow.
Can you allow me to set my polling to a lower value?
Describe the bug
App crashes right after authorized on TV
To Reproduce
npm install
homey app run
Also tried to remove package-lock.json
and node_modules
and runned npm install
to get a total refresh of dependencies. Still app crashes on the same.
Expected behavior
A working app ;)
Screenshots
─────────────── Logging stdout & stderr ───────────────
2021-10-09 21:47:15 [log] [WebosPlus] WebOS Plus is running...
2021-10-09 21:47:16 [log] [ManagerDrivers] [webos_plus] [2e0379be-6d30-4ccd-b588-742561935b9c] onInit: Device Ready!
2021-10-09 21:47:16 [log] [ManagerDrivers] [webos_plus] [2e0379be-6d30-4ccd-b588-742561935b9c] _connect: Connect to TV 192.168.10.115
2021-10-09 21:47:16 [log] [ManagerDrivers] [webos_plus] WebosPlus Driver has been inited
2021-10-09 21:47:16 [log] [ManagerDrivers] [webos_plus] [2e0379be-6d30-4ccd-b588-742561935b9c] _connect: [prompt] Please authorize on TV
2021-10-09 21:47:26 [log] [ManagerDrivers] [webos_plus] [2e0379be-6d30-4ccd-b588-742561935b9c] _connect: [connect] Connected
2021-10-09 21:47:26 [log] [ManagerDrivers] [webos_plus] [2e0379be-6d30-4ccd-b588-742561935b9c] powerStateListener: Called
2021-10-09 21:47:26 [log] [ManagerDrivers] [webos_plus] [2e0379be-6d30-4ccd-b588-742561935b9c] _powerStateListener: Start listening for changes in power state
--- INFO: com.maxvandelaar.webos-plus has been killed ---
───────────────────────────────────────────────────────
Additional context
My TV: LG OLED55B7V
If channelNumber and/or channelName is undefined. Don’t set it to the track.
Describe the bug
Green download button is working but WebOS Plus app is not installed on Homey - tried several times.
To Reproduce
Steps to reproduce the behaviour
Expected behavior
A clear and concise description of what you expected to happen.
Screenshots
If applicable, add screenshots to help explain your problem.
Additional context
Add any other context about the problem here.
Add more flow triggers
Tried installing on my Homey 2023.
homey select
homey app install
Output:
✓ Pre-processing app...
Command failed: npm ls --parseable --all --only=prod
npm WARN config only Use `--omit=dev` to omit dev dependencies from the install.
npm ERR! code ELSPROBLEMS
npm ERR! missing: jimp-compact@^0.9.8, required by [email protected]
npm ERR! missing: node-fetch@^2.6.0, required by [email protected]
npm ERR! missing: node-wol@^0.1.1, required by [email protected]
npm ERR! missing: websocket@^1.0.30, required by [email protected]
npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\lars\AppData\Local\npm-cache\_logs\2023-05-23T14_11_42_998Z-debug-0.log
This error may be fixed by running `npm install` in your app.
npm run deploy
Output:
> [email protected] deploy
> npm install && homey app install
npm WARN deprecated [email protected]: Please update to ini >=1.3.6 to avoid a prototype pollution issue
npm WARN deprecated [email protected]: Modern JS already guarantees Array#sort() is a stable sort, so this library is deprecated. See the compatibility table on MDN: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/sort#browser_compatibility
npm WARN deprecated [email protected]: Please see https://github.com/lydell/urix#deprecated
npm WARN deprecated [email protected]: Package no longer supported. Contact Support at https://www.npmjs.com/support for more info.
npm WARN deprecated [email protected]: Legacy versions of mkdirp are no longer supported. Please update to mkdirp 1.x. (Note that the API surface has changed to use Promises in 1.x.)
npm WARN deprecated [email protected]: See https://github.com/lydell/source-map-resolve#deprecated
npm WARN deprecated [email protected]: Chokidar 2 does not receive security updates since 2019. Upgrade to chokidar 3 with 15x fewer dependencies
npm WARN deprecated [email protected]: https://github.com/lydell/resolve-url#deprecated
npm WARN deprecated [email protected]: acorn>=7.2 supports import-meta
npm WARN deprecated [email protected]: See https://github.com/lydell/source-map-url#deprecated
npm WARN deprecated [email protected]: The querystring API is considered Legacy. new code should use the URLSearchParams API instead.
npm WARN deprecated [email protected]: Please upgrade to version 7 or higher. Older versions may use Math.random() in certain circumstances, which is known to be problematic. See https://v8.dev/blog/math-random for details.
npm WARN deprecated [email protected]: This SVGO version is no longer supported. Upgrade to v2.x.x.
added 830 packages, and audited 831 packages in 14s
22 packages are looking for funding
run `npm fund` for details
49 vulnerabilities (12 moderate, 28 high, 9 critical)
To address issues that do not require attention, run:
npm audit fix
To address all issues (including breaking changes), run:
npm audit fix --force
Run `npm audit` for details.
✓ Pre-processing app...
✓ Validating app...
✓ Homey App validated successfully against level `debug`
✓ Packing Homey App...
✓ Pruning dev dependencies...
× Error occurred during npm prune TypeError: prunePathsJson.removed.map is not a function
at NpmCommands.getPrunePaths (C:\Users\lars\Downloads\homey-webos-plus-3.1.2\homey-webos-plus-3.1.2\node_modules\homey\lib\Modules\NpmCommands.js:92:49)
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
at async C:\Users\lars\Downloads\homey-webos-plus-3.1.2\homey-webos-plus-3.1.2\node_modules\homey\lib\App\index.js:683:26
— App size: 85.7 MB
✓ Installing Homey App on `Lars's New Homey` (http://192.168.x.y)...
× Cannot read properties of undefined (reading 'find')
Anyone know how to make this run on the new Homey?
Hallo Max,
ben je toevallig van plan de Webos plus app naar SDK3 te updaten? zodat hij ook op de nieuwe Homey pro gebruikt kan worden?
tevens valt het me op dat de app niet constanteert dat er iets aan het afspelen is, wel ziet de app dat de tv aan en uit gaat. ik zou graag namelijk een bioscoop scene van mijn lampen willen aansturen als netflix begint af te spelen
groeten
Robin de Lange
Hey. Everything works great. There are no errors, no problems, everything is perfect. Thanks for the app. One small question: two more lines appeared in the message sending, as I understand it, to send an image, I just can’t figure out how to use it. I would be grateful for an example of use. Thanks!!!
Describe the bug
A minor bug imho.
@ LG TV one can save multiple fav websites (these sites are now also selectable from the app list @ the TV)
Those sites are then selectable @ Homey with the WebOS Plus "select app or input" action card, see screenie 1.
Issue:
The last shown url keeps being shown, no matter which selectable url is sent from a flow.
To Reproduce
@ LG TV, start Webbrowser app.
Save two different url's to fav sites, referred as url 1 and -2.
When url 1 was last shown on the TV, and one fires a flow where url 2 is selected, url 1 is shown again.
When manually picking url 2 on the TV, and then firing a flow where url 1 is selected, url 2 is shown again.
Expected behavior
When url 1 was last shown on the TV, and one fires a flow where url 2 is selected, url 2 should show.
When manually picking url 2 on the TV, and then firing a flow where url 1 is selected, url 1 should be shown.
Screenshots
Screenie 1,
(With tested url's: 'buienradar.nl' and 'Homey Cornelisse Dash'):
Additional context
N.A.
Thanx for this great app! Cheers, Peter
It would be very cool if you can support the image tag (HomeyImage) as image source for the toast notification instead of/next of the base64.
that would make it possible to take a camera image and send it as toast for example
I was planning to use a flow to cast the image from ring to the tv when someone is at my door. I was planning for a flow like this.
When: Ring alarm triggered
And: LGTV is on
Then:
The problem is that I can't change input to a value from a variable. It would have been Nice if this could be implemented.
Thanks!
So if I use the remote to power on the 2.0 version I get 1 out of 2 times an immediate power down again. I mean a real shutdown not just displayed as off in the app.
This also happens when power on from the app.
In both cases the app is aware that the tv is off.
Sending toastmessage with gallery image not displayed on TV
Tryed different images and filesizes, but non of the images and text are displayed on TV
The app crashes when installing my oled cx on homey fw5.0rc26.
Sideload v2.2.1 and install oledtv in devices.
Describe the bug
The flow misses titleFormatted, this may be problem in future releases
To Reproduce
Install via CLI
Expected behavior
No warnings will be shown
Screenshots
If applicable, add screenshots to help explain your problem.
Additional context
This is for now just pure warning, not critical issue, but need to be solved
So I tried to update to 1.2.1 so I downloaded the new version and the code shows 1.2.1
Then I ran homey app install. It deployed fine but the app never stops loading.
Then I ran homey app run and even then, I can see it deploy and then nothing. it never stops inititalizing.
Describe the bug
App after install from Git worked ok. Added device (went ok), now it constantly crashes.
Setup: LG OLED 55C7V running 05.80.35
To Reproduce
Not sure. Restart the app, but it crashes again
Please do let me know if I need to share antything else
The app does not want to be aware that the tv is off.
If I power the TV off using the remote the app never detects it as being off.
If I power off using the app the app confirms the off state for a second and than the button turns back to on state.
It then never gets to the off state again.
Pressing the button to the off state does nothing with the tv (probably tries to shutdown but since its off already...).
When the TV is off and an Off command is send from a flow the device turns on.
Describe the bug
TV sending power on signal after turning it off with a flow on homey. it happens randomly
To Reproduce
when starting homey flow with turn off tv, some times the tv will turn on again after turning off, also sometimes when the turn off button is pressed when the tv is off, the tv will turn on.
Expected behavior
that the power off button / turn off tv will turn off the tv and not turn it on again. for now i solved it with powering on and off with the harmony bridge, i added the tv also on that platform. on the harmony bridge this issue is gone.
i want to use your app, because your app is so much better :-)
Screenshots
Additional context
i am using this app on the new homey pro 2023, i installed the app with homey app install, its the latest version.
also tried to change power check to polling, i can turn it on in the app on homey, when i want to save the new settings it gives the following error: cannot read properties of undefined (reading 'userpoll')
Installed via zip. Got a lot of 'deprecated' errors. Did a 'npm update -g'. Tried to install again. Install reported successful this time. WebOS Plus shows up in my Homey Pro '23 app list, but I cannot make any flows with it, as there are no cards visible.
In Homey devices when you open your LG WebOS TV you get the controls to do some light interaction with the tv. What I would like is to see what App/Input is active on the TV as the AlbumArt inlcuding media controls. So I can see that the Netflix app is running with its logo and allowing for the prev play/pause next buttons to interact with it.
Similar behavior can be seen by the official LG tv app or the Xbox one compagnion app as examples.
Code needed for this looks like:
On device init:
this.appImage = new Homey.Image();
this.appImage.setPath('/assets/images/hdmi.jpg'));
this.appImage.register().catch(console.error).then(function(){this.setAlbumArtImage(this.appImage);}.bind(this));
This loads the the hdmi image as the default.
later on somewhere in your new app detection code:
//Getting the app image from an external source, device api/internet for example
this.appImage.setStream(async (stream) => {
const res = await fetch(appInfo.displayImage); //object with the URL to the image for example
if(!res.ok)
throw new Error('Invalid Response');
return res.body.pipe(stream);
});
this.appImage.update();
The media controls are standard capabilities you can enable:
if(!this.hasCapability("speaker_playing"))
await this.addCapability('speaker_playing');
if(!this.hasCapability("speaker_next"))
await this.addCapability("speaker_next");
if(!this.hasCapability("speaker_prev"))
await this.addCapability("speaker_prev");
Rewrite the current polling implementation for checking the device state. Use the WebOS api instead
Hi
Thanks for this app, it works great for my LG TV (LG OLED55C9PLA). The only thing I've noticed is that when the TV turns on it's screensaver (e.g. when I get a call whiling watching TV), the TV is marked as off in Homey. It doesn't look I can turn off the screensaver due to OLED protection.
I'm unaware if you can make a distinction between powered off and screensaver mode but I'm happy to assist you in testing if need be.
Let me know if you need more (debugging) information.
Best regards,
Jonas
Is your feature request related to a problem? Please describe.
Trigger a flow when the app changed to e.g. Netflix. Now this is only possible to create a trigger in general and conditional check if the app is Netflix
Describe the solution you'd like
It should work the same way as other apps with the check inside the trigger.
Please add the TV is ON/OFF as "and" condition.
My lights in the livingroom go off after 10 minutes except when te TV is on (sitting still on the couch).
Condition is available in original athom app, missing in this (almost) perfect fork..
Keep up the good work.
When i want to send a Message to TV, the image will not show. For example i have a flow when my doorbell rings, it takes a snapshot from ring with image grabber.
And another flow: When image grabber has recieved a new image. Then send a message to TV, i tried a toast message with url and a toast message from galary. In both ways i only see the text message So the flow work but i dont see the image. Tried more extentions. But thougt the normal jpg would work.
Describe the bug
When two or more tv's are added, flow cards use the lgtv connection from the last added tv
To Reproduce
Add two tv's and try to create an flow action for the tv added first
Expected behavior
The flow action should apply to the correct tv
I've installed the app on Homey Pro 2023 (of course with SDK v3). At first it seems to install correctly and I can add my TV, but after a reboot of Homey, there is an error message: "Error: Invalid App Origin: undefined".
If i look in the JSON of the app in my Homey (api/manager/apps/app) you can see that the origin is indeed set to unknown (I tried to uninstall the app and install it again, but right after installation it is already 'unknown').
The app 'com.maxvandelaar.homey-community-store-homeyapp' does have a valid origin: 'devkit_install'
Thanks a lot for this improved WEBOS app!
I would love to see sound output added to the overview; just as it's possible to do on the Hass.io integration: https://www.home-assistant.io/integrations/webostv/#sound-output
That way I can easily switch between my soundbar, headphones and TV speakers
Describe the bug
My TV updated itself today and after this it has started to act weirdly. It seems like the Homey app (I use v 2.2.1 development) is getting random on/off signals, despite the fact the tv's status has not changed. Please see the upper-most log items here, where I've logged the tv saying it's on (at 20:33:55, this was me turning it on), then off (20:35:48) then on again (20:35:53). The last two were not triggered by user input.
To Reproduce
Update LG tv to latest WebOS. Monitor on/off events when tv is on.
Expected behavior
No on/off events when tv remains on.
Additional context
Am I the only one getting these? Since I had the tv on auto-update (stupid mistake) this firmware version must be very fresh. Thank you, by the way, for a very good Homey app!
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.