-
Notifications
You must be signed in to change notification settings - Fork 638
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
UART --> MQTT #529
Comments
I like this one. It would be a great addition to use with RFID or barcode readers... |
Hi, I created something like this data going from UART to MQTT. As I only needed a quick and dirty working approach I high jacked the RF-Bridge code for it. I will attache the file so you have an idea. |
I tried to make a Pull request sorry that went wrong. In espurna add on line 150 in Arduino.h add on line 63 in general.h add on line 557 in hardware.h add on line 1425
Add a file uart_mqtt.ino with the following content #include // ----------------------------------------------------------------------------- void _recvWithEndMarker() { while (Serial.available() > 0 && newData == false) {
} void _sendNewData() { #if MQTT_SUPPORT
} // ----------------------------------------------------------------------------- void UARTtoMQTTSetup() {
} void UARTtoMQTTLoop() { #endif It is not the most nice code but it works for one direction. In uart_mqtt.ino you will find a line //send the received MQTT message to Serial from here I got stuck hope someone can help a bit. |
Thanks, It would be nice to include in the main branch of the project |
for now my experiment can be found here: |
My code works both way's now I'm having it sending a RSS feed over MQTT and UART to a ticker as test and it is running fine. @xoseperez can you have a look at what I created and add it? it is now added as a hardware board more nice will be if it could be added as feature to all hardware that don't have anything connected to the UART. I think you will have a perfect overview of that. |
@AlbertWeterings I have just merged your code. Thank you! I have made some small changes to follow the code style convention and moved some things up and down. It's in the dev branch now. |
Staged for release |
Could this be used for a IR transmitter for smart meters? |
Is it possible to add new functionality(UART --> MQTT): from the terminal, the publicat of the data in the mqtt topic. It is necessary for interaction with other devices
Example:
send data to serial --> #mqttmydevice test-string
mqtt <--- mqtt_root_topic/mydevice/test-string
The text was updated successfully, but these errors were encountered: