Git Product home page Git Product logo

Comments (20)

mthlvt avatar mthlvt commented on May 23, 2024 2

it works, thanks a lot.

from meross.

mthlvt avatar mthlvt commented on May 23, 2024 1

That worked, now it is joining the wi-fi and gets an IP. Thanks !

Now it blinks green, what's the next command to push MQTT server settings please?

from meross.

bytespider avatar bytespider commented on May 23, 2024 1

That's excellent. I'll get working on an implementation in the tool.

from meross.

bytespider avatar bytespider commented on May 23, 2024 1

Okay thanks for doing that. I was hoping it was just a case of expecting some value an not caring. Its going a pretty horrible set of cli flags when there 5 cipher types and 9 encryption types. Will have to provide that WIFI list command so users know what values to use.

from meross.

lcavalli avatar lcavalli commented on May 23, 2024 1

Solved. Since I'm using multiple configurations in /etc/mosquitto/conf.d/ (one for zigbee2mqtt and one for meross) I had to add per_listener_settings true before include_dir /etc/mosquitto/conf.d. Thank you again for your help and for your software!

from meross.

bytespider avatar bytespider commented on May 23, 2024

If you have access to curl, can you try put a device into pairing and connect to it's AP then try this command?

curl --request POST \
   --url http://10.10.10.1/config \
   --header 'Content-Type: application/json' \
   --data '{
     "header": {
         "method": "GET",
         "namespace": "Appliance.Config.WifiList",
         "messageId": "cce78e0c91e9c9446323775340534878",
         "timestamp": 1617176364,
         "sign": "3bd15b3447a3347a9107c386bf5ee516"
     },
     "payload": {}
 }'

from meross.

mthlvt avatar mthlvt commented on May 23, 2024

Thanks!

The wifi list contains multiple networks, among them I confirm the same SSID I pass to setup:

            {
                "ssid": "xxxxxxxxxxxxxxxx=",
                "bssid": "38-10-d5-5c-cd-de",
                "signal": 99,
                "channel": 8,
                "encryption": 6,
                "cipher": 3
            },

perhaps the encryption/cipher needs to be adjusted?

from meross.

bytespider avatar bytespider commented on May 23, 2024

perhaps the encryption/cipher needs to be adjusted?

This was the avenue of thinking I was heading down. Will check what my WIFI setup uses and compare.

Were your BSSID's really hyphenated? Not colon separated?

from meross.

mthlvt avatar mthlvt commented on May 23, 2024

yes, I didn't modify the rest of the json above, it was hyphenated

if you let me know what encryption cipher (e.g. WPA2+PSK) you used successfully on your network I can setup a virtual ssid with same settings to test.

from meross.

bytespider avatar bytespider commented on May 23, 2024

Do you want to try this?

curl --request POST \
  --url http://10.10.10.1/config \
  --header 'Content-Type: application/json' \
  --data '{
  "header": {
    "method": "SET",
    "namespace": "Appliance.Config.Wifi",
    "messageId": "0be2318bac0a9237164cade9063fe803",
    "timestamp": 1617183880,
    "sign": "cb9178873b940b65e291b5e3fef64c32"
  },
  "payload": {
    "wifi": {
      "ssid": "<your base64 encoded ssid>",
      "password": "<your base64 encoded password>",
      "bssid": "<your bssid each octet separated by colon>",
      "encryption": 6,
      "cipher": 3,
      "channel": 8
    }
  }
}'

from meross.

bytespider avatar bytespider commented on May 23, 2024

Now it blinks green, what's the next command to push MQTT server settings please?

Sorry I missed this before.

curl --request POST \
  --url http://10.10.10.1/config \
  --header 'Content-Type: application/json' \
  --data '{
  "header": {
    "method": "SET",
    "namespace": "Appliance.Config.Key",
    "messageId": "efed8e6db4b629fbeeaa766b7c8e7d1d",
    "timestamp": 1617186747,
    "sign": "2bdfbbed9795faa187ffeb493e606c66"
  },
  "payload": {
    "key": {
      "gateway": {
        "host": "0.0.0.0",
        "port": "8443",
        "secondHost": "0.0.0.0",
        "secondPort": "8443"
      },
      "key": "",
      "userId": ""
    }
  }
}'

Replace the 0.0.0.0 with your MQTT IP and the 8443 with your MQTT port, just incase that wasn't obvious 😀

from meross.

bytespider avatar bytespider commented on May 23, 2024

@mthlvt are you able to try something for me?
Could you, if you have a spare device, try running the WIFI setup command again but set encryption and cipher to 0?

from meross.

mthlvt avatar mthlvt commented on May 23, 2024

sure I'll try tomorrow !

from meross.

mthlvt avatar mthlvt commented on May 23, 2024

I tried encryption and cipher : 0 but this doesn't work for me, the LED becomes fixed orange after reboot and then it reverts to config mode after a while.

from meross.

mthlvt avatar mthlvt commented on May 23, 2024

Thanks, for now I'm just hardcoding cipher/encryption values I need in api.js and it scales ok.

from meross.

bytespider avatar bytespider commented on May 23, 2024

Command line options --wifi-encryption, --wifi-cipher, and --wifi-channel have been added. Please use these along with meross info --include-wifi for devices that don't connect just from the SSID and Password

from meross.

lcavalli avatar lcavalli commented on May 23, 2024

Hi, I have a smart plug mss310 (hw: 2.0.0, fw: 2.1.6) and I'm still not able to configure my device.
I also tried with
./meross-info --include-wifi
and then
./meross-setup --wifi-channel 6 --wifi-encryption 7 --wifi-cipher 6 --gateway 10.10.10.1 --wifi-ssid XXXXX --wifi-pass ******* --mqtt mqtts://192.168.1.xxx --mqtt mqtts://192.168.1.xxx
I tried also --wifi-encryption 0 --wifi-cipher 0. No way to connect to my wifi. Each time the device resets and led blinks amber/green.

from meross.

bytespider avatar bytespider commented on May 23, 2024

@lcavalli can your tell me more about your broker? How is it set up? Stand alone or Home assistant. If.home assistant what version of the add-on are you using?

from meross.

lcavalli avatar lcavalli commented on May 23, 2024

No, standalone (native, no docker) on the same raspberry pi running HA in a docker container. Configured with TSL (certificates generated following your wiki) without authentication listening on port 8883. Port 1883 still active for plain mqtt used by zigbee2mqtt (running on the very same rpi in a docker container). Thank you!

from meross.

lcavalli avatar lcavalli commented on May 23, 2024

Bingo! You were right!

1622752444: New connection from 192.168.1.150:63109 on port 8883.
1622752444: Client <unknown> disconnected, not authorised.

The smart plug resets because the broker reject the connection.
Thank you. I will look at mosquitto configuration.

from meross.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.