tavicu / homebridge-samsung-tizen

Homebridge plugin for Samsung TV's with Tizen OS
MIT License
639 stars 86 forks source link

play button after openning the app #522

Closed Danlipanovich closed 2 years ago

Danlipanovich commented 2 years ago

Hi, I'm trying thru API to open Spotify as the tv turns on and then hit play so the music start by itself what is the best way to do it? iv tried to KEY_PLAY_BACK4s with no luck, but the switch stays turn on. { "name": "Morning Mood", "power": true, "app": "3201606009684", "volume": 12, "command": [ "KEY_PLAY_BACK12s" ] }

tavicu commented 2 years ago

Hi.

KEY_PLAY_BACK don't exists. I think they key you are looking for is KEY_PLAY. Also, you don't need the 4s or 12s or any s because that means it keeps the key pushed for X seconds. You only need to press it.

So it should be "command": "KEY_PLAY"

If you want to have a bigger delay before pressing play, let's say 5 seconds you can do it like this: "command": "DELAY*5s,KEY_PLAY"

Danlipanovich commented 2 years ago

It’s doesn’t do the play function, I’m homebridge is shows a comment 401 unauthorized

tavicu commented 2 years ago

I’m homebridge is shows a comment 401 unauthorized

That's probably from SmartThings API since you have the volume. https://github.com/tavicu/homebridge-samsung-tizen/wiki/SmartThings-Setup

Without logs I cannot help you

Danlipanovich commented 2 years ago

How do I download them?


מאת: Octavian Ruda @.> נשלח: יום שני, מאי 9, 2022 4:10 אח׳ אל: tavicu/homebridge-samsung-tizen @.> עותק: Danlipanovich @.>; Author @.> נושא: Re: [tavicu/homebridge-samsung-tizen] play button after openning the app (Issue #522)

I’m homebridge is shows a comment 401 unauthorized

That's probably from SmartThings API since you have the volume. https://github.com/tavicu/homebridge-samsung-tizen/wiki/SmartThings-Setup

Without logs I cannot help you

— Reply to this email directly, view it on GitHubhttps://github.com/tavicu/homebridge-samsung-tizen/issues/522#issuecomment-1121081242, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AIICFLCJ4AETWU2LP46U6ZTVJEFCNANCNFSM5VM2JEEA. You are receiving this because you authored the thread.Message ID: @.***>

tavicu commented 2 years ago

You need to start Homebridge in Debug mode. https://github.com/tavicu/homebridge-samsung-tizen/wiki/Common-Issues#how-to-open-a-new-issue

Then follow the console when you toggle the Switch.

Danlipanovich commented 2 years ago

HAP-NodeJS:EventedHTTPServer Server listening on [::]:36495 +0ms HAP-NodeJS:Advertiser Starting to advertise 'Homebridge CAD8' using bonjour-hap backend! +78ms [5/9/2022, 4:26:02 PM] Homebridge v1.4.1 (HAP v0.10.2) (Homebridge) is running on port 36495. HAP-NodeJS:EventedHTTPServer Currently 0 hap connections open: +60s HAP-NodeJS:EventedHTTPServer [::ffff:192.168.1.192] New connection from client on interface eth0 (::ffff:192.168.1.192) +17s HAP-NodeJS:EventedHTTPServer:Connection [::ffff:192.168.1.192] Internal HTTP server listening on 127.0.0.1:34287 +0ms HAP-NodeJS:EventedHTTPServer:Connection [::ffff:192.168.1.192] Internal HTTP socket connected. HAPConnection now fully set up! +11ms HAP-NodeJS:EventedHTTPServer:Connection [::ffff:192.168.1.192] HTTP request: /accessories +7ms HAP-NodeJS:HAPServer [CC:22:3D:E3:CE:30] HAP Request: GET /accessories +0ms HAP-NodeJS:EventedHTTPServer:Connection [::ffff:192.168.1.192] HTTP Response is finished +15ms HAP-NodeJS:EventedHTTPServer:Connection [::ffff:192.168.1.192] Client connection closed +4ms HAP-NodeJS:EventedHTTPServer:Connection [::ffff:192.168.1.192] HTTP server was closed +1ms HAP-NodeJS:EventedHTTPServer:Connection [::ffff:192.168.1.192] HTTP connection was closed +1ms HAP-NodeJS:EventedHTTPServer:Connection [::ffff:192.168.1.192] HTTP server was closed +1ms HAP-NodeJS:EventedHTTPServer Currently 0 hap connections open: +43s

Danlipanovich commented 2 years ago

JUST NOTICES THAT THE COMMAND ITSELF SHOWN ONLY IN CONFIG AND NOT UN THE PLUGIN SETTINGS' COULD BE RELEVANT?

tavicu commented 2 years ago

Hi.

I'm sorry but the logs you posted are not related to the plugin. There are just the first logs of the server starting.

Also you didn't post your config so I can see it.

At this point I don't know how to help you without showing me at least the config section :)

ElphaX commented 2 years ago

An easy way to share logs would be to temporarily disable other plugins (if you don't have too many) and share the entire log with config. We should be able to find the culprit that way :)

Danlipanovich commented 2 years ago

Hi.

I'm sorry but the logs you posted are not related to the plugin. There are just the first logs of the server starting.

Also you didn't post your config so I can see it.

At this point I don't know how to help you without showing me at least the config section :)

An easy way to share logs would be to temporarily disable other plugins (if you don't have too many) and share the entire log with config. We should be able to find the culprit that way :) "platforms": [ { "name": "Config", "port": 8581, "platform": "config" }, { "devices": [ { "api_key": "", "device_id": "", "name": "Samsung TV", "ip": "192.168.1.133", "mac": "80:47:86:28:db:85", "inputs": [ { "type": "app", "name": "Netflix", "value": "3201907018807" }, { "type": "app", "name": "YouTube", "value": "111299001912" }, { "type": "app", "name": "Internet", "value": "3201907018784" }, { "type": "app", "name": "Spotify", "value": "3201606009684" }, { "type": "command", "name": "Xbox", "value": "KEY_HDMI," } ], "switches": [ { "name": "Morning Mood", "power": true, "app": "3201606009684", "volume": 12, "command": "DELAY*5S,KEY_PLAY" } ] }, { "device_id": "a05959d5-9997-4fc7-bf13-77fa7d75d0c0", "name": "Dan TV", "ip": "192.168.1.201", "mac": "d0:d0:03:c6:f0:c3", "inputs": [ { "type": "app" } ] }, { "inputs": [ { "type": "app" } ] } ], "platform": "SamsungTizen" },

Danlipanovich commented 2 years ago

Hi.

I'm sorry but the logs you posted are not related to the plugin. There are just the first logs of the server starting.

Also you didn't post your config so I can see it.

At this point I don't know how to help you without showing me at least the config section :)

the only log is this even that everything else works[5/31/2022, 2:51:53 PM] [Samsung TV] 401 - Unauthorized

tavicu commented 2 years ago

the only log is this even that everything else works[5/31/2022, 2:51:53 PM] [Samsung TV] 401 - Unauthorized

That is an error returned by SmartThings API. Follow this guide, step by step, word by word! :) https://github.com/tavicu/homebridge-samsung-tizen/wiki/SmartThings-Setup