1. Visiting from the US? Why not try DIYnot.US instead? Click here to continue to DIYnot.US.
    Dismiss Notice

My home automation

Discussion in 'Home Automation' started by roasty, 29 Jul 2015.

  1. Scarum

    Scarum

    Joined:
    30 May 2007
    Messages:
    271
    Thanks Received:
    12
    Location:
    Cambridgeshire
    Country:
    United Kingdom
    One thing I'd say is I'm OCD and would want it looking tidier!

    Where is it located in the house, in the basement? Do you find it gets warm in there?
     
  2. Sponsored Links
  3. eveares

    eveares

    Joined:
    28 Jul 2012
    Messages:
    1,309
    Thanks Received:
    46
    Location:
    Surrey
    Country:
    United Kingdom
    Probably not; if he can afford all that hardwired stuff that likely all costs several thousand and that he has 96 zones and 4 floors, then he properly can afford and thus has AC down in the plant room.
     
  4. angelboy

    angelboy

    Joined:
    11 Oct 2006
    Messages:
    490
    Thanks Received:
    31
    Location:
    Nottinghamshire
    Country:
    United Kingdom
    *gulp!*
     
  5. magicmushroom666

    magicmushroom666

    Joined:
    11 Jan 2010
    Messages:
    306
    Thanks Received:
    59
    Location:
    Essex
    Country:
    United Kingdom
    Did you re-wire the house with this in mind? such as all light switches cabled back to this central location? or have you managed to work around more conventional cables?
     
  6. mattylad

    mattylad

    Joined:
    27 Apr 2008
    Messages:
    8,295
    Thanks Received:
    632
    Country:
    United Kingdom
    There is something really amiss with your installation Roasty.

    The beer fridge is devoid of beer :)
     
    • Like Like x 1
  7. Lewishw

    Lewishw

    Joined:
    13 May 2015
    Messages:
    10
    Thanks Received:
    0
    Location:
    Manchester
    Country:
    United Kingdom
    Looks great!

    Can I just ask what you use 4 Galaxy alarm panels for, is it all alarm and if so would it not be better to have rio's (remote input output). I am starting out on a similar project in a good sized house and would love to know more.
     
  8. ultomoat

    ultomoat

    Joined:
    2 Jun 2012
    Messages:
    65
    Thanks Received:
    8
    Country:
    United Kingdom
    I'd guess that three of those Galaxy enclosures are
    Power RIOs. You aren't going to run 96 zones off the single 1A PSU when a third of them are PIRs. Note also that the 16 onboard zones are all linked out. I guess it's done that way in order that all zones are on remote RIOs - and hence can be read off the bus using the serial adaptor mentioned.

    Nice work Roasty. Like magicmushroom, I'd be interested in how you've done the DMX lighting.
     
  9. GalaxyGuy

    GalaxyGuy

    Joined:
    7 Jan 2014
    Messages:
    876
    Thanks Received:
    139
    Location:
    Fife
    Country:
    United Kingdom
    I would agree that one-way interfacing by scraping and post processing serial output is easy. Interfacing with full two way communication a little more difficult. The panel is the bus master, so it's the only device that should be driving the slaves. You could, in theory, inject a packet to tell the slave to do something, but the bus master is likely to overwrite your change at some point - it may also dislike your change and set a system wide tamper condition.

    The same goes with doing anything with the keypad. If you want to do anything as a keypad at the bus level, then first you need to 'be the keypad'. If you simply try to inject keypad slave responses, then you will be in contention with the keypad that's communicating with the master. Also, if you try to 'be the keypad' with a non real-time OS, then you're likely to cause intermittent tampers on the bus when you violate packet response times.

    Nice big project though. I have all my RIO's remote (garage and two attic spaces), as it reduces the wiring in the system. I can understand if you don't have space at the remote locations, but it does make for more cabling and possible noise in the system.
     
  10. Sponsored Links
  11. roasty

    roasty

    Joined:
    7 Sep 2012
    Messages:
    74
    Thanks Received:
    4
    Location:
    Bristol
    Country:
    United Kingdom
    Hi,
    It stays pretty cool down there, well, not so much cool, but a pretty constant temperature, it's not been a problem so far. I don't have AC in there, but would probably consider a big extractor fan first.
     
  12. roasty

    roasty

    Joined:
    7 Sep 2012
    Messages:
    74
    Thanks Received:
    4
    Location:
    Bristol
    Country:
    United Kingdom
    Hi,
    Yeah I rewired with all this in mind. So all the lighting is wired radially back to the cabinets, as is each socket (there are about 100 of them) there's plenty of cat5e, coax, HDMI, alarm, audio etc... in the mix too. All in all about 5km of cable, lots of which I'm not using at the moment, but it's there for the future if i need it.
     
  13. roasty

    roasty

    Joined:
    7 Sep 2012
    Messages:
    74
    Thanks Received:
    4
    Location:
    Bristol
    Country:
    United Kingdom
    Hi,

    ultomoat is spot on, three of those boxes are powered RIOs, generally with another non-powered rio squeezed in there too. I've linked out the internal 16 channels so that I see all the traffic on the data bus. It works pretty well
     
  14. roasty

    roasty

    Joined:
    7 Sep 2012
    Messages:
    74
    Thanks Received:
    4
    Location:
    Bristol
    Country:
    United Kingdom
    Thanks Galaxyguy,
    that's useful information, you clearly know your stuff. I'll bear that in mind if I ever try anything more advanced.
     
  15. roasty

    roasty

    Joined:
    7 Sep 2012
    Messages:
    74
    Thanks Received:
    4
    Location:
    Bristol
    Country:
    United Kingdom
    I use this module for the DMX control

    [​IMG]

    It's a Velleman DMX controller. I got it from Maplin maybe 8 years ago. It takes RS232 in and spits out DMX, you send a pair of values (hex encoded I think) out of the serial port and the module sends it over the DMX circuit. I'll see if I can find the old code I wrote to control it
     
    • Thanks Thanks x 1
  16. roasty

    roasty

    Joined:
    7 Sep 2012
    Messages:
    74
    Thanks Received:
    4
    Location:
    Bristol
    Country:
    United Kingdom
    Ok, so the module is connected to these DMX dimmers (Bottom middle, black boxes) they are soundlab G018VA. I've got 5 with 4 channels on each, 20 channels in total. You can have up to 512, so I've room for expansion. I use the dmx channels to dim lights mainly (obviously) but as they are stage/disco dimmers and capable of 1kw per channel, I also 'dim' things like heated towel rail elements and electric underfloor heating mats to give me more temperature control.

    [​IMG]

    The dimmers look like this closeup [​IMG]

    My only complaint is the IEC connectors on the outputs, but it's not the end of the world and I have some of these dimmers that I used in my old house that are 8 years old + and still going strong, so I know they are reliable. I've had 2 arrive DoA, but to be honest it's not the design, just poor production, on both occasions the inductor on the output driver board hadn't been soldered properly and had worked loose. A bit of extra solder and some silicone to hold it in place and all was well.
     
  17. roasty

    roasty

    Joined:
    7 Sep 2012
    Messages:
    74
    Thanks Received:
    4
    Location:
    Bristol
    Country:
    United Kingdom
    Ok, I found the code.

    Code (Perl):
    #!/usr/bin/perl

    system( "logger 'HAL - dmx_prod_rebooted' ");

    $inc_up = 5 ;
    $inc_down = 5 ;
    $min_intensity = 70 ;
    while (true)
    {
       use Device::SerialPort ;
       my $port = Device::SerialPort->new("/dev/ttyAMA0") ;

       $port->baudrate(9600) ;    $port->parity("none") ;
       $port->handshake("none") ; $port->databits(8) ;
       $port->stopbits(1) ;       $port->read_char_time(0) ;
       $port->read_const_time(1) ;

       #Set Status's
       @files = <dmx_set_*.txt> ;

       foreach $file (@files) {

          $channel = $file ; $channel =~ s/.txt// ;
          $channel =~ s/dmx_set_// ;
          chomp($channel) ;

          open (FILE, $file) ;
          $intensity = <FILE> ;
          close (FILE) ;
          chomp ($intensity) ;
          if ( $intensity > 255 ) { $intensity = 0 } ;
          if ( $intensity < $min_intensity ) { $intensity = 0 } ;

          if ( ${variable_."$channel"} != $intensity )
          {
             if (${variable_."$channel"} < $intensity )
             {
                $set_intensity = ${variable_."$channel"} + $inc_up ;
                if ( $set_intensity < $min_intensity )
                {
                   $set_intensity = $min_intensity ;
                }
             }

             if (${variable_."$channel"} > $intensity )
             {
                $set_intensity = ${variable_."$channel"} - $inc_down ;
             }

             $port->write( pack "C", $channel ) ;
             $port->write( pack "C", $set_intensity ) ;
             system( "logger 'HAL - dmx_lighting_set $channel - $set_intensity' ");
             ${variable_."$channel"} = $set_intensity ;
             select(undef, undef, undef, 0.05) ; #Sleep a bit

          }
       }
       $port->close() ;
       select(undef, undef, undef, 0.1) ; #Sleeep 100 mS
    }

    The code above, reads in the required dmx values from files called dmx_set_xx.txt (where xx is the dmx channel) inside each file is just a value between 0 and 255, which represents the dimmer value required.

    The code also handles the dimming up and down of the lights to get to the required level (see $inc_up and $inc_down) I like this and it not only looks nice, but protects the filaments from the shock of being hammered on quickly (I do pretty well for lightbulb life, so I think it's working)
     
    Last edited by a moderator: 4 Aug 2015
Loading...

Share This Page