Ankündigung

Einklappen
Keine Ankündigung bisher.

KNX node for node-red

Einklappen
X
 
  • Filter
  • Zeit
  • Anzeigen
Alles löschen
neue Beiträge

    I am currently working out the input for influxDB based on your Node in "listen to all" mode. It works, but as I am not very familar with Node Red (and Java Script), the script looks horrible...
    The format of the string is:
    "("<maingroup>“->“<middlegroup>“) "<room>“ - "<device>“ - "<action>

    And this is my Script to split this accordingly:
    Code:
    var outputMsg = {};
    var p1 = msg.payload.split("->");
    var HG = p1[0].substr(1,p1[0].length);
    
    var p2=p1[1].split(")");
    var MG = p2[0];
    var parts = p1[1].substr(MG.length+2,p1[1].length).split(" - ")
    
    outputMsg.payload = {
    hg: HG,
    mg: MG,
    room: parts[0],
    device: parts[1],
    action: parts[2]
    }
    
    return [ outputMsg ];

    Does anyone have hints how to improve this?

    EDIT:

    I think I found a good solution using Regex, at least it's much better than the "mess" before ;-) :
    Code:
    var outputMsg = {};
    
    var regexp = /^[\(](.*)[\-][>](.*)[\)][\s](.*)[\s][\-][\s](.*)[\s][\-][\s](.*)$/
    var parts = msg.payload.match(regexp);
    
    outputMsg.payload = {
    hg: parts[1],
    mg: parts[2],
    room: parts[3],
    device: parts[4],
    action: parts[5]
    }
    
    return [ outputMsg ];
    Zuletzt geändert von martiko; 07.03.2020, 21:01.

    Kommentar


      Hi
      If you wish, i can output separate msg properties, instead of one property with maingroup, middlegorou etc. So it’ll be simpler for you.

      Kommentar


        Hi,
        in principle, this would be good idea, but I am not sure if others - that are already using your Node - are happy, Wien you change the interface... or would you just add these properties in addition? (So that all existing flows would remain usable)?

        BTW: Could you include a switch in the Settings to Turn of the missing DP Warnings during deployment? ;-)

        Kommentar


          Obviously they are newly added properties.

          Kommentar


            Hello Martin
            Sorry for the late feedback. I hat do do some changes on my other node (https://flows.nodered.org/node/node-...-sonospollytts) first.
            Italy is yet whole "red zone" for coronavirus, so we have problems. We cannot go out, we cannot work, we can only go to grocery. I'm in trouble. I need to find a way to find incomes for my family, so my priority must go to this.
            The change in the device naming is canceled for now. Sorry.
            But a new version will implement a new scene controller node and, if time permits, the separate main and subgroup naming as well.

            Kommentar


              Hi,
              no problem... I understand the massive problems, I hope in Germany, we will not end up with similar restrictions.

              So all the best for you and your family!


              PS: My flow is working fine with the RegEx for splitting the devicename, so no worry and for sure no hurry...

              Kommentar


                Hi,
                thanks for the great knx ultimate node red flow.
                I've tried using this node, but i can't get this working. I'm using knxd without any configured filters. Connections seems to be okay, i can see the sent telegrams from the ultimade node in the ets bus monitor, but no action is triggered e.g. i send the telegram to turn on the lights the telegram shows up in the bus monitor but the light stays off.
                On the other hand there a no incoming telegrams.
                Do you have any idea what's wrong here? Thanks for your support.
                Hello Gizmoh.
                Thank you for using my node.
                Have you read the Troubleshoot first? https://github.com/Supergiovane/node...Q-Troubleshoot
                Please follow all the steps, then revert here again if you still having problems. Sorry, the German version of the FAQ is still in development. Only English for now.
                Thank you.
                Zuletzt geändert von TheMax74; 20.03.2020, 12:21.

                Kommentar


                  Hi,

                  yes, i've read the troubleshoot guide.
                  I can see the telegrams from NodeRed in the busmonitor and no action is triggered. And NodeRed does not receive any telegrams sent by knx.

                  My knxd config doesn't have any filters configured:
                  Code:
                  [tpuarttcp]
                  dest-port = 80
                  driver = tpuart
                  ip-address = 192.168.1.172
                  [debug-server]
                  name = mcast:knxd
                  [main]
                  addr = 1.0.2
                  client-addrs = 1.0.3:4
                  connections = tpuarttcp,server
                  # systemd = systemd
                  [server]
                  debug = debug-server
                  discover = true
                  router = router
                  server = ets_router
                  tunnel = tunnel

                  Kommentar


                    Hello
                    if you see the telegrams in the ETS bus monitor, they are sent for sure to the bus and, for sure, a KNX Device, for example your Lamp, must turn on/off. Are your sure to use the correct Group Address and that you've programmed the Lamp's actuator with ETS?.
                    Assume you are controlling a Lamp, can you confirm, that your lamp doesn't turn on? Does it turn on, if you send the telegram directly from the ETS bus monitor?
                    Zuletzt geändert von TheMax74; 20.03.2020, 12:41.

                    Kommentar


                      Here yu can see the two telegerams. The first one is from the ultimate Node in NodeRed and the light doesn't turn on. The second is from the wall mounted switch and the lights turns on.
                      Unbenannt.jpg
                      If i send it directly from the bus monitor it works also.
                      Angehängte Dateien

                      Kommentar


                        Hello
                        never seen that before.
                        What happens if you set the Physical KNX Address of the config-node, to 1.0.82, instead of 1.0.3?

                        Kommentar


                          Hi Gizmoh für mich sieht es aus das dein Problem nicht mit Node-Red oder Ultimate Node zu tun hat. Dein Node-Red ist doch über IP an KNX angeschlossen, und der Bedienzentrale mit TP. Die beiden sind aber laut deinem Screenshot im gleichen Linie 1.0.x ?
                          Winston Churchill hat mal gesagt: "Ein kluger Mann macht nicht alle Fehler selbst. Er gibt auch anderen eine Chance.“

                          Kommentar


                            Hey Gizmoh, have you solved the issue?

                            Kommentar


                              Hallo TheMax74,

                              ich habe mal eine kleine Verständnisfrage zu deinem Node, wo ich gerade nicht weiter komme.
                              Ich denke ich habe etwas an der Funktionisweise vom/mit dem KNX Bus übersehen/nicht verstanden, komme aber da nicht drauf.

                              Ich benutze dein Node z.B. um meine Squeezeboxen zu steuern. Dazu habe ich eine GA, hier die 11/3/2 für Pause festgelegt.
                              Beschreibe ich diese GA von einem MDT GT2 Glastaster oder direkt aus der ETS bekommt das Node das mit und reagiert entsprechend.

                              Sende ich aber von extern, bei mir hier z.B. aus IPSymcon auf diese GA sehe ich die Änderung auch in der ETS, aber das Node reagiert hier nicht darauf.

                              Auf dem Bild ist der erste Befehl von Glastaster, das funktioniert, der zweite ist aus IPSymcon heraus.

                              Hast du eine Idee, warum das nicht funktionieren könnte?

                              Danke u. viele Grüße,
                              Doc

                              Screenshot 2020-03-24 12.14.26.png

                              Kommentar


                                Hello Doctor
                                Sorry for the late response, but i had to translate your answer in english.
                                Please check the RBE filter of the knx-ultimate. If it's enabled, disable it. You can learn about the settings here: https://github.com/Supergiovane/node...-Configuration
                                Check the "Quelladresse" as well and ensure that your KNX/IP Interface/Router doesn't filter out it.
                                Please, paste here a screenshot of your flow as well. Thank.
                                Zuletzt geändert von TheMax74; 24.03.2020, 13:19.

                                Kommentar

                                Lädt...
                                X