albertogeniola / Custom-Meross-Pairer

Android APP that allows pairing Meross Devices with third party MQTT brokers
GNU General Public License v2.0
62 stars 5 forks source link

Error while Fetching device info #4

Closed JohannCR closed 3 years ago

JohannCR commented 3 years ago

Hi, Promising app except it doesn't work for me... It detects the ssid but after that errors out when trying to get device info.

albertogeniola commented 3 years ago

Hi @JohannCR ,

can you test the latest release and check if the problem was fixed?

JohannCR commented 3 years ago

Hi, sure. Tried but the last version won't install... Do you need more info ? Tell me what you need^^

JohannCR commented 3 years ago

App was not signed. Signed it using another app (don't know if that's unsecure). After that it installs ok. Cannot connect though. I don't understand the process FYI :

Maybe I missed some documentation, or this can help you refine the user experience ;-) Will test again anytime

albertogeniola commented 3 years ago

Hi @JohannCR ,

thanks a lot for your valuable feedback. You are right: the process needs better documentation. I'll try to explain it better in the next releases. In the meanwhile, here's a short explanation.

The login feature points to the HTTP broker which is responsible to provide you both your Meross UserId and the Meross Key for your account. This is something you cannot use at the moment: it needs to be used when using the Homeassistant LAN-Only Addon, which is yet to be released. The Homeassistant LAN-Only addon will implement what the current Meross HTTP API does on the cloud, but will do it in LAN.

In the meanwhile, if you have a local MQTT broker, you can go ahead with manual setup: userId should be an integer number, while the Key is the verification key that the plugs will use to calculate mqtt password. You need to specify at least the User ID (the plugs expect that parameter, no matter what). At pairing stage, the plug will take both userid and key and will use them to derive a password that is used by the plug to connect to the MQTT broker.

This process will look much easier once the LAN-Only HA Addon is released as the App is capable of discovering it.

Regarding the signing: once again you are right. However, that's by design: GitHub compiled code won't be signed as anyone might need to debug it. From now on, the beta releases will be available on Google Play store. You should apply for the beta testing here: https://play.google.com/apps/testing/com.albertogeniola.merossconf

JohannCR commented 3 years ago

Thanks for the explanation, everything makes sense now ^^ I've joined and downloaded the store version, installs fine. Setup works I've successfully connected to the device and set up wifi and mqtt parameters. I have to check my mqtt broker though because I only use it on port 1883 and the secure port doesn't seem to work. Most probably a config problem on my end there. I'll update when all works well, just for information.

PS: I tried on 2 mobile phones, one has very spotty wifi connection and could not connect, the other connected like a charm. 100% sure it's the crappy phone wifi at fault that did not work when I first posted that issue.

albertogeniola commented 3 years ago

Hi @JohannCR ,

I'm glad it worked!