Domotica using a NAS, a CA42, a Remeha heater and HTML5 part 2

I lost some time getting the CA42 to work. The cable I am using carries vendorID 0421 and productID 0802. A lot of suggestions on the web suggested to use the usbserial driver. I had to pass the vendor and product ID to the driver. This wasn’t working at all. Another one hinted about the cdc-acm kernel module. I started rebuilding the kernel modules for the Synology DS210j and copied cdc-acm.ko to the NAS. I created an entrypoint for the driver using the following instruction:

mknod /dev/usb/ttyACM0 c 166 0

I started the driver right after creating the entrypoint:

modprobe cdc-acm

 But you could also try:

insmod <location_of_kernel_modules>/cdc-acm.ko

The following command should NOT be executed although suggested by a number of people:

modprobe usbserial vendor=0x0421 product=0x0802

After starting the cdc-acm driver, the following was shown in my messages log:

[ 156.190000] cdc_acm 1-1.1:1.0: This device cannot do calls on its own. It is not a modem.
[ 156.200000] cdc_acm 1-1.1:1.0: ttyACM0: USB ACM device
[ 156.210000] usbcore: registered new interface driver cdc_acm
[ 156.210000] cdc_acm: v0.26:USB Abstract Control Model driver for USB modems and ISDN adapters

So, /dev/usb/ttyACM0 is present 🙂

I wrote a bit of C code to talk to my Remeha Avanta boiler and it seems to work too:

Sending 8 bytes to Remeha: 0x02 0x34 0x05 0x06 0x02 0x00 0x35 0x03
Waiting for an answer from Remeha...
Received 64 bytes from Remeha: 0x02 0x41 0x06 0x3e 0x02 0x00 0xa4 0x0b 0x22 0x0b 0x80 0xf3 0x00 0x80 0x00 0x80 0x00 0x80 0xb0 0x0e 0x48 0x07 0x78 0x05 0x7c 0x15 0x1c 0x07 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x64 0x00 0x00 0x00 0x01 0x01 0x09 0x00 0x00 0xff 0xff 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x9d 0x03

The communication part is solved, the Synology is able to talk to the boiler and the boiler responds. It’s time to get ready for part 3.

This entry was posted in communication, domotica, User Interfaces and tagged , , , , , , , , , , . Bookmark the permalink.

One Response to Domotica using a NAS, a CA42, a Remeha heater and HTML5 part 2

  1. Robert says:

    Hi Freddy,
    This is cool stuff you’re doing! And it’s exactly what (I think) we’ll need (and see) more and more in the future, where Domotica (Home Automation) becomes more and more a ‘distributed’ effort – where devices like a NAS, Arduino-ish devices, Raspberries etc. are going to take over the role of that single PC doing ‘everything’.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s