Closed amair closed 1 year ago
The username and password reported by meross-info is the MQTT credentials. The username you are setting in meross-setup is only used in signing the message and communication with Meross cloud.
OK, some more details of the issue using verbose logging option
Initial Attempt: No user or key
user@host bin % sudo ./meross-setup --verbose --gateway 10.10.10.1 --wifi-ssid '
POST /config Host: 10.10.10.1 Accept: application/json, text/plain, / Content-Type: application/json
{ header: { from: '', method: 'SET', namespace: 'Appliance.Config.Key', messageId: 'bc7d4be83a18449f4112e8ff7ddb85c0', timestamp: 1695711098, sign: '8bacc21ffe154410dadf9e6db34b1de8' }, payload: { key: { userId: '0', key: '', gateway: { host: 'mqtt.local', port: '8883', secondHost: 'mqtt.local', secondPort: '8883', redirect: 1 } } } }
node:internal/errors:496 ErrorCaptureStackTrace(err); ^
TypeError [ERR_INVALID_ARG_TYPE]: The "url" argument must be of type string. Received undefined at new NodeError (node:internal/errors:405:5) at validateString (node:internal/validators:162:11) at Url.parse (node:url:170:3) at Object.urlParse [as parse] (node:url:141:13) at new URL (/Users/alastair/Programming/openhab/Meross/lib/api.js:6:35) at logRequest (/Users/alastair/Programming/openhab/Meross/lib/api.js:62:15) at handleRequestError (/Users/alastair/Programming/openhab/Meross/lib/api.js:99:13) at API.configureMqttServers (/Users/alastair/Programming/openhab/Meross/lib/api.js:341:13) at process.processTicksAndRejections (node:internal/process/task_queues:95:5) at async /Users/alastair/Programming/openhab/Meross/bin/meross-setup:89:9 { code: 'ERR_INVALID_ARG_TYPE' }
Query Device for key and password
user@host bin % sudo ./meross-info -g 10.10.10.1
Getting info about device with IP 10.10.10.1
│Device │mss110 us rtl8710cm (hardware:7.0.0 firmware:7.3.19) │
│UUID │
Successful attempt using user and key (with code modification to remove conversion to int for user)
user@host bin % sudo ./meross-setup --user '
POST /config Host: 10.10.10.1 Accept: application/json, text/plain, / Content-Type: application/json
{ header: { from: '', method: 'SET', namespace: 'Appliance.Config.Key', messageId: 'a28b60639e297bc1f69c8af767fce2ce', timestamp: 1695711279, sign: '281b8f920e604f226668ddfa40d9e1ec' }, payload: { key: { userId: '
', key: ' ', gateway: { host: 'mqtt.local', port: '8883', secondHost: 'mqtt.local', secondPort: '8883', redirect: 1 } } } }
< 200 OK
< content-type: application/json
< connection: close
<
{
header: {
messageId: 'a28b60639e297bc1f69c8af767fce2ce',
namespace: 'Appliance.Config.Key',
method: 'SETACK',
payloadVersion: 1,
from: '/appliance/
POST /config Host: 10.10.10.1 Accept: application/json, text/plain, / Content-Type: application/json
{ header: { from: '', method: 'GET', namespace: 'Appliance.System.All', messageId: '1737c7fa27afb3964a5ea1f4d24fd9c0', timestamp: 1695711279, sign: '894ba6fa214f54d179b093b3dfb7c077' }, payload: {} }
< 200 OK
< content-type: application/json
< connection: close
<
{
header: {
messageId: '1737c7fa27afb3964a5ea1f4d24fd9c0',
namespace: 'Appliance.System.All',
method: 'GETACK',
payloadVersion: 1,
from: '/appliance/
│Device │mss110 us rtl8710cm (hardware:7.0.0 firmware:7.3.19) │
│UUID │
POST /config Host: 10.10.10.1 Accept: application/json, text/plain, / Content-Type: application/json
{ header: { from: '', method: 'SET', namespace: 'Appliance.Config.Wifi', messageId: '9dd06cd2a64f4990ea11c872b2d076e9', timestamp: 1695711280, sign: '0067591d72122b9b549a5e9af2602bf9' }, payload: { wifi: { ssid: '
', password: ' ' } } }
< 200 OK
< content-type: application/json
< connection: close
<
{
header: {
messageId: '9dd06cd2a64f4990ea11c872b2d076e9',
namespace: 'Appliance.Config.Wifi',
method: 'SETACK',
payloadVersion: 1,
from: '/appliance/
Device will reboot...
Have you tried passing a user id that isn't 0. It's possible they have changed the firmware so that 0 is no longer valid.
Closing due to inactivity
After upgrading an ms110 switch to firmware 7.3.19 using meross-setup without a user and key setup results in an error.
The user (as returned from meross-info is the MAC address of the device. Trying to set this as the user in meross-setup results in the app trying to interpret the string as an integer which then fails validation.