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. MQTT Client using MySensors Serial Gateway

MQTT Client using MySensors Serial Gateway

Scheduled Pinned Locked Moved Development
5 Posts 4 Posters 2.8k Views 2 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.
  • A Offline
    A Offline
    arendst
    wrote on last edited by
    #1

    I wrote a python script acting as a MQTT Client using the standard MySensors Serial Gateway:

    https://github.com/arendst/mqtt-mysensors

    It is based on the MQTT Ethernet gateway as provided with the MySensors package. It supports the same message structure as
    <topic_prefix>/<nodeid>/<childid>/<variable_type> [<value>]

    Depending of the presence of <value> a C_SET or C_REQ message is send to the gateway. It recognizes ON and OFF for V_LIGHT. So publishing 'mysensors/0/0/V_LIGHT ON' will turn the light on for node 0 and child 0.

    Before use please update the user configuration values according to your environment at the beginning of the script.

    L TheoLT 2 Replies Last reply
    3
    • A arendst

      I wrote a python script acting as a MQTT Client using the standard MySensors Serial Gateway:

      https://github.com/arendst/mqtt-mysensors

      It is based on the MQTT Ethernet gateway as provided with the MySensors package. It supports the same message structure as
      <topic_prefix>/<nodeid>/<childid>/<variable_type> [<value>]

      Depending of the presence of <value> a C_SET or C_REQ message is send to the gateway. It recognizes ON and OFF for V_LIGHT. So publishing 'mysensors/0/0/V_LIGHT ON' will turn the light on for node 0 and child 0.

      Before use please update the user configuration values according to your environment at the beginning of the script.

      L Offline
      L Offline
      lafleur
      wrote on last edited by
      #2

      @arendst

      I have this gateway running on my Raspberry PI2, but I noticed that it not giving out node ID's... Is this something your going to add??

      Thanks

      1 Reply Last reply
      1
      • X Offline
        X Offline
        xefil
        wrote on last edited by
        #3

        hello @arendst ,

        Does it work on MySensors API 2.0 as well?
        I'm interested to use it ;)

        thanks!!

        Simon

        X 1 Reply Last reply
        0
        • A arendst

          I wrote a python script acting as a MQTT Client using the standard MySensors Serial Gateway:

          https://github.com/arendst/mqtt-mysensors

          It is based on the MQTT Ethernet gateway as provided with the MySensors package. It supports the same message structure as
          <topic_prefix>/<nodeid>/<childid>/<variable_type> [<value>]

          Depending of the presence of <value> a C_SET or C_REQ message is send to the gateway. It recognizes ON and OFF for V_LIGHT. So publishing 'mysensors/0/0/V_LIGHT ON' will turn the light on for node 0 and child 0.

          Before use please update the user configuration values according to your environment at the beginning of the script.

          TheoLT Offline
          TheoLT Offline
          TheoL
          Contest Winner
          wrote on last edited by
          #4

          @arendst I'm also interested of you MQTT client is capable of assinging nodes. At this point it's the only reason why I still connect everything through Domoticz. Would be awesome to separate MySensors and Domoticz.

          1 Reply Last reply
          0
          • X xefil

            hello @arendst ,

            Does it work on MySensors API 2.0 as well?
            I'm interested to use it ;)

            thanks!!

            Simon

            X Offline
            X Offline
            xefil
            wrote on last edited by
            #5

            Seems to work well! I'll test it a little bit :-)

            1 Reply Last reply
            0
            Reply
            • Reply as topic
            Log in to reply
            • Oldest to Newest
            • Newest to Oldest
            • Most Votes


            11

            Online

            11.7k

            Users

            11.2k

            Topics

            113.1k

            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