All Projects → eclair4151 → Alexacontrolledsamsungtv

eclair4151 / Alexacontrolledsamsungtv

Licence: mit
Control your Samsung smart TV via amazon alexa

Programming Languages

python
139335 projects - #7 most used programming language

Projects that are alternatives of or similar to Alexacontrolledsamsungtv

Squeeze Alexa
Squeezebox integration for Amazon Alexa
Stars: ✭ 54 (-26.03%)
Mutual labels:  alexa, alexa-skill
Alexa Monzo
Monzo Skill for the Amazon Alexa
Stars: ✭ 49 (-32.88%)
Mutual labels:  alexa, alexa-skill
voice-landing-page
Free Landing Page Bootstrap Template for Alexa Skills and Google Actions
Stars: ✭ 21 (-71.23%)
Mutual labels:  alexa, alexa-skill
Azure4Alexa
Create and Host Alexa Custom Skills using .NET and Azure
Stars: ✭ 48 (-34.25%)
Mutual labels:  alexa, alexa-skill
Alexa Soundcloud
soundcloud integration for alexa
Stars: ✭ 47 (-35.62%)
Mutual labels:  alexa, alexa-skill
cookiecutter-flask-ask
Cookiecutter template for Alexa skills based on the fantastic Flask-Ask framework 🍾🗣❓
Stars: ✭ 51 (-30.14%)
Mutual labels:  alexa, alexa-skill
alexa-conversation
Framework to easily test your Alexa skills functionally by creating a conversation with your skill.
Stars: ✭ 51 (-30.14%)
Mutual labels:  alexa, alexa-skill
alexa-ruby
Ruby toolkit for Amazon Alexa service
Stars: ✭ 17 (-76.71%)
Mutual labels:  alexa, alexa-skill
SinricPro Generic
Simple way to control your IOT development boards like ESP8226, ESP32, Arduino SAMD21, Adafruit SAMD21, SAMD51, nRF52, STM32, Teensy, SAM DUE with Amazon Alexa or Google Home
Stars: ✭ 18 (-75.34%)
Mutual labels:  alexa, alexa-skill
alexa-skill-clean-code-template
Alexa Skill Template with clean code (eslint, sonar), testing (unit tests, e2e), multi-language, Alexa Presentation Language (APL) and In-Skill Purchases (ISP) support. Updated to ASK-CLI V2.
Stars: ✭ 34 (-53.42%)
Mutual labels:  alexa, alexa-skill
alexa-skill-test-framework
Framework for easy offline black-box testing of Alexa skills.
Stars: ✭ 64 (-12.33%)
Mutual labels:  alexa, alexa-skill
Alexa Skills Kit Sdk For Python
The Alexa Skills Kit SDK for Python helps you get a skill up and running quickly, letting you focus on skill logic instead of boilerplate code.
Stars: ✭ 678 (+828.77%)
Mutual labels:  alexa, alexa-skill
alexa-verifier-middleware
An express middleware that verifies HTTP requests sent to an Alexa skill are sent from Amazon.
Stars: ✭ 31 (-57.53%)
Mutual labels:  alexa, alexa-skill
serverless-alexa-skills
Manage your Alexa Skills with Serverless Framework
Stars: ✭ 69 (-5.48%)
Mutual labels:  alexa, alexa-skill
alexa-skill-heytube
Alexa Skills to Play a Single Audio or Multiple Audio from YouTube Videos
Stars: ✭ 26 (-64.38%)
Mutual labels:  alexa, alexa-skill
alexa-skill-boilerplate
An easy to use Amazon Alexa Skill Boilerplate for fast skill creation
Stars: ✭ 54 (-26.03%)
Mutual labels:  alexa, alexa-skill
alexa-typescript-starter
This is a simple starter project for Alexa skills using Typescript.
Stars: ✭ 38 (-47.95%)
Mutual labels:  alexa, alexa-skill
alexa template
A template and tutorial for building an Alexa Skill written in Python focused on readability.
Stars: ✭ 44 (-39.73%)
Mutual labels:  alexa, alexa-skill
home assistant appdaemon alexa google
An AppDaemon application for Home Assistant, handles calls from Alexa Skill and a Google Action
Stars: ✭ 11 (-84.93%)
Mutual labels:  alexa, alexa-skill
Alexa Skill Kit
Library for effortless Alexa Skill development with AWS Lambda
Stars: ✭ 278 (+280.82%)
Mutual labels:  alexa, alexa-skill

Connecting your Samsung Smart TV to Alexa

This tool allows you to connect your Samsung Smart TV to alexa, by using a rasberry pi. To see a full writeup of how this works see: https://drive.google.com/open?id=1uSn3TrIsmUn8I4OfTDpgXExMafl71EGzi0hFydTTWWo

To run you will need Python3 with the following pip packages installed

websocket-client

AWSIoTPythonSDK

requests

Setup

First you will need an online account. Create one at https://alexasmarttv.dev Then clone this project onto your raspberryPi

Then turn on your TV and run the following commands to get up and running

python3 alexasmartcli.py scan

It should output the ip, mac address, and model.
put those into the tvconfig.py file. The tvconfig should be in this format:

device_name = "Home Raspberry PI" #What shows up under devices in alexasmarttv.dev. not that important unless you have multiple devices (not tvs) on your account
volume_step_size = 10  #how much your tv volume should go up by when you say 'Alexa, turn up the volume on my tv'


tvs = [
    {
        'host': ".....", #ip address of tv
        'tv_model' : '....',
        'tv_mac_address': "....",
        'tv_name' : 'TV', #Leave as TV to refrence this by just 'TV'. ex: 'Alexa, turn on the TV'.  Change to eg:'Kitchen TV' if you want to say 'Alexa turn on the kitchen TV', You cannot have multiple tvs have the same name
        'prefer_HD': True, #if you say 'change the channel to ESPN',  always attempt to use the HD channel number'
    },
    {
      #TV2....
    },
    {
       #TV3.... 
    }
    
]

Then run:

python3 alexasmartcli.py login
python3 alexasmartcli.py register (you will need to run this command anytime you change/add/remove a tv from tvconfig)
python3 alexasmartcli.py setup_cable (optional and only currently works in the US)
python3 alexasmartcli.py start (run with -m to mute the output)

to run this server in the backround automatically when your pi boots up place this line in your /etc/rc.local file (before the exit line):

python3 /PATH/TO/FOLDER/alexasmartcli.py start -m &&

Then just install the Alexa smart skill (Unofficial Samsung SmartTV Controller), discover devices and you will be on your way.

Link to alexa skill: https://www.amazon.com/dp/B07886XNK8

Tutorial:
Alexa Setup Tutorial

Currently supported commands:

  • Alexa turn on the TV (Only supported on K,M, and QLED TVS (2016 and newer))

  • Alexa turn off the TV

  • Alexa (un)mute the TV

  • Alexa turn up/down the volume on TV

  • Alexa change the channel to 25 on the TV

  • Alexa change the channel to ESPN on the TV

  • Alexa Play/Pause/Stop the TV



Setting up your own channel mappings for unsupported countries/zipcodes:

I currently pull all channel mappings from http://www.tvguide.com/Listings/ but if your tv provider/zipcode isnt on there you can still set it up manually:

  • Create a file inside the helpers folder called lineup.json.
  • inside you should put the channels in the following format:
[
  ["espn", "espn", "2", "502"], 
   ["dsc", "discovery", "120", "620"], 
   ... 
   ["fs1", "fox sports one", "83", "583"]
]

The first item the channel id like dsc or hgtv. The 2nd is the full channel name, The 3rd is the nonhd channel num The 4th is the hd channel num.

You can leave any the items that don’t apply empty/set to 0
In many cases like ESPN the channel id and full name will be the same
It is also important to note that that the channel id and name are completely arbitrary and can be named anything you want to, to tell alexa to change the channel, Eg: alexa change the channel to unicorn on my tv.

Just note that in the full channel name to use spelled out numbers if it applies, Eg: Fox Sports One NOT Fox Sports 1

Troubleshooting:

if nothing seems to happen these are some steps you can take to debug:

  • start the server without the -m option and ask alexa to mute the tv. If nothing appears in the output there was an error linking the alexa skill. This can happen if you reregister a pi but dont relogin to you account in the device linking. go the the alexa app, disable this skill and reenable to correctly link them

  • if the command appears in the output but doesnt control the tv your tvconfig file is incorrect. make sure you have put the correct IP address and model number. You can also try running the Samsungctl library directly to make sure you have the correct settings

  • if discovering TVs through the Alexa app does not discover the tvs correctly try running python3 alexasmartcli.py register and restarting the server. Then try to rediscover your tvs.

  • if when starting the server you get the following error

File "/usr/lib/python3.5/socket.py", line 733, in getaddrinfo
for res in _socket.getaddrinfo(host, port, family, type, proto, flags):
socket.gaierror: [Errno -2] Name or service not known

This is a known issue of the Mqtt library i use
https://github.com/aws/aws-iot-device-sdk-python/issues/192
The fix is to set the DNS provider of your raspi to 8.8.8.8, 8.8.4.4
https://pimylifeup.com/raspberry-pi-dns-settings/

Disclaimer:

  1. H and J series TVs are currently unsupported but are being worked on to support it. There is an experimental fork to add support if you would like to give it a try: https://github.com/bencarlisle15/AlexaControlledSamsungTV

  2. If you have a cable box, in order to change the channel the alexa sends a command to the smart remote which sends it back to the cable box over RF. Because of this for the command 'alexa change the channel' to work the remote needs to have line of sight with the cable box

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].