albertogeniola / MerossIot

Async Python library for controlling Meross devices
https://albertogeniola.github.io/MerossIot/
MIT License
478 stars 88 forks source link

[MEROSS-API-CHANGED] missing 1 required positional argument: 'skill_number' #274

Closed impulsio closed 1 year ago

impulsio commented 1 year ago

Hello, I have an issue with the latest version : File "/usr/local/lib/python3.7/dist-packages/meross_iot/manager.py", line 343, in async_device_discovery http_devices = await self._http_client.async_list_devices() File "/usr/local/lib/python3.7/dist-packages/meross_iot/http_api.py", line 417, in async_list_devices return [HttpDeviceInfo.from_dict(x) for x in result] File "/usr/local/lib/python3.7/dist-packages/meross_iot/http_api.py", line 417, in return [HttpDeviceInfo.from_dict(x) for x in result] File "/usr/local/lib/python3.7/dist-packages/meross_iot/model/shared.py", line 27, in from_dict obj = cls(**new_dict)

With this code (it's the call async_device_discovery that generate the error)

    http_api_client = await MerossHttpClient.async_from_user_password(args.muser, args.mpswd)
    logger.debug("Connected with user " + args.muser)
    # Register event handlers for the manager...
    manager = MerossManager(http_client=http_api_client)
    await manager.async_init()
    await manager.async_device_discovery()

Could you help me ?

thefloe1 commented 1 year ago

Same for me. Tested on Windows with different Python Versions from 3.8 to 3.10 with 32bit and 64bit and library version 0.4.2.3 and 0.4.5.3.

MichelRabozee commented 1 year ago

Same for me... Strange enough, I updated yesterday, 19 hours ago, and it worked fine till 2 hours ago, while I clearly did not change anything between 19 hours ago and 2 hours ago...

albertogeniola commented 1 year ago

Hi, that's a change on the Meross Cloud API that is breaking the library. I am now working to fix it.

dpacecca commented 1 year ago

Hi, that's a change on the Meross Cloud API that is breaking the library. I am now working to fix it.

Thank you Alberto

Raul-7-7 commented 1 year ago

Thank you Alberto!

impulsio commented 1 year ago

Hi, that's a change on the Meross Cloud API that is breaking the library. I am now working to fix it.

Many thanks !

dpacecca commented 1 year ago

@albertogeniola thanks for your good work, how do we apply the fix in Home Assistant?

albertogeniola commented 1 year ago

Hi @dpacecca , you just have to stay tuned here. When a fix is ready for HA I'll publish that there, with corresponding instructions.

dpacecca commented 1 year ago

Thanks, sorry I misunderstood that this was resolved :)

albertogeniola commented 1 year ago

For the ones using this library, you can now upgrade to v0.4.5.4, which includes the hotfix. Please let me know if that solves the issue.

MichelRabozee commented 1 year ago

Everything is now OK ! You rock !

albertogeniola commented 1 year ago

I'm glad to hear that. We've been lucky: the Meross breaking change occurred during my holidays :)

Jokes aside, It's just too bad people must now upgrade the library version to the latest one. I know of many IoT projects relying on this library to work and I'm afraid they will need to upgrade to keep them up and running.

dpacecca commented 1 year ago

You're a legend, it is all working fine now, thanks!!

@albertogeniola enjoy your coffee!

fletch904 commented 1 year ago

Hi, I have done the update and restart but still not working, however I think it might have been something I changed trying to fix it before I realised it was a common problem

I had changed the top box to the web address for meross API could someone tell me what it should be please. Also what do people set their http/ MQTT option to.

TIA

And I know I'm an idiot for not noting down what was in the box before changing it 🤦

Screenshot_20230104-100725

albertogeniola commented 1 year ago

Hi @fletch904 ,

please note that this issue is about the MerossIot library and not about the HomeAssistant integration. For the future, please open an issue in the relative github repository (this one)

In any case, the default value is the following: MerossHA/1.2.7

bryanminorphd commented 1 year ago

Thank you @albertogeniola!! My orchids all thank you :)

Topsham commented 1 year ago

Have updated to 0.4.5.7 and all good. Thanks as always for the quick fixes.

albertogeniola commented 1 year ago

I'm glad it worked!