Comments (13)
Hi @virtualdj ,
yeah, the device is listed among the ones that are available. However, the library does not recognize its device id (MSS310H) so it doen't support that plug. Anyways, there are good chances that the hardware is supported by the library, but I cannot confirm it.
To better investigate, I can add the device ID among the ones that are supported and give you a new version of the library. You should "test it" and report it works or not. If it does, I will then release that version to the public. Would it be ok for you?
from merossiot.
Hi, you are on the right path. The problem is that the library is somehow referring to the wrong SSL module...
It seems you are using python3.4, while this library requires python 3.6+ to work correctly. Would you mind to update your python version and try again with the modified source?
from merossiot.
As far as I understood, you're now able to turn the plug ON and OFF, right?
Yes, confirmed!
I don't understand what the problem is.
You said earlier:
the message you see is just a debug message. The problem is that the status property is not updated and the getStatus might be wrong. I should investigate better on your device before adding explicit support to it. For now, I'll create the PR myself and add a warning message for MSS310H owners.
so what I noticed is that even with this new version, the library returns the same output than before (including the "UNKNOWN msg received by ..."). I though it wasn't your expected result... so I asked if there's anything you need to investigate and, if yes, then I'm at your disposal ;-)
Ah, yeah, I see now. Well, at the moment I cannot prepare any specific implementation to address that issue. But I really appreaciate your help and I'll ask you to test in case I end up with something. Thank you guys!
from merossiot.
Of course, I'm available to run test if you need!
Just FYI I've tried to add to device_factory.py
the line:
elif device_type.lower() == "mss310h":
return Mss310(token, key, user_id, **device_specs)
... hoping that the same "class" would be enough, but then I get:
user@ubuntu:~/meross$ python3 meross.py
Listing Devices...
Traceback (most recent call last):
File "meross.py", line 11, in <module>
devices = httpHandler.list_supported_devices()
File "/usr/local/lib/python3.4/dist-packages/meross_iot/api.py", line 124, in list_supported_devices
device = build_wrapper(self._token, self._key, self._userid, deviceType, dev)
File "/usr/local/lib/python3.4/dist-packages/meross_iot/device_factory.py", line 14, in build_wrapper
return Mss310(token, key, user_id, **device_specs)
File "/usr/local/lib/python3.4/dist-packages/meross_iot/supported_devices/power_plugs.py", line 134, in __init__
tls_version=ssl.PROTOCOL_TLS,
AttributeError: 'module' object has no attribute 'PROTOCOL_TLS'
Thanks!
from merossiot.
It seems you are using python3.4, while this library requires python 3.6+ to work correctly.
Oops, sorry, I didn't catch that! I've updated to python 3.6 on my old Ubuntu 14.04 LTS and set up the README example script to run with 3.6.
Then I edited the new /usr/local/lib/python3.6/dist-packages/meross_iot/device_factory.py
as before and now I get a long (verbose) output with JSON (the print(jsondata)
is still commented out).
I've attached a file, where I removed some personal information with "#", please let me know if there is other data which should not be kept here.
Anyway, the plug turns on and off, is the output correct? Shouldn't I get numerical output instead of raw JSON and errors?
from merossiot.
Well done, the output is ok. Output is in JSON format (dictionary object), so that is ok. Well done.
Why don't you test all the APIs on your device and propose a Pull Request so that MS310H owners can start using this library as well?
from merossiot.
Well done, the output is ok.
Including the UNKNOWN error messages?
Why don't you test all the APIs on your device and propose a Pull Request so that MS310H owners can start using this library as well?
OK, but I'm pretty new to Python (never worked with it apart streamlink), can you point me how should I do it (testing the API, not creating the PR).
from merossiot.
I've looked again at the code. It seems that your device is responding with a valid ACK to the ON-OFF but is not setting up the "toggle" property into the payload of the response. Anyways, the message you see is just a debug message. The problem is that the status property is not updated and the getStatus might be wrong. I should investigate better on your device before adding explicit support to it. For now, I'll create the PR myself and add a warning message for MSS310H owners.
from merossiot.
Alright, you can install the latest version of the package (0.1.4.3). If you want to update the existing library, you can issue the following command:
pip install --upgrade meross-iot
Let me know if it works as expected !
from merossiot.
Anyways, the message you see is just a debug message. The problem is that the status property is not updated and the getStatus might be wrong. I should investigate better on your device before adding explicit support to it. For now, I'll create the PR myself and add a warning message for MSS310H owners.
OK, I've updated the library and re-run the script but the output doesn't seem different from the previous one. It's attached here as meross-output-2.txt.
Let me know if you need further tests or different scripts to run to improve the library for MSS310H, I'm available.
from merossiot.
Hi virtualdj,
I don't understand what the problem is. As far as I understood, you're now able to turn the plug ON and OFF, right? If not, could you please explain better?
from merossiot.
As far as I understood, you're now able to turn the plug ON and OFF, right?
Yes, confirmed!
I don't understand what the problem is.
You said earlier:
the message you see is just a debug message. The problem is that the status property is not updated and the getStatus might be wrong. I should investigate better on your device before adding explicit support to it. For now, I'll create the PR myself and add a warning message for MSS310H owners.
so what I noticed is that even with this new version, the library returns the same output than before (including the "UNKNOWN msg received by ..."). I though it wasn't your expected result... so I asked if there's anything you need to investigate and, if yes, then I'm at your disposal ;-)
from merossiot.
Hello Alberto.
I confirm that mss310h works fine for me now.
Thankyou.
I'm available for tests if you need
from merossiot.
Related Issues (20)
- MST960 reading current values is not possible HOT 3
- Meross changing the cloud api from 2024-01-01 HOT 4
- Logout fail HOT 1
- Meross Cloud API changed begining of January 2024 HOT 2
- Log entries HOT 10
- TypeError: async_from_user_password() missing 1 required positional argument: 'api_base_url'
- Is merossiot no longer working? HOT 4
- MerossManager._update_and_send_push' was never awaited HOT 5
- Incompatible with paho-mqtt 2.0 HOT 2
- hourly consumption MSS310 HOT 6
- https://iotx-eu.meross.com returns error 404 HOT 8
- Meross architecture clarification - recording electricity consumption HOT 2
- Operation of multiple MSS110 smart plugs HOT 4
- cannot reuse already awaited coroutine HOT 14
- MSH300HK/MS100F are not supported HOT 5
- Incorporating Meross-iot into a broader application
- MerossIOT Java implementation support request
- MSS810 is not supported
- KeyError: 'mfaLockExpire' HOT 14
- Error: Exception caught: You have issued too many tokens without logging out and your account might have been temporarly disabled. HOT 4
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 merossiot.