Controlling a SamyGO TV through Home Assistant

Ideas and dreaming will go this forum
Post Reply

User avatar
mad_ady
SamyGO Project Donor
Posts: 231
Joined: Sun May 03, 2015 10:42 am

Controlling a SamyGO TV through Home Assistant

Post by mad_ady » Mon Jul 10, 2017 2:36 pm

Home Assistant (http://homeassistant.io/) is a Home automation platform that allows you to monitor and control all sorts of devices an platform in the privacy of your own house (no cloud). I've added my SamyGO TV (H6400) to Home Assistant by using the samygo-web-api (viewtopic.php?f=75&t=11881).

A general howto for understanding and configuring Home Assistant is over here: https://forum.odroid.com/viewtopic.php?t=27321

The changes needed to HomeAssistant to control your TV are stored in this github repository: https://github.com/mad-ady/home-assista ... omizations

Installation:
1. Make sure you've installed the web api and its dependencies on the TV
2. Install Home Assistant on your computer/RPI/Odroid/device and go through the standard configuration
3. Copy the jsonrest sensor to your custom components folder:

Code: Select all

mkdir -p ~homeassistant/.homeassistant/custom_components/sensor/
wget -O ~homeassistant/.homeassistant/custom_components/sensor/jsonrest.py https://raw.githubusercontent.com/mad-ady/home-assistant-customizations/master/custom_components/sensor/jsonrest.py
4. Configure your Home Assistant by adding several sensors and a web cam.
Example configuration: https://github.com/mad-ady/home-assista ... o-api.yaml
Example URLs: https://github.com/mad-ady/home-assista ... ecret.yaml
5. Restart homeassistant or reload the configuration
6. Profit:
Home Assistant Web UI:Image
Home Assistant History (view state changes): Image
Youtube demo: https://www.youtube.com/watch?v=jC7yUe_AJw4

Tested on a H6400. Older models might need some tweaking with regard to the screenshot functionality. Patches and ideas welcome! TV is surprisingly stable despite repeated injections - good job SamyGO team!
Last edited by mad_ady on Mon Jul 10, 2017 2:36 pm, edited 1 time in total.
H6400, firmware 2602.2 downgraded to 2130

User avatar
mad_ady
SamyGO Project Donor
Posts: 231
Joined: Sun May 03, 2015 10:42 am

Re: Controlling a SamyGO TV through Home Assistant

Post by mad_ady » Tue Jul 11, 2017 8:32 pm

Updated first post and added a link to Home Assistant general configuration: https://forum.odroid.com/viewtopic.php?t=27321
H6400, firmware 2602.2 downgraded to 2130

brendanheyu
Posts: 1
Joined: Fri Sep 08, 2017 6:26 am

Re: Controlling a SamyGO TV through Home Assistant

Post by brendanheyu » Fri Sep 08, 2017 6:30 am

@mad_ady - I just thought I'd let you know that I joined this forum to specifically say to you - AWESOME! I saw your video on youTube and traced you back to here.

I'm going to dash home and check to see if I can hook my samsung TV with samygo and link it into my homeassistant!

Nice work!

User avatar
mad_ady
SamyGO Project Donor
Posts: 231
Joined: Sun May 03, 2015 10:42 am

Re: Controlling a SamyGO TV through Home Assistant

Post by mad_ady » Fri Sep 08, 2017 9:01 am

:) I'm glad you find it helpful. The hard work is done by the SamyGO libraries, I just added a web API around them so that I could query them from Home Assistant.
If you have a newer generation TV (J or higher), the API won't work, and needs to be redone. I can do it, but I would need help from somebody with shell access on such a TV.
H6400, firmware 2602.2 downgraded to 2130

Post Reply

Return to “[H] Brainstorm”