eclair4151 / samsung_encrypted_POC

A proof of concept to pair and send commands to H and J series Samsung TVs
10 stars 5 forks source link

sometimes it does nothing #3

Open mod25 opened 6 years ago

mod25 commented 6 years ago

sometimes it does nothing in console is everything ok but on tv is no reaction KEY_VOLDOWN or KEY_POWER. thank you my tv is J-Series

eclair4151 commented 6 years ago

Does it never work or does it work sometimes?

mod25 commented 6 years ago

It works sometimes

@mobil

Am 12.12.2017 um 22:32 schrieb Tomer Shemesh notifications@github.com:

Does it never work or does it work sometimes?

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or mute the thread.

eclair4151 commented 6 years ago

Hard to say. i think it may have to do with some websocket connection limit. i ran into this during development if i opened too many websocket connections it started rejecting new connections. i was able to fix it by unpluggging and replugging in the tv.

mod25 commented 6 years ago

it does but after poweroff normaly it doesn't work. i need to pair it again and then it works. btw. thank you for your great work!

sectroyer commented 6 years ago

For me I need to "init" ws api after 1 minute using stuff from the begining of the script. If I only keep on sending commands tv stops reacting to them (maybe websocket timeout?) but if I init again all is ok 😄

McKael commented 6 years ago

@mod25 after power off or reboot I believe the pairings are cleared (see #5).

quan3t commented 6 years ago

@sectroyer I am having same issue. sometime command works sometime doesnt. can you tell me what you mean by init ws api? can you share example?

sectroyer commented 6 years ago

@McKael I think only hard (unplugging from wall) since IIRC for me it works even after (soft) reboot 😄

@quan3t Just look at sample script it does init and send key "commands". Simply re-do init 😄

McKael commented 6 years ago

@sectroyer Yes I meant actual reboot like firmware upgrade. (Not sure what you mean with soft reboot, but stand-by mode does not clear pairing for me, fortunately.)

Sometimes my TV seems to do a full boot sequence when leaving stand-by mode... When it happens I always think it's an unattended upgrade, but I can't say for sure. I haven't had one for a while now (maybe it's too old now and Samsung wants me to buy a new TV to get upgrades :wink: ).

McKael commented 6 years ago

@sectroyer BTW have you given up on your native pairing implementation?

quan3t commented 6 years ago

@sectroyer sorry am not very good at coding so if you can help me out that would be great... I don't see any init in the code.. are you referring to the line connection=websocket.create_connection?

aesLib = aes_lib.AESCipher(enc_key, session) connection = websocket.create_connection(websocket_url) time.sleep(0.35)

need sleeps cuz if you send commands to quick it fails

connection.send('1::/com.samsung.companion')

pairs to this app with this command.

time.sleep(0.35)

connection.send(aesLib.generate_command(key_command)) time.sleep(0.35)

sectroyer commented 6 years ago

@McKael You should NEVER do a firmware UPgrade ❗️ If you have to change a fw it's much better to do a fw DOWNgrade. NOTHING new comes with "new" fw's except from MORE blotware, more ads and more spyware 😄

@McKael Not sure how to answer that 😄 If by "giving up" you mean NOT coding it anymore than yeah, once I finished there was no point in doing anything else 😄

@quan3t I mean connection shit but this code you posted is basically the sample from github. It doesn't work for you ❓

McKael commented 6 years ago

@sectroyer

You should NEVER do a firmware UPgrade

Well I've always been hopeful they'd fix some annoying bugs... And besides, I don't know if it's even possible to disable automatic upgrades!

If by "giving up" you mean NOT coding it anymore than yeah, once I finished there was no point in doing anything else

Oh ? I didn't know it was finished! Did you release it? (I'm referring to the C or Python code you mentioned in https://github.com/Ape/samsungctl/issues/22, that would not require a 3rd party server, right?)

sectroyer commented 6 years ago

Well I've always been hopeful they'd fix some annoying bugs... And besides, I don't know if it's even possible to disable automatic upgrades!

It NEVER fixes anything. Depending on model you can disable or block updates. All details are on SamyGO website

Oh ? I didn't know it was finished! Did you release it? (I'm referring to the C or Python code you mentioned in Ape/samsungctl#22, that would not require a 3rd party server, right?)

Nope, I didn't release it yet 😄