Current Cost

7 replies [Last post]
BoxingOrange
Offline
United Kingdom
Joined: 11 Jun 2010

Having a bit of bother getting the Current Cost Envi 128 working.  It's receiving information from the wireless transmitter, I can see data on the display.  I've connected the display to the Livebox, using a Current Cost RJ45-USB cable.  I then had to get a USB A Female to B Male, http://cgi.ebay.co.uk/ws/eBayISAPI.dll?ViewItemVersion&item=250497626890..., to connect the Current Cost to the Livebox.  I'm using build 250.

The problem I'm having is that the Livebox can't seem to connect to the Current Cost.  If I run the xap-currentcost script manually I get the following output :-

# ./xap-currentcost

Current Cost Connector for xAP v12
Copyright (C) DBzoo, 2009

br0: address 192.168.1.5
br0: netmask 255.255.255.0
Autoconfig: xAP broadcasts on 192.168.1.255:3639
xAP uid=FF00DC00, source=dbzoo.livebox.CurrentCost
Broadcast socket port 3639 in use
Assuming a hub is active
Socket port 3639 in use
Socket port 3640 in use
Socket port 3641 in use
Discovered port 3642

Using serial device /dev/ttyUSB0

Unable to open the serial port /dev/ttyUSB0

I've tried other USB port numbers, but I get the same problem, I've also tried rebooting the Livebox.  I can only think that I haven't connected the Current Cost to the Livebox correctly, but I can't see another accessable USB port on the Livebox. 

Any ideas? 

I'm keen to get this going so that I can move onto your add-on unit and start turning things off remotely.  On that subject, I noticed Asda selling a pack of 3 RF plug sockets for £5.  Any chance of getting those going, I'd be happy to test, but I think I'll need more that 3.

Thanks for any help,

Karl

PS - I like the new notification feature, keep up the good work.

BoxingOrange
Offline
United Kingdom
Joined: 11 Jun 2010
Troubleshooting

Having read the troubleshooting section, I've tried the debug mode for xap-currentcost, and the microcom program, outputs shown below, but it does seem to be a port problem, can you describe how the Current Cost should be connected to the Livebox please.  The xap-snoop didn't show anything more that I could already see in the xFx Message Viewer.

 

# cd /usr/bin
# xap-currentcost -d5 -s /dev/ttyUSB0 -i br0

Current Cost Connector for xAP v12
Copyright (C) DBzoo, 2009

br0: address 192.168.1.5
br0: netmask 255.255.255.0
Autoconfig: xAP broadcasts on 192.168.1.255:3639
xAP uid=FF00DC00, source=dbzoo.livebox.CurrentCost
Broadcast socket port 3639 in use
Assuming a hub is active
Socket port 3639 in use
Socket port 3640 in use
Socket port 3641 in use
Discovered port 3642

Using serial device /dev/ttyUSB0

Unable to open the serial port /dev/ttyUSB0
# microcom -s 57600 /dev/ttyUSB0
microcom: can't open '/dev/ttyUSB0': No such device
# xap-currentcost -d9 -s /dev/ttyUSB0 -i br0

Current Cost Connector for xAP v12
Copyright (C) DBzoo, 2009

br0: address 192.168.1.5
br0: netmask 255.255.255.0
Autoconfig: xAP broadcasts on 192.168.1.255:3639
xAP uid=FF00DC00, source=dbzoo.livebox.CurrentCost
Broadcast socket port 3639 in use
Assuming a hub is active
Socket port 3639 in use
Socket port 3640 in use
Socket port 3641 in use
Discovered port 3642

Using serial device /dev/ttyUSB0

Unable to open the serial port /dev/ttyUSB0
#

brett
Offline
Providence, United States
Joined: 9 Jan 2010
You've plugged it into the

You've plugged it into the wrong USB port you don't need any adapters.

There are two USB ports a Type A and a Type B.

See the picture:

Use the one next to the 2x BUTTONS on the white plastic side of the case.  You have pressed these at some point in time to reflash your livebox with the HAH firmware !!  Guess you didn't notice the USB port underneath.

Brett

BoxingOrange
Offline
United Kingdom
Joined: 11 Jun 2010
Now I feel really stupid!  Oh

Now I feel really stupid!  Oh well, it's not the first time and it won't be the last. 

Pachube link next .......

derek
Offline
Glasgow, United Kingdom
Joined: 26 Oct 2009
Asda RF sockets

I just decoded the bitstream from an Asda RF Tx handheld. Five quid for three sockets is pretty good.

Bitstream is around the same length (25 bits) as the BBSB units use, but with a different encoding format. The second last bit is a 1 for on commands and a 0 for off commands. Inter RF burts time is a bit less than used by the BBSB.

I gotta 'scope out the bit times before I can see if new AVR firmware will be needed, or if it's just a simple tweak to the [RF] section of xap-livebox.ini file.

BoxingOrange
Offline
United Kingdom
Joined: 11 Jun 2010
Wireless Control

Nice work Derek, you didn't hang about there.  Sound's like I should go and get some.  Will there be a limit to the number of these the HAH can control, I presume there is some limit to the channels available on any frequence?  Also, is a different firmware required for the different types of RF equipment, so that if I start to buy one type, I then have to stick with that type because mixing the different types isn't possible.  If so, which would you recommend?  I've got a plan in mind to control my main lighting later, ie turning off/on and dimming lights around the house, not just plugin lamps.

I'm hoping to get the HAH parts bundle next pay day with a short term plan to use Google calander to turn off the "standby" equipment overnight.

I'm also thinking of getting one of those wireless controllers for the centeral heating, do you think the HAH would be able to control one of those as well?

BoxingOrange
Offline
United Kingdom
Joined: 11 Jun 2010
Pachube

Just to prove I did find the right USB port in the end, here's a link to my Pachube feed, http://www.pachube.com/feeds/8538.

derek
Offline
Glasgow, United Kingdom
Joined: 26 Oct 2009
Choosing an RF socket

The way that the Asda RF sockets work is interesting. The encoder chip inside these has a 20bit long, one time programmable (at factory) 'randomly programmed' sequence that is unique to the transmitter. Then there are some extra bits which get set lo or hi depending on the logic levels on some of the pins on the chip. The RF receiver 'learns' to respond to a specific sequence of bits, so there is no real upper limit on how many sockets you have in any one setup.

 

For now, the socket type is fixed. Either Lidl or HomeEasy/BBSB. There are a max of 12 on/off command pairs defined in the xap-livebox.ini file. We do plan to have a 'generic' solution that will use an xAP message to define ALL of the characteristics of the RF transmission to be sent (and cause it to be sent). We have a design for this, but it's still on paper (last seen on Brett's desk). 

That said, right now, there isn't any AVR firmware to support the Asda units. So, the best choice right now is the Home Easy/BBSB units. These are readily available on eBay and are proven to work. I wrote a little program that generates the .ini file on/off entries for a given BBSB House code/unit code.

 

As for the wireless heating controller, it would have to be looked into. I've spent quite a lot of cash/time on various RF gadgets and can't afford to hack the protocol for many more. 

Work on RF reception is also progressing well. This is harder than transmission, but does open up a wide range of possibilities (like xAP enabling wireless PIRs and wireless door contacts). RF reception is likely to work in conjunction with an external microcontroller unit that attaches to the HAH via the xap-bridge process.

Hardware Info