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. HTTP request from gateway to controller

HTTP request from gateway to controller

Scheduled Pinned Locked Moved Development
8 Posts 3 Posters 1.6k Views 3 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.
  • M Offline
    M Offline
    mhkid
    wrote on last edited by
    #1

    Does MySenors allow for the gateway to send an HTTP request (POST or GET) to the controller and also to receive a request from the controller? I'm doing that right now on an esp8266 as the gateway but I'm using the receive() function on the gateway to send the request after it's received from a sensor to the controller. Is this functionality already provided in the MySenors library and I'm just not seeing it? If so how do I do this?

    mfalkviddM 1 Reply Last reply
    0
    • M mhkid

      Does MySenors allow for the gateway to send an HTTP request (POST or GET) to the controller and also to receive a request from the controller? I'm doing that right now on an esp8266 as the gateway but I'm using the receive() function on the gateway to send the request after it's received from a sensor to the controller. Is this functionality already provided in the MySenors library and I'm just not seeing it? If so how do I do this?

      mfalkviddM Offline
      mfalkviddM Offline
      mfalkvidd
      Mod
      wrote on last edited by
      #2

      @mhkid MySensors does not have support for incoming or outgoing HTTP. The interface towards controllers is either serial, ethernet (tcp or udp) or mqtt client.

      Is there a (more or less) standardized way to communicate with controllers over http? A standardized and well-documented way would make it easier to implement and more valuable since many controllers could utilize it.

      M 1 Reply Last reply
      0
      • mfalkviddM mfalkvidd

        @mhkid MySensors does not have support for incoming or outgoing HTTP. The interface towards controllers is either serial, ethernet (tcp or udp) or mqtt client.

        Is there a (more or less) standardized way to communicate with controllers over http? A standardized and well-documented way would make it easier to implement and more valuable since many controllers could utilize it.

        M Offline
        M Offline
        mhkid
        wrote on last edited by
        #3

        @mfalkvidd, More trying to figure out if MySensors gateway can make connection to controller via http not so much changing the message format. Either the serial or mqtt message format could still be utilized and just serialized/deserislized to/from json for instance.

        I can do it in the receive function was just wondering if this was already provided for via an http connection and I was missing something, but it doesn't sound like it.

        1 Reply Last reply
        0
        • gohanG Offline
          gohanG Offline
          gohan
          Mod
          wrote on last edited by
          #4

          Maybe you could use node-red for that

          M 1 Reply Last reply
          0
          • gohanG gohan

            Maybe you could use node-red for that

            M Offline
            M Offline
            mhkid
            wrote on last edited by
            #5

            @gohan, if I'm understanding node-red correctly I'd have another controller that my esp8266 gateway would talk to, then node-red would talk to the controller via http. Is that correct?

            I can make the http request from the receive() function on the gateway, which I've already got that part working as a test. It's not fully functional yet but I've tested and confirmed I can make the call when I receive a sensor message and I can pass it on to the controller from the gateway. What would the advantage be of using node-red in this case?

            The reason I was asking about existing capability in MySenors is that I'd refactor and use the functionality that's already in MySenors if it was available. However, adding another piece of hardware and software integration adds more complexity which I don't think I need, unless I'm not understanding?

            1 Reply Last reply
            0
            • gohanG Offline
              gohanG Offline
              gohan
              Mod
              wrote on last edited by
              #6

              Yes, it is more complex but node-red is a lot more flexible when it comes to do these things. A lot of people are using node-red as an addition to the home automation. I don't really know what is your setup so I went for a more universal solution.

              M 1 Reply Last reply
              0
              • gohanG gohan

                Yes, it is more complex but node-red is a lot more flexible when it comes to do these things. A lot of people are using node-red as an addition to the home automation. I don't really know what is your setup so I went for a more universal solution.

                M Offline
                M Offline
                mhkid
                wrote on last edited by
                #7

                @gohan - Thanks. Looking at it a little closer it's actually a not a bad suggestion at all and it does look pretty cool. I think I'm going to get this working first so I can get things up and going. But I'm going to put Node-red on my future feature list to look at possibly implementing.

                1 Reply Last reply
                0
                • gohanG Offline
                  gohanG Offline
                  gohan
                  Mod
                  wrote on last edited by
                  #8

                  I hope you know some javascript, as it will be very handy with node-red

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


                  10

                  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