Skip to content
CSS HTML JavaScript
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
Labs
css
js
README.md
WFCloudLogo.png
app.css
app.js
index.html

README.md

WFCloudAPP

https://cloud.wf8266.com

教學

https://sites.google.com/view/wfcloud

WF8266R.js API

物件名稱 wf8266r

login(email, password, callback)

使用 WFCloud 物聯雲帳號和密碼登入,回傳所有設備資訊

auth(key, callback)

使用 WFCloud 暫時的 TOKEN KEY 登入,回傳所有設備資訊

signOut()

登出

watchAll(callback)

建立監聽模型,任何設備異動資訊都會以 JSON 物件回傳

digitalWrite(deviceId, pin, value)

數位輸出

info(deviceId)

取得設備通用資訊

使用 WFCloud 帳號和密碼登入

var myDevices;

wf8266r.login(this.user.email, this.user.password, function (data) {
          console.log(data);
          myDevices = data;
          bindDeviceEvent();
})

function bindDeviceEvent(){
  wf8266r.watchAll(function(data){
    myDevices.devices[data.index].online = true;

    if(data.type == "CONFIG")
      myDevices.devices[data.index].config = data;
  })
}
You can’t perform that action at this time.