RGB Led-bar

Show or discuss your existing Home automation project here, so a detailed explanation!.....
Bwired
Administrator
Administrator
Posts: 4704
Joined: Sat Mar 25, 2006 1:07 am
Location: Netherlands
Contact:

RGB Led-bar

Post by Bwired »

Look up!
BTW: Lets make a chain of ledbars [:o)]
User avatar
Noel
Senior Member
Senior Member
Posts: 1887
Joined: Tue Feb 12, 2008 12:13 am
Location: Netherlands
Contact:

RGB Led-bar

Post by Noel »

<blockquote id="quote"><font size="1" face="Verdana, Arial, Helvetica" id="quote">quote:<hr height="1" noshade id="quote"><i>Originally posted by Digit</i>
<br />See the start of this topic[:)]
<hr height="1" noshade id="quote"></font id="quote"></blockquote id="quote">I'll be damned :/

---
Never start anything you can't fi
Jfn
Member
Member
Posts: 332
Joined: Tue Feb 26, 2008 2:01 pm
Location: Netherlands
Contact:

RGB Led-bar

Post by Jfn »

Nice option!

One of the things I am planning on to implement on my own website.

<blockquote id="quote"><font size="1" face="Verdana, Arial, Helvetica" id="quote">quote:<hr height="1" noshade id="quote"><i>Originally posted by Digit</i>
<br />Update again...
Since the LED-bar is banned to stay in the office for now, i thought to do something funny with it; it's controllable from the website. http://www.hekkers.net/test/Cam1.aspx [:o)]
<hr height="1" noshade id="quote"></font id="quote"></blockquote id="quote">Als het niet kapot is, niet repareren!
Droezel
Member
Member
Posts: 104
Joined: Sun Jul 29, 2007 4:02 pm
Location: Belgium

RGB Led-bar

Post by Droezel »

Following Jfn's example I created a little VB program to control the ledbar. I'm having difficulties with the checksum starting value. When I use different lead-in and lead-out effects the checksum changes, I've tried a couple combinations and found the following:

'FA / FE checksum dec 49, hex 31
'FE / FA checksum dec 49, hex 31
'FE / FE checksum dec 53, hex 35
'FA / FA checksum dec 53, hex 35
'FC / FA checksum dec 55, hex 37
'FA / FC checksum dec 55, hex 37
'FA / FF checksum dec 50, hex 32
'FA / FG checksum dec 51, hex 33
'FA / FH checksum dec 60, hex 3C
'FA / FI checksum dec 61, hex 3D
'FA / FJ checksum dec 62, hex 3E
'FA / FK checksum dec 63, hex 3F

Does anyone see any kind of system/logic?
Digit
Global Moderator
Global Moderator
Posts: 3388
Joined: Sat Mar 25, 2006 10:23 am
Location: Netherlands
Contact:

RGB Led-bar

Post by Digit »

You have to calculate the checksum on the whole data packet except for the <IDxx> and <E>. All the rest needs to be XOR-ed. Works always.
My checksum starting value is always 0.[:)]

Took a while before i figured that out, but afterwards rereading the manual, it makes sense.
Droezel
Member
Member
Posts: 104
Joined: Sun Jul 29, 2007 4:02 pm
Location: Belgium

RGB Led-bar

Post by Droezel »

hah, just found that out myself (not really myself, found this online: http://www.sonologic.nl/Projects/VellemanDisplay )
Lennart
Member
Member
Posts: 497
Joined: Sat Jul 22, 2006 10:58 am
Location: Netherlands

RGB Led-bar

Post by Lennart »

Hi Jfn,

I've been playing around with this ledbar and your example code (thanks for posting this!).

A few observations/questions:

- Instead of:

my $fh = FileHandle->new("rss1.txt");
my $feed = $p->parse_file($fh);

you might want to use:

my $uri = "http://nu.nl/deeplink_rss2/index.jsp?r=Algemeen";
my $feed = $p->parse_uri($uri);

for a direct RSS feed -> ledbar experience.

- Note that you might need to increase the usleep time to get rid of timing/overflow issues (3000 to 10000 microseconds worked well in my case).

- I noticed that the Perl code does not work on Win32 ActiveState Perl (both 5.8 and 5.10) if the ledbar is connected using the USB port ("invalid COMMPROP block length" error). However, with a real RS232 port, it works like a charm. Any ideas?

- Could this ledbar be connected to an RFXCOM ethernet device and a serial module, to "ethernetify" the ledbar, like Chak, DMB and others have been doing with the Xanura CTX35? Hmm, nice thing to try out sometime!

- Alenco (my "all things ledbar" reference shop till now, and selling other interesting LED stuff as well) is selling a similar ledbar for EUR 226,- ex. VAT, which is basically 2 - 2,5 times the Conrad price... See http://www.lichtkrant.com

- In your code, you use "<BE>05<E>" and "<BF>06<E>" before and after each page data message. I understand, according to the protocol, that these are for setting the brightness level (that's what the B does). First to 0% to stop the display from flickering while sending, by sending BE, I guess. But what does the F in BF do? Put it back to 100%? According to specs, the only options here are A through D (so even E = 0% brightness is officially not an option ;-).

Anyway, just some thoughts...

Lennart
Digit
Global Moderator
Global Moderator
Posts: 3388
Joined: Sat Mar 25, 2006 10:23 am
Location: Netherlands
Contact:

RGB Led-bar

Post by Digit »

@lennart:
I've seen these <BF> codes to, while monitoring what the Windows-tool on the CD sent to the LEB-bar. That surprised me to.

I can do a test later this evening (have to go now) with LED-Bar connected to RFXCOM+Serial module. Haven't tried that yet.
Lennart
Member
Member
Posts: 497
Joined: Sat Jul 22, 2006 10:58 am
Location: Netherlands

RGB Led-bar

Post by Lennart »

@Digit

If you could do a test with the ledbar connected to an RFXCOM+serial later on, that would be great.

I'm also interested in any settings that you might need to change in the RFXCOM ethernet device to get this working. (Chak mentioned this for getting the CTX35 to work on the RFXCOM+serial.)

Thanks!

Lennart
Digit
Global Moderator
Global Moderator
Posts: 3388
Joined: Sat Mar 25, 2006 10:23 am
Location: Netherlands
Contact:

RGB Led-bar

Post by Digit »

It works, as i expected.
These were the settings used:
Image
Jfn
Member
Member
Posts: 332
Joined: Tue Feb 26, 2008 2:01 pm
Location: Netherlands
Contact:

RGB Led-bar

Post by Jfn »

There was a bug in my ActivePerl installation where I originally started coding the script. It prohibited me to directly request from an URL, so I circumvented it by doing a 'wget' first to get the data I needed. I will be changing the code in the future because I want to add more features to the ledbar.

<blockquote id="quote"><font size="1" face="Verdana, Arial, Helvetica" id="quote">quote:<hr height="1" noshade id="quote"><i>Originally posted by lennart</i>

- Instead of:

my $fh = FileHandle->new("rss1.txt");
my $feed = $p->parse_file($fh);

you might want to use:

my $uri = "http://nu.nl/deeplink_rss2/index.jsp?r=Algemeen";
my $feed = $p->parse_uri($uri);

for a direct RSS feed -> ledbar experience.
<hr height="1" noshade id="quote"></font id="quote"></blockquote id="quote">1000us is still working perfectly here, no bufffer-overflow issues yet.

<blockquote id="quote"><font size="1" face="Verdana, Arial, Helvetica" id="quote">quote:<hr height="1" noshade id="quote">- Note that you might need to increase the usleep time to get rid of timing/overflow issues (3000 to 10000 microseconds worked well in my case).
<hr height="1" noshade id="quote"></font id="quote"></blockquote id="quote">Might have to do with the the way the USB to COM driver implements certain functions. Have you tried using HHD Serial Port Monitor to check what happens?
<blockquote id="quote"><font size="1" face="Verdana, Arial, Helvetica" id="quote">quote:<hr height="1" noshade id="quote">
- I noticed that the Perl code does not work on Win32 ActiveState Perl (both 5.8 and 5.10) if the ledbar is connected using the USB port ("invalid COMMPROP block length" error). However, with a real RS232 port, it works like a charm. Any ideas?
<hr height="1" noshade id="quote"></font id="quote"></blockquote id="quote">I do not know. I used the original Windows software and HHD Serial Port monitor to check what strings where send to the led-bar and that is what I used in my code. It seems to work (and what is what matters for now).
<blockquote id="quote"><font size="1" face="Verdana, Arial, Helvetica" id="quote">quote:<hr height="1" noshade id="quote">- In your code, you use "<BE>05<E>" and "<BF>06<E>" before and after each page data message. I understand, according to the protocol, that these are for setting the brightness level (that's what the B does). First to 0% to stop the display from flickering while sending, by sending BE, I guess. But what does the F in BF do? Put it back to 100%? According to specs, the only options here are A through D (so even E = 0% brightness is officially not an option ;-).
<hr height="1" noshade id="quote"></font id="quote"></blockquote id="quote">

Als het niet kapot is, niet repareren!
Lennart
Member
Member
Posts: 497
Joined: Sat Jul 22, 2006 10:58 am
Location: Netherlands

RGB Led-bar

Post by Lennart »

@Jfn: I didn't try the port monitor yet; I just used your code to experiment with. What I get from looking at the Win32::SerialPort code, is that the serial port properties as reported by the USB driver seem to be different than expected by the Perl module.

@Digit: Thanks for trying the RFXCOM -> serial setup! One question though: did you use the supplied NewSign software to try this, or did you use the Perl code? What I'm wondering is what the usleep wait time will do in the Ethernet -> serial context, as timing is now a lot less direct...

Lennart
Digit
Global Moderator
Global Moderator
Posts: 3388
Joined: Sat Mar 25, 2006 10:23 am
Location: Netherlands
Contact:

RGB Led-bar

Post by Digit »

Lennart,

I used my own code, based on the manual posted by Jfn. I only used PortMon (from Sysinternals) in combination with the supplied software to figure out the checksum. 1 ms delay between every byte works ok, haven't tried anything else yet so can't tell anything about that.
Now the LED-bar is on the COM1 of my PC, with a small quick&dirty IP->COM gateway i wrote, to cover the distance between the LED-bar and my HA-PC[:)]
User avatar
Snelvuur
Forum Moderator
Forum Moderator
Posts: 3156
Joined: Fri Apr 06, 2007 11:01 pm
Location: Netherlands
Contact:

RGB Led-bar

Post by Snelvuur »

Nice, i was waiting for my rgb led bar.. but i got this "13/03/2008 / 11:38 ROTTERDAM (FLOW) Adres onjuist, bestaat niet, Znd als weigering in opslag. Weig.nr.: 60223, Het adres van de geadresseerde bestaat niet. Kunt u de correcte adresgegevens doorgeven zodat de zending zo spoedig mogelijk kan worden aangegeven e-mail"

And the funny part is that i ordered something the next day and that is allready received. Sometimes people are really stupid..

// Erik (binkey.nl)
User avatar
Snelvuur
Forum Moderator
Forum Moderator
Posts: 3156
Joined: Fri Apr 06, 2007 11:01 pm
Location: Netherlands
Contact:

RGB Led-bar

Post by Snelvuur »

Everything seems to work, i only dont have windows with perl. So i changed it so it will check if its windows or linux.

Only thing that does not work, after it sets the pages.. it only displays page A constantly and doesn't go through the other ones.. any ideas? or did i made a fubar.

<b>Download Attachment:</b> [img]images/icon_paperclip.gif[/img] ledbar.txt<br />3.35KB

yeah remove the hashes at the end where it says "to_serial_port" was still playing a bit :)

// Erik (binkey.nl)
Post Reply

Return to “Home Automation Projects”