FS20 Binding problems

119 views
Skip to first unread message

Timo K

unread,
Jun 6, 2014, 1:10:42 PM6/6/14
to ope...@googlegroups.com
Hello everyone,

for a few days now i'm trying to get my SCC from busware (http://busware.de/tiki-index.php?page=SCC) working with OH and the Pi. It is compatible with culfw (already preinstalled), so it should be working with OH (i guess).
Of course i started by installing the FS20 Binding and "configuring" it, even though there's not that much to configure. As expected, it did not work that easily :D

My system:
- Raspberry Pi with Wheezy (I'm not quite sure which verison, but kernel version 3.10.25)
- SCC from busware
- OH 1.4.0 (Bindings are version 1.3.0, and one is even 1.5.0, you'll read about later)

After some trial and error, i gained the following knowledge:

- At first, you need to configure some GPIO Pins of the Pi with some kind of script: http://busware.de/tiki-index.php?page=SCC_Installation
- I read somewhere, that there's a difference between "real" serial connections and virtual ones (via USB) concerning the baud rate. For USB you can use whatever baud you prefer, but for real serial connection you need to use the one defined for the device. After a little bit of surfing i found out, that a similar device to SCC uses baud 38400. I even got that working using minicom.
- When i finally had a connection to the SCC via minicom, i found http://culfw.de/commandref.html, where i got to know the commands i could type in for controlling the SCC and my FS20 system. And heeey, it worked.
- After this i remembered the issue with baud and i thought, that there is maybe a fixed baud in the transport.cul package.
- After setting up my IDE, i quickly found the part in the package where i needed to change the baud. 
- As expected, it still would not work -.-. So I double checked the parameters SCC needs (baud, stopbits...) and i also changed the parity, which has to be odd.

-> After all, no success...

So i thought, i'd try to get it working via "echo", which is dirty and something i actually dont want. But for testing i played around and realized, that it worked pretty unreliable. Maybe that's the point why it's not working with OH? FYI: I pressed the switch pretty often and it never worked, so probably there is still another problem. 

By the way, i'm using an antenna and the receiver is not far away, so this actually can't be the cause as well.

Do you have any ideas what i'm doing wrong?

PS: I needed a bit to realize, that i would need the RXTX library, which i got via apt-get. It would be really helpful to mention it in the wiki for the FS20 binding by the way.

PPS: I also tried the CUL binding, which didn't work either. 

Greetings Timo

Timo K

unread,
Jun 12, 2014, 2:59:58 PM6/12/14
to ope...@googlegroups.com
Hi again,

after a lot of trial and error, i finally got i working. So i can officially announce, that the SCC (http://busware.de/tiki-index.php?page=SCC) is working with OH (at least for use with FS20). There is only one problem: You need to tweak the transport.cul addon/library/whatever (you find it in the addons) a little. When it opens the serial port, it uses baud 9600 and parity-even (im not quite sure anymore) hardcoded. So you would need to change that to baud 38400 and parity-none. 

An improvement for the future would be to implement an option you can set in the openhab.cfg for changing parity and baud and other parameters.

I uploaded my changed transport.cul (use at your own risk).

Hopefully it will help someone...

org.openhab.io.transport.cul-1.5.0-SNAPSHOT.jar

Sebastian Janzen

unread,
Jan 10, 2015, 6:56:06 AM1/10/15
to ope...@googlegroups.com
Hi!

We'd like to have the SCC Module working, too. But there we see a potential better solution with changes not in the io.transport but in the MAX binding. MAX uses the constructor which uses wrong defaults. Because the constructor (CULSerialHandlerImpl()) for setting e.g. the baud rate exists, we'd like to change MAX and add config params.

Btw: Our problem with a not recognized serial port /dev/ttyAMA0 was solved with the hints from Kai: rxtx lib does not recognize the string "ttyAMA0" as correct serial port. We added a symlink.

Sebastian
Reply all
Reply to author
Forward
0 new messages