Code Monkey home page Code Monkey logo

blynk_mqtt's Introduction

Blynk.cc to MQTT broker bridge

Blynk.cc nice project with nice Android application, but uses own protocol and library not implemented on some hardware.

This is simple bridge between Blynk.cc and MQTT. Only virtual pins allowed.

Setup

Setup your token and broker:

TOKEN = "YourAppToken"
MQTT_SERVER = "test.mosquitto.org"
MQTT_PORT = 1883
TOPIC = "/ESP009xxxxx"

And run python blynk-mqtt.py

Requires paho-mqtt python module

MQTT Topics

Virtual pin 0 write request will be published as /ESP009xxxxx/vw/0 topic. Virtual pin 0 read request will be published as /ESP009xxxxx/vr/0 topic and also will be send answer to Blynk.cc server - latest pin value. Where 0 is virtual pin number.

Bridge subscribes for all /ESP009xxxxx/# topics and translate them to virtual pins according translate table

translate_topic = (
	('sensors/bmpt', 0),
	('sensors/bmpp', 1),
)

This mean that value from topic /ESP009xxxxx/sensors/bmpt will be translate to virtual pin 0, for example.

Topics like /ESP009xxxxx/vw/0 will be translate to virtual pin 0.

Copyright

This work based on code blynk-library/tests/pseudo-library.py from Blynk.cc project.

blynk_mqtt's People

Contributors

polkabana avatar

Watchers

 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.