tavicu / homebridge-samsung-tizen

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

I want to avoid SmartThings API #568

Closed jdebardi closed 1 year ago

jdebardi commented 1 year ago

Hi,

I just stumbled on your excellent looking plugin as I am looking for ways to keep as many of my smart home integrations as I can local (i.e. not depending on web services).

Then I read that you are moving towards SmartThings API šŸ˜ž

Can I ask that rather than rip the "hacks" out of the code, you include a "local mode" that avoids using the SmartThings API at all costs, even if at the detriment to functionality?

Maybe have it as localMode:Strict means it will never use the API, localMode:Enabled will favour "hacks" where possible but still use the API where no other option is available locally for a function?

I'm hoping it's a simple as choosing to insert an if (localMode)... statement rather than deleting "hack" code as you add API functionality (and maybe restore a few old lines of code in the first instance!).

Happy to make a PayPal donation if this can be done.

tavicu commented 1 year ago

Hi @jdebardi ,

local functionality is also very important to me and it will not be removed. We are using SmartThings api just for the new features that work only this way. But the old code and functions that worked before will remain the same. Even for those that we are migrating to SmartThings I implemented a fallback and if you donā€™t setup SmartThings it will work the old way.

For example (and right now itā€™s the only one) the channel option. If you have SmartThings setup it will use that. If not, it will use the old ā€œhackā€ that presses the buttons :)

Personally I hate SmartThings and I will do whatever I can to avoid it :) Even if Samsung decide to ditch the local endpoint we are using with newer TVs I will probably make another plugin that works with SmartThings and leave this one the old way for those who have an older TV :)

But letā€™s hope Samsung itā€™s not dumb enough and understand that smart homes are a thing now and you also canā€™t block users to use only your ecosystem!

jdebardi commented 1 year ago

Morning, That's good to hear! I'm currently migrating away from Smartthings but am tied to them in some way as I still have TV/Refrigerator/Washing Machine that only work with it. Hopefully they realise many people want local control of their devices as you say and leave the current endpoint in the firmware. I guess it would be nice from my side to have my cake and eat it... so enable Smartthings integration but only use it for functions that have no other option (i.e. my suggested LocalMode:Strict), but I'll see how I get on with Smartthings not enabled at all for now.

tavicu commented 1 year ago

As I said in the first message the only feature that was migrate from local endpoint to SmartThings was selecting a channel number.

You can leave the SmartThings integration if you want and instead of selecting a channel you could use commands.

For example, channel 11. Instead of channel: 11 you could send command ā€˜KEY_1,KEY_1,KEY_ENTERā€™

jdebardi commented 1 year ago

Oh if that's the only feature then cool. Thanks again :)