HomeGenie Forum
Development => Bug reporting => Topic started by: chrispazz on January 13, 2015, 11:16:05 PM
-
Hello.
I have just connected a CM15PRO to my raspberry and I have activated SC9000 virtual modules.
I have various security sensors and I have all configured and working ok.
The only problem I have is the following:
I have two DS10 door/window sensor.
While SC9000 is correctly addressing them with different alarm zones, HG is considering both at the same address (module 6 in SC9000 domain).
Looking at RAW data they send different strings but HG does not care this and switch on/off the module with both sensors.
Is it a HG bug or I am wrong somewhere?
Thank you
Christian
-
Doing some debug:
when receiving RF code:
5D 29 D7 D8 00 FF 74 00 (sensor 1 with address D7)
or code
5D 29 A7 A8 04 FB 13 80 (sensor 2 with address A7)
HG always map both to address 110:
11:33:01.406 PM X10 RF debug a=110 fn=84 Contact_normal_min_DS10A 122 HomeAutomation.HomeGenie.Automation
11:32:58.5 PM X10 RF debug a=110 fn=04 Contact_alert_min_DS10A 122 HomeAutomation.HomeGenie.Automation
11:32:32.479 PM X10 RF debug a=110 fn=04 Contact_alert_min_DS10A 122 HomeAutomation.HomeGenie.Automation
11:32:22.125 PM X10 RF debug a=110 fn=80 Contact_normal_max_DS10A 122 HomeAutomation.HomeGenie.Automation
11:32:08.868 PM X10 RF debug a=110 fn=00 Contact_alert_max_DS10A 122 HomeAutomation.HomeGenie.Automation
11:31:35.50 PM X10 RF debug a=110 fn=80 Contact_normal_max_DS10A 122 HomeAutomation.HomeGenie.Automation
so I think there is a bug in this section of SC9000 program source:
var binaddress = Convert
.ToString(int.Parse(address, System.Globalization.NumberStyles.HexNumber), 2)
.PadLeft(8, '0')
.Substring(4, 3)
.ToCharArray();
Array.Reverse(binaddress);
var straddress = new string(binaddress);
Program.Notify("X10 RF debug", "a=" + straddress.ToString() + " fn=" + function + "\n" + fnvalue);
address = Convert.ToInt32(straddress, 2).ToString();
module = sc9000Modules.WithAddress(address).Get();
If someone is able to correct it....
Thank you again
-
Gene can you move this thread to "BUG" section?
Thank you very much
-
Moved...
-
Someone can confirm the presence of this bug?
thank you
-
Hi chris,
sc9000 code is mainly based on "as long as it works with my setup" =) so it's not a strict implementation since I was missing documentation about how to decode X10 RF security codes.
Lately I've come across this document:
http://www.smarthus.info/support/download/x10_RF_formats.pdf (http://www.smarthus.info/support/download/x10_RF_formats.pdf)
that seems to explain very well how to decode rf security messages.
If you file a issue to github, I'll try to fix this, though have no way of testing the results.
Cheers,
g.
-
Ok, I will do and I will be glad to test for you.
Thanks