Connecting the RF mains sockets to the HAH

20 replies [Last post]
rwillett
Offline
United Kingdom
Joined: 13 Apr 2012

Thanks to Derek I now have the hub all working and can see the IP address from my desktop.

I'm trying to get the RF receivers working and I think I'm missing some simple step somewhere.

I have the LIDLRF sockets as supplied by Derek.

I think the setup is:

  1. Goto the Home Automation Webpage -> Automation Tab and then to Configure
  2. I enter the On string "01020320028A05DC028A05DC0514032004B00C029C401515B155561600" in the RF1 section and the Off String "01020320028A05DC028A05DC0514032004B00C029C4015CB1555555540" in the Off section.
  3. I turn the mains RF receiver on and I hold down Teach-In Button on the RF socket and save my settings.

If this is the sequence it doesn;t seem to do anything for me.

I have also gone to the Control tab, selected the RF 1 checkbox, held the Teach In Button, selected the Action On in the pulldown and "turned it on" according to the control panel.

I didn't think I needed to actually script anything to turn the RF receivers on.

have I been dense and misssed an obvious step?

Thanks,

Rob

derek
Offline
Glasgow, United Kingdom
Joined: 26 Oct 2009
You are getting there ...

Note that you don't actually 'train' the socket at point 3. Training isn't done during the specification of the URF strings, only once these have been saved down.

You are correct in the procedure for 'training' from the 'Control' tab. Strange that this isn't working for you. 

One thought .... did you attach the 15V feed wire between the Livebox PCB and the HAH PCB?

Derek.

rwillett
Offline
United Kingdom
Joined: 13 Apr 2012
Hi Derek,Yes, the 15V is

Hi Derek,

Yes, the 15V is attached to the router board and to the HAH PCB.

I thought after reading more of the e-mails going back, I needed to write a script but that doesn't appear to be the case.

Given the issues I had before and power, is there somewhere on the HAH board I can check the voltage "just-to-sure".

Does the LIDL socket lights change colour at all to indicate they've been taught?

Rob

derek
Offline
Glasgow, United Kingdom
Joined: 26 Oct 2009
No script required

Operation of the RF sockets from the HAH browser UI does not need any additional scripting.

If you have a multimeter to hand (and have a steady pair of hands) you can check for 12VDC between pin 1 of the RF module and pin 2 of the RF module. Pin 1 is ground. Be careful not to let the probes slip & short out the supply!

Also, see the circuit diagram at http://www.dbzoo.com/livebox/assembly#hah_pcb_assembly_notes

and with power off, buzz out the line from pin 3 on the RF module to pin 19 on the AVR chip.

Sadly, the Lidl socket light does not change colour during training.

Derek.

rwillett
Offline
United Kingdom
Joined: 13 Apr 2012
No joy...

I've checked the voltage and got 13V at Pin 2 to Ground. I can check the resistance from pin 3 on the RF module to Pin 19 and that also is connected (no resistance).

I tried two sockets now and no joy on either.

The wireless socket is wobbly on top of the three pins but seems to have made a good connection. I just now soldered onsome extension cables to the RF socket to make sure it was properly connected, it was but I still have the same result.

The livebox Wiki mentions

"the PCB has a solder pad (marked '15V' - shown front right on the picture below, more recent versions of the PCB have this connection near the LCD connector, it's marked 'LSP1') - solder one end of the red wire to this. The other end should be soldered to the 15V rail on the Livebox PCB (see RF 15v for details)."

My board doesn;t look like the one in the picture here http://www.dbzoo.com/_detail/livebox/hah-external_rf_1.jpg?id=livebox%3A... but there's no LSP1 I can see on my PCB.

I also noticed that there are two missing components on the PCB directly between the RF module and the edge of the PCB adjacent to the cable socket, these appear to be a diode of some description and a transitor shape, e.g. a half circle (ish). There were no components left over for these. Are these now redundant?

Any suggestions now?

Rob

g7pkf
Offline
United Kingdom
Joined: 11 Jan 2011
I cannot post a photo on here but heres a link.

If you have 13v between pin2 and ground (on the rf board) you have your 15V wire connected-it goes through a 12v voltage regulator.

 

http://www.packetradio.co.uk/gallery/index.php/HAH/HAH_newpcb  the white wire near the lcd "pot" and connector is the 15v supply to the board (this is from memory)

rf1.on=01020320028A05DC028A05DC0514032004B00C029C401515B155561600
rf1.off=01020320028A05DC028A05DC0514032004B00C029C4015CB1555555540

check for the strings carefully there was a typo a while ago

once you have the RF strings inputed save your settings and reboot the HAH (admin management reboot)

 

then

the sequence is (i think as i only use 302's) push the button on the plug and hold then go to rf 1 control on the HAH GUI and turn on release button on mains plug.

your HAH should now control the socket on/off.

 

info from http://www.dbzoo.com/livebox/universalrf

 

also see this thread someone else had problems but they were rectified:-

 

http://www.homeautomationhub.com/content/trouble-getting-rf-working

 

that should do it. no scripting required the way to look at is "if" you had a handheld remote you put the plug into learning (by holding button )then send the on command etc, the HAH takes the place of the handheld remote

 

the spare components you refer to i belive are a temp sensor and a shoctky diode, both for one wire bus so no relation to RF and unused for the most part.

 

let us know how you get on

derek
Offline
Glasgow, United Kingdom
Joined: 26 Oct 2009
Working Lidl socket

Hi Rob,

I've mainly moved to using HE sockets, but do have a Lidl one that switches a light in my basement. This was trained over a year ago & works reliably.

FYI, my HAH is on build 306.7/3.4.

I've cut and pasted the codes from my .ini file that are working my Lidl socket ...

 

rf1.on=01020320028A05DC028A05DC0514032004B00C029C4015CB1555861B000
rf1.off=01020320028A05DC028A05DC0514032004B00C029C4015CB1555855840

To make doubly sure of these, I 'trained' a brand new Lidl socket. It trained on the first attempt & responds as expected.

If these don't work for you, we might go down the route of sending you a replacement RF module ... just in case it's faulty. You measured 13V across the module supply lines - that strikes me as a bit on the high side. I have 12.12V on mine. We use 12V as that is the max rating for the module & gives us the best range of transmission.

So, give these codes a shot & let us know how you get on.

Cheers,
Derek.

p.s. One mad thought ... you do have an antenna wire connected to your RF module?

 

rwillett
Offline
United Kingdom
Joined: 13 Apr 2012
In reply to g7pkf (ham

In reply to g7pkf (ham radio?),

1. I have 12-13V between pin 2 and pin 1. Your picture is of a different PCB to mine so can't compare. The fact I have 12V (or whatever it was) and pin 3 is going to the MCU gives me confidence that at least this part of the system is soldered correctly.

2. Checked the strings and they are correct, no spaces at each end and no typos.

3. Have now rebooted the Livebox, which I didn't do yesterday. This has made no difference.

4. Have already printed out and read the link http://www.dbzoo.com/livebox/universalrf.  I think I'm doing the training sequence correctly now.

5. I did read the thread http://www.homeautomationhub.com/content/trouble-getting-rf-working. I checked the data pin was corrently soldered and that looks OK. I am wholly unclear as to the use of microcom and urf. I googled and searched on the website for all references to microcom and none of them give me any idea what to use. I kill off xap-livebox using /etc/init.d/xap stop, I then try and use /dev/ttyS0 (is that the right device?) with 57600 as the speed but get nothing back on the console. I can see that the idea is to send the right datastring down but without knowing the correct syntax I feel a bit useless.

6. I will be using the spare parts eventually :)

Thanks for all the help,


Rob

rwillett
Offline
United Kingdom
Joined: 13 Apr 2012
Derek,I realised I hadn't

Derek,

I realised I hadn't upgraded my HAH and was on an old version (287?). I have now upgraded to 306/1.0. My bad, hadn't realised I needed to do that. One more line to add to the Wiki for me.

Your codes are different to mine, so will try those. have now tried those and no changes. Rats, I really thought the upgrade would help.

Measured the volatge and am gettinf 12.02V.

I do have the antenna wire connected. I have checked the module for short connections and the only one I can see (and I think it's correct) is a connection from the antenna to one end of the PCB capacitor C1. The attached photo shows the connection between 1 and 2.

AttachmentSize
RF Module.jpg 20.28 KB
allanayr
Offline
Ayr, United Kingdom
Joined: 25 Sep 2011
Just a quick pointer

I think you need to be on Build 306/3.4 to ensure that you have the right ATMega software. When you boot up the box, the LCD should read "Booting v 3.4" or something similar. The latest code is required for the URF to work correctly, I believe.

rwillett
Offline
United Kingdom
Joined: 13 Apr 2012
What's the 3.4 part of the

What's the 3.4 part of the 306/3.4 please? is this the LCD saying "Booting 3.4"?

if that is the case then I'm on 306 and "Booting V3.4".

Rob

derek
Offline
Glasgow, United Kingdom
Joined: 26 Oct 2009
Build number/AVR firmware version

On the top RHS of every HAH web UI page, you should see 'Build: vvv.v/x.x'

vvv.v is the HAH firmware build. x.x is the AVR code version.

If you are either using the old mega8 AVR chip or your AVR isn't talking to the HAH, you will see x.x as 1.0

If you have the newer ATMEGA328P chip, you should see x.x as 3.4

Power cycle the HAH (not just reboot it) and check what the web UI shows. If you have the 328 AVR chip and you see the web UI showing 1.0 ... there is a basic problem with the HAH talking to your PCB.

Derek

rwillett
Offline
United Kingdom
Joined: 13 Apr 2012
Ah! We could be getting

Ah! We could be getting somewhere. I have 306/1.0 displayed top right BUT I have "Booting 3.4" on the LCD at startup.

The chip shows AVR328 silkscreened on the top.

How can I check anything else?

Rob

derek
Offline
Glasgow, United Kingdom
Joined: 26 Oct 2009
Interesting ...

So, the LCD shows 'Booting 3.4' because there is code in the sketch that the AVR runs to print this directly to the LCD. This also tells us that you do indeed have the 328 AVR chip with the latest code onboard.

However, the Version that appears on the HAH Web UI is retrieved from the PCB via the HAH sending a 'version' command to the PCB. If there is no reply from the PCB, the version is shown as 1.0 - you absolutely should see 3.4 on the web UI.

The fact that you see the 'Booting ...' message on the LCD gives confidence that the AVR is starting up properly.

So, I'm wondering if the comms to your AVR is connected up properly. Can you read the inputs on the PCB via the web UI. Can you turn the relays on the PCB on and off?

Derek.

garrydwilms
Offline
United Kingdom
Joined: 31 Mar 2011
Bigger issue than Urf

Rob. You appear to not be talking to your AVR at all. 

I assume if you switch relays via the web GUI you don't hear them click also?  

This has happened to me a few times but always after I have fried my chip by dodgy wiring into my relays, etc.

I think you need to double check every connection and maybe remove and reseat the AVR chip. It's no point going any further until 3.4 is displayed on the web GUI. 

Sure there are other things to check that others may be aware of but only advice I can offer at this stage is to recheck all connections

Keep us informed of your progress!

 

Garry

rwillett
Offline
United Kingdom
Joined: 13 Apr 2012
Derek,I have no inputs on the

Derek,

I have no inputs on the PCD to read from :) My intention was to send mains power cycle commands.

However I can change the LCD message from the Control Screen in the GUI. I just changed the IP address to "This is a test" and it works correctly.

garrydwilms
Offline
United Kingdom
Joined: 31 Mar 2011
What about relays?

Can you hear them clicking. Strange you can control LCD but displaying code 1.0 in GUI. As far as I remember 1.0 is bascom code and sounds like your AVR has non-bascom v3.4 flashed on it. 

derek
Offline
Glasgow, United Kingdom
Joined: 26 Oct 2009
Input test

Just short one pair of the input connectors together with a piece of wire & then refresh the web UI. You should see the input state change from 'off' to 'on'.

The LCD text shows that comms 'to' the PCB is good. However, the web UI needs comms both 'to & from' the PCB to show that version number correctly.

Off to catch a flight now. Won't be back online 'till later (much later if I go out for a curry!)

Derek.

rwillett
Offline
United Kingdom
Joined: 13 Apr 2012
Garry,OK, hadn't thought

Garry,

OK, hadn't thought about simply turning the relays on and off and listening for the click. Hold on....right, back now.

I can turn on and off Relays 2-4. I hear a gentle click. Relay 1 makes no sound whether on or off.

I have reseated the AVR chip but will do so again.

This to me means a dodgy connection. Is this the general view?

Rob

rwillett
Offline
United Kingdom
Joined: 13 Apr 2012
Shorted out a pair of

Shorted out a pair of connectors and got no change from "?" in the GUI. I do not have On or Off in the Input State Section on the Control tab.

I am taking this to mean I am not getting anything back.

Rob

admin
Offline
Joined: 26 Oct 2009
You can force the xap-livebox

You can force the xap-livebox program to communicate at a specific version if auto detection of the AVR firmware version is failing using the following setting in your /etc/xap-livebox.ini file.   Until version 3.4 is detected you will not be able to send URF command strings this may workaround your detection problem.  If that is all that is failing as you suggest that relays are working ok.

[hardware]
major=3
minor=4
Hardware Info