Comments (10)
from meross.
Hi Rob!
Thanks for your quick response!
My NodeJS vers is: v8.15.1
from meross.
from meross.
Oh thanks a lot!
With which version are you sure it works?
I can always downgrade NodeJS to a version compatible with your script
from meross.
I've updated the code to be used on Node 8.
I've also remove the interface in favour of --gateway
Let me know if it works for you.
from meross.
Hi Rob,
thank you very much for your interest!
I just tested the new script and...
sudo ./meross info --gateway 10.10.10.1
I receive the information of the object correctly
sudo ./meross setup --gateway 10.10.10.1 --wifi-ssid WIFISSID --wifi-pass WIFIPSW --mqtt 192.168.1.xx: 8883
The script works and the socket gets the new setup, then it restarts and tries to connect to the wifi, but unfortunately it can't connect correctly to my wifi and restarts after a few minutes :(
This is the code I receive after sending the "./meross setup":
Setting up device with IP 10.10.10.1
Setting MQTT servers [ { host: '192.168.1.15', port: '8883' } ]
sending payload { header:
{ method: 'SET',
namespace: 'Appliance.Config.Key',
messageId: '1' },
payload: { key: { gateway: [Object], key: '', userId: '' } } }
sending payload { header:
{ method: 'SET',
namespace: 'Appliance.Config.Wifi',
messageId: '1' },
payload:
{ wifi:
{ ssid: 'VEFSRElTX0VYVA==',
password: 'RGVjaW1vRG90dG9yZTEwIQ==' } } }
{ header:
{ messageId: '1',
namespace: 'Appliance.Config.Wifi',
method: 'SETACK',
payloadVersion: 1,
from: '/appliance/1805034347250425180134298f116cf7/publish',
timestamp: 454,
timestampMs: 670,
sign: '3bbfdde8842a5c44a0323518eec97cbe' },
payload: {} }
Is it possible that the problem is in this part of the code?
sending payload { header:
{ method: 'SET',
namespace: 'Appliance.Config.Wifi',
messageId: '1' },
payload:
{ wifi:
{ ssid: 'VEFSRElTX0VYVA==',
password: 'RGVjaW1vRG90dG9yZTEwIQ==' } } }
I noticed that it shows an ssid ('VEFSRElTX0VYVA==') and a password ('RGVjaW1vRG90dG9yZTEwIQ==') different from the ones I enter on the command string.
Sorry again for my horrible English!
from meross.
No the values are base64 encoded and sent to the device as thats what the devices expect.
If the device light flashes green then resets I expect either your WIFI credentials are incorrect (or you’re using 5Ghz? I think these only support 2.4Ghz) or it cannot connect to your mqtt server.
Test if you can connect to the MQTT server via mosquito, you have to pass it the certificate using the —cafile
option something along the lines of mosquitto_sub -h 192.168.1.15 -p 8883 -t topic --cafile /path/tp/cafile.pem
from meross.
Hi rob,
the script works great, I think the problem is my Mosquitto configuration.
Does Mosquitto need to be installed on the same system that I use to configure the MSS310 with your setup script?
I have to connect the MSS310 to the mosquitto broker installed on my Raspberry (on which Home Assistant runs), is it possible that the right certs for connection to the MQTT broker are missing on my Raspberry?
Can you recommend a good guide to configure Mosquitto with certs?
Thanks!
from meross.
You'll need Mosquitto client applications order to test the broker on you RasPi.
I followed this tutorial to get mine set up https://mcuoneclipse.com/2017/04/14/enable-secure-communication-with-tls-and-the-mosquitto-broker/
My resulting minimal config is detailed here: https://github.com/bytespider/Meross/wiki/MQTT
from meross.
Closing due to inactivity
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
- Error Unable to connect to device - TypeError: Cannot read properties of undefined (reading 'system') HOT 16
- 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.