Coder Social home page Coder Social logo

every2mqtt's Introduction

every2mqtt

  • 支持将绿米Aqara局域网组播UDP转发至MQTT特定主题下,并且支持控制指令下发时的token自动更新生成;
  • 支持将ModbusRTU数据转发至MQTT特定主题下;

运行方式

绿米智能网关 udp->mqtt

python udpMain.py

Modbus串口模式

注意:如果运行python uartMain.py不加 -device参数,则默认以噪声传感器方式运行

即 python uartMain.py ==== python uartMain.py -device=noise

  • 噪声传感器
python uartMain.py -device=noise
  • 贴片式温度传感器
python uartMain.py -device=pt100
  • 建大仁科温湿度传感器
python uartMain.py -device=temphumi
  • 水压传感器
python uartMain.py -device=pressure

Modbus TCP模式

  • hpu数据采集
python tcpMain.py

依赖库列表

  • asyncio
  • PyYAML
  • pycryptodome (在Windows系统下安装)
  • pycrypto (在Linux系统下安装)
  • paho-mqtt
  • pymodbus

注意事项

  • 如果在Linux运行UDP组播程序时遇到

     errno:19 no such device

    请使用route -n 查看组播地址是否已添加进路由表,如果没有请使用

    sudo route add -net 224.0.0.50 netmask 255.255.255.255 eth0

    224.0.0.50:为当前使用的多播IP地址

    eth0:为当前使用的有效网卡

every2mqtt's People

Contributors

nmoumou avatar

Watchers

James Cloos 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.