Warning

 

Close

Confirm Action

Are you sure you wish to do this?

Confirm Cancel
BCM
User Panel

Page / 3
Link Posted: 2/7/2012 7:57:42 AM EDT
[#1]



Quoted:





Quoted:



You know, my 2811 is loud as shit, and it never occurred to me to just remove the top and kill the fan. I'm seriously thinking about this now...




Thanks for the quote - without it I might not have noticed how badly my last edit maimed the description.



Leave enough room for convection cooling and make sure you don't let out too much EMI. (why I put them under a metal shelf) I considered using some metal screening, but this was easier for me.


As luck would have it, I have a full metal shelf I could put a few inches up.

 



Any idea how hot is too hot? The room stays at around 68 in the winter, and gets as high as 80 in the summer.




Also, I've never actually had to deal with a router overheating. If I get syslog messages bitching about dead fans, I just replace them. Suppose it did overheat, though - think it'll just lock up? Shut itself down? Other?




The motherfucker wasn't cheap, so I do get a bit nervous about it. But the noise...I can't take it anymore and I don't have any other practical place in the house to put it.
Link Posted: 2/7/2012 8:10:29 AM EDT
[#2]

Link Posted: 2/7/2012 8:15:45 AM EDT
[#3]





I'll bet that actually makes a clicking sound when changing channels.

 
Link Posted: 2/7/2012 12:02:54 PM EDT
[#4]
Follow-up question: How much electricity are you guys spending on all this equipment, both directly and through AC costs?
Link Posted: 2/7/2012 12:09:16 PM EDT
[#5]
Quoted:
Follow-up question: How much electricity are you guys spending on all this equipment, both directly and through AC costs?

this is why i am very happy with 25W worth of computing infrastructure...

atom-based server.
5 port GigE switch.
verizon-supplied FIOS-connected Wifi router.

ar-jedi
Link Posted: 2/7/2012 12:10:04 PM EDT
[#6]



Quoted:


Follow-up question: How much electricity are you guys spending on all this equipment, both directly and through AC costs?


I'd rather not calculate it.

 
Link Posted: 2/7/2012 12:18:17 PM EDT
[#7]
Quoted:

Quoted:
Follow-up question: How much electricity are you guys spending on all this equipment, both directly and through AC costs?

I'd rather not calculate it.  


Yep.
Link Posted: 2/7/2012 12:25:34 PM EDT
[#8]
Quoted:
Quoted:
Follow-up question: How much electricity are you guys spending on all this equipment, both directly and through AC costs?

this is why i am very happy with 25W worth of computing infrastructure...

atom-based server.
5 port GigE switch.
verizon-supplied FIOS-connected Wifi router.

ar-jedi


Assuming 25w on 24 hours/day for 30 days straight –– 18kWh.  Our latest electric rate is $0.092896/kWh.  This would cost me $1.67/month to run (not calculating the negligible heat load).

Once something starts getting above 100w-200w of continuous 24/7 usage, the difference on your electric bill can be noticeable.  Running with the same numbers, a 200w continuous load would run me just over $13/month.  On the other hand, keeping the AC or heat a few degrees warmer or cooler in the appropriate season would likely offset the power consumption from a decent sized home network/server setup.
Link Posted: 2/7/2012 12:30:20 PM EDT
[#9]
I'm keepin it real.

Link Posted: 2/7/2012 12:30:43 PM EDT
[#10]
Quoted:
Quoted:
I have a few things...  

This was after I got everything racked;
http://www.ar15.com/media/viewFile.html?i=37047

This is working at the table and testing out getting everything under management and generally playing;
http://www.ar15.com/media/viewFile.html?i=37048


You must be single...



I'm married and have abit more than that(9 computers and 5 XBOX machines) in my house. . It looks like your standard Central Office here.
Link Posted: 2/7/2012 12:50:21 PM EDT
[#11]
Quoted:
Quoted:
25W.
that's my home server/network power consumption.  my inbound email comes straight here, my web content is served up from here, and my home automation system runs on the same box.  if i wanted more compute power or more network bandwidth i would get it on the cheap from one of 87 providers thereof, e.g. Amazon EC2.  

All that for 25 watts?  Winning.

look at the problem in two dimensions...

network throughput:
any Atom-based box (even single core) can saturate 100Mb/s ethernet, and the WAN side of your network is a fraction of 100Mb/s –– e.g. my FIOS is 25/25.  so in no case is the server going to be struggling to keep up on the WAN side.  no amount of email or web *network* traffic is going to cause a problem.  depending on what you are doing on the LAN side, the Atom may or may not be suitable.  for me, if my nightly PC/laptop backups take 20 minutes longer than a faster machine, it's no big deal.  if you are running an enterprise, it's a big deal.  

compute power:
home/SOHO server needs are characterized by bursty/peaky compute loads for few clients.  incoming email that needs to be scanned for spam and viruses, or web traffic that relies on PHP/mysql backends, etc.  

anyway, on my current Ubuntu 10.04 LTS box i have
email
- postfix sending/receiving to maildirs
- spamassassin scanning inbound for spam
- clamav scanning inbound for viruses
- dovecot offering via IMAP
- imapproxyd keeping IMAP connections alive

www
- apache with the usual cruft
- gallery2 offering images (about 25K pics right now)  (note: gallery2 is PHP/mysql beckended)
- squirrelmail offering email to web clients via https:

other
- samba for network shares
- backuppc for network backup
- sshd for remote login (including scp sftp; no anon ftp here)
- arpwatch to let me know if anyone has "joined" the wireless network
- hddtemp to monitor drive temperatures
- cacti and rrdtool to graph a whole bunch of stuff
- monit to babysit processes (mainly my home-built home automation setup)

home automation
- motion (linux package) for a couple of cameras.
- DIY temperature/contact/process sensor network.  i know how often the furnace, A/C, well pump, etc run.  i know the temperature outside, and at multiple locations inside.  i know what time the sun comes up and goes back down each day, low voltage lights come on automagically, and can be manually overridden.  the state of the doors on our detached garage and detached workshop are visible via the web.  everything is logged.

ps:
the other HUGE advantage to using low power infrastructure is the hold-up time during a utility outage. a modest capacity UPS results in 24 or more hours of continuous operation.

ar-jedi


Jan 30 10:22:11 wopr logger: envsys - loops: 4130324 (0.98/sec); actions: 26495214 (6.29/sec)
Jan 30 10:52:11 wopr logger: envsys - loops: 4132095 (0.98/sec); actions: 26506555 (6.30/sec)
Jan 30 11:09:55 wopr logger: envsys - rob state change: Workshop/Door opto4 0->1
Jan 30 11:09:58 wopr logger: alarm! - motion tripped, action: Workshop/Door relay4 0->1 "ShopMotion"
Jan 30 11:09:59 wopr logger: envsys - rob state change: Workshop/Door relay4 0->1
Jan 30 11:15:29 wopr logger: envsys - rob state change: Workshop/Door opto4 1->0
Jan 30 11:15:32 wopr logger: alarm! - motion cleared, action: Workshop/Door relay4 1->0 "ShopMotion"
Jan 30 11:15:33 wopr logger: envsys - rob state change: Workshop/Door relay4 1->0
Jan 30 11:22:11 wopr logger: envsys - loops: 4133861 (0.98/sec); actions: 26517869 (6.29/sec)
Jan 30 11:52:11 wopr logger: envsys - loops: 4135641 (0.99/sec); actions: 26529258 (6.33/sec)

...

Feb  6 02:22:16 wopr logger: envsys - loops: 4701642 (0.99/sec); actions: 30151321 (6.36/sec)
Feb  6 02:52:16 wopr logger: envsys - loops: 4703422 (0.99/sec); actions: 30162712 (6.33/sec)
Feb  6 03:22:16 wopr logger: envsys - loops: 4705203 (0.99/sec); actions: 30174112 (6.33/sec)
Feb  6 03:45:02 wopr logger: daylight-sched.sh - scheduled event for 07:01 (sunrise)
Feb  6 03:45:02 wopr logger: daylight-sched.sh - scheduled event for 17:21 (sunset)
Feb  6 03:52:16 wopr logger: envsys - loops: 4707102 (1.06/sec); actions: 30186225 (6.73/sec)
Feb  6 04:22:16 wopr logger: envsys - loops: 4709042 (1.08/sec); actions: 30198576 (6.86/sec)
Feb  6 04:52:16 wopr logger: envsys - loops: 4710828 (0.99/sec); actions: 30210003 (6.35/sec)




Link Posted: 2/7/2012 12:53:47 PM EDT
[#12]
Quoted:
Assuming 25w on 24 hours/day for 30 days straight –– 18kWh.  Our latest electric rate is $0.092896/kWh.  This would cost me $1.67/month to run (not calculating the negligible heat load).

exactly –– and once you get above $5/month or so you will be better off going with a hosting provider.  you'll get more bandwidth and compute power for less money.

ar-jedi

Link Posted: 2/7/2012 1:08:20 PM EDT
[#13]
Wow, that is some pretty impressive stuff.

As for a hosting provider decision being based off of money –– personally I would rather spend a bit extra in electricity (and gear) and being 100% physically in control of my own systems.  That, plus the geek factor of just having more toys to mess around with.  And let's be honest here: most of this stuff is just that...toys.
Link Posted: 2/7/2012 3:37:30 PM EDT
[#14]
Jan 30 10:22:11 wopr logger: envsys - loops: 4130324 (0.98/sec); actions: 26495214 (6.29/sec)


Link Posted: 2/7/2012 3:43:54 PM EDT
[#15]
Quoted:
Jan 30 10:22:11 wopr logger: envsys - loops: 4130324 (0.98/sec); actions: 26495214 (6.29/sec)

http://cdn2.hark.com/images/000/001/157/1157/original.jpg

nice catch!  

ar-jedi
Link Posted: 2/7/2012 3:54:03 PM EDT
[#16]
Quoted:
Quoted:
Jan 30 10:22:11 wopr logger: envsys - loops: 4130324 (0.98/sec); actions: 26495214 (6.29/sec)

http://cdn2.hark.com/images/000/001/157/1157/original.jpg

nice catch!  

ar-jedi


Let's play a game!
Link Posted: 2/7/2012 4:20:56 PM EDT
[#17]
Basement workstation is mainly a NAS box (JBOD) that dual boots XP and Win98 (for old games that suck on emulation) and also does some a/v stuff.



It serves the house through my home-brew structured panel:



I've got telco, cat5e, and coax pulled through some of the house.  There's plenty of space (and plans) for more.  Right now the wireless router has enough space for the network, but the patch panel has 12 ports so I'll eventually put in a larger switch.  I'm trying to get everything off the wireless, but the wife likes her laptop freedom.  The other boxes are my family desktop, a modded xbox (original), and a network printer.  They share internet through the DSL modem, but you can see that I'm configured for cable, too.  The keystone panel between the tv booster and the 66 block brings telco in from DMARC and then jumpers to the port below for the 66 block––I did it this way so the modem could serve as a whole-house DSL filter (no dongles).  It also brings in cable from outside and another coax signal from the attic where I currently have a UHF antenna (that I built out of old copper flex tubing) mounted.  The F jack in the attic is on the south wall so it would be super easy to put a dish up there.  I take OTA signal and boost it through a 1x4 amp.

I'm hoping to cash in this sweat equity when I eventually sell the place, if I can get some buyers who know what it is.
Link Posted: 2/7/2012 4:32:16 PM EDT
[#18]
I'm hoping to cash in this sweat equity when I eventually sell the place, if I can get some buyers who know what it is.


Good luck with that one!
Link Posted: 2/7/2012 4:39:53 PM EDT
[#19]
Quoted:
I'm hoping to cash in this sweat equity when I eventually sell the place, if I can get some buyers who know what it is.


Good luck with that one!


I know, this is me holding my breath.

Anyway I need the fantasy of getting some money back out of this place, since all the other work I've done has been repairs.  Next up is the laundry plumbing...
Link Posted: 2/7/2012 5:16:24 PM EDT
[#20]

Monoprice 4U rack

Monoprice Cat5e 48 port panel

Monoprice 24 port 10/100 unmanaged switch

Leviton phone bridge











Vonage box

WRT54G

Westell DSL modem

 
Link Posted: 2/7/2012 5:33:46 PM EDT
[#21]
I've already reduced the power/heat signature of my NT side by moving all my "essential" services onto low power atom boxes. Yes, I could pare it down further if I only wanted function... But half the reason for having it was to learn and play.



The same goes for the networking gear. I could run things that take less power, but I would not be keeping an iOS network infrastructure alive in production if I did that. I did make a token effort though... Small fanless Dell gig switches because I could not handle the idea of two more loud Cisco boxes running 24/7. Ok, so there's the part where I couldn't afford that many ports of Cisco gig too...



Subnet - I don't know about the operating temp. Doesn't one of the physical info commands give you system temp.?



maybe http://www.techrepublic.com/blog/networking/monitor-cisco-routers-and-switches-using-the-ios-environment-command/611
Link Posted: 2/7/2012 5:37:37 PM EDT
[#22]
Link Posted: 2/7/2012 5:50:49 PM EDT
[#23]
Link Posted: 2/7/2012 6:19:08 PM EDT
[#24]

home automation
- motion (linux package) for a couple of cameras.
- DIY temperature/contact/process sensor network.  i know how often the furnace, A/C, well pump, etc run.  i know the temperature outside, and at multiple locations inside.  i know what time the sun comes up and goes back down each day, low voltage lights come on automagically, and can be manually overridden.  the state of the doors on our detached garage and detached workshop are visible via the web.  everything is logged.




I'd be very interested in learning more about what software package(s)/hardware you're using for the temp and utility tracking.  I'm working on getting my house wired for cat 5 and am debating starting to make the move to home automation for lighting control and elec usage monitoring.
Link Posted: 2/7/2012 7:49:01 PM EDT
[#25]
Quoted:
I'd be very interested in learning more about what software package(s)/hardware you're using for the temp and utility tracking.  I'm working on getting my house wired for cat 5 and am debating starting to make the move to home automation for lighting control and elec usage monitoring.

shit, i knew someone was going to ask that question.  

first off, i am a propeller head. i want to make that clear.  what i am doing may or may not be suitable for you.  that's not my fault nor your fault.  everyone has differing need for features, and differing methodologies for getting there.

that said, if you are simply looking to automate lighting and monitor power consumption, you can get off-the-shelf hardware to do exactly what you want to do, and more.  there is the typical tradeoff, of course, of money versus your effort.  at one end of the scale is hiring someone to come in, wire it up, and press go.  on the other end of the scale is a complete DIY system tailored exactly to the things you want to do.  whether or not you can afford the outsourcing approach or have the skills for the insourcing approach will dictate some of your decisions.  but a system based on off-the-shelf hardware and installed by you can be grown, as needed, over time and as funds allow.

for the casual user looking to automate normal things, i would suggest Insteon products.  they are relative low cost, they communicate over the power lines so there is no additional wiring, the variety of functions available is fairly wide, they network easily (e.g. to PC's and smartphones) and the products work.  with very little effort you can, for example, turn lights anywhere in the house on/off from your bedroom, or control the heat from anywhere on the web, etc.  see
http://www.smarthome.com/_/INSTEON/_/23b/land.aspx

in addition to Insteon, there is X10, Z-Wave, UPB, and other commercial solutions.   but Insteon has a lot of product breadth, and the capabilities are good to excellent.  you are basically buying an Apple computer –– in that someone already thought through all of the hardware/software interaction issues.  

in my case i have oddball wants/needs and decided a very much DIY approach.  my linux box, which does a lot more than just the home automation aspect, is the central point of the system.  software runs on this box to implement the features.  some of the software i wrote, some is open source.  the hardware is a collection of inexpensive "hobbyist/project boards".  these boards are attached to the linux box via CAT5 wire, in ways that are too complex to explain in the scope of this post (ed: some boards are direct attach RS232; some boards are hung off of an RS485 multi-drop; and one board is on the end of a one port terminal server).  

the linux server sends commands to the boards, one at a time.  the boards reply, one at a time.  it's deterministic.  the linux server polls all of the boards in a circular loop.  you can do this quite quickly, on the order of 1 loop per second.  there are methods to parallelize this approach, which i have not had the need to do but i often think about during long drives while my wife is talking at me.

since the hardware endpoints are more or less ad-hoc, any capability needed is possible.  the tradeoff, as usual, is cost vs effort.  for example, a 4 relay Insteon module is US$109 (link).  but a simple microcontroller project board with 4 relays AND 4 inputs AND the ability to measure temperature is US$34 (link).  so you see the build versus buy tradeoff.  

now then, what happens to the data that the polling process collects?

in general, i take the "filesystem representation" approach.  it is simple, self-describing, intuitive, and finally (but perhaps most importantly) it is easily debugged.  the filesystem tree for a given location fully describes all of the features and capabilities of the sensor(s) at that location.  the environmental system then is responsible for populating the filesystem tree under that location, and also for updating sensors when the file system is changed by external programs.  read that last sentence again, as it is an important concept.   of course, some data can not be "set".   for example, you can try to "set" the outside temperature all you want, but it's not going to make a difference.

another benefit of the filesystem representation approach is that no external database or other ancillary application is required.  the filesystem IS the database.  it makes backup trivial as well.

so lets take a simple measurement.  for example, we want to know the outside temperature, and make a graph of it over time.  there are many possible approaches to this, but one way is to ask NOAA via the internet, and record the temperature in the filesystem tree.  in this case the sensor is Internet/NOAA, and it's recorded using a defined path:  (btw all of these are located under /var/env)

36 ––> ./Internet/NOAA/feature/temperature/get/degF (Tue Feb  7 23:17:15 EST 2012)


in other cases, such as

69 ––> ./House/Upstairs/feature/temperature/get/degF (Tue Feb  7 23:21:50 EST 2012)

or
41 ––> ./Workshop/Door/feature/temperature/get/degF (Tue Feb  7 23:22:02 EST 2012)


we got the data from a sensor.   or perhaps the data is from the linux box itself:

95 ––> ./Server/DiskA/feature/temperature/get/degF (Tue Feb  7 23:22:01 EST 2012)


these are simple examples, to give you a flavor of how the system stores sensor values taken from a given location.

those values can be read by MTRG, RRDtool, etc and used as input for graphing.  the important concept here is the division of labor; the graphing program does not need to interact with the automation system –– it simply has to read data from the filesystem, which is what it was designed to do in the first place!  so there is no adaptation needed for any available program.  

ps:
a few more notes about home automation: eschew closed, proprietary systems.  the system should be scalable as your needs/wants arise.  KISS.  if it is too complicated for your wife to understand or use, it's too complicated.  it should fail safe across power outages.  and it should definitely open the pod bay doors when you want it to, without acting like a two year old. (link)
Link Posted: 2/8/2012 6:22:12 AM EDT
[#26]
ar-jedi



I was hoping you'd post something like that. The idea has.... appeal.
Link Posted: 2/8/2012 6:22:44 AM EDT
[#27]
Although that post wasn't directed at me, I will definitely say thanks for the info –– very useful.



...but i often think about during long drives while my wife is talking at me.



I love, and understand, the distinction between talking at and talking to.  
Link Posted: 2/8/2012 6:27:11 AM EDT
[#28]
No pictures, (I know Johnny Buzzkill,) but I moved my Linux file-server and main Router/FW into my safe room once I got it built out. Nice thing is that my data (Hardware RAID 5,) is physically secure and has fire protection but I keep my important data off-site. My next major home-networking project is to pull new CAT 6 wire for IP cameras and terminate it all with a PoE switch I have.
Link Posted: 2/8/2012 6:35:08 AM EDT
[#29]
Ya know, short cables work just fine. Just sayin'.
Link Posted: 2/8/2012 7:20:10 AM EDT
[#30]
Quoted:
I was hoping you'd post something like that. The idea has.... appeal.

if you have beginner-level shell programming skills and are comfortable using vi/gedit to change configuration files, i'll expose the entirety of my automation project via http and/or CVS so you can pull what you want.  just note the basic unix/linux principle applies: complex systems should be made up out of small, easily understood/debugged modules.  there is no monolithic application that does everything.  that said, there is real economy in the approach i selected; using the filesystem as a hierarchical database makes life SO VERY EASY.  the shell script which does the loop management, including all of the data gathering and setting, is 3.6Kbytes.  and a good portion of that is just instrumentation for stats.
jds@wopr:/var/env$ wc envsys.sh

156  358 3645 envsys.sh


ar-jedi

ps:
i rec'd an IM that asked how daylight hours (sunrise/sunset) are determined.  i figured others might find this useful as well.  the data itself comes from your tax dollars.  a simple shell script then finds the right month/day and outputs the sunrise/sunset time.  thereafter, you can use the unix at() command to make things happen at sunrise/sunset


jds@wopr:/etc/daylight$ ls -sl
-rw-r––r–– 1 root root 4591 2011-02-10 19:32 solar-data.2010
-rw-r––r–– 1 root root 4591 2011-02-10 19:32 solar-data.2011
-rw-r––r–– 1 root root 4591 2011-02-10 19:32 solar-data.2012
-rw-r––r–– 1 root root 4591 2011-02-10 19:32 solar-data.2013
-rw-r––r–– 1 root root 4591 2011-02-10 19:32 solar-data.2014
-rw-r––r–– 1 root root 4591 2011-02-10 19:32 solar-data.2015
-rw-r––r–– 1 root root 4591 2011-02-10 19:32 solar-data.2016
-rw-r––r–– 1 root root 4591 2011-02-10 19:32 solar-data.2017
-rw-r––r–– 1 root root 4591 2011-02-10 19:32 solar-data.2018
-rw-r––r–– 1 root root 4591 2011-02-10 19:32 solar-data.2019
-rw-r––r–– 1 root root 4591 2011-02-10 19:32 solar-data.2020
-rw-r––r–– 1 root root 4591 2011-02-10 19:32 solar-data.2021



jds@wopr:/usr/local/bin$ cat /etc/daylight/solar-data.2012
      Jan.       Feb.       Mar.       Apr.       May        June       July     Aug.       Sept.      Oct.       Nov.       Dec.
Day Rise  Set  Rise  Set  Rise  Set  Rise  Set  Rise  Set  Rise  Set  Rise  Set  Rise  Set  Rise  Set  Rise  Set  Rise  Set  Rise  Set
    h m  h m   h m  h m   h m  h m   h m  h m   h m  h m   h m  h m   h m  h m   h m  h m   h m  h m   h m  h m   h m  h m   h m  h m
01  0720 1641  0706 1715  0630 1749  0540 1822  0456 1853  0429 1921  0431 1930 0455 1911  0525 1828  0554 1738  0627 1653  0701 1631
02  0720 1642  0705 1716  0628 1750  0538 1823  0454 1854  0428 1922  0431 1930  0456 1910  0526 1826  0555 1737  0628 1652  0702 1631
03  0720 1643  0705 1717  0627 1751  0537 1824  0453 1855  0428 1922  0432 1930  0457 1908  0527 1825  0556 1735  0629 1651  0703 1631
04  0720 1644  0704 1718  0625 1752  0535 1825  0452 1856  0428 1923  0433 1930  0458 1907  0528 1823  0557 1733  0630 1650  0704 1631
05  0720 1644  0702 1720  0624 1753  0533 1826  0451 1857  0427 1924  0433 1930  0459 1906  0528 1821  0558 1732  0632 1649  0705 1630
06  0720 1645  0701 1721  0622 1754  0532 1827  0450 1858  0427 1924  0434 1929  0500 1905  0529 1820  0559 1730  0633 1648  0706 1630
07  0720 1646  0700 1722  0620 1756  0530 1828  0449 1859  0427 1925  0434 1929  0501 1904  0530 1818  0600 1729  0634 1647  0706 1630
08  0720 1647  0659 1723  0619 1757  0529 1829  0447 1900  0427 1925  0435 1929  0502 1903  0531 1816  0601 1727  0635 1646  0707 1630
09  0719 1648  0658 1724  0617 1758  0527 1830  0446 1901  0427 1926  0436 1928  0502 1901  0532 1815  0602 1725  0636 1645  0708 1630
10  0719 1649  0657 1726  0616 1759  0526 1831  0445 1902  0427 1926  0436 1928  0503 1900  0533 1813  0603 1724  0637 1644  0709 1631
11  0719 1650  0656 1727  0614 1800  0524 1832  0444 1903  0426 1927  0437 1927  0504 1859  0534 1811  0604 1722  0639 1643  0710 1631
12  0719 1651  0655 1728  0612 1801  0522 1833  0443 1904  0426 1927  0438 1927  0505 1857  0535 1810  0605 1721  0640 1642  0711 1631
13  0719 1652  0653 1729  0611 1802  0521 1834  0442 1905  0426 1928  0438 1926  0506 1856  0536 1808  0606 1719  0641 1641  0711 1631
14  0718 1654  0652 1730  0609 1803  0519 1835  0441 1906  0426 1928  0439 1926  0507 1855  0537 1806  0607 1718  0642 1640  0712 1631
15  0718 1655  0651 1732  0608 1804  0518 1836  0440 1907  0426 1929  0440 1925  0508 1853  0538 1805  0608 1716  0643 1639  0713 1632
16  0717 1656  0650 1733  0606 1805  0516 1837  0439 1907  0426 1929  0441 1925  0509 1852  0539 1803  0609 1715  0644 1639  0713 1632
17  0717 1657  0648 1734  0604 1806  0515 1838  0439 1908  0426 1929  0442 1924  0510 1851  0540 1801  0610 1713  0646 1638  0714 1632
18  0717 1658  0647 1735  0603 1807  0513 1839  0438 1909  0427 1930  0442 1923  0511 1849  0541 1800  0611 1712  0647 1637  0715 1633
19  0716 1659  0646 1736  0601 1808  0512 1840  0437 1910  0427 1930  0443 1923  0512 1848  0542 1758  0612 1710  0648 1636  0715 1633
20  0715 1700  0644 1738  0559 1809  0510 1841  0436 1911  0427 1930  0444 1922  0513 1846  0543 1756  0614 1709  0649 1636  0716 1634
21  0715 1701  0643 1739  0558 1810  0509 1842  0435 1912  0427 1930  0445 1921  0514 1845  0544 1755  0615 1707  0650 1635  0716 1634
22  0714 1703  0641 1740  0556 1811  0508 1843  0435 1913  0427 1930  0446 1920  0515 1843  0545 1753  0616 1706  0651 1635  0717 1635
23  0714 1704  0640 1741  0555 1812  0506 1844  0434 1914  0428 1931  0447 1919  0516 1842  0546 1751  0617 1705  0652 1634  0717 1635
24  0713 1705  0639 1742  0553 1814  0505 1845  0433 1915  0428 1931  0448 1919  0517 1840  0547 1750  0618 1703  0653 1634  0718 1636
25  0712 1706  0637 1743  0551 1815  0503 1847  0433 1916  0428 1931  0448 1918  0518 1839  0548 1748  0619 1702  0655 1633  0718 1636
26  0712 1707  0636 1744  0550 1816  0502 1848  0432 1916  0429 1931  0449 1917  0519 1837  0549 1746  0620 1701  0656 1633  0718 1637
27  0711 1709  0634 1746  0548 1817  0501 1849  0431 1917  0429 1931  0450 1916  0520 1836  0550 1745  0621 1659  0657 1632  0719 1638
28  0710 1710  0633 1747  0546 1818  0459 1850  0431 1918  0430 1931  0451 1915  0521 1834  0551 1743  0622 1658  0658 1632  0719 1638
29  0709 1711  0631 1748  0545 1819  0458 1851  0430 1919  0430 1931  0452 1914  0522 1833  0552 1742  0624 1657  0659 1632  0719 1639
30  0708 1712             0543 1820  0457 1852  0430 1919  0430 1931  0453 1913  0523 1831  0553 1740  0625 1656  0700 1631  0719 1640
31  0707 1713             0542 1821             0429 1920             0454 1912  0524 1829             0626 1654             0720 1641



jds@wopr:/usr/local/bin$ cat daylight.sh
#!/bin/bash
#
# see also http://www.linuxjournal.com/article/10860?page=0,1
#
# Looks up sunrise/sunset time for today's date from a USNO-generated table
# generated by
# http://www.usno.navy.mil/USNO/astronomical-applications/data-services/rs-one-year-world
# using your lat/lon coordinates and associated time delta.
# or use this simpler form
# http://www.usno.navy.mil/USNO/astronomical-applications/data-services/rs-one-year-us
#
# Use:  daylight sunrise|sunset ...
#
DAY=`date +%d`
MONTH=`date +%m`
YEAR=`date +'%Y'`
#
TABLE="/etc/daylight/solar-data.${YEAR}"
#
if ! [ -s ${TABLE} ]
then
 echo "solar table '${TABLE}' not found."
 exit 1
fi
#
#  Look up 1-hour correction for daylight savings time zone
case `date +%Z` in
 *DT) DST=1 ;;
 *) DST=0 ;;
 esac
# echo DST=$DST
#
for i in $*
do
 case "$i" in
   sunrise) grep "^$DAY" $TABLE | awk "{ printf \"%02d:%s\\n\", substr(\$0,($MONTH-1)*11+5,2)+$DST,\
        substr(\$0,($MONTH-1)*11+7,2) }"; continue ;;

   sunset) grep "^$DAY" $TABLE | awk "{ printf \"%02d:%s\\n\", substr(\$0,($MONTH-1)*11+10,2)+$DST,\
        substr(\$0,($MONTH-1)*11+12,2) }"; continue ;;

   *) echo Unknown arg: $i ; continue ;;
 esac
done
#



jds@wopr:/usr/local/bin$ ./daylight.sh sunrise
06:59
jds@wopr:/usr/local/bin$ ./daylight.sh sunset
17:23


jds@wopr:/usr/local/bin$ cat daylight-sched.sh

#!/bin/bash

DAYLIGHT=/usr/local/bin/daylight.sh
ON=1
OFF=0

SWITCHPATH=/var/env/location/House/Basement/feature/relay/set/ch1
SYSLOGID=local7.info

function annotate()
{
 logger -p ${SYSLOGID} "daylight-sched.sh - $1"
}

if [ -x ${DAYLIGHT} ]
then
 SUNRISE=`${DAYLIGHT} sunrise`
 echo "echo ${OFF} > ${SWITCHPATH}" > /tmp/daylight.off.$$
 at ${SUNRISE} < /tmp/daylight.off.$$ > /dev/null 2>&1
 annotate "scheduled event for ${SUNRISE} (sunrise)"

 SUNSET=`${DAYLIGHT} sunset`
 echo "echo ${ON} > ${SWITCHPATH}" > /tmp/daylight.on.$$
 at ${SUNSET} < /tmp/daylight.on.$$  > /dev/null 2>&1
 annotate "scheduled event for ${SUNSET} (sunset)"

 rm -rf /tmp/daylight.o*
else
 exit 1
fi
Link Posted: 2/8/2012 7:26:38 AM EDT
[#31]
Quoted:
the shell script which does the loop management, including all of the data gathering and setting, is 3.6Kbytes.  and a good portion of that is just instrumentation for stats.
jds@wopr:/var/env$ wc envsys.sh 156  358 3645 envsys.sh



jds@wopr:/var/env$ cat envsys.sh
#!/bin/bash
#
# start this script with "––" to run interactively from the shell,
# and with no parameters to daemonize iteself.

BASEDIR=/var/env
LOCKFILE=${BASEDIR}/envsys.pid
LOGFILE=${BASEDIR}/envsys.out.log
ERRFILE=${BASEDIR}/envsys.err.log
WDINTERVAL=1800
WDBIN=${BASEDIR}/envsys-wd.sh
WDPIDFILE=${BASEDIR}/envsys-wd.pid
SYSLOGID=local7.info

trap checkpoint 1          # SIGHUP appends info to log file
trap cleanup    2 3 6 15   # clean up lock file and exit

function annotate()
{
  logger -p ${SYSLOGID} "envsys - $1"
}

function checkpoint()
{
  if [ ${lcount} -gt 0 ]
  then
     lps=`calc "config('display',2);config('tab',0);config('leadzero',1);config('fullzero',1);
          config('tilde',0);(${lcount}-${llast})/${WDINTERVAL}" | tail -1`
     aps=`calc "config('display',2);config('tab',0);config('leadzero',1);config('fullzero',1);
          config('tilde',0);(${acount}-${alast})/${WDINTERVAL}" | tail -1`
  else
     lps=0
     aps=0
  fi
  annotate "loops: ${lcount} (${lps}/sec); actions: ${acount} (${aps}/sec)"
  llast=${lcount}
  alast=${acount}
  /var/env/info.sh > /var/env/info.txt &
}

function cleanup()
{
  checkpoint
  if [ -s ${WDPIDFILE} ]
  then
     kill `< ${WDPIDFILE}`
     annotate "watchdog killed."
  fi
  rm -f $LOCKFILE
  annotate "lockfile removed."
  annotate "pid $$ exited."
  exit
}

function watchdog()
{
  if [ -x ${WDBIN} ]
  then
    ${WDBIN} ${WDINTERVAL} &
  fi
}

cd ${BASEDIR}

if [ "x$1" != "x––" ]
then
  annotate "starting daemon"
  $0 –– 2>&1 | logger -p ${SYSLOGID} &
  exit
fi

if [ -e ${LOCKFILE} ]
then
  echo "${LOCKFILE} found. $0 already running?"
  exit 1
else
  echo $$ > ${LOCKFILE}
fi

annotate "pid $$ running"
annotate "logging to ${SYSLOGID}"
annotate "checkpoint at ${WDINTERVAL} seconds"

BASELOCATION=${BASEDIR}/location

date > tree.txt
echo >> tree.txt
tree -A ${BASELOCATION} >> tree.txt

alast=0
llast=0
acount=0
lcount=0

watchdog

# cp /dev/null /tmp/envsys.debug
while [ 1 ]
do
  cd ${BASELOCATION}
  for location in *
  do
     cd ${location}
     for site in *
     do
        cd ${site}
        if [ ! -e "SKIP" ]
        then
           interface=${PWD}/interface
           sensor=${PWD}/sensor
           if [ -s address ]
           then
              address=`<address`
           else
              address=1
           fi
           timenow=`date +"%s"`
           cd feature
           for feature in *
           do
              cd ${feature}
              if [ -s interval ]
              then
                 interval=`<interval`
                 timestamp=`date ––reference=interval +"%s"`
              else
                 interval=0
                 timestamp=0
              fi
              delta=$((timenow-timestamp))
              if [ ! -s interval -o ${delta} -gt ${interval} ]
              then
                 for action in set get
                 do
                    if [ -d ${action} ]
                    then
                       cd ${action}
                       script=${sensor}/method/${feature}/${action}
#                       echo `date`":${script}" >> /tmp/envsys.debug
                       ${script} ${interface} ${address} ${feature} ${action} ${location} ${site}
                       cd ..
                       acount=$((acount+1))
                    fi
                 done
                 touch -c interval
              fi
              cd ..
           done
           cd ..
        fi
        cd ..
     done
     cd ..
  done
  lcount=$((lcount+1))
done

Link Posted: 2/8/2012 7:40:08 AM EDT
[#32]
Quoted:
now then, what happens to the data that the polling process collects?

in general, i take the "filesystem representation" approach.  it is simple, self-describing, intuitive, and finally (but perhaps most importantly) it is easily debugged.  the filesystem tree for a given location fully describes all of the features and capabilities of the sensor(s) at that location.  the environmental system then is responsible for populating the filesystem tree under that location, and also for updating sensors when the file system is changed by external programs.  read that last sentence again, as it is an important concept.   of course, some data can not be "set".   for example, you can try to "set" the outside temperature all you want, but it's not going to make a difference.

another benefit of the filesystem representation approach is that no external database or other ancillary application is required.  the filesystem IS the database.  it makes backup trivial as well.



jds@wopr:/var/env/location/House/Upstairs$ tree .
├── feature
│   ├── counter
│   │   ├── get
│   │   │   ├── packets
│   │   │   ├── packets.0
│   │   │   ├── packets.1
│   │   │   ├── packets.2
│   │   │   └── packets.3
│   │   └── interval
│   ├── display
│   │   ├── interval
│   │   └── set
│   │       ├── gpio
│   │       ├── line1
│   │       └── line2
│   ├── error
│   │   ├── get
│   │   │   ├── crcerr
│   │   │   ├── invalid
│   │   │   ├── runt
│   │   │   └── timeout
│   │   ├── interval
│   │   └── set
│   │       ├── flag
│   │       └── last
│   ├── opto
│   │   └── get
│   │       ├── ch1
│   │       ├── ch1.defer.0-1
│   │       ├── ch2
│   │       ├── ch3
│   │       └── ch4
│   ├── relay
│   │   ├── get
│   │   │   ├── ch1
│   │   │   ├── ch2
│   │   │   ├── ch3
│   │   │   └── ch4
│   │   └── set
│   │       ├── ch1
│   │       ├── ch2
│   │       ├── ch3
│   │       └── ch4
│   ├── reset
│   │   ├── interval
│   │   └── set
│   │       ├── flag
│   │       └── last
│   ├── serial
│   │   ├── get
│   │   │   ├── crc
│   │   │   ├── familycode
│   │   │   └── serial
│   │   └── interval
│   ├── temperature
│   │   ├── get
│   │   │   ├── degC
│   │   │   ├── degF
│   │   │   ├── sign
│   │   │   ├── Tlsb
│   │   │   └── Tmsb
│   │   └── interval
│   └── version
│       ├── get
│       │   ├── FW
│       │   ├── HW
│       │   ├── HWFW
│       │   └── Tsensor
│       └── interval
├── interface -> /dev/ttyUSB5
└── sensor -> /var/env/sensor/rob

Link Posted: 2/8/2012 9:24:23 AM EDT
[#33]
This thread = full of win.
Link Posted: 2/8/2012 12:18:20 PM EDT
[#34]



Quoted:


This thread = full of win.


I finally created a thread in which the GD does not make fun of me.  



 
Link Posted: 2/8/2012 3:43:50 PM EDT
[#35]
I ran CAT6 throughout the house and made a small "rack" tucked away in the closet for the terminations.  The closet was an excellent central location for the wireless router, and it has a gig switch built in that the high speed stuff uses.  I added in another small Netgear switch with PoE because I use some VoIP phones from the office and I hate messing with the AC adapters.





I just wish the PoE switch was gig, I had a hard time finding a reasonably priced unit that wasn't 10/100.

Let's see how long I can keep it this neat and tidy, I already have visions of adding in an ASA and media center PC.
Link Posted: 2/8/2012 6:20:38 PM EDT
[#36]
ar-jedi:  Thanks for the reply, I appreciate it.  I'm a nerd at heart(engineer) but my forte is mechanical/process related stuff and my programming knowledge is more VB for excel and CNC programming so as of now most of what you're doing is way over my head on the software side.....but who knows, I might get more interested eventually.  I have been leaning towards Insteon brand products for my house so I'm glad I'm in the right direction.....right now just need to get more wiring pulled for network then start seeing where things go and how quickly the budget disappears.  Building up some stuff off project boards isn't outside the range off possibilities though.....hum.....
Link Posted: 2/8/2012 6:50:57 PM EDT
[#37]
pfft






I win.
Link Posted: 2/8/2012 6:52:40 PM EDT
[#38]
Quoted:
I ran CAT6 throughout the house and made a small "rack" tucked away in the closet for the terminations.  The closet was an excellent central location for the wireless router, and it has a gig switch built in that the high speed stuff uses.  I added in another small Netgear switch with PoE because I use some VoIP phones from the office and I hate messing with the AC adapters.
http://img713.imageshack.us/img713/8282/photopor.jpg
http://img845.imageshack.us/img845/7832/photo1tf.jpg
I just wish the PoE switch was gig, I had a hard time finding a reasonably priced unit that wasn't 10/100.
Let's see how long I can keep it this neat and tidy, I already have visions of adding in an ASA and media center PC.


very nice clean install.

ar-jedi
Link Posted: 2/8/2012 7:14:19 PM EDT
[#39]
Quoted:
I ran CAT6 throughout the house and made a small "rack" tucked away in the closet for the terminations.  The closet was an excellent central location for the wireless router, and it has a gig switch built in that the high speed stuff uses.  I added in another small Netgear switch with PoE because I use some VoIP phones from the office and I hate messing with the AC adapters.

http://img713.imageshack.us/img713/8282/photopor.jpg

http://img845.imageshack.us/img845/7832/photo1tf.jpg

I just wish the PoE switch was gig, I had a hard time finding a reasonably priced unit that wasn't 10/100.

Let's see how long I can keep it this neat and tidy, I already have visions of adding in an ASA and media center PC.


Finally - cable management!  Some of those pics killed me a little inside....  
Link Posted: 2/9/2012 6:08:17 AM EDT
[#40]


OMG OMG OMG you has the Internet!

Do the Elders of the Internet know??
Link Posted: 2/9/2012 6:14:59 AM EDT
[#41]
Link Posted: 2/9/2012 6:17:34 AM EDT
[#42]
On a more serious side, I have a question for you internet geeks:

I get to use my cousins WiFi back home in the US. My house is like 100 feet away from his. How can I boost his WiFi signal so I can use it with my computer?
Link Posted: 2/9/2012 8:02:53 AM EDT
[#43]




Quoted:

On a more serious side, I have a question for you internet geeks:



I get to use my cousins WiFi back home in the US. My house is like 100 feet away from his. How can I boost his WiFi signal so I can use it with my computer?




A good question to post in Urban Commandos. Until then, here is a search term - High Gain Wifi Antenna
Link Posted: 2/9/2012 8:35:34 AM EDT
[#44]
Thanks! I will google that.
Link Posted: 2/9/2012 11:42:02 AM EDT
[#45]
  Somethings just come in last on mi casa's  punchlist.....



....because I spend my days doing this

Link Posted: 2/10/2012 12:58:19 PM EDT
[#47]
Quoted:
Somethings just come in last on mi casa's  punchlist.....


....because I spend my days doing this


lol @ the electrical tape stands.  Get it together man!
Link Posted: 2/10/2012 1:31:22 PM EDT
[#48]
Quoted:
Quoted:
Somethings just come in last on mi casa's  punchlist.....


....because I spend my days doing this


lol @ the electrical tape stands.  Get it together man!



air circulation man, they gotz a whole lotta processing goin on tharrr

Link Posted: 2/10/2012 1:58:50 PM EDT
[#50]
Here's my home "production" network before I ran the cabling:

This is my home lab for network testing/education (the top switch and two of the WAPs are "production"):

Here is the wiring layout for the production stuff:

Here is the rack configuration for both racks, with equipment labels:



 
 
Page / 3
Close Join Our Mail List to Stay Up To Date! Win a FREE Membership!

Sign up for the ARFCOM weekly newsletter and be entered to win a free ARFCOM membership. One new winner* is announced every week!

You will receive an email every Friday morning featuring the latest chatter from the hottest topics, breaking news surrounding legislation, as well as exclusive deals only available to ARFCOM email subscribers.


By signing up you agree to our User Agreement. *Must have a registered ARFCOM account to win.
Top Top