开源物联网平台 吊兰
在线Demo: http://mqtt.phodal.com吊兰是一个在线的物联网测试平台,你可以用他来测试你的物联网设备。网页上创建一个节点,然后你就可以用MQTT,REST,CoAP来测试你的硬件代码。
REST示例如下所示:
安装
1.安装
redissudoapt-getinstallredis-serverorsudoyuminstallredis-server
2.安装依赖
sudonpminstall
3.Servernodediaonan.js
简介
REST示例如下所示:
$curl-XPUT-d'{"dream":1}'
-H"Content-Type:application/json"
http://mqtt.phodal.com/topics/lettuce
$curlhttp://mqtt.phodal.com/topics/lettuce
{"dream":1}
Mosquitto示例:
mosquitto_pub-hmqtt.phodal.com-d-tlettuce-m"Hello,MQTT.Thisismyfirstmessage."
Python MQTT示例:
importmosquitto
mqttc=mosquitto.Mosquitto("python_pub")
mqttc.connect("mqtt.phodal.com",1883,60,True)
mqttc.publish("lettuce","Hello,World!")
CoAP GET示例:
coap-client-mgetcoap://mqtt.phodal.com:5683/topics/zero
CoAP POST示例:
echo-n'helloworld'|coappostcoap://mqtt.phodal.com/topics/zero
echo-n'{"lettuce":123}'|coappostcoap://mqtt.phodal.com/topics/zero
让我们用MQTT, REST, CoAP做一些有趣的事!
Arduino示例见:https://gist.github.com/phodal/fd1be9ea3cc13cd48ffa
协议支持:
MQTTHTTP GET/POSTWebSocketCoAP
支持设备:
Arduino8051/51 FamilyRaspberry PiPCduinoSTM32ARMAndroid DevicesiOS DevicesWindows Phone Devices...