Ceiling Light Control

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts
  • Quinten
    Automated Home Sr Member
    • May 2004
    • 85

    #16
    Hiya,

    I've just done the same thing on my Macbook and I am getting the same result. So a quick perl --help later and it reveals you can just call it like this:

    $ perl listener.pl

    or alternatively, make an executable from it by:

    $ chmod +x listener.pl
    $ ./listener.pl

    Q.
    Awooga!!!

    Comment

    • Quinten
      Automated Home Sr Member
      • May 2004
      • 85

      #17
      And if you want to test it, you can use the other script, and change the port number in that to 53007 (so the same as the listener). Then call it as follows (in a new Terminal):

      $ ./client.pl localhost "Parsing |D:1A01:E|"

      That's exactly what the Online Controller would broadcast over UDP.
      Awooga!!!

      Comment

      • rarem
        Automated Home Jr Member
        • Sep 2009
        • 23

        #18
        Quinten - just got around to trying this out now. It works beautifully. Thanks again for taking the time to take me through this. I really appreciate it.

        For any others wishing to try this on their Mac I had to make a couple of very minor adjustments to get it working. I'll detail them here to save others time -
        • Each program seemed to have unrecognized characters when I pasted them into Text Wrangler. I simply deleted all leading spaces on each line of the programs. Anyway the terminal will give you a message such as "Unrecognized character \xC2 in column 8 at client.pl line 9" so you can tell which lines are affected.
        • I had to comment out "!/usr/bin/perl -w" by adding "#" before that line in the client.pl program


        That was all. Now to buy the hardware!

        EDIT: Is there a command to Dim via the Online Controller?
        Last edited by rarem; 23 September 2009, 07:49 PM. Reason: Add question on Dimming

        Comment

        • Quinten
          Automated Home Sr Member
          • May 2004
          • 85

          #19
          Glad you got it working

          You can not issue a Dim command (there is no such thing), but you can do the same thing as what a wall switch needs to do in order to dim. Press the On button twice, and the receiver will dim up and down until you press the On button again. So with Online Controller, you'd send 2 On commands, followed by another On to stop the 'disco'. Dim levels remain stored though.
          Awooga!!!

          Comment

          • rarem
            Automated Home Jr Member
            • Sep 2009
            • 23

            #20
            So I finally got my Online Controller only to find that it was old stock so I've had to send it back to Domia for the firmware upgrade. Grrr!

            But in the meantime I had it just long enough for another few questions to occur to me (sorry Quinten!).
            • I plug the Online Controller into my Airport Extreme router. Do I need to open any ports in the Firewall? I'm running Snow Leopard
            • How do I find the IP address of the Online Controller in order to hardcode that number into the Perl script and does that IP number change over time?

            Comment

            • Quinten
              Automated Home Sr Member
              • May 2004
              • 85

              #21
              Originally posted by rarem View Post
              So I finally got my Online Controller only to find that it was old stock so I've had to send it back to Domia for the firmware upgrade. Grrr!

              But in the meantime I had it just long enough for another few questions to occur to me (sorry Quinten!).
              • I plug the Online Controller into my Airport Extreme router. Do I need to open any ports in the Firewall? I'm running Snow Leopard
              • How do I find the IP address of the Online Controller in order to hardcode that number into the Perl script and does that IP number change over time?
              I have no experience of the Airport Extreme router, but there is normally no need to open any ports on it. You do want to put a bit of distance (i.e. long ethernet cable) between the controller and the router as the controller doesnt seem to like other equipment much (just from experience, ymmv).

              If you start the listener, you will see a whole bunch of messages scroll by, one of them will tell you which IP address the controller has taken. It defaults to DHCP, but you can set it to fixed IP if that's more convenient by sending it a message (can dig this up nearer the time for you). The IP number should not change over time, although with DHCP addressing this is of course always a possibility.
              Awooga!!!

              Comment

              • rarem
                Automated Home Jr Member
                • Sep 2009
                • 23

                #22
                Thanks Quinten. I'm looking forward to trying this sometime this week. Will keep you posted!

                Comment

                • Quinten
                  Automated Home Sr Member
                  • May 2004
                  • 85

                  #23
                  Dont forget the BBSB forums... a lot more specific help is available there
                  Awooga!!!

                  Comment

                  • rarem
                    Automated Home Jr Member
                    • Sep 2009
                    • 23

                    #24
                    Hi Quinten - if you're out there I'm ready for stage 2! All my equipment has arrived and I can control a dimmer switch from the Domia homepage with the Controller plugged into my Airport Extreme.

                    The listener app detects on and off messages from the controller and prints them in its terminal window.

                    However I don't get a whole bunch of messages, including the IP address, scrolling by at the start only the message "Awaiting UDP messages on port 53007"

                    When I, for example, turn on the lamp from the online controller I get the messages "[SW] Device A1 was turned ON" and the light turns on
                    1. Can you tell me how to obtain the IP address of the Domia controller?
                    2. Will the IP address be in the format 10.x.x.x or 88.xxx.xxx.xx for use with client script that issues an on or off command?

                    Comment

                    • Quinten
                      Automated Home Sr Member
                      • May 2004
                      • 85

                      #25
                      Hiya,

                      Glad you're now up and running. I'm pretty sure that the script you are using (open it up in a text editor) has a flag you can use to switch on or off more verbose logging. If it doesn't, then it should easily added.

                      With regards to the IP address of the controller, it should be an address that is within your local network range.

                      If it's more convenient to you to discuss this by email, feel free to drop me one at q (at) awooga (dot) nl (sorry about the anti spam notation).
                      Awooga!!!

                      Comment

                      Working...
                      X