Jump to content

Need help controlling HA with a Network Resource


Recommended Posts

Can anyone help me control a single device in HA through an NR?

Short story:

I have a Samsung TV that HA found and created a card for.  Using the card, I can manually turn the TV on and off.  I want to tell HA do that in an NR.  I think it is possible through the HA RESTful interface, with PUT calls maybe, but I'm finding it hard to get the specifics by searching.

Long story:

This model, UN43TU700DFXZA , must be turned on through WOL.  Once it's on, you can send it commands, but like a lot of modern stuff, you have to use credentials that you obtain once interactively.  HA's integration handles all this, and it's now set up on my TV, so with its interface I can control the TV's power.  I don't think NR's have the versatility to directly communicate with this TV, but all my logic is on my Polisy, and I just need to be able to turn the TV on and off to create an automation that I want.  That's why I want to use a couple of NRs to control the TV power through HA.  Like a lot of things HA-related, searching for '"REST" turned up a lot of information that was either irrelevant or so densely filled with jargon that I couldn't understand it.  I have created several NRs for other things in my home, and I'm hoping one of the built-in NR protocols can be used to send the proper commands to HA.

-Tom

Link to comment

This may be the dealbreaker: in the HA developer documentation, it shows you how to use the RESTful interface, but contains this comment: The API accepts and returns only JSON encoded objects.  Does this mean NRs won't work?  I don't see JSON as an option in the "mode" dropdown, unless that's what "URL-Encoded" means.

I got this information from this page: REST API | Home Assistant Developer Docs (home-assistant.io)

-Tom

Link to comment

Go to your HA dashboard --> settings --> automations and scenes
Create new automation
Add trigger --> Webhook
Change the webhook ID to something meaningful like "tvon"
Then add the action of turning the tv on in your HA
Use my attached screenshot as a template for your network resource.
The host will be the ip address of your HA box
The path will be /api/webhook/tvon

Let me know if you have questions

2024-07-31_16-22-45.png

Edited by gregkinney
Link to comment
On 7/29/2024 at 1:10 AM, xlurkr said:

Can anyone help me control a single device in HA through an NR?

Short story:

I have a Samsung TV that HA found and created a card for.  Using the card, I can manually turn the TV on and off.  I want to tell HA do that in an NR.  I think it is possible through the HA RESTful interface, with PUT calls maybe, but I'm finding it hard to get the specifics by searching.

 

Maybe it would be easier to create automation in HA and control ISY via integration? 

Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


×
×
  • Create New...