-
Notifications
You must be signed in to change notification settings - Fork 2
Operation
Before starting, you have already configured your MQTT broker for tls operation, loaded the flow into Node-Red, configured the MQTT nodes in the flow to your MQTT server, and set up the configuration parameters as shown in the setup page.
Step 1 - Get the device in 'Pairing' mode You may have to consult the device instructions. Normally the Meross device has a power switch of some kind. Depress this switch and hold it for 5+ seconds. This will usually start the device status LED to start blinking and / or change color. At this point the device should be in pairing mode and the wireless AP from the device should be active.
I might suggest opening a MQTT monitoring window before moving on so you can see when you are configured... This can be accomplished on Mosquitto by....
mosquitto_sub -v -h 192.168.X.XX -p 1883 -t "#" -u "user" -P "password"
Configure the computer running the Node-Red driver to bind to the SSID provided by the Meross device. If successful you should optain a ip of 10.10.10.2.
Step 2 - Pairing Mode in the flow The flow is setup to automatically detect a meross device by pinging 10.10.10.1 at 2 minute intervals. When reply is seen, the driver will automatically configure the Meross device with the parameters loaded. At this point, if successful, the device will reset, reboot, log into your wireless network and finally into your MQTT broker.
You can enable the two debug nodes 'HTTP Response' and 'WiFi ACK' to monitor the divers progress.
Note if you have reasonable responses and a ACK during the config process - look at your local DHCP server to see if the Meross device has requested a local IP. Obviously the real success is to see MQTT traffic from the Meross nodes.
Step 3 - Generate MQTT Traffic from the Meross device The driver creates a simple database to associate the 32 character long ids with the 7 character short ids and a parameter to identify if the device is dimmable. This data array, maintained at the flow level is created automatically upon reception of Meross device MQTT traffic. So manually toggle your Meross devices on and off and if they are dimmable - change the brightness. I have 2 Meross devices and my database looks as follows (this can be examined by going to context data and looking for the variable ids under flow):
ids:
[
{
"longID":"1712281825467829030134298f151c4a",
"shortID":"51c4a00",
"Capibilities":1
},
{
"longID":"1812144891717229088234298f196791",
"shortID":"9679100",
"Capibilities":3
}
]
Note - the ids database is stored locally and loaded from that file to give persistence through power fails etc... After you get the driver to create this array by listening to your Meross Devices, you are ready to sent some test commands...
Step 4 - Send Test Commands to the device