Page 1 of 2 12 LastLast
Results 1 to 10 of 19

Thread: My-Digital-House(

  1. #1
    Automated Home Jr Member Gangsta's Avatar
    Join Date
    Jan 2010

    Default My-Digital-House(

    Just want to start a thread for my house, so that others can use anything the think will work for them, or comment on anything they think I could do better.

    The story so far:

    The house is a 3 bed, detached bungalow, located in south west wales. I want to fully automate the house, and have recently started wiring.

    Equipment so far:

    2x 14 way Consumer Units

    We have 3x Duel 2.4Ghz optron servers, with a HUGE (27TB) amount out harddisk space divided between the 3 servers. Configured as RAID 5 arrays

    a) Media server - this one handles our media streaming
    b) Comms server - this one handles all comms in/out of the house
    c) Automation server - this one handles the automation

    4x NDJ 12 channel dmx dimmers
    2x Electric door strikes
    1x 24 port 10/100/1000 switch (for network)
    1x 24 port 10/100 switch (for phones)
    1x 24 port PoE injector
    1x Duel skybox controller via rs232
    8x Xbox's running a customised version of xbmc
    2x Sky boxes (1 sky, 1 sky+)
    4x 4Channel cctv cards
    13x security cameras
    1x Custom built alarm system (Classified - lol)
    72x Data outlets - our house has a basement and garage too (its quite a large house for only 3 bedrooms)

    loads of driver boards, relays, sensors, etc

    The media server serves up our dvd collection, tv shows, music, pictures etc
    it is based on ubuntu server, with samba filesharing providing the SMB shares. It runs a kernel mode, remote filesystem which lets me mount the drives from the other two servers as part of the device tree. This server also monitors the UPS status and controls the sky boxes - and the xbox's - sky via a dusky controls box, and xbox's via the Web_API.

    The xbox's are powered on using a custom interface (based on a PIC16F628A), and are shutdown using the Web_API, this reduces power consumption considerably, as the Xbox's are only powered on when needed, switch off the TV and the xbox linked to it shuts down.

    The sky channels are controlled either inside XBMC, choosing a channel from a list - or from the universal remote.

    I have to say - I am VERY impressed with ubuntu server, if your looking for a great looking system to impress your friends, this is NOT the one for you. If you want something that works very fast and very well - with so far 100% reliabliliy - this is it. When it is running, this is all you get

    Server b, is the comms server, again ubuntu server, running firewall, email server, apache web-server, mysql, php. This is all used from both within and outwith the house - it will eventually allow me full control from anywhere in the world. Most importantly it runs asterisk, providing all the gateway, voip, IVR, voicemail, sms, etc. I only have one voip phone just now for testing, but once we have settled on a features list for the phones we'll be up to 10. The phones play a major part in my plans.

    The automation server has not been finalised yet, its currently running XP pro, with various bits of custom software, but again id love to put ubuntu server on their too - but i need to learn a whole new coding style for that.

    I wont burden anyone with the details of the cat-5 installation, as im sure everyone knows how hubs,switches etc work - I will mention that I have a PoE injector, this is just in line with the connections to the phone sockets to provide power-over-ethernet to the phones, as it eliminates ugly power adapters everywhere. I hope to have it shutdown most of the phone during the night, and power them up - if required.

    I have a DMX module attached to the home automation server, that controls the dimmers, I (should) have enough channels to run every bulb in the house automagically, including the fish tanks, fireplaces etc

    Thats it for now, probably too much to read in one go anyway - you can follow my blog at as i tend to update that every day or two.

  2. #2
    Automated Home Jr Member Gangsta's Avatar
    Join Date
    Jan 2010



    Just finished writing my DMX Light Server, which allows dmx control via TCP.

    It uses simple 3 byte packets to control it, allows all the fading etc to be offloaded to the server etc.

    To find out more,

    Please offer me some suggestions for improvements as id rather have functionality ready before I need it, than have to re-code everything to work with new functionality later.

    TCP control means I can now control my light from home, office, internet, mobile phone, ipod, whatever - but most importantly it lets me control it from the maplin MID device (see the other threads regarding this device) - so I can replace my light switches with these MIDs.

    Any questions or comments let me know - also if you think my server might be useful to you - let me know and I may be able to send it to you.
    Last edited by Gangsta; 31st January 2010 at 07:17 PM.

  3. #3
    Moderator toscal's Avatar
    Join Date
    Oct 2005
    Near Alicante Spain


    Thanks for sharing.
    Renovation Spain Blog

  4. #4
    Automated Home Jr Member
    Join Date
    Nov 2006

    Default Wow!

    Wow - in a word, what a great post, I also took a read through your site as well..

    I have a few questions, and also some thoughts on your setup:

    - Where the heck do you get the time from! -Theres about a years work in there for me, you seem to have done it in a few weeks! lol. - you should be proud. 8-)

    - Where did you get your DMX devices from? can you post a link?
    - What switches are you using?

    Some thoughts:

    I would be dead and buried under the patio if I chased the walls out for all that wiring - we use Domia and HomeEasy wireless stuff, which actually on the whole is pretty reliable - I also built a booster for the signals as well from an Arduino.

    Core Control by embedded devices

    Based on my own (much slower progress), I concluded that the 'core' control systems in the house (light control, device control etc) should be as low power as possible - I currently use a BBSB network controller for Domia devices, and a NSLU2 running linux - at about 5w total for the two of them I have event, and schedule driven control of stuff in the house - Am I right in concluding your dual-core server needs to be on for lights to work for example? (I've looked at MrHouse, Harmony, Comfort etc) - did you consider migrating the switch-lightcontrol etc work to an embedded device to increase reliability etc? (excuse if I mis-understand the role of the server in this) - I'd be interested in your thoughts on that.

    Power Usage
    I am also (eventually) planning on voice control etc, but was aiming to have (as I do currently), my two servers a windows-home-server with storage (3TB) and a HYPER-V server for my other VM's shutdown and on standby when they are not required - my logic is that if the house is unoccupied then 'rich' features like video streaming and voice control are not required, so need not be running.

    Once the WOL commands etc are scripted it's pretty easy to 'wake' the server(s) from the NSLU2 when needed (e.g alarm de-activation etc) and the WHS comes online about 5 seconds after wake-up. Hyper-v takes about 4 minutes but that's because it's a cold boot. (or when a PC is booted)

    I remain convinced also that the theory of centralised scheduling and event control is not necicarry, and can be distributed - e.g to 'smart' devices with little horsepower, but they can do things like event processing and scheduling provided they live on a smart network and 'tell' everything else what happened - Its still more of a work in progress, but I quite like my power meter idling at less than 300w at night and when I'm not home.. (I'm considering making all my stuff talk XAP or something over the network, or my own homebrew UDP broadcast)

    I'm aiming much lower than 300w, testing has revealed that less than 150w 'dwell' power in the house is possible (I flippin wish I knew what the 80w source is that I cannot find!) , with the power-down of all those evil plug-pack PSU's on chargers and network devices - as soon as I get some more time on it I'll post my findings, but that is my plan.

    Occupancy Sensing

    Great idea on the twin beam break - after room entry do you keep the lights on until room exit is detected? If you sit still watching TV do the lights go out?

    Keep up the good work, perhaps when you have time some of your PIC based projects might find their way on to your blog?



  5. #5
    Automated Home Jr Member
    Join Date
    Nov 2006

    Default Another one..

    I like the idea of using DMX instead of proprietary automation hardware (from a cost perspective), but is there a hidden *BUT* around the future sale of a house where someone does this? - Upside is that DMX is a standard and if a 12 channel array goes poof, then you/future owner can have it replaced as there will be loads of these available for ages, but given that fine line that always plagues me with HA:

    - There are 'n' ways of 'doing' what I want
    - Some will be dangerous to stupid people
    - Some will not be understood by anyone but me (unless I document it)
    - The one I should do , to do it 'right' is the expensive proprietary one.
    - Are DMX systems (primarily for theatre / party lighting) rated for continuous use?

    I guess this applies mainly to permanently installed electrical work - because of the way you need to have wired your house to centrally control everything, it's not easy for someone to revert to standard UK looped-in wiring

    Audio and Home Entertainment is pretty much a done deal, I dont recall anything 'illegal' about what you can do well or badly with your cinema setup (apart from break the law on improperly doing in-wall mains cabling)

    I'm sure the last thing on your mind is selling up, but I'd be interested in your view on it, and the rest of the forum, as you've clearly had the sleepless night, and are going ahead with it.

    Is there an IEE/Electrical wiring regulation bit in here as well - I'm sure I *could* build my own control kit for my heating, and lighting, but *should I*, and *is it legal*

    If all the answers are yes, then hell, I'm off to get some DMX modules!


  6. #6
    Automated Home Jr Member Gangsta's Avatar
    Join Date
    Jan 2010


    Hi Martynah,

    I will try my best to answer your questions. They may be brief, but I will expand on them as time permits.

    Time: All the work I have done so far has been done in approx 4 full days (I work full time - which includes most saturdays, and I tend not to work sundays on it. Its really not that difficult - its the decorating afterwords lol

    My dmx dimmers come from a guy called tony, I will find his number and post it up tomorrow sometime - let him know Graham@my-digital-house gave you his number. Mabey he will give discount on my future needs

    If you mean which light switches im using - its a combo of maplin MID's, a few cheapo 15p push buttons (temporary), PIRs and beams. I want real 'intelligence' though - so hopefully soon i wont need any of them!

    I too would have been dead and burried if I chased the walls, but when we returned from our chrimbo break, we returned to a flooded house due to a burst pipe - so redecorating was a requirement anyway. This combined with the death of an old pc we used as a media centre kicked this whole thing off.

    power: my system is very power hungry, but it is an evolution that tends to go like this. develop something that works on my windows server, evaluate it, perfect it. once its perfected - port it to linux - my previous ubuntu server had never crashed in 5 years!!. if its viable then port it onto a pic processor for ultimate reliability and power saving. My dmx light server could EASILY run on a 3 pic processor, so add a ethernet module 28 and you have a hardware dmx light server that responds to tcp requests and operates the lights for about 35, and draws about 0.5w whilst activly changing a channel and milliwatts whilst sleeping waiting for a command (the dmx system maintains its previous state until changed or powered off) The reason i run my big servers is that the media storage is spread throught raid5 arrays between the servers, and the media systems get used almost all the time by atleast someone in the house (i was a security guard for a while - so collected a LOT of dvds to rip onto the system)

    I am working on a controller to switch on/off the xboxs/sky boxes/etc that we use as media players on demand, but only having limited success just now - sky boxs do not like geting switched on/off and default to the sky channel 999, and display messages complaining that its not connected to a phone line.

    my house is probaby in the kW range idling, but our leccy bills are huge anyway so we dont really notice. Due to us living a good distance from the nearest supermarket - and me driving a 5L v12 - we tend to do LOTS of shopping only once or twice a month. That means we have 2 fridge freezers and 2 chest freezers running 24/7 for a start.

    The lights will stay on whilst people are in the room unless other conditions modify the behaviour. For example it gets light out side - the lights go out. This is the primary factor and overides everything except a manual overide. if the lights are on, and you choose to watch a movie it will dim them.

    dmx: i dont know how my dmx system would affect the sale of my house, i guess some people would love it - some hate it. If I wernt so fussy it would be a doddle to revert to standard (i have removed my switches now) but i could have just added a junction box and extended the wires in the attic, that would mean that i could revert to standard within a day, but that would be too easy lol, so i ripped out the lot and started again (at least now i know what i have)

    there are always many ways of doing things, i just choose this because i found it easy - and i knew that i wasnt going to pay for a proprietry solution. The price was right too.

    Some will be dangerous to stupid people. I try my best to keep everything safe and following the electrical codes etc, but no amount of prevention on my part will help the idiot who sticks a screwdriver in a plug socket and uses his tounge to see if its live.

    People could easily understand each individual part of my setup - but as one complete functioning unit - i dont think i understand it hahaha

    of course doing it 'right' is proprietry, who do you think tells you thats the 'right' way to do it.

    dmx rating - i havent had a problem yet - infact i have never even felt heat from my dimmer packs. It might have something to do with the fact that each dimmer pack is rated at 10kW (I have 4 - that 40,000 watts rating), yet every single light in my house (48 channels) on at the same time draws about 3000watts. In other worrds my dimmers are overrated by about 13 times (and how often do you have 48 lights on in your house at the same time??) i dont see a problem here.

    see above - if i hadnt removed the switches etc - i could revert back to totally standard within a day.

    selling up. I have had a troubled life - and have moved 26 times (short term lets) since i was 15 (im 30). Im now married with children and dont want them to go through that - im NOT moving for at least 10-15 years (by that time home automation will be the norm )

    they keep changing the regs on wiring, but the last time i checked ( a fair while ago) it required a 'competent person' to do electrical work. well my modules work on the mains controlled devices - therefore i must be competent? no? lol

    hope that helped a bit


    ps. you dont need to channel walls, i just done it my way - and added data ports, and sockets, and lighting sockets. you could just extend the existing wiring for your lights to the dmx dimmer, quick simple clean and cheap (20 for 100m 1.0mm2 T+E - probably plenty depending on house layout)

  7. #7
    Automated Home Jr Member Gangsta's Avatar
    Join Date
    Jan 2010


    Just a small code snippet (vb6) if anyone wants it - its for a small app that reads command line parameters and send them to the dmx server. it takes parameters in the form

    dmxauto.exe m=0 c=0 v=0

    with m being the mode, c being the channel and v being the value - note: no error checking has been added!

    you can group the values, as long as you have a mode set first eg

    dmxauto.exe m=2 c=1 v=64 c=2 v=64 c=12 v=0 c=31 v=255

    it is read from left to right

    I use it just now for batch files and scheduled tasks for the lights that havn't got round to automating, but will also be useful to enable dmx from any other language, and also from any other programs that allow launching external programs.

    create a form, add a winsock control called 'winsock' and a timer called 'timer'. I have a logo on my form - it pops up in the top corner for 1.5 seconds then dissapears.

    Dim Args() As String
    Dim ArgString As String
    Dim Mode As Integer
    Dim ModeSet As Boolean
    Dim Channel As Integer
    Dim ChannelSet As Boolean
    Dim Value As Integer
    Dim ValueSet As Boolean
    Private Sub Form_Load()
        Me.Top = 0
        Me.Left = 0
    End Sub
    Private Sub Timer_Timer()
        Timer.Enabled = False
    End Sub
    Private Sub Winsock_Connect()
        ArgString = UCase(Command)
        If InStr(1, ArgString, " ") Then
            Args() = Split(ArgString, " ", , vbTextCompare)
        End If
        For x = 0 To UBound(Args)
            Select Case Left(Args(x), 2)
                Case "M="
                    Mode = Val(Mid(Args(x), 3))
                    ModeSet = True
                    Debug.Print "M=" & Val(Mid(Args(x), 3))
                Case "C="
                    Channel = Val(Mid(Args(x), 3))
                    ChannelSet = True
                    Debug.Print "C=" & Val(Mid(Args(x), 3))
                Case "V="
                    Value = Val(Mid(Args(x), 3))
                    ValueSet = True
                    Debug.Print "V=" & Val(Mid(Args(x), 3))
                    Debug.Print "sending:" & Mode & " " & Channel & " " & Value
                    Winsock.SendData Chr$(Mode) & Chr$(Channel) & Chr$(Value)
            End Select
        Next x
        Timer.Enabled = True
    End Sub
    Attached Images Attached Images
    Last edited by Gangsta; 20th February 2010 at 10:42 PM.

  8. #8
    Automated Home Jr Member
    Join Date
    Nov 2006

    Default Thanks!

    Cheers for the update, I was just sounding out really as you triggered lots of ideas in your first post....

    Embedded: Totally agree with you - in fact there is possibily a market among the DIY electronics community (say via for publishing the finished controllers etc. - Arduino is also quite good as it is pre-assembled if you want to save on having to construct your own stuff - An Ethernet enabled Arduino is about 45-50 all in ready to go. - there isnt so much homebrew HA electronics around, so anything new is nice.

    DMX: Over-rated as you say, which is probably the best way.

    Wiring - I did actually think just after posting, that upstairs certainly a DMX unit in the loft would be really easy to wire in, plus some clever mains detection stuff on a custom board with lots of isolation(!). would be able to re-use the switched-feed to the ceiling rose as a detect as well, which really would mean 5min to revert back if required - HomeEasy already do this, in some of their control modules and detect the switched live 240v as a 'change in state' - the only difference people notice is that some days 'up' is off and down is on the lightswitch, other days (if the light has been powered up remotley for example, then the switch is down for on and up for off - like twin switches you probably had for landing lights so people dont notice in our place.

    I think I'd definatley look at using DMX in the future, as the wireless stuff is all very well, but can be known to 'miss' an event - then your system thinks the lights are on when they are still off etc - so hardwired will always win until someone does a 2-way wireless module, which would be expensive.

    Like the sound of your media library - nice, we have only 2TB and it's not full lol. Though we have no movies on it, only music.

    Thanks again, keep the blog posts going!


  9. #9
    Automated Home Guru Vangelis's Avatar
    Join Date
    Sep 2009


    Hey Graham,

    Have you got any pics of the twin beam installation?? Do you keep all the PIC hardware local to the doorframe and then feed the signals back to ERIC?? Do you take a feed of an ambient light sensor as well to determine if the lights need to come on in the first place, or do you just use a clock?

    Am really interested in this as my extended family never turn lights off after they have left the room.

    Are you publishing your code on the mikroelectonica website? I reckon you would have alot of interested parties

    Looking forward to your next blog update...


  10. #10
    Automated Home Jr Member Gangsta's Avatar
    Join Date
    Jan 2010


    No pics yet, but will try to get some. As you can see from the photos i took of the MID, my camera phone is crap.

    The beam sensors I am using to test (for now, as they are really expensive 28+vat each, 2 for each doorway) have all the electronics internal to them, they output a pulse when triggered - that runs back to the same patching bay/pic controller that the PIRs (and anything else having a digital output) run too.

    I dont take an ambient light reading in each room, and currently base everything on a single ouside sensor. When the delivery comes in, I will have LDRs, Humidity sensors, DS????s (One wire temp), gas sensors and a few other bits and bobs. At some point I will put together a multi-sensor for each room that can fit in a 1-gang electrical socket box.

    I have already published a few programs on the mikroe site projects page, but for the time being no HA related ones. My favourite one that i did last year was a digi-dice (with sound) that starts 'rolling' when you shake it.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts