Network communication... best protocol?

Einklappen
X
 
  • Zeit
  • Anzeigen
Alles löschen
neue Beiträge
  • J V
    LoxBus Spammer
    • 28.08.2015
    • 367

    #1

    Network communication... best protocol?

    Hello,

    Perhaps a strange question, but I would like to communicate between Loxone and EventGhost. EventGhost offers numerous standards for communication, the applicable ones here are webserver (with sockets), tcp sending/receiving and udp communication.

    I would like to send values from EventGhost to Loxone, and am considering either tcp sending (on EventGhost side) combined with a virtual input, or sending via http (though I'm not sure if the Loxone presents itself as a suitable client). And of course I would also like to do the reverse: send some value from Loxone to EventGhost, and again there are these options...

    Which option would be the best choice considering robustness and future applicability? Either requires me to work a bit on it, so I want to make a good choice now...

    Thanks,


    Jörg
  • Benjamin Jobst
    Lox Guru
    • 25.08.2015
    • 1194

    #2
    Hi,

    is there a possiblity of using Modbus/TCP protocol? If then I would prefer this as Loxone can handle Modbus/TCP quite easily by now and Loxone could manage the timing of fetching the data.
    Alternatively udp might be a quite easy way but I haven't checked the capabilities of Loxone in this direction... If you're already programming with the Loxone Config you could easily check and maybe test the different connection possiblites to find out which of these is the best option...
    MfG Benny

    Kommentar

    • J V
      LoxBus Spammer
      • 28.08.2015
      • 367

      #3
      I would have to check if Eventghost supports Modbus.

      But does it allow some push-functionality? If something changes on the side of eventghost, that it can just push it to the loxone (and vice versa)? On the eventghost side, I already have a website with websockets, which allows me to display data from eventghost and this data changes when eventghost tells it to. Something similar would be great in loxone.

      Jorg

      Kommentar

      • Benjamin Jobst
        Lox Guru
        • 25.08.2015
        • 1194

        #4
        Okay, for push-functionality Modbus is not the ideal choice that's true. In this case you could more easily use the http or udp-inputs I think...
        MfG Benny

        Kommentar

        • J V
          LoxBus Spammer
          • 28.08.2015
          • 367

          #5
          Thanks!
          I read a bit more, and it seems that the web services ( http://www.loxone.com/enen/service/d...bservices.html ) might be the easiest to get working. I still have to figure out how to get Loxone to send status changes, but I have to experiment with a few things first.

          I suspect that if I send an enablestatusupdate ( http://miniserver/dev/sps/​enablestatusupdate ) from eventghost, any statusupdate from the Loxone will be sent to eventghost. But I have to test that first...

          For changes in eventghost, I can force the sending of a http command, so that should be fine...

          Jörg

          Kommentar

          • maxw
            Lox Guru
            • 26.08.2015
            • 1362

            #6
            UDP works great for push notifications, I used it a lot to integrate the Netatmo weather station.

            Kommentar

            • J V
              LoxBus Spammer
              • 28.08.2015
              • 367

              #7
              Yes... but I may have more issues processing UDP in EventGhost. I think I'll give the web api's a try: both eventghost and loxone seem to support it quite well, and it may be open enough to use to communicate with other things without too much modifications...

              Thanks!

              Kommentar

              • J V
                LoxBus Spammer
                • 28.08.2015
                • 367

                #8
                Ok, still some issues... I use a http output to send this to a webserver:
                Code:
                http://SERVER_IP:PORT?EVENT&PAYLOAD
                I defined a virtual output, with ip address set to
                Code:
                http://SERVER_IP:port
                and separator set to
                Code:
                 &
                I then have virtual output,
                method for on set to
                Code:
                POST
                POST command for on set to
                Code:
                EVENT&PAYLOAD
                but only the first part gets sent to the server:
                Code:
                http://SERVER_IP:PORT?EVENT
                How can I get that that second part? I have tried different options... For sure I'm have something wrong, but I don't know where...


                Thanks!


                Jörg

                Kommentar

                • Christian Fenzl
                  Lebende Foren Legende
                  • 31.08.2015
                  • 11234

                  #9
                  Possibly you have to URL-encode the ampersand (http://meyerweb.com/eric/tools/dencoder/) and other special characters.
                  Hilfe für die Menschen der Ukraine: https://www.loxforum.com/forum/proje...Cr-die-ukraine

                  Kommentar

                  • J V
                    LoxBus Spammer
                    • 28.08.2015
                    • 367

                    #10
                    Didn't think of that... Will try it soon (most likely in the weekend)...
                    Thanks!

                    Kommentar

                    Lädt...