Skip to content
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

New idea, API messages #550

Open
netRunner0 opened this issue Dec 12, 2024 · 10 comments
Open

New idea, API messages #550

netRunner0 opened this issue Dec 12, 2024 · 10 comments

Comments

@netRunner0
Copy link

Thanks again for your work, the plugin is great!

You have support for messages on the TV in the form of static buttons and predefined messages.
It would be nice if you made API support for messages, so that it would be possible to send any messages with any data via HomeKit automation (http requests).

Please consider this as an idea for implementation)

@merdok
Copy link
Owner

merdok commented Dec 12, 2024

thanks for the feedback, but i am not quite sure if i understand it correctly. Could you please elaborate it more, if possible with an real world use case?

@netRunner0
Copy link
Author

For example, I need to send a message about low water level (25%) or about upcoming frosts (up to -20)

The values ​​25 and 20 are dynamic. They are in Homekit, and I would like to send them to TV via Homekit

@merdok
Copy link
Owner

merdok commented Dec 14, 2024

There is a file property on the notificationButtons, when you specify that, it will read out the file and show the content of it in the notification. Other then that you can use the toast cli command which will also show a notification on the tv.

@netRunner0
Copy link
Author

This is good, but there is no way to write a file in Homekit automations. It would be nice to have a web server on some port to receive these commands via POST.

@merdok
Copy link
Owner

merdok commented Dec 18, 2024

As mentioned, you can do that with the cli commands. You could setup a service on a server which then calls the cli commands.

@netRunner0
Copy link
Author

I tried to access from commands via SSH but there was a problem
To get to the CLI, you need to run the command hb-shell and then webostv toast ...

I tried to pass the execution of 2 commands via SSH from commands:
sudo hb-shell & webostv toast ip mac message but this returns an unknown error

When simply working from the console, messages are sent fine

@netRunner0
Copy link
Author

IMG_6655

@merdok
Copy link
Owner

merdok commented Dec 22, 2024

This seems to be more of an OS related issue and would have nothing to do with the initial request, so i would recommend you to check the permissions or other OS related things.

@netRunner0
Copy link
Author

The fact is that one command is always executed, and two commands in a row can no longer be executed (using shorts)

Therefore, I would like to see an intermediary in the form of a mini web server to receive messages via json...

@merdok
Copy link
Owner

merdok commented Dec 22, 2024

Yeah, you would need to build yourself that small web server if you require it, the tools to do that are available. If you think that some other people could benefit from that then you could submit a pull request and we could include that in the repo.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants