Commit graph

58 commits

Author SHA1 Message Date
definitio
67bb6ebd13
Fix "Unknown power_off command" for Samsung H6410 (#80386) 2022-10-15 21:29:15 +01:00
Marc Mueller
d73754d292
Fix TypeAlias + TypeVar names (#76897) 2022-08-16 21:19:55 -04:00
epenet
d1d6c6b923
Cleanup SamsungTV log message (#71987) 2022-05-17 22:50:03 +03:00
epenet
db08c04da6
Only test for EncryptedBridge in Samsung J/H models (#71291) 2022-05-04 22:15:24 -07:00
epenet
8fb645e1d7
Return cached device_info if refresh fails in SamsungTV (#68844) 2022-03-29 22:16:26 -10:00
epenet
f053fc9167
Add code comment in SamsungTV (#68841) 2022-03-29 20:11:22 -10:00
epenet
4d59cb290c
Remove duplicate code in SamsungTV bridge (#68839) 2022-03-29 20:04:18 -10:00
epenet
2bb42f48aa
Add CONF_MODEL to core constants (#68806)
* Add CONF_MODEL to core constants

* Use CONF_MODEL in SamsungTV

Co-authored-by: epenet <epenet@users.noreply.github.com>
2022-03-29 10:01:10 +02:00
J. Nick Koston
6110e7d194
Remove unneeded __repr__ in samsungtv logging (#68817)
* Remove unneeded __repr__ in samsungtv logging

* keep only the ones we need
2022-03-29 07:22:58 +02:00
J. Nick Koston
6cec53bea1
Add support for finding the samsungtv MainTvAgent service location (#68763) 2022-03-27 22:01:07 -10:00
J. Nick Koston
b5496441ae
Use new samsungtv exception to detect when reauth is needed (#68762) 2022-03-27 12:12:32 -10:00
J. Nick Koston
cc75cebfc5
Add support for setting up encrypted samsung tvs from config flow (#68717)
Co-authored-by: epenet <epenet@users.noreply.github.com>
2022-03-27 10:30:45 -10:00
epenet
b13e14b80c
Add command support to SamsungTV H/J models (#68301)
Co-authored-by: epenet <epenet@users.noreply.github.com>
Co-authored-by: J. Nick Koston <nick@koston.org>
2022-03-24 07:58:58 -10:00
epenet
9ba0475644
Use callback to get app_list in SamsungTV (#68506)
Co-authored-by: epenet <epenet@users.noreply.github.com>
2022-03-23 11:12:12 -10:00
epenet
df6cc94b25
Cleanup SamsungTV following dependency bump (#68562)
* send_command -> send_commands

* Remove TODO

Co-authored-by: epenet <epenet@users.noreply.github.com>
2022-03-23 20:35:58 +02:00
epenet
87378016c1
Add basic support for SamsungTV encrypted models (#68500)
Co-authored-by: epenet <epenet@users.noreply.github.com>
2022-03-22 00:11:41 -10:00
epenet
0adc7042dc
Make new_token_callback more generic in SamsungTV (#67990)
Co-authored-by: epenet <epenet@users.noreply.github.com>
2022-03-17 09:24:00 -10:00
epenet
125ab5eb2b
Handle ConnectionClosed in SamsungTV try_connect (#68125)
* Handle ConnectionClosed in SamsungTV try_connect

* Add tests

* Add quotes around the error message

Co-authored-by: epenet <epenet@users.noreply.github.com>
2022-03-15 08:20:24 +01:00
epenet
23b8229143
Adjust ms.remote.control error logging in SamsungTV (#67988)
Co-authored-by: epenet <epenet@users.noreply.github.com>
2022-03-12 01:20:04 -10:00
epenet
86b775e46a
Use generic SamsungTVBridge for SamsungTV type hints (#67942)
Co-authored-by: epenet <epenet@users.noreply.github.com>
2022-03-10 07:48:30 -06:00
epenet
d12118a425
Fix reauth trigger in SamsungTV (#67850)
Co-authored-by: epenet <epenet@users.noreply.github.com>
2022-03-08 11:02:00 +01:00
epenet
36049ac514
Batch send commands in SamsungTV (#67847)
Co-authored-by: epenet <epenet@users.noreply.github.com>
2022-03-08 10:10:17 +01:00
epenet
6f38eda114
Adjust power_off for TheFrame in SamsungTV (#67841)
Co-authored-by: epenet <epenet@users.noreply.github.com>
2022-03-08 08:20:58 +01:00
epenet
5b23b9a617
Adjust get_mac routine in SamsungTV (#67804)
Co-authored-by: epenet <epenet@users.noreply.github.com>
2022-03-08 07:54:12 +01:00
epenet
1793c29fac
Move key sequences to bridge in SamsungTV (#67762)
Co-authored-by: epenet <epenet@users.noreply.github.com>
2022-03-08 07:46:34 +01:00
epenet
c70bed86ff
Adjust websocket bridge logging in SamsungTV (#67809)
Co-authored-by: epenet <epenet@users.noreply.github.com>
2022-03-07 23:31:57 +01:00
epenet
c5f7e7d1b0
Refactor run app in SamsungTV (#67616)
Co-authored-by: epenet <epenet@users.noreply.github.com>
2022-03-04 14:37:27 -10:00
epenet
9db3e321e4
Add message for unsupported models in samsungtv (#67549)
Co-authored-by: epenet <epenet@users.noreply.github.com>
2022-03-04 12:06:15 -10:00
epenet
74483d2669
Fix Samsung TV state when the device is turned off (#67541)
Co-authored-by: epenet <epenet@users.noreply.github.com>
2022-03-03 08:06:33 -10:00
epenet
26f2388fa1
Adjust error handling scope in samsungtv (#66692)
Co-authored-by: epenet <epenet@users.noreply.github.com>
2022-03-02 20:52:11 +01:00
epenet
b8861578ff
Implement async websocket in samsungtv (#67127)
Co-authored-by: epenet <epenet@users.noreply.github.com>
2022-03-02 09:30:33 -10:00
epenet
b245ba6d57
Bump samsungtvws to v2.1.0 (#67483)
Co-authored-by: epenet <epenet@users.noreply.github.com>
2022-03-02 10:09:06 -08:00
epenet
b613008eda
Cleanup samsungtv bridge (#67424)
Co-authored-by: epenet <epenet@users.noreply.github.com>
2022-03-01 09:05:51 -10:00
epenet
1556868d56
Use async rest api in SamsungTV (#67369)
Co-authored-by: epenet <epenet@users.noreply.github.com>
2022-02-28 09:53:42 -10:00
epenet
1cca317294
Bump samsungtvws to 2.0.0 (#67351) 2022-02-27 15:29:31 -10:00
epenet
715d7f70f0
Adjust SamsungTV abstraction layer (#67216)
Co-authored-by: epenet <epenet@users.noreply.github.com>
2022-02-25 17:15:45 +01:00
epenet
a60c37cdb8
Expose Samsung wrapper as async (#67042)
Co-authored-by: epenet <epenet@users.noreply.github.com>
2022-02-22 08:31:16 -10:00
epenet
39c1209e1c
Bump samsungtvws to 1.7.0 (#66978)
Co-authored-by: epenet <epenet@users.noreply.github.com>
2022-02-21 12:42:54 +01:00
epenet
3aa18ea5d8
Add installed apps to samsungtv sources (#66752)
Co-authored-by: epenet <epenet@users.noreply.github.com>
2022-02-18 13:33:49 -08:00
epenet
92ce255293
Ensure new samsungtv token is updated in the config_entry (#66731)
Co-authored-by: epenet <epenet@users.noreply.github.com>
2022-02-17 12:49:01 -08:00
epenet
2d33e435b9
Fix token refresh in samsungtv (#66533) 2022-02-16 12:28:01 -08:00
epenet
3b87c01af9
Fix try_connect in samsungtv (#66653)
* Fix try_connect in samsungtv

* Use try...else

* Adjust try...else

* Undo try...else

Co-authored-by: epenet <epenet@users.noreply.github.com>
2022-02-16 16:17:11 +01:00
Simone Chemelli
36427fe76c
Fix excepton for SamsungTV getting device info (#65151) 2022-01-28 23:57:12 +02:00
Simone Chemelli
4160a5ee3b
Strict typing for SamsungTV (#53585)
Co-authored-by: Franck Nijhof <frenck@frenck.nl>
Co-authored-by: J. Nick Koston <nick@koston.org>
2021-09-17 18:51:07 -10:00
Simone Chemelli
d39b861110
Fix SamsungTV sendkey when not connected (#55723) 2021-09-04 13:58:34 -07:00
Simone Chemelli
18bc2f95c8
Small log addition for samsungtv (#53206) 2021-07-19 23:41:30 -05:00
J. Nick Koston
d009f06a55
Handle connection being closed in legacy samsungtv (#52137)
* Handle connection being closed in legacy samsungtv

- Mirror the websocket behavior

Fixes
```
2021-06-24 02:54:13 ERROR (MainThread) [homeassistant.helpers.entity] Update for media_player.89_guestroom fails
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 401, in async_update_ha_state
    await self.async_device_update()
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 609, in async_device_update
    raise exc
  File "/usr/local/lib/python3.8/concurrent/futures/thread.py", line 57, in run
    result = self.fn(*self.args, **self.kwargs)
  File "/usr/src/homeassistant/homeassistant/components/samsungtv/media_player.py", line 124, in update
    self._state = STATE_ON if self._bridge.is_on() else STATE_OFF
  File "/usr/src/homeassistant/homeassistant/components/samsungtv/bridge.py", line 113, in is_on
    return self._get_remote() is not None
  File "/usr/src/homeassistant/homeassistant/components/samsungtv/bridge.py", line 232, in _get_remote
    self._remote = Remote(self.config.copy())
  File "/usr/local/lib/python3.8/site-packages/samsungctl/remote.py", line 9, in __init__
    self.remote = RemoteLegacy(config)
  File "/usr/local/lib/python3.8/site-packages/samsungctl/remote_legacy.py", line 32, in __init__
    self._read_response(True)
  File "/usr/local/lib/python3.8/site-packages/samsungctl/remote_legacy.py", line 77, in _read_response
    raise exceptions.ConnectionClosed()
samsungctl.exceptions.ConnectionClosed
```

* add coverage

* pass instead
2021-06-25 07:31:44 +02:00
J. Nick Koston
5695710463
Add mac address to samsungtv config entry data if missing (#51634)
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
2021-06-24 08:15:16 -10:00
Simone Chemelli
3d8804bbcf
Improve logging for SamsungTV (#51477) 2021-06-04 09:02:39 -07:00
Simone Chemelli
b9a0fb93eb
Add samsungtv dhcp and zeroconf discovery (#48022)
Co-authored-by: J. Nick Koston <nick@koston.org>
2021-05-22 10:41:18 -05:00