Giter Site home page Giter Site logo

aliyun-iot's Introduction

Simps & Aliyun IOT

使用 Simps框架 调用 阿里云物联网平台 服务(MQTT)

安装

使用composer进行安装或者直接使用git clone源码

composer create-project simps-cloud/aliyun-iot

git clone [email protected]:simps-cloud/aliyun-iot.git

使用

<?php

return [
    'host' => "{$YourProductKey}.iot-as-mqtt.{$region}.aliyuncs.com", // 连接域名
    'port' => 1883, // 端口默认1883
    'keepalive' => 300, // 心跳
    'client_id' => "d812edc1-18da-2085-0edf-a4a588c296d1", // clientID
    'device_name' => "",
    'device_secret' => "",
    'product_key' => "",
    'product_secret' => "",
];
  • 订阅
php bin/subscribe.php
  • 发布
php bin/simps.php http:start

curl http://127.0.0.1:9501/

⚠️内置的 MQTTClient 已标记废弃,请使用 simps/mqtt

🎉详细说明参考博客《基于Swoole使用MQTT协议连接阿里云物联网平台设备实现消息订阅》

⭐️支持请前往点个Star:Simps

aliyun-iot's People

Contributors

sy-records avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.