Where can I find the subscription notification list names for the X10 Devices?
or
Where can I find subscription notification names for all device.
Thanks,
Gene
Subscription Notification List
Re: Subscription Notification List
Good question. That information is not available anywhere, but it's not a secret. If you want to know what names are used by any particular hardware interface, let me know the interface and I'll make you a list.
Scott
-
- Member
- Posts: 30
- Joined: Sun May 23, 2010 6:45 pm
Re: Subscription Notification List
Thank you,
I would like the info on the x10 devices, in fact if I you would be willing to make it public, I would love to see the source for the X10 devices, I have only recently discovered HouseBot and I am very interested in making a couple interface plugins (starting with the CM15A ) and at least a few devices but I am no good with C++ so the more code I can look at the better I can understand it with the hope of eventually porting the plugins over to Pascal (Delphi) where I feel comfortable.
Thank you sir,
Gene
I would like the info on the x10 devices, in fact if I you would be willing to make it public, I would love to see the source for the X10 devices, I have only recently discovered HouseBot and I am very interested in making a couple interface plugins (starting with the CM15A ) and at least a few devices but I am no good with C++ so the more code I can look at the better I can understand it with the hope of eventually porting the plugins over to Pascal (Delphi) where I feel comfortable.
Thank you sir,
Gene
Re: Subscription Notification List
I don't release the full plugin source code, but I'll provide snippets to help answer questions from time to time.
I'll just list the SubscribeToNotificationList() calls for each device. If you need more info, let me know.
X10 Controller
I'll just list the SubscribeToNotificationList() calls for each device. If you need more info, let me know.
X10 Controller
- SubscribeToNotificationList( "X10 Reception (ALL)", "" );
- SubscribeToNotificationList( "X10 Global Reception (ALL)", "" );
- wsprintf( szFilter, "H=%d;U=%d", hc, uc );
SubscribeToNotificationList( "X10 Reception", szFilter ); - wsprintf( szGlobalFilter, "H=%d", hc );
SubscribeToNotificationList( "X10 Global Reception", szGlobalFilter );
- wsprintf( szFilter, "H=%d;U=%d", hc, uc );
SubscribeToNotificationList( "X10 Reception", szFilter ); - wsprintf( szGlobalFilter, "H=%d", hc );
SubscribeToNotificationList( "X10 Global Reception", szGlobalFilter );
Scott
-
- Member
- Posts: 30
- Joined: Sun May 23, 2010 6:45 pm
Re: Subscription Notification List
I understand, It was a shot in the dark :)
Thanks for the info.
BTW, HouseBot is awesome.
Thanks,
Gene
Thanks for the info.
BTW, HouseBot is awesome.
Thanks,
Gene
-
- Member
- Posts: 30
- Joined: Sun May 23, 2010 6:45 pm
Re: Subscription Notification List
So this code should make my "X10 Appliance Module" device (in housebot) change it's "Power State" to "ON", correct?
I am not sure what I am doing wrong.
Thanks,
Gene
Code: Select all
CDataPack DataPack;
DataPack.AddData( "HouseCode", "C" );
DataPack.AddData( "UnitCode", "2" );
DataPack.AddData( "Command", "ON" );
DataPack.AddData( "RepeatCount", "1" );
NotifySubscribedDevices( "X10 Reception", "H=C;U=2", &DataPack );
NotifySubscribedDevices( "X10 Global Reception", "H=C", &DataPack );
return (TRUE);
Thanks,
Gene
Re: Subscription Notification List
Pretty close.
I don't think the X10 numeric values for HC and UC are references anywhere in the SDK, but I think they're standard X10 protocol values. Here's an enum that I use for them:
Code: Select all
CDataPack DataPack;
DataPack.AddData( "Command", "On" ); // On, not ON
DataPack.AddData( "HouseCode", "C" );
DataPack.AddData( "UnitCode", "2" );
DataPack.AddData( "RepeatCount", "1" ); // Not sure what this is for, unless you have your own device plugin looking at repeatcount
NotifySubscribedDevices( "X10 Reception", "H=3;U=2", &DataPack ); // Uses X10 numeric values for filter, not characters. Odd... I know.
NotifySubscribedDevices( "X10 Reception (ALL)", "", &DataPack );
Code: Select all
enum X10HouseCode
{
hcUnknown,
hcA,
hcB,
hcC,
hcD,
hcE,
hcF,
hcG,
hcH,
hcI,
hcJ,
hcK,
hcL,
hcM,
hcN,
hcO,
hcP,
hcLastHouseCode
};
enum X10UnitCode
{
ucUnknown,
uc1,
uc2,
uc3,
uc4,
uc5,
uc6,
uc7,
uc8,
uc9,
uc10,
uc11,
uc12,
uc13,
uc14,
uc15,
uc16,
ucAllUnitsOff,
ucAllLightsOn,
ucOn,
ucOff,
ucDim,
ucBright,
ucAllLightsOff,
ucExtendedCode,
ucHailRequest,
ucHailAck,
ucPresetDim0,
ucExtendedData,
ucStatusOn,
ucStatusOff,
ucStatusRequest,
ucPresetDim1,
};
Scott
-
- Member
- Posts: 30
- Joined: Sun May 23, 2010 6:45 pm
Re: Subscription Notification List
Thank you sir
RepeatCount was a guess based on the parameters for the SendX10 command.
Gene
RepeatCount was a guess based on the parameters for the SendX10 command.
Gene