Closed sammachin closed 2 years ago
Sorry for the trouble, @sammachin. The manifest_mqttclient.json
is missing. We'll get the public Moddable SDK repository updated with that. In the meantime, here's the content of the manifest.
it doesn't seem to connect
If you replaced manifest_mqttclient.json with manifest.json it may have overridden the project main.js which would explain why nothing happened. But, the network connection also needs to be configured. If you are running on the simulator on macOS, it will automatically use your computer's network connection:
mcconfig -d -m
If you are running on an ESP32, you need to provide the Wi-Fi credentials so that the ESP32 can connect:
mcconfig -d -m ssid="My SSID" password="My Wi-Fi password"
I just tested a simple flow with MQTT in and out successfully (with the manifest added above). FWIW, here's the test flow:
Just FYI – manifest_mqttclient.json
is in the Moddable SDK repository now.
Thanks for this, I have got the MQTT working using your sample flow and also with some other flows which include GPIO out pins. The only issue is that it will only connect to the broker in your example. I have tried a few other brokers, both cloud and local but none of these work even without authentication. When you copy a flow from one instance of Node Red to another it does not copy the credentials, could you add these into the flow after you have copied this into the node.js file?
I have got the MQTT working using your sample flow and also with some other flows which include GPIO out pin
Very nice!
The only issue is that it will only connect to the broker in your example. I have tried a few other brokers, both cloud and local but none of these work even without authentication. When you copy a flow from one instance of Node Red to another it does not copy the credentials, could you add these into the flow after you have copied this into the node.js file?
I would be happy to look into this, but I'm not sure I completely understand. Would you open a new issue and provide a sample flow to reproduce the problem?
Been trying to get a simple Node-RED flow running on a moddable two,
I noticed an error trying to build, in the manifest.json for this project, https://github.com/phoddie/node-red-mcu/blob/7291f8b13b47c3faa9c5482e2c3b7bfc3bc8f141/manifest.json#L5
But in my examples the io/tcp/mqttclient project has its manifest file as manifest.json.
Is there some custom config you added to the mqttclient for node-red-mcu?
My flow builds, if I change it to manifest.json but it doesn't seem to connect, I have an mqtt in node to subscribe to a top, a function node that does msg.payload*2 and then an mqtt out node to publish to a different topic.