WoT Servers for LinkIt Smart 7688

WoT.City 專為 CoAP 與 LWM2M 環境開發的 WoT Broker Servers

Getting Started

Wrint Lua Script at NodeMCU

-- Connect NodeMCU to WiFi
-- Configure the NodeMCU as a station (client)
wifi.setmode(wifi.STATION)
wifi.sta.config("<SSID>", "<PASSWORD>")
wifi.sta.autoconnect(1)
 
-- Print IP address
ip = wifi.sta.getip()
print(ip)
 
-- Create a CoAP client
cc = coap.Client()
 
-- Register a LWM2M object via a simple CoAP POST request (optional)
registry="/75001/1/2"
cc:post(registry, "{}\r\n")
 
-- Make a mDNS update (discover home hub)
cc.update()
 
-- Make a POST request to server (discovered by mDNS)
cc:post(uri, "{\"temp\":30}\r\n")
Download NodeWoT firmware

Install  wotcity.io v0.6 (coming)  and run COAP-LWM2M broker server

$ npm install wotcity.io
$ cd node_modules/wotcity.io
$ node servers/coap-broker-lwm2m.js
WoT.City/CoAP/LWM2M broker server is listening at coap://localhost:8000
Visit wotcity.io npm

LinkIt Smart 7688 has Avahi (mDNS) service.

<?xml version="1.0" standalone='no'?><!--*-nxml-*-->
<!DOCTYPE service-group SYSTEM "avahi-service.dtd">
<service-group>
 <name replace-wildcards="yes">WoT Home Hub CoAP Server on %h</name>
  <service>
   <type>_http._tcp</type>
   <port>80</port>
   <txt-record>path=/</txt-record>
  </service>
</service-group>

Seeed Studio

Seeed is a hardware innovation platform for makers to grow inspirations into differentiating products. Seeed helps productize 1 to 1,000 pcs using in-house engineering, supply chain management and agile manufacture forces.

WoT.City

Copyright (C) 2015-present Devify, Inc. All rights reserved.
WoT.City® is a registered trademark of Devify, Inc.

Contact

 Facebook
 hello@wotcity.com

Community

 Open source