Archive for November, 2011


Everything went relatively according to plan following instructions from: http://www.dbzoo.com/livebox/livebox

I only hit one snag- trying to take a shortcut and not bother changing the ip address of the router to 10.0.0.1 and the pc running the http/ftp server to 10.0.0.2. The reason appears to be that the livebox name field takes a maximum of maybe 32 characters so ;cd /etc;wget ftp://192.168.0.111/u for example does not work.

Now just waiting of delivery of a couple of Jeenodes: http://www.dbzoo.com/livebox/hah_hahnode

A few Airwick’s: http://www.dbzoo.com/livebox/hah_hahnode#airwick_hahnode have already been delivered :)

And I’m still researching various remote switching options: http://www.domoticaforum.eu/viewforum.php?f=55 looks to be a good source of information. The plugwise http://www.plugwise.com/idplugtype-g/ devices look quite promising as they’re one of the only options that support two way communication. They also come with an added bonus of monitoring power consumption of the device(s) attached to them. The shortfalls being reliability (read some bad reports from the domoticaforum) and cost (but the functionality might justify it). I’m not sure if/how well they would integrate with the HAH.

L

Structured CAT5e Network Cabling

I’ve been crimping my own patch leads for an eternity but never bothered introducing a patch panel. Now’s the time… (forgive the slightly poor quality pictures taken with the phone).

The back of the patch panel:

The 4 port RJ45 wall box and 4 cat5e cables. This is the first time I’ve used those velco tie-wraps and they work a treat (although I guess for inside the house depending on how well I hide the cabling, white would be preferable to black):

The excess / slack nicely spooled:

The patch panel patched into the switch:

This is in the garage (aka server room) where I’m just going to have 4 ports for the workbench. I’ve got a small cabinet in the house and a POE switch I’ve yet to hook up…

L

In the past I’ve been a bit blasé with security- where something doesn’t work I would just add myself to the local administrator group and voila! Now I’m trying to better my habits and, when something doesn’t work, find out exactly what needs to happen to get it working. Today I was trying to publish some reports to a brand new deployment of SQL Server Reporting Services (SSRS) 2008 R2.

When first accessing the report server from a web browser, unsurprisingly I got a permissions error:

User ‘domainusername’ does not have required permissions. Verify that sufficient permissions have been granted and Windows User Account Control (UAC) restrictions have been addressed.

So I jumped onto the report server as an administrator and from the Site Settings area assigned the System Administrator to my account:

Still the same error:

This time I tried defining security at the root node (home) folder:

And now- everything works:

Following on from my previous blog entry about SSRS permissions- I now wanted to connect to Reporting Services from SQL Server Management Studio:

Connect to Server -> Cannot connect to serverinstance -> Additional Information: A connection to the computer cannot be established. (Microsoft.SqlServer.Management.UI.RSClient) -> Access is denied. (Exception from HRESULT: 0x80070005 (E_ACCESSDENIED)) (mscorlib)

This was resolved by adding my account to the Distributed COM Users:

Now the connection is successful from Management Studio:

Although I was expecting to see folders, reports, data sources, datasets etc:

But I’ll save that for another time!

L

I often use BCP as a quick/easy alternative to SQL Server Integration Services Packages- creating a view or stored procedure to return the desired records then a SQL job to execute BCP using an Operating system (CmdExec) step type.

This works pretty well then a second step can be used to e-mail the BCP output using sp_send_dbmail or a similar alternative. Now I want to archive the BCP output by appending a prefix / suffix to the BCP output filename.

I already use batch files for various tasks and so know that I can pass %date:~6,4%%date:~3,2%%date:~0,2% to the command line to get the date in format YYYYMMDD. So let’s try adding that to the BCP command line:

bcp "exec ebms_sql.dbo.sp_Missing_Tax_Schemes" QUERYOUT "\fs01ReportsMissing_Tax_Scheme_"%date:~6,4%%date:~3,2%%date:~0,2%".csv" -T -S "localhost" -t "," –c

Let’s try it:

Error: SQLState = S1000, NativeError = 0 Error = [Microsoft][SQL Native Client]Unable to open BCP host data-file. Process Exit Code 1. The step failed.

OK- so it must be a permissions error? Nope- permissions are fine. Let’s trying running it from the a command prompt:

Hmmm- that works?! Let’s try snooping what’s going on when the SQL job runs with Sysinternals Process Monitor:

Right- the environment variables aren’t being played out- so the filename containing special characters is invalid. How can we force the command prompt to interpret differently? Let’s try cmd /c on the off chance:

cmd /c bcp "exec ebms_sql.dbo.sp_Missing_Tax_Schemes" QUERYOUT "\fs01ReportsMissing_Tax_Scheme_"%date:~6,4%%date:~3,2%%date:~0,2%".csv" -T -S "localhost" -t "," –c

Success- it works!

Now my only remaining frustration is that BCP won’t output a row with column headers (I do a weird union thing to get around this for the time being, but will look further into this at a later date).

L

T-Mobile 3G Dongle

4.72Mbps- can’t really complain at that when my wired ADSL at home struggles to exceed 4Mbps! A real life-saver when away from home!

L

Hard @ Work :)

Some DJ shots from Saturday’s Kool Kids Club https://www.facebook.com/TheKoolKidsKlub

Dillon Francis

Brenmar

Mele

Eristoff :)

CO2 :)



Like Lee Tickett Photography https://www.facebook.com/pages/Lee-Tickett-Photography/111744830880 for regular updates :)

L

I’ve been doing a lot of research into home automation, a/v distribution and data capture/monitoring recently and whilst I’ve found a endless amounts of information there seemed to be a few issues present across all solutions:

-Price
-Standards
-Availability
-Support

I did mention the Home Automation Hub (http://www.homeautomationhub.com/) project I stumbled across last month in a blog post but had initially dismissed because it appeared that the project had been abandoned. However, Derek, part of the project fortunately dropped me an e-mail to inform me the project is very much still alive! This solution therefore hopefully doesn’t fall short on any of the fronts the others (Control4, Crestron etc) do.

-Price: The central hub itself is a repurposed livebox router which I found on eBay for about £5. The additional hardware I need to control, collect and display data appears to vary but it’s modular and most modules appear to be very reasonably priced.
-Standards: The software running on the central hub is open source and can interface with existing devices using a whole host of standards. Support for additional standards could be developed at a later date.
-Availability: I found plenty of live box routers on eBay- I’m not sure if they’re still sold commercially but I imagine if there was a point in the future when they’re no longer available the image will be ported so it can be flashed onto alternative hardware. There are a number of options for the modules required for control, collect and display data so I think there will always be something available.
-Support: As the project is open source the community support is great and there appears to be activity on the hah forum everyday!

Initially I was going to order the hah parts bundle from the shop http://www.homeautomationhub.com/content/hah-parts-bundle but the pcb is currently out of stock so I’m researching for a bit longer :)

It looks like most of what I want to collect / control can be handled by Jeenodes http://www.dbzoo.com/livebox/hah_hahnode – RF enabled AVR328P boards using the same development tools as the Arduino. In addition to:

-Room Board (for monitoring temperature, light and humidity)
-Expander Plug (for general purpose digital I/O)
-Input Plug (for general purpose analog input)
-Infrared Plug (possibly to interface with a/v equipment or maybe add light/mains control to my harmony remotes?)
-Relay Plug (in the hope to control lights and potentially sockets- I don’t think the board currently uses latching relays so this would probably drain the batteries far too quickly- hmm…)
-OOK 433 Plug (in the hope to hijack the data from my weather stations and maybe the current cost energy monitoring devices)
-Graphics Board (display some of the info without having to access a mobile/computer and open a web browser)
-Extension Cables & Plug Headers and Battery Holders to hook everything up

The hahnode article on the hah website shows a novell way of repurposing an Airwick Freshmatic Compact http://www.dbzoo.com/livebox/hah_hahnode#airwick_hahnode to house the jeenode, provide power and detect motion- so I’ve ordered a few of these too. Shopping List (prices include p&p):

£10.00- Livebox Router (eBay)
£11.25- TTL Connection / Programming Cable (HAH)
£18.00- 3x Airwick Freshmatic Compact (eBay)

I’ve yet to place my order with jeelabs but my cart is looking something like:

Things I’m still yet to think about:

-Doorbell (integrate with the system? http://www.bwired.nl has inspired me- I love the idea of having a camera capture a photo when the doorbell is pressed)
-Security (Cameras, Door/window open/close/lock/unlock?)
-Boiler
-A/V distribution (my satellite receiver(s) are on the network as is my 4×4 HDMI matrix)
-Phone (I don’t currently have a phone connected to my landline but I do have some ip phones I’ve been playing with… I also like the idea of adding a mobile to send/receive sms but this might be overkill as twitter or something could be potentially be implemented more cheaply)

The cameras which are currently looking most appealing: http://www.ebay.com/itm/ws/eBayISAPI.dll?ViewItem&item=220875730715&ssPageName=ADME:X:RTQ:US:1123

Lots to still think about!

L

My ener$ave : http://www.myenersave.com

Enio : http://www.enio.co.uk

Just connected them to my current cost meter so need to wait a month or so before I can tell how well they both work.

L

%d bloggers like this: