- Ensure Node (between v8.0 - v12.5)
- Ensure NPM (v6.0 or above)
- Navigate to Node-Red folder first
cd ~/.node-red
- Then install node-red-contrib-motechat
npm install --unsafe-perm node-red-contrib-motechat
- cannot install outside node-red folder
- Download Sphere (must download to use motechat)
- Use Snapd (only Linux)
sudo snap install sphere
Overall Flow for Send Node
Grab { Inject Node } from Input
Grab { Send Node } from Motechat
Send Node Info
DDN section can input other device's DDN or its EI_NAME
Inject Node Ino
Result
From Other Device's Terminal
Debug Flow. Using OnEvent
In order to read signals from other devices
Grab { Debug Node } from Output
Grab { OnEvent Node } from motechat
Debug Node Info
DDN | Topic | Payload | Notes |
---|---|---|---|
>>COMM | email://[email protected] | {"subject":"xxxxx","content":"xxxxx" } | Send Email via comm |
>>COMM | sms://TaiwaneseCellPhone | {"text":"xxxxxxxxxxx"} | Send Text via Comm |
COMM is written by YPCloud Inc. It provides several utilities to inspire developers around the world to develop in motebus environment.
https://github.com/motebus/motechat
The above link provides 6 examples to help you develop your uBots in JavaScript.
It explains and shows samples for send, call, urt, onEvent, retEvent, and Page.
Node | Description |
---|---|
send | sending messages to telegram with chat-id being fully customizable |
call | similar to send, but has an input for a function, able to obtain the output that the function desires |
onEvent | wait until recieve a signal and read the signal |
retEvent | upon onEvent, tells the sender if the device has made an action |
page | allows the user a way to attach/upload a JavaScript file in order for them to work conveniently |