Comments (16)
Thanks @bytespider and @fireheadman. By reading this issue, I was able to narrow in on my problem and get 1 bulb and two switches working and integrated. Details like this help a lot.
from meross.
saw you are also using npx, so tried that also, same error.
[fireheadman@minion bin 317]$ npx meross info
Getting info about device with IP 10.10.10.1
Error Unable to connect to device
/Users/fireheadman/meross/Meross-1.0.14/lib/api.js:155
const system = data.system
^
TypeError: Cannot read properties of undefined (reading 'system')
at API.deviceInformation (/Users/fireheadman/meross/Meross-1.0.14/lib/api.js:155:29)
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
at async /Users/fireheadman/meross/Meross-1.0.14/bin/meross-info:42:5
Node.js v21.1.0
[fireheadman@minion bin 318]$ ping 10.10.10.1
PING 10.10.10.1 (10.10.10.1): 56 data bytes
64 bytes from 10.10.10.1: icmp_seq=0 ttl=255 time=8.212 ms
64 bytes from 10.10.10.1: icmp_seq=1 ttl=255 time=39.465 ms
^C
--- 10.10.10.1 ping statistics ---
2 packets transmitted, 2 packets received, 0.0% packet loss
round-trip min/avg/max/stddev = 8.212/23.839/39.465/15.627 ms
from meross.
could you try with --verbose
that should log the response
from meross.
Also noticed when I run this command while running a live ping to 10.10.10.1 the ping will stop. Looks like it causes a reboot of the device?
[fireheadman@minion bin 367]$ pwd
/Users/fireheadman/meross/Meross-1.0.14/bin
[fireheadman@minion bin 367]$ sudo ./meross-info -v -g 10.10.10.1 --include-wifi
Getting info about device with IP 10.10.10.1
> 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: '1f57d5ee57b31014bb7705c4687eca22',
timestamp: 1698869249,
sign: 'd85bf65534a9d5e12ea5f281bd7522fa'
},
payload: {}
}
node:internal/validators:162
throw new ERR_INVALID_ARG_TYPE(name, 'string', value);
^
TypeError [ERR_INVALID_ARG_TYPE]: The "url" argument must be of type string. Received undefined
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/fireheadman/meross/Meross-1.0.14/lib/api.js:6:35)
at logRequest (/Users/fireheadman/meross/Meross-1.0.14/lib/api.js:66:15)
at handleRequestError (/Users/fireheadman/meross/Meross-1.0.14/lib/api.js:109:13)
at API.deviceInformationData (/Users/fireheadman/meross/Meross-1.0.14/lib/api.js:221:13)
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
at async API.deviceInformation (/Users/fireheadman/meross/Meross-1.0.14/lib/api.js:153:22)
at async /Users/fireheadman/meross/Meross-1.0.14/bin/meross-info:42:5 {
code: 'ERR_INVALID_ARG_TYPE'
}
Node.js v21.1.0
from meross.
trying this same command with the previous version (Meross-1.0.12) produces this output...
from meross.
trying this on my macmini also... but I have an issue on this machine since I can't update npm to latest due to brew not being support on macOS Sonoma... so using the previous version that allows me to run it.
BTW: I do see the ping comes back eventually
[fireheadman@templar bin 4958]$ sudo ./meross-info -v -g 10.10.10.1 --include-wifi
Getting info about device with IP 10.10.10.1
> POST /config
> Host: 10.10.10.1
> Accept: application/json, text/plain, */*
> Content-Type: application/json
>
{
header: {
method: 'GET',
namespace: 'Appliance.System.All',
messageId: '6702a983546c47d3ed93723e82fc88d9',
timestamp: 1698870081,
sign: '73e690dece749a0016a66a1d7dc1603f'
},
payload: {}
}
node:internal/errors:464
ErrorCaptureStackTrace(err);
^
TypeError [ERR_INVALID_ARG_TYPE]: The "url" argument must be of type string. Received undefined
at new NodeError (node:internal/errors:371:5)
at validateString (node:internal/validators:119:11)
at Url.parse (node:url:169:3)
at Object.urlParse [as parse] (node:url:156:13)
at new URL (/Users/fireheadman/meross/Meross-1.0.12/lib/api.js:6:35)
at logRequest (/Users/fireheadman/meross/Meross-1.0.12/lib/api.js:62:15)
at handleRequestError (/Users/fireheadman/meross/Meross-1.0.12/lib/api.js:99:13)
at API.deviceInformation (/Users/fireheadman/meross/Meross-1.0.12/lib/api.js:204:13)
at processTicksAndRejections (node:internal/process/task_queues:96:5)
at async /Users/fireheadman/meross/Meross-1.0.12/bin/meross-info:42:5 {
code: 'ERR_INVALID_ARG_TYPE'
}
from meross.
ha... success this time using npx
I'm unix savvy, but not so much with npm/npx. unsure of the differences in these commands
from meross.
Glad you got it working. Sounds like the device was being temperamental.
npm is the package manager and installs dependencies.
npx executes a node script/library like it's binary
I updated the requirement to node 18 since 12 is no longer supported.
from meross.
I'm upgrading my node to version 18 now to retry this on my macmini... will let you know how it goes.
Found a writeup on homebrew for macOS sonoma
from meross.
you could also use NVM if that doesn't work https://github.com/nvm-sh/nvm
from meross.
well I have broken npm by having homebrew upgraded and npm at v21.1.0
it was working with the previous version... bummer
from meross.
think I am back on track....
I have get data from the device using nodejs 16
[fireheadman@templar bin 5064]$ node -v
v16.20.2
but it will fail using anything greater than this... such as v18.x, v20.x, v21.x
from meross.
UPDATE: disregard this....It is now working.
Going to cycle through all 3 devices to rule out a faulty one as you mentioned.
This might just be a bad day for me!
from meross.
Good luck
from meross.
its working...
REF: https://github.com/krahabb/meross_lan/discussions/63#discussioncomment-7452413
from meross.
@fireheadman I don't know if this is still true but the HA Mosquitto add-on gave so many of us headaches. HA decided to stick with out dated technology and as such Meross device usernames weren't allowed.
I've had much better success with EMQX which is also in the Add-on store.
from meross.
Related Issues (20)
- Does this support MSS310 Hardware Version 6 ? HOT 24
- Unable to setup device MSS210 HOT 15
- Setting MQTT and Wifi for MSS210 HOT 3
- No time synchronisation with 5.1.1 firmware HOT 2
- Upgraded firmware/incorrect key HOT 2
- [question] hass mqtt connection HOT 1
- Plug keeps blinking green forever HOT 3
- mss110 power switch with firmware 7.3.19 requires user and key HOT 4
- [QUESTION] What exactly is --gateway? HOT 2
- Setup does not work for newer MSS310 HOT 8
- Device mss425e won't connect to AP, falls back to pairing mode HOT 16
- Updated firmware on mss310 us rtl8710cf (hardware:6.0.0 firmware:6.3.22) causes red light HOT 1
- Issues with ssl after upgrading from Debian 11 to Debian 12 HOT 2
- Cant connect MSS710 HOT 4
- NTP queries from Meross Plugs HOT 1
- TypeError: program.version is not a function HOT 1
- Device Key? HOT 1
- Unable to setup MSS310 HOT 2
- mss210 contents to wifi and mqtt but doesn't push changes to mqtt [un rtl8710cf (hardware:6.0.0 firmware:6.2.3) ] HOT 7
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 meross.