Comments (3)
Actually although get_device_info() fails, get_device_info_json() does work. it looks like the "overheated" field is now named "overheat_status" for this device. Here is the json with all keys and most values (some redacted for privacy).
{'avatar': 'switch_s500d', 'brightness': 50,
'default_states': {'re_power_type': 'always_off', 're_power_type_capability': ['last_states', 'always_on', 'always_off'], 'type': 'last_states'},
'device_id': 'xxxx', 'device_on': False, 'fw_id': '00000000000000000000000000000000',
'fw_ver': '1.1.1 Build 240130 Rel.090201', 'has_set_location_info': True,
'hw_id': 'xxxx', 'hw_ver': '1.0', 'ip': 'xxxx', 'lang': 'en_US',
'latitude': xxx, 'longitude': -xxx, 'mac': 'xxxx', 'model': 'S500D',
'nickname': 'xxxxx=', 'oem_id': 'xxxxx', 'on_time': 0,
'overheat_status': 'normal', 'region': 'America/Los_Angeles',
'rssi': -43, 'signal_level': 3, 'specs': '', 'ssid': 'xxxxx', 'time_diff': -48\0,
'type': 'SMART.TAPOSWITCH'}
In case it's helpful to other users, you can roll your own device info from the json like this:
device_info_dict = await device.get_device_info_json()
DeviceInfoRecord = namedtuple('DeviceInfoRecord', device_info_dict.keys())
device_info = DeviceInfoRecord(**device_info_dict)
print(f"Device is {'on' if device_info.device_on else 'off'}")
if device_info.device_on:
..etc
from tapo.
Thank you for raising this issue.
In the short term, I have removed the overheated
property from DeviceInfoGenericResult
.
In the long term, I think it's worth adding first-class support for S500D devices.
It looks very similar to light bulb devices, which can be turned on/off and have their brightness adjusted.
Thank you for posting the device info, that's very helpful!
from tapo.
As one user of your library, I would be very happy if you do not first-class the S500D but instead make the generic tapo device more functional. get_device_info_json() is perfect but if you could add set_device_info_json(<key/val dict>), it would support all devices (that use the same authentication method) and there's no new work for you every time Tapo introduces a new device or change.
from tapo.
Related Issues (20)
- Is it mandatory to use the Hub? HOT 2
- P115 changing WI-FI HOT 5
- H100 initialization attempt returns error HOT 4
- Support client.getDeviceList HOT 4
- Example for doing things with devices accessed throung the hub HOT 1
- Local access to TAPO P110 for energy data HOT 10
- cannot import 'LightHander' or 'ColorLightHandler' for typings HOT 3
- Meaning / correctness of timestamps of device.get_energy_data HOT 3
- Bug in hue/saturation and color_temperature code HOT 2
- ApiClient on AWS Lambda HOT 1
- Sporadic segfaults in a python module when using ApiClient to query a Tapo P110 HOT 8
- ImportError: cannot import name 'ApiClient' from partially initialized module 'tapo' (most likely due to a circular import) HOT 2
- start_timestamp and export timestamp HOT 5
- Tapo: SessionTimeout HOT 2
- Monthly data reading crashes when device somehow has negative values HOT 2
- trigger logs doesn't retrieve all logs HOT 2
- tapo-py 0.3.1 code hangs on timeout HOT 1
- tapo-py :- 0.3.1 getting error while calling get_device_info HOT 9
- Behaviour of start_date and end_date parameters of device.get_energy_data() HOT 8
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from tapo.