Ankündigung

Einklappen
Keine Ankündigung bisher.

eibd and PHP

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

    eibd and PHP

    Hi,

    Anyone having a sample PHP souce code dealing with eibd ? and willing to share it ? or a pointer to such code ?

    So far I've found much C code, but no PHP. As I don't master neither, I'm going to learn PHP.

    What I'm willing to do, is to issue simple read & write to the bus via eibd, just as can be done from the eibd command line.
    This exercise is in the context mentionned here (so far I'm able to issue EIB commands from the telephone, but to make decisions i.e. the type of icon to display, I need some code at the server side)

    Thank you in advance

    #2
    Maybee I'm wrong but Misterhouse is using php
    and I thing CNI uses php scripts too...
    there is also a script at sourceforge...
    http://linknx.sourceforge.net/files/example-php.txt
    or
    https://knx-user-forum.de/showpost.p...76&postcount=6
    EPIX
    ...und möge der Saft mit euch sein...
    Getippt von meinen Zeigefingern auf einer QWERTZ Tastatur

    Kommentar


      #3
      Hi,
      Zitat von EPIX Beitrag anzeigen
      there is also a script at sourceforge...
      http://linknx.sourceforge.net/files/example-php.txt
      Thank you for the pointer (I should have known )
      But I'm unable to get it, IE is eating up the file, just displaying a few characters.
      Would you be so kind to get it for me, please ?

      Edit:
      Sorry, don't bother, I forgot I've a Linux machine now, and FF can grab it, no problem
      Thank you anyway

      Kommentar


        #4
        I have implemented all my eib stuff with php, mysql and eibd.
        I used interprocess communication of php to seperate some tasks. For example one php process which only receives and sends all eib telegrams. With a queueing mechanism it will forward the received eib telegrams to the homeserver/logic process. I have implemneted php processes/modules for:

        - eib homeserver (incl. logic module)
        - eib listener/sender (connection to the KNX bus)
        - eib timer (like linux cron syntax)
        - irtrans
        - audio (e.g. musicpal, linux alsa)
        - dreambox
        - 1wire
        - asterisk
        - eib timer
        - dreambox
        - rfid rs485 reader
        - elsner weather station
        - visu on ajax basis (very first try)

        I think what you ar looking for is something like my eib listener together with the homeserver module. Due to the fact, that I am only developing for me the source is not very well documented. Please let me know if you want to get the source. Than I can explain you some more details if you are interested in.

        Kommentar


          #5
          Zitat von Warichet Beitrag anzeigen
          Anyone having a sample PHP souce code dealing with eibd ?
          In the source distribution (at least) of eibd is a PHP file that contains a PHP class that can communicate with eibd and that can be the base of an implementation. As it uses the same interface like the C code you could easily translate some functionality from C to PHP.
          Zitat von jonofe Beitrag anzeigen
          I have implemented all my eib stuff with php, mysql and eibd.[...]
          That sounds like a great project that you should open source!
          TS2, B.IQ, DALI, WireGate für 1wire so wie Server für Logik und als KNX Visu die CometVisu auf HomeCockpit Minor. - Bitte keine PNs, Fragen gehören in das Forum, damit jeder was von den Antworten hat!

          Kommentar


            #6
            @Chris
            In the source distribution (at least) of eibd is a PHP file that contains a PHP class that can communicate with eibd
            Well I looked in the BCU SDK? I guess I missed it. (Ooh this doc )

            you could easily translate some functionality from C to PHP.
            That's very true for a programmer, but I'm not, so, it will mean much pain & sweat. But if that's the way to go, I'll go.

            @ André,
            Thank you for the detailed reply.
            Indeed, looks like a great project
            Zitat von jonofe Beitrag anzeigen
            I have implemneted php processes/modules for:
            - eib homeserver (incl. logic module)
            Ah ?!?
            I thought that the HS uses EibLib and eibd uses Eib routing or tunneling, hence are not compatible. Maybe you are doing some conversion on the fly ?

            Zitat von jonofe Beitrag anzeigen
            I think what you ar looking for is something like my eib listener together with the homeserver module.
            Most probably, maybe you can juge from the story below.
            The original idea, (as mentionned in the post) was to use the Cisco phone and the nice touchscreen as an alternate Visu, one in each room.
            The phone has an XML menu system, can display png, send & receive urls.
            But the interface with the HS seemed much too difficult, hence the need for a third party: eibd.
            So far, I've mimiced the HS menu on the phone and I can display a Visu icon. When hitting one corner or the other, I can switch On/off a lamp by sending eibd commands, embedded in an url.
            By hitting a third corner of the icon, I can send a read request to eibd and I get a numeric reply for the status.
            What I'm trying to do now, is to implement some logic on the server, that would catch this numeric value of the status and send a green icon for Off and a red icon for On (not the opposite, hé )

            Zitat von jonofe Beitrag anzeigen
            Please let me know if you want to get the source. Than I can explain you some more details if you are interested in.
            Sure enough, I'm interested

            Thank again for your kind offer, appreciated.

            Kommentar


              #7
              Zitat von Warichet Beitrag anzeigen
              Well I looked in the BCU SDK? I guess I missed it. (Ooh this doc )
              I've just seen that this file gets generated when compiling the source code. It would stay at bcusdk-0.0.4/eibd/client/php. I've added that file for your convenience.
              Zitat von Warichet Beitrag anzeigen
              That's very true for a programmer, but I'm not, so, it will mean much pain & sweat. But if that's the way to go, I'll go.
              If you can program PHP then (at least reading) C shouldn't be a miracle for you.
              The documentation is at the eibd homepage (sdkdoc-0.0.4.pdf)
              Angehängte Dateien
              TS2, B.IQ, DALI, WireGate für 1wire so wie Server für Logik und als KNX Visu die CometVisu auf HomeCockpit Minor. - Bitte keine PNs, Fragen gehören in das Forum, damit jeder was von den Antworten hat!

              Kommentar


                #8
                Zitat von Chris M. Beitrag anzeigen
                I've added that file for your convenience.
                Very kind of you. Thank you very much
                Sorry for the late reply, we've had a really, very, very bad time in Midi-Pyrénées.

                Kommentar


                  #9
                  Raymond, I'm currently working on beautifying my code. Therfore I ask you for your patience. It will take me some days before I can provide the code. I will come back to you as soon as possible.

                  Kind regards

                  André

                  Kommentar


                    #10
                    I did not forget this topic. Today I prepared a rough overview of my implementation. Just for the guys who are interested in it, please look at the attachment.
                    Currently I am also beautifying my code, so I think I will upload some code to the download area in 1 or 2 weeks. But please don't expect that this code is running out of the box in your environment, because it is not designed to do so.

                    regards
                    André
                    Angehängte Dateien

                    Kommentar


                      #11
                      Zitat von jonofe Beitrag anzeigen
                      Just for the guys who are interested in it, please look at the attachment.
                      Looks great !

                      Kommentar


                        #12
                        Zitat von Chris M. Beitrag anzeigen
                        I've just seen that this file gets generated when compiling the source code. It would stay at bcusdk-0.0.4/eibd/client/php. I've added that file for your convenience.

                        If you can program PHP then (at least reading) C shouldn't be a miracle for you.
                        The documentation is at the eibd homepage (sdkdoc-0.0.4.pdf)
                        Please look at bcusdk-0.0.4/contrib/eibdvis for a complete example client in PHP

                        Kommentar


                          #13
                          Zitat von mkoegler Beitrag anzeigen
                          Please look at bcusdk-0.0.4/contrib/eibdvis for a complete example client in PHP
                          It's a great honor to have a post of Martin Kögler, the father of eibd.
                          In the mean time, I've indeed migrated to ver 0.0.4.
                          My project is heading towards the end (after some sweat and fumbling about the doc ) as I've a (almost) working Visu on a Cisco 7970.
                          It's no brilliant programming but rather a "midnight hack".

                          It wouldn't have been possible without eibd

                          Thank you.

                          Kommentar


                            #14
                            Hallo André,

                            Dein Schaubild macht mich ganz schön neugierig
                            Bin gespannt

                            VG Dirk

                            Kommentar


                              #15
                              Der Ansatz von jonofe ist schon sehr umfassend
                              Auch wenn ich vor 10 Minuten noch Werbung für den HS geschrieben habe (wozu ich auch stehe), mein Ziel ist es aktuell, das Thema OSS mit eibd, linknx&Co im Rahmen der Möglichkeiten für einen grösseren Anwenderkreis verfügbar zu machen.

                              eibd und die Ideen&Diskussionen hier sind dafür natürlich ganz entscheinde Bausteine, ebenso begrüsse ich natürlich Martin Kögler hier ! Ich glaube es wurde in meiner ganzen IT-Laufbahn noch nie ein Fehler vom "Hersteller" in einem Produkt so schnell gefixed wie am 14.12.2008 in unter 2h
                              Und das alles ohne grosse Diskussionen, sinnlose Rückfragen, Beschätigungstheraphie für den Kunden. Das kenne ich als "eigentümer" von mindestens 10 Cisco-Bugs auch ganz anders, sowas erlebt man selten, das ist aber ein klasse Beispiel wie und warum OSS im Jahre 2009 die bessere Alternative und Lösung ist!

                              Zitat von EPIX Beitrag anzeigen
                              WENN(!) es ein Forum gäbe, wo Gleichgesinnte an OpenSource werken und als Ziel eine vernünftige Lösung herausbringen, die MIT VERTRETBAREN Aufwand ein Ziel erreichen: ich bin dabei!

                              Zitat von makki Beitrag anzeigen
                              Gibts es schon, Du bist mittendrin
                              In meiner Aussage fühle ich mich da bestätigt, weil hier glaube ich auch seitens der Betreiber keine sinnfreie Engstirnigkeit besteht und man so offen wie hier über das eine und das andere sprechen kann.

                              Und vielleicht wird auch die Lösung von Warichet da noch eine Ergänzung bringen

                              Makki
                              EIB/KNX & WireGate & HS3, Russound,mpd,vdr,DM8000, DALI, DMX
                              -> Bitte KEINE PNs!

                              Kommentar

                              Lädt...
                              X