Skip to content
  • MySensors
  • OpenHardware.io
  • Categories
  • Recent
  • Tags
  • Popular
Skins
  • Light
  • Brite
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Brand Logo
  1. Home
  2. Development
  3. script to convert serial to mqtt?

script to convert serial to mqtt?

Scheduled Pinned Locked Moved Development
9 Posts 4 Posters 787 Views 5 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • K Offline
    K Offline
    kiesel
    wrote on last edited by
    #1

    Hi,

    I am trying to find a working script that translates messages from my serial gateway to mqtt so that they are equivalent (in structure and topics) to a mysensors mqtt-gateway.

    The reason I would like this is that I can't use my rfm69h chip on my raspberry pi atm but I can use a serial gateway. As soon as I can use the chip I would like to use the mqtt gateway. And I don't want to set everything up from scratch in home assistant then.

    Can anybody recommend a working script for this? I have found a few very old ones and one that's fairly recent, but the ones I found that let me set subscribe and publish topics didn't accept username and passwort for the mqtt broker and the ones that did used a different messaging structure.

    Thanks for the help!

    1 Reply Last reply
    0
    • mfalkviddM Offline
      mfalkviddM Offline
      mfalkvidd
      Mod
      wrote on last edited by
      #2

      I have no experience with Home Assistant, but in Domoticz I can just switch my gateways from one protocol to another. Maybe Home Assistant can do something similar?

      f84e4f17-c6fe-4c0a-8332-277fe902ab6a-image.png

      1 Reply Last reply
      0
      • electrikE Offline
        electrikE Offline
        electrik
        wrote on last edited by
        #3

        I haven't tested it, but this one seems to fit what you need
        https://github.com/mycontroller-org/serial2mqtt/blob/master/README.adoc

        K 1 Reply Last reply
        2
        • electrikE electrik

          I haven't tested it, but this one seems to fit what you need
          https://github.com/mycontroller-org/serial2mqtt/blob/master/README.adoc

          K Offline
          K Offline
          kiesel
          wrote on last edited by
          #4

          @electrik perfect, thank you both!

          1 Reply Last reply
          1
          • electrikE Offline
            electrikE Offline
            electrik
            wrote on last edited by
            #5

            You're welcome. Can you let us know how that program worked?

            K 1 Reply Last reply
            0
            • G Offline
              G Offline
              Gerard van Seventer
              wrote on last edited by
              #6

              You could also use node-red for this (and many other useful things)

              electrikE K 2 Replies Last reply
              0
              • G Gerard van Seventer

                You could also use node-red for this (and many other useful things)

                electrikE Offline
                electrikE Offline
                electrik
                wrote on last edited by
                #7

                @Gerard-van-Seventer said in script to convert serial to mqtt?:

                You could also use node-red for this

                I've tried this in the past, but couldn't get it to work completely. It worked only one way, as for both send and receive a serial port node was needed, and only one of them could have access to the serial port at a time.

                1 Reply Last reply
                0
                • electrikE electrik

                  You're welcome. Can you let us know how that program worked?

                  K Offline
                  K Offline
                  kiesel
                  wrote on last edited by
                  #8

                  @electrik
                  I haven't tried the script since using a serial gateway as is in home assistant was problem free and from what I have seen I can seamlessly switch to an mqtt broker in the future.

                  1 Reply Last reply
                  0
                  • G Gerard van Seventer

                    You could also use node-red for this (and many other useful things)

                    K Offline
                    K Offline
                    kiesel
                    wrote on last edited by
                    #9

                    @Gerard-van-Seventer

                    I am using appdaemon for my automation and I wouldn't want to install node red just for the conversion. Or are there automations that node red can that appdaemon can't?

                    1 Reply Last reply
                    0

                    Hello! It looks like you're interested in this conversation, but you don't have an account yet.

                    Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.

                    With your input, this post could be even better 💗

                    Register Login
                    Reply
                    • Reply as topic
                    Log in to reply
                    • Oldest to Newest
                    • Newest to Oldest
                    • Most Votes


                    16

                    Online

                    12.0k

                    Users

                    11.2k

                    Topics

                    113.4k

                    Posts


                    Copyright 2025 TBD   |   Forum Guidelines   |   Privacy Policy   |   Terms of Service
                    • Login

                    • Don't have an account? Register

                    • Login or register to search.
                    • First post
                      Last post
                    0
                    • MySensors
                    • OpenHardware.io
                    • Categories
                    • Recent
                    • Tags
                    • Popular