Jump to content

New Plugin - Samsung SmartThings


chef
 Share

Recommended Posts

So just tried the above, does nothing at all now?

 

Thanks again for looking at this @@chef we are all very appreciative of your efforts!

 

 

I see it, one moment.

Link to comment
Share on other sites

Same, nothing happening at all.

 

Edit - interestingly, works fine with my Emby theater upstairs, just not with the TV downstairs.

embyserver.txt

Edited by CashMoney
Link to comment
Share on other sites

Okay, I tried to use the "NowPlayingItem" object on the API, however, some clients will report it and some will not, so we can't use it. 

 

I'll have to look again, for a different way.

  • Like 1
Link to comment
Share on other sites

Bonkers!

 

 

okay, this time we check the paused Session list first to see if the session which has triggered the progress event is in it. Then, we see if it is paused.

 

DOWNLOAD: SamsungSmartThings.zip

 

I'm kinda embarrassed. Sorry.

Link to comment
Share on other sites

Hopefully not a coincidence, glitchy still, but less so? Before it was 95% pause glitch 5% working, now it's more like 50-50.

Attached log should have 3 play-pause, first glitched, second was fine, third glitched.

embyserver.txt

  • Like 1
Link to comment
Share on other sites

DOWNLOAD: SamsungSmartThings.zip

 

I put a flag in the code called "IgnoreEvents". This will hopefully allow time for the pause and unpause events to full fire, and register themselves in the context list without being interrupted by the playbackprogress events.

Edited by chef
Link to comment
Share on other sites

DOWNLOAD: attachicon.gifSamsungSmartThings.zip

 

I put a flag in the code called "IgnoreEvents". This will hopefully allow time for the pause and unpause events to full fire, and register themselves in the context list without being interrupted by the playbackprogress events.

Wont be able to do a full on test until this weekend but this new version seems to work as expected!

 

Logs attached if it helps.

 

Thanks @@chef!

embyserver.txt

  • Like 1
Link to comment
Share on other sites

So it would seem that, the issue was, we were swamped with events. 

Link to comment
Share on other sites

I’ll be able to check it tomorrow as will be first day off in the past7. I’ll post the logs for you by lunch and let you know if I have any glitches.

Link to comment
Share on other sites

@@chef

That worked exactly like it should. All scenes played , paused, resumed, credits ran (I experimented and changed to 180 seconds) and then stop scene ran at the end. Great job for me. Now onto Previews scene, LoL. I have attached the log for you to review. I did see some errors, didn't seem to effect the way the scenes ran. Let me know if you need me to test anything else.

 

On another note, is there a setting in Emby that can be set to not have a check on watched movies? I have to clear after each movie is watched.

embyserver.txt

  • Like 1
Link to comment
Share on other sites

Ok, something isn't right, but I'm beginning to think it might be unique to my setup (I just have no idea what).

 

Attached log has 2 playback tests. The first is via Emby Theater on my HTPC. Same scenes as the Samsung TV. As others have reported, works flawlessly (good work @@chef!).

The second is Emby Theater via the Samsung TV App. No scenes play at all now.

 

I've deleted all the scenes, regenerated a new token, enabled ALL options for that token and tried again. Same thing; HTPC plays fine, TV nada.

My sons slightly older 49" Samsung, same scenes and lights etc, again, flawless lighting.

 

The only difference I can see so far is that he is on 1.0.75 and my TV is on 1.0.77.

embyserver.txt

Link to comment
Share on other sites

Okay I'll check it out. There shouldn't be a difference between clients, however the logs should tell us what's going on.

  • Like 1
Link to comment
Share on other sites

So it would seem that, the issue was, we were swamped with events. 

Real world movie viewing last night worked perfectly @@chef

 

  • Like 1
Link to comment
Share on other sites

@@chef, Thanks again for all the hard work getting this all ironed out. Everything appears to be working as it should. Now, how much beer money can we send your way to get a preview scene as one of our choices? I would love to have that option so I can set lights at 30% when a previews run, then go onto the play scene to have them all turn off. Does Emby have a way to see a tag or are there tags that tell if the movie(s) are filmed as 2:40 or 1:85 ratio?

Link to comment
Share on other sites

Ok, something isn't right, but I'm beginning to think it might be unique to my setup (I just have no idea what).

Found the problem/Fixed it :)

 

tl:dr - Deleted the affected devices from the plugins list, and then deleted the devices from the devices list. Logged back in on the devices, then went back in the smartthings plugin and setup the scenes again, all working fine.

 

Long version -

Previously the "stop" scene wasn't running on my TV and nothing I did would fix it. Eventually all scenes stopped working on the TV so I assumed it was limited to my TV only. When it started happening on web browser and my PC's Emby Theater as well (1 scene not working, different scenes/devices) I figured something else was up. Having had no luck creating a new token in the Smartthings plugin and deleting recreating scenes in the plugin I removed the affected devices from the Emby server devices list entirely and logged back in. Of course I then had to go into the Smartthings plugin and set them all up again but now they all work flawlessly. 

 

Thought I'd post the long version in case it happens to someone else; if scenes stop working, delete the device from the Smartthings plugin AND from the Emby server Device List and set them up again.

 

No idea if that is correct/expected behavior but personally I can live with it. Thanks again @@chef

Link to comment
Share on other sites

@@CashMoney, I have found that I setup a different profile (guest) for each device that way I can control what each does/ scenes it runs. I have previews and credits that run on the home theatre but I don’t want those things to run on living room tv or web browser. Would also help you track down what’s happening on each device.

  • Like 1
Link to comment
Share on other sites

robspriest

I have managed to get it work when in chrome browser but will this be able to be used with Google Chromecast also?

Edited by robspriest
Link to comment
Share on other sites

I have managed to get it work when in chrome browser but will this be able to be used with Google Chromecast also?

I'm sorry, Chromecast is a different type of device. It doesn't report state and also doesn't show up in Emby devices specifically. The device you use to cast the stream will show up in Emby devices, but the Chromecast itself will not.

Link to comment
Share on other sites

  • 4 weeks later...

Any progress on implementing the option for suppressing commands when in between videos in a playlist?  Thanks for your time.

Link to comment
Share on other sites

  • 6 months later...

I had been using this plugin over the summer and it was great.  Would mostly just have lights dim at the beginning of a movie or live TV, and then come back when stopped.  Only issue I saw was that switching channels in live TV was seen as a stop / play set of command, which makes sense, and then the lights would flick on full bright then dim back down again.  So I was trying to think of how to get around that.

But, then I bailed out on SmartThings and went to Hubitat.  While their forum has tons of novel 3rd party applications, nothing useful for connecting Emby to it.  Knowing that SmartThings and Hubitat are very similar on the backend, do you think there is anyway to get the same functionality from this plugin on Hubitat?

Thanks.

Link to comment
Share on other sites

  • 2 weeks later...
On 19/01/2021 at 13:37, bigbruin said:

I had been using this plugin over the summer and it was great.  Would mostly just have lights dim at the beginning of a movie or live TV, and then come back when stopped.  Only issue I saw was that switching channels in live TV was seen as a stop / play set of command, which makes sense, and then the lights would flick on full bright then dim back down again.  So I was trying to think of how to get around that.

But, then I bailed out on SmartThings and went to Hubitat.  While their forum has tons of novel 3rd party applications, nothing useful for connecting Emby to it.  Knowing that SmartThings and Hubitat are very similar on the backend, do you think there is anyway to get the same functionality from this plugin on Hubitat?

Thanks.

Emby Communicator for Hubitat

Here you go. I didn't officially release it, and all but abandoned hubitat months ago in favor of Home Assistant. But this creates devices on Hubitat that receives webhook events from Emby, which you can then use in Rule Machine, Simple Lighting, Webcore, etc... to do any automations you please based on playback status, type of video being played, etc.. etc..

 

 

Capture.PNG

Edited by MRobi
  • Like 1
Link to comment
Share on other sites

  • 1 year later...
TheWorkz

Curious, Does this plugin work with the Aeotec Smart Home Hub? I was looking at switching from Vera to Samsung and it seems like the hubs are harder to come by and have been replaced by Aeotec? Thanks

Luke

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...