Blynk - MQTT bridge
This C# application works as a two-way bridge between MQTT and Blynk App.
By changing configured VPIN value on Blynk, it will be reposted to MQTT server and vice versa.
Linux (using mono):
mono BlynkMqttBridge.exe -dump
Windows:
BlynkMqttBridge.exe -dump
Valid .ini configuration file should be provided in executable directory.
Command line arguments -verbose or -dump might be used to determine debug level.
Example configuration file is provided in bin/Release directory. Application will look for blynkmqttbridge.ini file every run.
Once ran, it loads topics mapping and types. There is a simple mechanism which allows to convert values, for example Blynk LED value is parsed as 0 to 255, but MQTT bool value is almost always defined as 0 or 1. Simply, when MQTT topic has value “1”, then “255” will be published on Blynk side and when “255” value is published on that pin, it will repost value “1” to MQTT. This behaviour is defined in TypeEncoder.cs in Application directory.
Simply use Visual Studio 2017 and build provided solution.
M2Mqtt persist here as binary blob. Code can be found at linked repository.
Ini Library by Larry57
Blynk Library by Sverre Frøystein