Function List

Last updated last month

mote.mms

Description

Add

Add number

Echo

Send back the same message

Time

To know what time it is

mote@hello.ypcloud.com

Function

Parameters

Return

Add()

{"A":"INT","B":"INT"}

{"C":"INT"}

{"A":"28","B":"37"}

{"C":"65"}

Echo()

{"Data":"STRING"}

{"Result":"STRING"}

{"Data":"HelloWorld"}

{"Result":"HelloWorld}

Time()

{"Data":"STRING"}

{"Result":"STRING"}

{"Data":""}

{"Result":"2018-03-13T03:43:30.185Z"}

comm.mms

Description

mail

Send mail

comm@hello.ypcloud.com

Function

Parameters

Return

mail()

{"to":"STRING","subject":"STRING","text":"STRING"

{"Result":"STRING"}

{"to":"yuantsai@ypcloud.com","subject":"Hello","text":"How are you?"}

{"Result":"OK"}

mqtt.mms

Description

mqttpub

Mqtt

mqtt@hello.ypcloud.com+

Function

Parameters

Return

mqttpub()

{"topic":"STRING","payload":"STRING"}

{"Result":"STRING"}

{"topic":"s_on_off/e87e022/power","payload":"on"}

{"Result":"OK"}

tts.mms

Description

tts

Text-to-Speech

tts@hello.ypcloud.com+

Function

Parameters

Return

tts()

{"data":"STRING"}

{"Result":"STRING"}

{"data":"welcome to hello world"}

{"Result":"[https://translate.google.com/translate_tts?ie=UTF-8&q=welcome to hello world&tl=en&total=1&idx=o&textlen=22&tk=909367.756928&client=t&prev=input&ttsspeed=1"}] (https://translate.google.com/translate_tts?ie=UTF-8&q=welcome to hello world&tl=en&total=1&idx=0&textlen=22&tk=909367.756928&client=t&prev=input&ttsspeed=1"})

file.mms

Description

urltofile

URL to File

file@hello.ypcloud.com+

Function

Parameters

Return

urltofile()

{"url":"STRING","mpath":"STRING"}

{"Result":"STRING"}

{"url":"https://www.ypcloud.com/media/banner_01.png" ,"mpath":"/home/yp/data/123.png"}story.mms

{"Result":"OK"}

story.mms

Description

search

To search a string keyword within an App to the <DDN->target>levels

story@hello.ypcloud.com+

Function

Parameters

Return

search()

{"app":"STRING","keyword":"STRING","ddn":["STRING"],

"target":["STRING"]}

{"Result":"STRING"}

{"app":"jujue","keyword":"mayday","ddn":["ddn1","ddn2"],

"target":["ylobby","ystand"]

{"Result":"OK"}

qCenter.mms

Description

qqn

Device Network(DN) management

qcenter@hello.ypcloud.com

Function

Parameters

Return

qqn()

{"qqn":"STRING"}

{"option":"STRING","qqn":"STRING","ErrCode":"STRING",

"ErrMsg":"STRING","QQNinfo":{"QQN":"STRING","Qname":"STRING",

"QData":"STRING","Owner":"STRING","Target":"STRING","Msg":"STRING"}}

{"qqn":"3634667117"}

{"option":"qqn","qqn":"NFC0000000000003634667117","ErrCode":"0",

"ErrMsg":"OK","QQNinfo":{"QQN":"NFC0000000000003634667117", "Qname":"NFC","QData":"NFC","Owner":"OK","target":"ylobby", "Msg":"youtube mayday"}}

hid.mms

Description

Cmd

Keycode

keycode@hello.ypcloud.com+

Function

Parameters

Return

Cmd()

{"Data":"STRING"}

{"Result":"STRING"}

{"Data":""}

{"Result":"OK"}

shell.mms

Description

Cmd

Copy, Delete, List, Make Directory, Execution, Find

shell@hello.ypcloud.com+

Function

Parameters

Return

Cmd()

{"cmd":"cp","options":"STRING","source":"STRING","dest":"STRING"}

{"Result":"STRING"}

{"cmd":"cp","options":"-f","source":"321.jpg","dest":"556.jpg"}

{"Result":"OK"}

cp

{"cmd":"cp","source":"STRING","dest":"STRING"}

{"Result":"STRING"}

{"cmd":"cp","source":"321.jpg","dest":"556.jpg"}

{"Result":"OK"}

Cmd()

{"cmd":"rm","options":"STRING","file":"STRING"}

{"Result":"STRING"}

{"cmd":"rm","options":"-f","file":"321.jpg"}

{"Result":"OK"}

rm

{"cmd":"rm","file":"STRING"}

{"Result":"STRING"}

{"cmd":"rm","file":"321.jpg"}

{"Result":"OK"}

Cmd()

{"cmd":"ls","options":"STRING","path":"STRING"}

{"Result":"STRING"}

{"cmd":"ls","options":"-f","path":"D:\nodejs\project"}

{"Result":["HelloWorld","Bin","Comm"]}}

ls

{"cmd":"ls","path":"STRING"}

{"Result":"STRING"}

{"cmd":"ls","path":"D:\nodejs\project"}

{"Result":["HelloWorld","Bin","Comm"]}

Cmd()

{"cmd":"mkdir","options":"STRING","dir":"STRING"}

{"Result":"STRING"}

{"cmd":"mkdir","options":"-p","dir":"test"}

{"Result":"OK"}

mkdir

{"cmd":"mkdir","dir":"STRING"}

{"Result":"STRING"}

{"cmd":"mkdir","dir":"test"}

{"Result":"OK"}

Cmd()

{"cmd":"exec","command":"STRING"}

{"Result":"STRING"}

exec

{"cmd":"exec","command":"node Hello World"}

{"Result":"OK"}

Cmd()

{"cmd":"find","path":"STRING"}

{"Result":"STRING"}

find

{"cmd":"find","path":"Hello World"}

{"Result":"OK"}

michael.mms

Description

michael

michael

michael@hello.ypcloud.com+

Function

Parameters

Return

Michael()

{"Name":"STRING","Number":"INT"}

{"Result":"STRING"}

{"Name":"D:/nodejs/project/HelloWorld","Number":"3"}

{"Result":"OK"}

gcp.mms

Description

on

turn on a VM instance

off

turn off a VM instance

status

status of VM instance

create

create a VM instance

delete

delete a VM instance

gcp@hello.ypcloud.com+

Function

Parameters

Return

VM(on)

{"cmd":"on","name":"STRING"}

{"OpType":"STRING","Status":"STRING",

"insertTime":"STRING"}

{"cmd":"on","name":"instance_test_01"}

{"OpType":"start","Status":"PENDING",

"insertTime":"2018-01-31T00:08:11.629-08:00"}

VM(off)

{"cmd":"off","name":"STRING"}

{"OpType":"STRING","Status":"STRING",

"insertTime":"STRING"}

{"cmd":"off","name":"instance_test_01"}

{"OpType":"stop","Status":"PENDING",

"insertTime":"2018-01-31T00:08:11.629-08:00"}

VM(status)

{"cmd":"status","name":"STRING","os":"STRING"}

{"name":"STRING","zone":"STRING",

"Status":"STRING"}

{"cmd":"status","name":"instance_1xyzabc"}

{"OpType":"instance_1xyzabc","zone":

"Asia-east1-a","Status":"TERMINATED"}

VM(create)

{"cmd":"create","name":"STRING","os":"STRING"}

{"VMname":"STRING","OpType":"STRING" ,"Status":"STRING","insertTime":"STRING"}

{"cmd":"on","name":"instance_test_01"}

{"VMname":"STRING","OpType":"insert", "Status":"RUNNING","insertTime": "2018-01-31T00:08:11.629-08:00"}

VM(delete)

{"cmd":"delete","name":"STRING"}

{"VMname":"STRING","OpType":"STRING", "Status":"STRING","insertTime":"STRING"}

{"cmd":"delete","name":"instance_test_01"}

{"VMname":"instance_1xyzabc","OpType":"delete", "Status":"PENDING","insertTime": "2018-01-31T00:08:11.629-08:00"}

1. if STRING===""|| STRING!==any VM’s name, show ALL VMs’ status

2. the name MUST be a match of regex '(?:a-z?)', i.e.: Name must start with a lowercase letter followed by up to 63 lowercase letters, numbers, or hyphens, and cannot end with a hyphen

3. if STRING===””, a name of vm2018m1d2h3m4s5r999999 will be generated by current date + time + a random number

4. OS could be one in {'debian', 'ubuntu', 'windows'} for now

rtu.mms

Description

rtu

relay, readCoil, humiture, air, ifr

rtutcp

relay, readCoil

rtu@hello.ypcloud.com+

Function

Parameters

Return

rtu()

{"name":"STRING","cmd":"STRING" ,"action":"STRING"}

{"RstCode":"STRING","RstMsg":"STRING",

"Data":"STRING"}

Relay Controller

{"name":"yellowfan","cmd":"relay", "acition":"open"}

{"RstCode":"o","RstMsg":"OK",

"Data":"Open Success!"}

rtu()

{"name":"STRING","cmd":"STRING"}

{"RstCode":"STRING","RstMsg":"STRING",

"Data":"STRING"}

ReadCoin

{"name":"yellowfan","cmd":"readcoin"}

{"RstCode":"o","RstMsg":"OK",

"Data":"Is open!"}

rtu()

{"name":"STRING","cmd":"STRING"}

{"RstCode":"STRING","RstMsg":"STRING",

"Data":"STRING"}

Get Humiture

{"name":"humituresensor", "cmd":"humiture"

{"RstCode":"o","RstMsg":"OK", "Data":"Temperature: 19.2℃,Humiture:48%RH}

rtu()

{"name":"STRING","cmd":"STRING"}

{"RstCode":"STRING","RstMsg":"STRING",

"Data":"STRING"}

Getair

{"name":"airsensor","cmd":"air"}

{"RstCode":"o","RstMsg":"OK", "Date":"PM2.5:1ug/m3,PM10:1ug/m3"}

rtu()

{"name":"STRING","cmd":"STRING"}

{"RstCode":"STRING","RstMsg":"STRING",

"Data":"STRING"}

Get IFR

{"name":"ifrsensor","cmd":"ifr"}

{"RstCode":"o","RstMsg":"OK","Date":"warning"}