celerity
Posts: 20
Joined: Mon Nov 28, 2011 1:50 pm
Contact: Website

Re: Controlling a mains power socket switch? (home automation)

Wed Nov 30, 2011 11:10 am

Ouchy, BBSB Online is £99 on Amazon. Do you mind saying how much you paid for yours?

/\

colinM
Posts: 7
Joined: Wed Nov 30, 2011 10:21 am

Re: Controlling a mains power socket switch? (home automation)

Wed Nov 30, 2011 11:27 am

Don't mind at all, but don't know either. I seem to remember it was more in the 50 to 60 pound range, I can find a dispatch notice but no price.
There's one on ebay now with a current bid of 45, but all the readers of this thread will soon drive that up :-)

You might need to budget for a firmware upgrade if you get a used/cheap one, I took the chance and mine had already been done.

Hope you track one down at a good price, I've been extremely pleased with mine and have only scratched the surface of what's possible, so far.
I enjoy the hobby solutions some of the other posters suggested but for off the shelf, this was the simplest solution I could find.

Colin

colinM
Posts: 7
Joined: Wed Nov 30, 2011 10:21 am

Re: Controlling a mains power socket switch? (home automation)

Wed Nov 30, 2011 11:37 am

One last thought,

Adam, would you mind posting an update if you go down this route and get a BBSB controller hooked up to your RPi when it arrives? It would be great to switch my scheduling to a 1W device instead of my power hungry PC.

Thanks
Colin

bradburts
Posts: 341
Joined: Sun Oct 02, 2011 7:07 am

Re: Controlling a mains power socket switch? (home automation)

Wed Nov 30, 2011 11:42 am

The BBSB TV plugs are very cheap.
You could wire an IR transmitter easily & use something like LIRC to grab the control codes.

Easier & quite cheap:
http://www.scan.co.uk/products.....controller
Has a web interface so should be easy to control.

colinM
Posts: 7
Joined: Wed Nov 30, 2011 10:21 am

Re: Controlling a mains power socket switch? (home automation)

Wed Nov 30, 2011 11:50 am

Quote from bradburts on November 30, 2011, 11:42
The BBSB TV plugs are very cheap.
You could wire an IR transmitter easily & use something like LIRC to grab the control codes.

Easier & quite cheap:
http://www.scan.co.uk/products.....controller
Has a web interface so should be easy to control.



Good find on price, I think that is the BBSB onbline controller, there's some kind of tie in/assocaition between BBSB and DOMIA that I don't understand, they may be the same company.

Note! they are RF not IR, and there's no need to sniff the codes, they're all published on the BBSB forums, including the RF protocols if you really want to get down to low level, but at 30 quid I'd by the controller, plug it into your network and push some UDP packets from your RPi, job done.

bradburts
Posts: 341
Joined: Sun Oct 02, 2011 7:07 am

Re: Controlling a mains power socket switch? (home automation)

Wed Nov 30, 2011 12:01 pm

Quote from jacklang on November 30, 2011, 10:43
My array is due south and I'm getting about 1kw at 10h30

Same.
2.4KW at 12:00
Wonder what panels we all have. Adams seem super charged.

bradburts
Posts: 341
Joined: Sun Oct 02, 2011 7:07 am

Re: Controlling a mains power socket switch? (home automation)

Wed Nov 30, 2011 12:08 pm

The controller is X10 & RF, think that is the connection.
The IR suggestion is that you can buy a BBSB TV plug which has an IR receiver.
You use your TV remote to turn the TV on/off. Costs around £10.
So you could rig an IR transmitter etc.
But at £30 I think that the domia is a no brainer, how could you say no to a domia, eh?

PS
This thread is getting quite interesting.

colinM
Posts: 7
Joined: Wed Nov 30, 2011 10:21 am

Re: Controlling a mains power socket switch? (home automation)

Wed Nov 30, 2011 12:19 pm

Oops,

I missed what you were getting at, haven't looked at the BBSB range for a while and didn't know the IR TV thing existed. Seems a bit of a dead end though if you're going for home automation, IR line of site in one room, RF whole house, I have a large stone built 1850's house and haven't found a socket that the online controller can't reach yet.

My wife would like the ability to use the IR from the TV remote and have one less remote lying around, but shock horror, we don't switch off mains to the TV.

bradburts
Posts: 341
Joined: Sun Oct 02, 2011 7:07 am

Re: Controlling a mains power socket switch? (home automation)

Wed Nov 30, 2011 12:38 pm

Quote from colinM on November 30, 2011, 12:19
Seems a bit of a dead end though if you're going for home automation, IR line of site in one room, RF whole house, I have a large stone built 1850's house and haven't found a socket that the online controller can't reach yet.

My thought were with Adam's setup, single pump and least cost (used to work with high volume & habits die hard).
There is an advantage that you will not get someone else's setup controlling yours. If reliability is an issue then that may also lead you the IR way before full on DIY.
Still not got Adam's problem truely nailed though as I think he wants 4 speeds.
But at £30 the RF automation node will be a nobrainer for most.

The problem I am facing now is that there are too many interesting RPI projects to take up.

User avatar
glenn66
Posts: 55
Joined: Fri Nov 25, 2011 4:06 pm
Location: Belfast
Contact: Website

Re: Controlling a mains power socket switch? (home automation)

Wed Nov 30, 2011 9:24 pm

Quote from celerity on November 30, 2011, 10:09
Get a wood burner, and you'll save carbon by using a virtually carbon-neutral fuel instead of fossil fuel. Alternatively, if you live anywhere near Cambridge I'll gladly take them off your hands ;-).

/\dam

Totally agree. All this 1.8kw stuff would leave me hypothermic. I live in the frozen Irish north and my woodburner is giving me over 20kw of heat on a nice steady supply of scrap timber and some turf for the cold nights (turf is a secret Irish fuel!). Only electricity I need is for the circulation pump and I have a 300w inverter and 2 big caravan batteries for back up in case of a power failure.

Just had a random thought, has anyone got any experience with thermocouples??

User avatar
glenn66
Posts: 55
Joined: Fri Nov 25, 2011 4:06 pm
Location: Belfast
Contact: Website

Re: Controlling a mains power socket switch? (home automation)

Wed Nov 30, 2011 9:30 pm

Quote from bradburts on November 30, 2011, 09:26
You may be able to do something with PWM and an RC circuit as your design is not real-time. I would use a MAX232 as a simple way to convert 5V to 12V, custom power supplies hate me and always look for ways to spike my boards.

I have something similar running in a car at the moment. The 5v PWM output from the PIC is passed to a simple transistor switch (amplifier) to get a 12volt signal and this is smoothed through an RC circuit to get a voltage. Might go back and look at that again for inspiration.

bradburts
Posts: 341
Joined: Sun Oct 02, 2011 7:07 am

Re: Controlling a mains power socket switch? (home automation)

Wed Nov 30, 2011 9:42 pm

Quote from glenn66 on November 30, 2011, 21:24
I live in the frozen Irish north and my woodburner is giving me over 20kw of heat on a nice steady supply of scrap timber and some turf for the cold nights (turf is a secret Irish fuel!).

And there was me thinking that the Irish used Whiskey for heating......

Just had a random thought, has anyone got any experience with thermocouples??
Yes, Peltiers, which are lots of thermos. Used them at work and then for solar fridges.

PS
They are quite cheap at VirtualVillage and well worth a go with your stove. Becomes a thermal/mechanical problem but heat pipes are quite cheap these days.

User avatar
glenn66
Posts: 55
Joined: Fri Nov 25, 2011 4:06 pm
Location: Belfast
Contact: Website

Re: Controlling a mains power socket switch? (home automation)

Wed Nov 30, 2011 9:53 pm

I'll look into Peltiers then, would be an interesting project to drive an electric pump (even a back-up job) from the stove itself. We had a major power cut in our area 2 years ago on a sub-zero night and by 9pm we were the only people still at home, everyone else having decamped to relatives or friends for the night because their oil-fired heating was knocked out. It was quite a bizarre and slightly disturbing scenario, kind of post-apocalyptic.

I gave up alcohol over a year ago (shocking for an Ulster-Scot!), but I keep a couple of bottles of Lagavulin tucked away for emergencies.

bradburts
Posts: 341
Joined: Sun Oct 02, 2011 7:07 am

Re: Controlling a mains power socket switch? (home automation)

Wed Nov 30, 2011 10:01 pm

The trick is to keep as high a temperature difference as you can.
You will need to check what the max temperature of the Pelt is, don't want it to melt!
You can do a quick check with a pelt on a metal plate and a pan of hot water on top but without a decent heatsink the power quickly drops off.

EDIT:
Should say that I have used Peltiers as TECs, not sure if a TEG uses different technology e.g. for reasons of temperature.

celerity
Posts: 20
Joined: Mon Nov 28, 2011 1:50 pm
Contact: Website

Re: Controlling a mains power socket switch? (home automation)

Thu Dec 01, 2011 1:40 pm

Quote from colinM on November 30, 2011, 12:19
[...] RF whole house, I have a large stone built 1850's house and haven't found a socket that the online controller can't reach yet.

I'm assuming the online controller has way more power than the handheld units then, as my remote can barely switch on the Bye Bye Standby plugs if they are behind wooden furniture. They work, but I have got into the habit of pressing the button several times to make sure.

/\dam

colinM
Posts: 7
Joined: Wed Nov 30, 2011 10:21 am

Re: Controlling a mains power socket switch? (home automation)

Thu Dec 01, 2011 1:59 pm

I would expect so, but I've never really done a comparison since, like I said it manages to reach all the sockets I care about, including one that's got to be 30 ft away through two stone walls, 18-24" thick. Having said that I've never really noticed any problems with the hand held remotes, including on a couple of occasions turning on a spotlight in a window to play in the snow with my toddler, (should really install a proper one) Actually that reminds me, bradburts makes a good point with the IR TV adaptor, my system potentially switches the neighbours sockets and theirs could do mine, so if you're doing something more important than switching on lamps it might be safer.
Colin

fordp
Posts: 8
Joined: Fri Sep 09, 2011 12:07 pm

Re: Controlling a mains power socket switch? (home automation)

Thu Dec 01, 2011 2:15 pm

Quote from kme on November 28, 2011, 18:46
Quote from celerity on November 28, 2011, 18:08
We use 240V here in the UK, although I'm sure that doesn't alter what you're saying.Well, actually you don't. You run 230V and have done that for 10-15 years when EU harmonized UK 240V with continental Europe's 220V and everything ended up being 230V. It really didn't matter much as the switch was within the normal voltage fluctuation anyway. But it did limit some confusion. EU actually does do make sense some times.

Most peoples mains voltage in the UK has not changed for the last 50 years. We are now nominally 230V and were nominally 240V but there is a wide tolerance on the voltage supplied so most transformers were not changed when we switched to 230V AC Nominal.

Not a lot of people know that ;)

bradburts
Posts: 341
Joined: Sun Oct 02, 2011 7:07 am

Re: Controlling a mains power socket switch? (home automation)

Thu Dec 01, 2011 3:03 pm

I am on 248V.....
I know that as my inverter will shutdown if it gets much higher.

PS
LIRC can be hard work if you are tempted to the IR route. If you are lucky then the BBSB IR receiver dongle will contain a processor and just send a discrete on/off to the plug. If so then you could rip the receiver off and activate the signal using GPIO. Not looked myself.

glenalec
Posts: 12
Joined: Tue Dec 13, 2011 3:32 am
Location: Wollongong, Australia
Contact: Website

Re: Controlling a mains power socket switch? (home automation)

Tue Dec 13, 2011 3:45 am

http://www.glenalec.net/DMCTO/.....ndex.shtml details a little box I built with a solid-state relay so my students could switch stage-lighting with an arduino.
I can't stress enough though, be very very carefull with mains voltages. If you are not very very confident (and preferably trained!), you should get an electrician to do the wiring at this level really - it will cost, but not as much as dying! Once the mains stuff is all sealed up, you can play on the low-voltage side of the circuit with relative safety. :-)

bradburts
Posts: 341
Joined: Sun Oct 02, 2011 7:07 am

Re: Controlling a mains power socket switch? (home automation)

Tue Dec 13, 2011 9:47 am

Great post!
Worth adding that the SSR is rated 10A into a resistive load. A motor would be a lot less, 3A for safety.

Also bumped into http://www.tinkerforge.com/
You have to buy a processor module but I am guessing that the bricks operate on SPI and so could be controllable via the RPI. Anyone here electronically minded and can figure out what the interface is from the pictures?

universalair
Posts: 7
Joined: Tue Dec 13, 2011 11:04 am
Contact: Website

Re: Controlling a mains power socket switch? (home automation)

Tue Dec 13, 2011 12:08 pm

I've just taken a look at that TinkerForge relay bricklet, it's simple GPIO interface, send 3.3V or 5V to pins 7 or 8 on the connector will activate the relays. It looks like the board also has a small ID chip that works off I2C that has nothing to do with activating the relays but just provides ID information to the master board. Also it looks like the microcontroller is actually assigning a bit of the I2C address to this ID chip, which means they're doing some crazy stuff involving dynamically reassinging I2C addresses to allow daisychaining of more devices than there are actual addresses available.

Incidentally, we've got a relay board that just went into manufacturing, it's got four relays (screw terminals), as well as current sensors on each of the channels, and the whole thing operates over I2C which you can directly attach to Raspberry Pi.

The board was designed to plug into a microcontroller module, so it's got an IR receiver as well, which you could plug into Raspberry Pi's GPIO port as well.

But we do have a couple of modules that plug into that relay board which makes it controllable over WiFi or Bluetooth, but don't hold your breath for those, they're experimental at this stage.

User avatar
Gert van Loo
Posts: 2486
Joined: Tue Aug 02, 2011 7:27 am
Contact: Website

Re: Controlling a mains power socket switch? (home automation)

Mon Dec 19, 2011 12:56 pm

I am in two minds about this but here it goes:
This weekend I made a tiny main-switch circuit board (The board is 55x55 mm, single sided and dedicated to control three Solid state relays, SIP4 footprint.)
My biggest worry:
If anybody dies using the circuit I will feel very bad. Also it is rather a risk in the current climate of 'sue the pants of everybody' so I am reluctant to give out the board.
On the other hand without a decent board there is the risk of amateurs with even less knowledge then I have of electronics and electrical circuits trying to do the same. Then if somebody dies and they did NOT use my board I will fell guilty as well.
Catch 22... :-(

bradburts
Posts: 341
Joined: Sun Oct 02, 2011 7:07 am

Re: Controlling a mains power socket switch? (home automation)

Mon Dec 19, 2011 5:18 pm

Tough one.

You may be responsible if someone uses your board. You will not be responsible if someone goes it alone. You cannot protect the fearless, the careless, the unfortunate or the stupid. Not saying which one is me ;)

I think that you should not offer the board. There are mains boards that you can buy. Perhaps you could help double check that this the board can be interfaced to your Gert board?
https://shop.tinkerforge.com/dual-relay-bricklet.html

The trouble is that if someone takes a shot at you, with or without cause, you cannot continue your good work.
There are a lot of regulations in the UK, CE marking etc which could be a pain to follow.
That's why I like software, less laws to follow :)

IanH
Posts: 68
Joined: Mon Dec 19, 2011 5:53 pm

Re: Controlling a mains power socket switch? (home automation)

Mon Dec 19, 2011 6:20 pm

For what it's worth, at my work we have a few Aviosys IP Power 9258S (see e.g. http://www.digidave.co.uk/jsho.....?xProd=211) switches, and they're not at all bad.

For a DIY mains switch, try hacking a remote-controlled mains switch (Maplin sell these: there's a switch unit which plugs into a mains socket and a hand-held radio transmitter which can switch a number of them on or off). The computer can connect to the safe, low voltage transmitter, and the nasty mainsy bit can work unmodified.

I've got a proof-of-concept of this in my Big Box of Unfinished Projects - not really a publishable design, but I can give pointers to the relevant data if you're interested.
https://github.com/IanHarvey

bradburts
Posts: 341
Joined: Sun Oct 02, 2011 7:07 am

Re: Controlling a mains power socket switch? (home automation)

Mon Dec 19, 2011 6:34 pm

Yes I have used those at work. Good easy to use kit. Reallly easy to switch kit on and off in the test room when our rig crashes. Gained a few pounds after installing those.....or was that the doughnuts?
Expensive though.

Return to “Other projects”