wuwentao / midea_ac_lan

Auto-configure and then control your Midea M-Smart devices (Air conditioner, Fan, Water heater, Washer, etc) via local area network.
MIT License
103 stars 5 forks source link

TOSHIBA Washer, model: TW-BL80A2CZ(SS), app: TSmartLife #185

Closed stylar-maker closed 1 day ago

stylar-maker commented 6 days ago

Device type and model (or SN)

TW-BL80A2CZ(SS)

The description of new feature

Hello,

I'm trying to use midea_ac_lan with Home Assistant, and it seems it might work with a TOSHIBA washing machine connected to the network via WiFi. The issue is how to navigate the login process when the washing machine uses the TSmartLife app, which isn't available here. Is there a way to integrate the washing machine into HA for local control or to display its entities?

Thank you in advance for any assistance!

Snímek obrazovky 2024-06-29 115604 Snímek obrazovky 2024-06-29 155917 Snímek obrazovky 2024-06-29 155941

rokam commented 4 days ago

Try adding it manually with the data provided by "list all appliances". It should work with the default keys.

I believe Toshiba uses the same backend of Midea Air, can you try that option with your TSmartLife account?

stylar-maker commented 4 days ago

I tried the offered login options, but none of them work for me.

When I want to use 'Configure manually,' a 'New appliance' window pops up. I don't know where to get the TOKEN and KEY. It keeps saying 'Token or Key in an incorrect format.'

chemelli74 commented 4 days ago

@stylar-maker we need debug log to look at to know what happens

stylar-maker commented 4 days ago

2024-07-01 17:27:48.912 WARNING (MainThread) [homeassistant.util.loop] Detected blocking call to open inside the event loop by custom integration 'midea_ac_lan' at custom_components/midea_ac_lan/config_flow.py, line 127: return load_json(record_file, default={}) (offender: /usr/src/homeassistant/homeassistant/util/json.py, line 78: with open(filename, mode="rb") as fdesc:), please create a bug report at https://github.com/wuwentao/midea_ac_lan/issues Traceback (most recent call last): File "", line 198, in _run_module_as_main File "", line 88, in _run_code File "/usr/src/homeassistant/homeassistant/main.py", line 223, in sys.exit(main()) File "/usr/src/homeassistant/homeassistant/main.py", line 209, in main exit_code = runner.run(runtime_conf) File "/usr/src/homeassistant/homeassistant/runner.py", line 190, in run return loop.run_until_complete(setup_and_run_hass(runtime_config)) File "/usr/local/lib/python3.12/asyncio/base_events.py", line 672, in run_until_complete self.run_forever() File "/usr/local/lib/python3.12/asyncio/base_events.py", line 639, in run_forever self._run_once() File "/usr/local/lib/python3.12/asyncio/base_events.py", line 1988, in _run_once handle._run() File "/usr/local/lib/python3.12/asyncio/events.py", line 88, in _run self._context.run(self._callback, *self._args) File "/usr/local/lib/python3.12/site-packages/aiohttp/web_protocol.py", line 452, in _handle_request resp = await request_handler(request) File "/usr/local/lib/python3.12/site-packages/aiohttp/web_app.py", line 543, in _handle resp = await handler(request) File "/usr/local/lib/python3.12/site-packages/aiohttp/web_middlewares.py", line 114, in impl return await handler(request) File "/usr/src/homeassistant/homeassistant/components/http/security_filter.py", line 92, in security_filter_middleware return await handler(request) File "/usr/src/homeassistant/homeassistant/components/http/forwarded.py", line 83, in forwarded_middleware return await handler(request) File "/usr/src/homeassistant/homeassistant/components/http/request_context.py", line 26, in request_context_middleware return await handler(request) File "/usr/src/homeassistant/homeassistant/components/http/ban.py", line 85, in ban_middleware return await handler(request) File "/usr/src/homeassistant/homeassistant/components/http/auth.py", line 242, in auth_middleware return await handler(request) File "/usr/src/homeassistant/homeassistant/components/http/headers.py", line 32, in headers_middleware response = await handler(request) File "/usr/src/homeassistant/homeassistant/helpers/http.py", line 73, in handle result = await handler(request, request.match_info) File "/usr/src/homeassistant/homeassistant/components/http/decorators.py", line 81, in with_admin return await func(self, request, *args, *kwargs) File "/usr/src/homeassistant/homeassistant/components/config/config_entries.py", line 222, in post return await super().post(request, flow_id) File "/usr/src/homeassistant/homeassistant/components/http/data_validator.py", line 70, in wrapper return await method(view, request, data, args, kwargs) File "/usr/src/homeassistant/homeassistant/helpers/data_entry_flow.py", line 122, in post result = await self._flow_mgr.async_configure(flow_id, data) File "/usr/src/homeassistant/homeassistant/data_entry_flow.py", line 368, in async_configure result = await self._async_configure(flow_id, user_input) File "/usr/src/homeassistant/homeassistant/data_entry_flow.py", line 414, in _async_configure result = await self._async_handle_step( File "/usr/src/homeassistant/homeassistant/data_entry_flow.py", line 517, in _async_handle_step result: _FlowResultT = await getattr(flow, method)(user_input) File "/config/custom_components/midea_ac_lan/config_flow.py", line 300, in async_step_auto storage_device = self._load_device_config(device_id) File "/config/custom_components/midea_ac_lan/config_flow.py", line 127, in _load_device_config return load_json(record_file, default={})

chemelli74 commented 4 days ago

Thx, but we need he full log not just a snippet.

Note: it is better to drag the log into the comment (which will add it as an attachment) and not copy paste as it is hard to read logs in GitHub.

stylar-maker commented 4 days ago

Full log attached. home-assistant_2024-07-01T15-35-23.132Z.log

rokam commented 2 days ago

Hi @stylar-maker can you leave the key and token empty?

Also, to provide us more info: Please add the following to configuration.yaml , restart HA, and post the log:

logger:
  default: warning
  logs:
    custom_components.midea_ac_lan: debug
    midealocal: debug

Note: it is better to drag the log into the comment (which will add it as an attachment) and not copy paste as it is hard to read logs in GitHub.

And add diagnostics (menu configuration -> integration -> midea_ac_lan -> download diagnostics )

stylar-maker commented 2 days ago

Hi, here are the requested logs attached according to your instructions. home-assistant_2024-07-03T14-12-50.799Z.log config_entry-hacs-83bf92936eaf32996ebe3f1827385ea7.json

wuwentao commented 2 days ago

@stylar-maker oh, you have enabled debug log, it got the expected output. but you still need to run discovery and add device, once it got error, then upload the full log. current log only have list device and without add device action and error info.

stylar-maker commented 2 days ago

Hi, I tried adding the device during the logging process, but I can't get any further.

Discover automatically - I can't log in, I only have a TSmartLife account. Configure manually - I don't have the token and key. List of appliances only - the device is found as supported, but clicking 'Submit' does nothing.

stylar-maker commented 2 days ago

I finnaly managed to add the washing machine (protocols V1 and V2 are working) and I can see entities, although they don't appear to be functional.

washer

updated logs: home-assistant_2024-07-03T16-28-22.530Z.log config_entry-hacs-83bf92936eaf32996ebe3f1827385ea7.json

wuwentao commented 1 day ago

I finnaly managed to add the washing machine (protocols V1 and V2 are working) and I can see entities, although they don't appear to be functional. washer

updated logs: home-assistant_2024-07-03T16-28-22.530Z.log config_entry-hacs-83bf92936eaf32996ebe3f1827385ea7.json

No, you can't add device with V1 or V2, as your device type is V3, so you can only add it with V3 type. if you add it with v2 type, you can't control your device. as the protocol is error......

so please don't manual change the protocol version, and you need to add device with the right protocol v3 version. if it can't add pass, it should be some error exist. the error log can show the readon.