X2D decoding attempt
Moderator: leecollings
- ervplecter
- Posts: 18
- Joined: Monday 02 March 2015 9:47
- Target OS: Raspberry Pi / ODroid
- Domoticz version: 2.2284
- Location: Paris, France
- Contact:
Re: X2D decoding attempt
I've received my RFbee, flashed it with no issue (used my arduino to avoid wiring a 3.3V regulator). Seems to work ok but I can't trigger any heater. It has worked ONCE with the previous version and never since, but I haven't allocated much time on this yet.
Sixk, could you let me know what prints out from your RFbee during the init / boot on the serial port ? The CC1101 init prints out the part #, version etc, I'm trying to see if I have this correct as a starting point (checking that the CC is initialized properly).
is your code version on github the latest / up to date ?
thanks
Sixk, could you let me know what prints out from your RFbee during the init / boot on the serial port ? The CC1101 init prints out the part #, version etc, I'm trying to see if I have this correct as a starting point (checking that the CC is initialized properly).
is your code version on github the latest / up to date ?
thanks
Rpi v2 + Domoticz
Re: X2D decoding attempt
@ervplecter,
I'll not be at home before Friday, so I will not be able to take traces, but when you send to RFBee a command such as Sun1, you should have CC1101 init message, then something saying a message is sent with a OK statut.
My github is supposed to be uptodate, I just hope I did not made any mistake when publishing as I code and test in a directory appart from github repository.
Maybe you could show me your "X2D_Heater_Messages.h" file, there is few mistakes that must be avoided.
You could also try to send the 2 messages send by Deltia emitter instead of only the 1rst one.
SixK
I'll not be at home before Friday, so I will not be able to take traces, but when you send to RFBee a command such as Sun1, you should have CC1101 init message, then something saying a message is sent with a OK statut.
My github is supposed to be uptodate, I just hope I did not made any mistake when publishing as I code and test in a directory appart from github repository.
Maybe you could show me your "X2D_Heater_Messages.h" file, there is few mistakes that must be avoided.
You could also try to send the 2 messages send by Deltia emitter instead of only the 1rst one.
SixK
- ervplecter
- Posts: 18
- Joined: Monday 02 March 2015 9:47
- Target OS: Raspberry Pi / ODroid
- Domoticz version: 2.2284
- Location: Paris, France
- Contact:
Re: X2D decoding attempt
I'd need the result of the init of the chip with values. Part #, version and I think markname or something. What results of the call to the init method
Rpi v2 + Domoticz
Re: X2D decoding attempt
@ervplecter,
Here is traces when I send "Sun3" command :
SixK
Here is traces when I send "Sun3" command :
Code: Select all
D:\pyRF>pyX2DCmd.py Sun3
>>Starting CC1101...
Initialize and set registers.
Setting PA_TABLE.
CC1101_PARTNUM 0
CC1101_VERSION 20
CC1101_MARCSTATE 1
device initialized
>>Sun3
>>end of line
0 sent ok :)
Sun3
- ervplecter
- Posts: 18
- Joined: Monday 02 March 2015 9:47
- Target OS: Raspberry Pi / ODroid
- Domoticz version: 2.2284
- Location: Paris, France
- Contact:
Re: X2D decoding attempt
awesome thanks, my CC seems to initialize correctly then.
Rpi v2 + Domoticz
Re: X2D decoding attempt
@ervplecter,
If you already have captured associate messages, send me your "X2D_Heater_Messages.h", I'll try to associate 1 of my heaters and I'll be able to check if your messages are Ok or if something is wrong.
SixK
If you already have captured associate messages, send me your "X2D_Heater_Messages.h", I'll try to associate 1 of my heaters and I'll be able to check if your messages are Ok or if something is wrong.
SixK
Re: X2D decoding attempt
Hi,
Added a minimal WEB IHM on Github to control X2D Heaters from anywhere :
https://github.com/SixK/CC1101-X2D-Heaters
SixK
Added a minimal WEB IHM on Github to control X2D Heaters from anywhere :
https://github.com/SixK/CC1101-X2D-Heaters
SixK
-
- Posts: 1
- Joined: Wednesday 09 March 2016 19:26
- Target OS: Raspberry Pi / ODroid
- Domoticz version:
- Contact:
Re: X2D decoding attempt
For outdoor curtains, the product description says that code are rolling to avoid piracy (to avoid your neightboor to open your curtains for example) so I think it will be quite difficult.
I've asked Delta Dore if they think they will open the X2D API but I got no answer
The only solution today is to hack a remote control with a 2 channel relay (driven buy arduino or RPi). This relay will perform actions on the up and down button of remote control.
I've asked Delta Dore if they think they will open the X2D API but I got no answer

The only solution today is to hack a remote control with a 2 channel relay (driven buy arduino or RPi). This relay will perform actions on the up and down button of remote control.
Re: X2D decoding attempt
Yes, that's something that is highly expectable.
They probably use Rolling code (and maybe a different protocol/modulation) for Curtains and alarms.
But as X2D is quite old, messages have to be captured to be sure.
SixK
They probably use Rolling code (and maybe a different protocol/modulation) for Curtains and alarms.
But as X2D is quite old, messages have to be captured to be sure.
SixK
-
- Posts: 39
- Joined: Sunday 10 January 2016 14:41
- Target OS: Raspberry Pi / ODroid
- Domoticz version: 2.3530
- Location: Cherbourg - Caen | France
- Contact:
Re: X2D decoding attempt
I think that's what i'm gonna do....jjlf wrote: The only solution today is to hack a remote control with a 2 channel relay (driven buy arduino or RPi). This relay will perform actions on the up and down button of remote control.
Re: X2D decoding attempt
I continue to developp a prototype with my usb key (tydom360 / Mydomokit).
I think it's just a USB <=> serial <=> X2D module (module inside a DeltaDore parts)
My previous difficulties were :
- pairing parts with the key
- understand the information manage in the API
- send a command only for the part pairing
Today, I have a prototype for this.
Who has a document to add a new protocol / hardware in the Domoticz tool ?
Or what is the good view to add this protocol ? Is it better to add an application which communicates with Domoticz ?
Thank for your replies
Jimmy
I think it's just a USB <=> serial <=> X2D module (module inside a DeltaDore parts)
My previous difficulties were :
- pairing parts with the key
- understand the information manage in the API
- send a command only for the part pairing
Today, I have a prototype for this.
Who has a document to add a new protocol / hardware in the Domoticz tool ?
Or what is the good view to add this protocol ? Is it better to add an application which communicates with Domoticz ?
Thank for your replies
Jimmy
Re: X2D decoding attempt
Thx guys for the great job on this 
Finaly, those Deltia Dore device can now be integrated in our domotic & IOT playground !
FYI, here are the devices I just bought to get this stuff working. It cost me around 25€ (including shipping) :
DVB key for intial code acquisitions (SDR compatible) : http://www.ebay.fr/itm/222207280488?_tr ... EBIDX%3AIT
RFBee : https://www.amazon.fr/dp/B01AXODEY6/ref ... 91_TE_item
RFBee USB Adapter : http://www.ebay.fr/itm/111778582167?_tr ... EBIDX%3AIT
I'll use my existing Raspberry PI as a controller (by plugging the RFBee USB adapter on it).
Let's wait for the shipment delivery (could take weeks when it comes from China), and I'll tell you if it works !
Cheers,
Guillaume.

Finaly, those Deltia Dore device can now be integrated in our domotic & IOT playground !
FYI, here are the devices I just bought to get this stuff working. It cost me around 25€ (including shipping) :
DVB key for intial code acquisitions (SDR compatible) : http://www.ebay.fr/itm/222207280488?_tr ... EBIDX%3AIT
RFBee : https://www.amazon.fr/dp/B01AXODEY6/ref ... 91_TE_item
RFBee USB Adapter : http://www.ebay.fr/itm/111778582167?_tr ... EBIDX%3AIT
I'll use my existing Raspberry PI as a controller (by plugging the RFBee USB adapter on it).
Let's wait for the shipment delivery (could take weeks when it comes from China), and I'll tell you if it works !
Cheers,
Guillaume.
-
- Posts: 784
- Joined: Wednesday 10 December 2014 13:06
- Target OS: Linux
- Domoticz version: beta
- Location: Bordeaux France
- Contact:
Re: X2D decoding attempt
Still a good challenge guys !
Have you check that ZiBlue (new Zodianet HA version) will release RFPlayer on CES2017 near 150€ (not cheap for sure, not fun as decode by your self)
RFPlayer is a usb dongle able to decode x2d and lot of other protocols.
Of course Domoticz is on the game, RFPlayer is on our hardware list ! Go to domoticz github, search for RFPlayer, and you can get full x2d hardware support.
Have you check that ZiBlue (new Zodianet HA version) will release RFPlayer on CES2017 near 150€ (not cheap for sure, not fun as decode by your self)
RFPlayer is a usb dongle able to decode x2d and lot of other protocols.
Of course Domoticz is on the game, RFPlayer is on our hardware list ! Go to domoticz github, search for RFPlayer, and you can get full x2d hardware support.
Domoticz stable 3.5877 for real & Domoticz beta for test
Rfxtrxe / RFLink / Milight / Yeelight / Tasmota / MQTT / BLE / Zigate
http://domo-attitude.fr
Rfxtrxe / RFLink / Milight / Yeelight / Tasmota / MQTT / BLE / Zigate
http://domo-attitude.fr
- Stuntteam
- Posts: 399
- Joined: Wednesday 06 May 2015 16:39
- Target OS: Raspberry Pi / ODroid
- Domoticz version:
- Contact:
Re: X2D decoding attempt
That is through an API.. it means you need to buy their hardware.
Lets add X2D to RFlink
Lets add X2D to RFlink

-=# RFLink Gateway Development Team #=-
Introduction: http://www.nemcon.nl/blog2/
Generic RFLink Support forum: http://www.esp8266.nu/forum/viewforum.php?f=8
Introduction: http://www.nemcon.nl/blog2/
Generic RFLink Support forum: http://www.esp8266.nu/forum/viewforum.php?f=8
-
- Posts: 784
- Joined: Wednesday 10 December 2014 13:06
- Target OS: Linux
- Domoticz version: beta
- Location: Bordeaux France
- Contact:
Re: X2D decoding attempt
Oohh yyeah !
Domoticz stable 3.5877 for real & Domoticz beta for test
Rfxtrxe / RFLink / Milight / Yeelight / Tasmota / MQTT / BLE / Zigate
http://domo-attitude.fr
Rfxtrxe / RFLink / Milight / Yeelight / Tasmota / MQTT / BLE / Zigate
http://domo-attitude.fr
Re: X2D decoding attempt
Hi guys,
Nice to see some of you are trying to manage heaters with rfbee.
I've turned on my Raspberry Pi (with my RFbee connected on it) a month ago and everything is working fine and stable.
I keep my Deltia emitter in Auto Mode just in case, but it could be turned off.
Edit==> Well, I've just tried to turn heaters in ECO mode with deltia emitter, but heaters did not react ! Finally RFBee took control !
Edit2==> Low power battery !
So Deltia Emitter was not working
So I've spent 1 month with RFBee as only heaters commander. 
Edit3 ==> Obviously as usual, I have to program Deltia emitter again for each days of week. I will not do it this time... RFBee will do the work, and Deltia emitter will only be used as manual command.
@gbraux2, don't hesitate to ask questions if you have troubles with RFbee or my software.
SixK
Nice to see some of you are trying to manage heaters with rfbee.
I've turned on my Raspberry Pi (with my RFbee connected on it) a month ago and everything is working fine and stable.
I keep my Deltia emitter in Auto Mode just in case, but it could be turned off.
Edit==> Well, I've just tried to turn heaters in ECO mode with deltia emitter, but heaters did not react ! Finally RFBee took control !

Edit2==> Low power battery !



Edit3 ==> Obviously as usual, I have to program Deltia emitter again for each days of week. I will not do it this time... RFBee will do the work, and Deltia emitter will only be used as manual command.
@gbraux2, don't hesitate to ask questions if you have troubles with RFbee or my software.
SixK
Re: X2D decoding attempt
@SixK, no problem with your code, I just forked it and tried to push it on one of my arduino Nano, it runs successfully !
Just noticed that it says that the CC1101 initialization is successsfull ... even if there is nothing connected on the SPI interface
But this should be related to the CC1101 library that you are using that is not making all the required status check ...
FYI, instead of a "all-in-one" RFBee, I only bought a small 868 MHz module (with a CC1101 onboard - http://www.ebay.fr/itm/1-2-5PCS-CC1101- ... hYAZ-VWZSQ), and I will use one of my existing Arduino to manage it through the SPI interface ...
You can get both a new Arduino Nano + this 868Mhz CC1101 module for less that 6€ ... while the RFBee is 20€+ !
A quick comment : The explanation about the RF frames (that can be catched with a SRD) that you did on your github is not very clear ...
Maybe you can add output examples of the RTL_433, and how to decode them.
FYI, I am not clear about the "2" messages that are sent when switching eco/confort ... Why is that ? So if we want to grab the "off" code, should I just ignore the 74 first bytes ?
Also, I have a Deltia base station that only has a global "off" button for all 3 zones. Is there a way to then catch the off code "zone-by-zone" ? Will the base station send 3 "off" frames (one for each zone) ?
I have this : http://www.leroymerlin.fr/v3/p/produits ... -03-e49386
G.
Just noticed that it says that the CC1101 initialization is successsfull ... even if there is nothing connected on the SPI interface

But this should be related to the CC1101 library that you are using that is not making all the required status check ...
FYI, instead of a "all-in-one" RFBee, I only bought a small 868 MHz module (with a CC1101 onboard - http://www.ebay.fr/itm/1-2-5PCS-CC1101- ... hYAZ-VWZSQ), and I will use one of my existing Arduino to manage it through the SPI interface ...
You can get both a new Arduino Nano + this 868Mhz CC1101 module for less that 6€ ... while the RFBee is 20€+ !
A quick comment : The explanation about the RF frames (that can be catched with a SRD) that you did on your github is not very clear ...
Maybe you can add output examples of the RTL_433, and how to decode them.
FYI, I am not clear about the "2" messages that are sent when switching eco/confort ... Why is that ? So if we want to grab the "off" code, should I just ignore the 74 first bytes ?
Also, I have a Deltia base station that only has a global "off" button for all 3 zones. Is there a way to then catch the off code "zone-by-zone" ? Will the base station send 3 "off" frames (one for each zone) ?
I have this : http://www.leroymerlin.fr/v3/p/produits ... -03-e49386
G.
Re: X2D decoding attempt
@gbraux2,
Deltia emitter always send 2 messages of 74 characters length. (repeated 2 or 3 times at 30 secondes intervals)
usually :
1rst message is to swtich ECO/Confort mode.
2nd message is to turn On or Off heaters (so it always send "turn on" message except if you explicitly want to turn heaters off).
Only 14th first characters are necessary for all messages. Extra characters are probably to link Deltia to some other Delta Dore devices, but seem's to be ignored by Heaters Receivers.
To associate a heater receiver, only 13th first characters are necessary, but you can send 14th.
Unless you don't have a Deltia emitter, you should never have to associate RFBee to a heater, but it can be done.
Deltia emitter send a "Turn Off" message for each zone, so you should be able to turn off any zone.
You can have a look at this file :
https://github.com/SixK/CC1101-X2D-Heat ... Messages.h
When catching messages with RTL_433, you should get 1rst and 2nd messages in hexa. (something like A3 30 F5 ...)
You will have to edit X2D_Heater_Messages.h file and convert this to something like : 0xA3, 0x30, 0xF5 ...)
I don't have USB Key anymore, so I can't put an example. (maybe I still have Txt captures, I will have to check)
Note that RTL_433 may not catch anything for several minutes at the beginning, I think the chip (and it's crystal) need to heat first to get the right frequencies.
For CC1101 init, I did quick and dirty code, so I don't check real init state.
RFBee is expansive but it works (and is able to send messages to all my heaters anywhere in house)
Your CC1101 module should work as well, but as noone said such a module work's fine, I prefer to to tell to use RFBee.
SixK
Deltia emitter always send 2 messages of 74 characters length. (repeated 2 or 3 times at 30 secondes intervals)
usually :
1rst message is to swtich ECO/Confort mode.
2nd message is to turn On or Off heaters (so it always send "turn on" message except if you explicitly want to turn heaters off).
Only 14th first characters are necessary for all messages. Extra characters are probably to link Deltia to some other Delta Dore devices, but seem's to be ignored by Heaters Receivers.
To associate a heater receiver, only 13th first characters are necessary, but you can send 14th.
Unless you don't have a Deltia emitter, you should never have to associate RFBee to a heater, but it can be done.
Deltia emitter send a "Turn Off" message for each zone, so you should be able to turn off any zone.
You can have a look at this file :
https://github.com/SixK/CC1101-X2D-Heat ... Messages.h
Code: Select all
// This part, take 14 first bytes of 2nd message sent by your Deltia Emitter
byte OffArea3[14]={0x55,0x7f,0x5d,0xa4,0xca,0x95,0x32,0xad,0x95,0x4a,0x81,0xc3,0x80,0x3f};
byte OffArea2[14]={0x55,0x7f,0x5d,0xa4,0xca,0xd5,0x32,0xad,0x95,0x4a,0x81,0xf9,0xc0,0x1f};
byte OffArea1[14]={0x55,0x7f,0x5d,0xa4,0xca,0xaa,0xcd,0x52,0x6a,0xb5,0x7e,0x28,0x7f,0xc0};
You will have to edit X2D_Heater_Messages.h file and convert this to something like : 0xA3, 0x30, 0xF5 ...)
I don't have USB Key anymore, so I can't put an example. (maybe I still have Txt captures, I will have to check)
Note that RTL_433 may not catch anything for several minutes at the beginning, I think the chip (and it's crystal) need to heat first to get the right frequencies.
For CC1101 init, I did quick and dirty code, so I don't check real init state.
RFBee is expansive but it works (and is able to send messages to all my heaters anywhere in house)

Your CC1101 module should work as well, but as noone said such a module work's fine, I prefer to to tell to use RFBee.
SixK
Re: X2D decoding attempt
Thx Sixk for this detailed explanation ! Even more clear after reading the full thread 
Now, time for some dumb questions (maybe a bit out of topic), as I am not a RF expert !
- I took a few minutes to look at the code, checked this tread and ... you never talked about pulse timing (how long 0 and 1 are) ! AFAIK, in the RF world, timimg is as important as getting the code sequence ... And in the CC1101 library, I see nowhere where timing is configured ! But maybe we just don't care about timing if the receiver is self learning the timimgs (i.e. based on an init sequence or related ...). In the case, what are the default timimg values used by the CC1101 ? Based on your knowledge, can you clarify a bit how this usually works in traditional consumer RF products, as I am a bit lost ?
- First question quite related to the second one : I was able to get a recording of a OOK 868Mhz signal I'd like to send with this CC1101. This signal does not look any kind of binary well known code (i.e. 0 and 1). It is just several pulses that are being sent (all with different lengths). Rather old stuff, so I think it is not digital signal ... This message is then catched by the receiver, and it only understands it if all pulses got exactly the right timings. When I bought the RFBee, I was happy by knowing that I will also be able to send this signal, as it is the right 868Mhz frequency ... But by looking at all existing CC1101 libraries out there, people never talks about timimg, so I am a bit lost on how to send my signal ...
EDIT : Seems to be called Asynchronous mode in CC1101 : http://www.ti.com/lit/an/swra316a/swra316a.pdf
Bonne semaine,
Cheers,
Guillaume.

Now, time for some dumb questions (maybe a bit out of topic), as I am not a RF expert !
- I took a few minutes to look at the code, checked this tread and ... you never talked about pulse timing (how long 0 and 1 are) ! AFAIK, in the RF world, timimg is as important as getting the code sequence ... And in the CC1101 library, I see nowhere where timing is configured ! But maybe we just don't care about timing if the receiver is self learning the timimgs (i.e. based on an init sequence or related ...). In the case, what are the default timimg values used by the CC1101 ? Based on your knowledge, can you clarify a bit how this usually works in traditional consumer RF products, as I am a bit lost ?
- First question quite related to the second one : I was able to get a recording of a OOK 868Mhz signal I'd like to send with this CC1101. This signal does not look any kind of binary well known code (i.e. 0 and 1). It is just several pulses that are being sent (all with different lengths). Rather old stuff, so I think it is not digital signal ... This message is then catched by the receiver, and it only understands it if all pulses got exactly the right timings. When I bought the RFBee, I was happy by knowing that I will also be able to send this signal, as it is the right 868Mhz frequency ... But by looking at all existing CC1101 libraries out there, people never talks about timimg, so I am a bit lost on how to send my signal ...
EDIT : Seems to be called Asynchronous mode in CC1101 : http://www.ti.com/lit/an/swra316a/swra316a.pdf
Bonne semaine,
Cheers,
Guillaume.
Re: X2D decoding attempt
@gbraux2,
I'm far from being a RF Expert, to be clear, I'm nearly an electronic newbie.
But as I played with RF 433 temperature devices, I can says that with a low cost RF433 module like you can see here
http://electroniqueamateur.blogspot.fr/ ... re-et.html pulse length is important.
With my Otio or Astrell temperature sensor device, 0 was something like 8200 ms pulse length, 1 was about 4200ms pulse length and synchro bit was about 9500ms pulse length. (you can have a look at my others github projects here https://github.com/SixK/Otio_SHT-10_protocol and here https://github.com/SixK/Astrell_protocol)
With CC1101, you don't have to care about pulse length, everything is handle by the CC1101 chip.
All you have to do is to find the right CC1101 configuration to be as near as possible of original signal.
I already did this part comparing original signal and frequency with signal sent by my RFbee, tweaking CC1101 parameters to be as near as possible.
Maybe parameters I set could be improved, but as messages can be received anywhere in my house, my values are probably fine enought for all X2D receivers.
I don't remember if signal is OOK or ACK or something else, but as far as I remember signal is Manchester Encoded.
In CC1101 there is a bit to activate this encoding.
If you want to learn more about parameters I used, you will have to play with a www.ti.com tool (I don't remember if it was "SmartRF Studio" or another one) that translate values you will find in CC1101 configure file https://github.com/SixK/CC1101-X2D-Heat ... r/cc1101.h to human reading values. (have a look at CC1101_DEFVAL_xxx values in cc1101.h file)
At the beginning, When playing with RFbee, I wanted to catch X2D messages with it, but I never found good parameters and code to use to be able to catch anything.
X2D Message length is 74 bytes, while CC1101 has a 64bytes buffer, this is a problem as you have to catch messages in several times and this is a particular way to code CC1101.
I've been lucky with X2D when sending messages as only 14 first bytes are mandatory.
SixK
I'm far from being a RF Expert, to be clear, I'm nearly an electronic newbie.

But as I played with RF 433 temperature devices, I can says that with a low cost RF433 module like you can see here
http://electroniqueamateur.blogspot.fr/ ... re-et.html pulse length is important.
With my Otio or Astrell temperature sensor device, 0 was something like 8200 ms pulse length, 1 was about 4200ms pulse length and synchro bit was about 9500ms pulse length. (you can have a look at my others github projects here https://github.com/SixK/Otio_SHT-10_protocol and here https://github.com/SixK/Astrell_protocol)
With CC1101, you don't have to care about pulse length, everything is handle by the CC1101 chip.
All you have to do is to find the right CC1101 configuration to be as near as possible of original signal.
I already did this part comparing original signal and frequency with signal sent by my RFbee, tweaking CC1101 parameters to be as near as possible.
Maybe parameters I set could be improved, but as messages can be received anywhere in my house, my values are probably fine enought for all X2D receivers.
I don't remember if signal is OOK or ACK or something else, but as far as I remember signal is Manchester Encoded.
In CC1101 there is a bit to activate this encoding.
If you want to learn more about parameters I used, you will have to play with a www.ti.com tool (I don't remember if it was "SmartRF Studio" or another one) that translate values you will find in CC1101 configure file https://github.com/SixK/CC1101-X2D-Heat ... r/cc1101.h to human reading values. (have a look at CC1101_DEFVAL_xxx values in cc1101.h file)
At the beginning, When playing with RFbee, I wanted to catch X2D messages with it, but I never found good parameters and code to use to be able to catch anything.
X2D Message length is 74 bytes, while CC1101 has a 64bytes buffer, this is a problem as you have to catch messages in several times and this is a particular way to code CC1101.
I've been lucky with X2D when sending messages as only 14 first bytes are mandatory.

SixK
Who is online
Users browsing this forum: No registered users and 1 guest