Basic Home Automation via xAP BSC enabled devices (updated 9-01-2008) (2 Viewers)

ronsonol

MP Donator
  • Premium Supporter
  • April 2, 2007
    178
    23
    Kingston
    Home Country
    Canada Canada
    Patrick,

    Both points are correct, and in that way it should work well. And for state images, that means the picture should show level 10 for 100%.

    But, actually I don't think its necessary to change the dim button to send off at any point, it we want to turn off the device there is a button for that. I really think its just the on/bright that needs fixing.

    BTW, I notice that with binary devices updates are instant (on, off state and images) but for dimmable, they seem to rely on the polling time value.
     

    ronsonol

    MP Donator
  • Premium Supporter
  • April 2, 2007
    178
    23
    Kingston
    Home Country
    Canada Canada
    Another thing I notice that only relates to the cm15a device itself, x10 devices are always detected as unknown, unless the computer has seen it turn off or on since it was last hooked up.

    So, on each reboot, they all toggle back to unknown until they are either turned off/on. A work around is to click on all the devices and just turn them off.

    I understand you have the status there do deal with xap devices, but for this device defaulting to OFF when unknown status is returned might be the best approach.
     

    patrick

    Portal Pro
    April 20, 2005
    608
    45
    Southeast
    Home Country
    United States of America United States of America
    ronsonol,

    I did not get a chance to work on it last night or this morning, will try this afternoon.

    Question on the cm15a and reboots.
    So even if the queryplc is run after a reboot the correct status will not be returned until an On or Off? Want me to see if I can add an option to send OFF to unknown devices at startup (it would be specific and not include xAP)?

    Also I will look into the device updates for level devices, that is strange b/c it
    works the same for both binary and level devices, probably a coding error by me.

    I will look into unknown devices defaulting to OFF.
    You would never be able to detect an unknown or error state.
    I was thinking about something like a door, with an error/unknown you
    might decide to check it, but with a state reported you would assume that
    reflected the true state and leave you garage door open all night.
    (You might just be able to set the state unknown reporting to display OFF and
    change the unknown image to a copy of the off/level 0 image.)

    Thanks,
    patrick
     

    ronsonol

    MP Donator
  • Premium Supporter
  • April 2, 2007
    178
    23
    Kingston
    Home Country
    Canada Canada
    Hi Patrick,

    Yes, even when the queryplc is run after reboot the status is unknown until an on or off is seen by the device either from RF remotes or sent from the computer.

    You make some good points about the status of certain objects. What works for my setup may not for others. For example, I have both a entrance door and garage door hooked up. Now I have it configured so that when its off - or no power, its in a failsafe to locked mode. Its possible, that someone has decided to do things the other way around, and sending OFF commands might not be good.

    Other products I've used, just show the status as OFF, but as you said you'll never be able to detect a problem state. As you said, one can just copy the png file and replace the unknown if they please.

    Afterall, this is a limitation of the actual x10 hardware, and not the plugin.

    It might be best how it is, after all it is working great. I really love this plugin of yours,

    Many thanks.
     

    patrick

    Portal Pro
    April 20, 2005
    608
    45
    Southeast
    Home Country
    United States of America United States of America
    ronsonol,

    New version again.
    Hopefully fixed the Bright to send ON if the device is either Off or the Level is Zero.
    If the dim is clicked and the new level is zero it should send a dim command then off command.

    Add an option to "Assume devices are Off on startup", this should cause the devices
    to show as off and level of zero until a status is determined.

    Let me know if the level device still are not updating the status like binary devices.
    I added a line in the log that should look something like:
    AclCommandSender: RecvAction: recvplc,a1,dim,10
    Paste it here if there are still problems b/c I could not really find anything that
    would cause it unless I have a typeo or the RecvAction event is not getting called for level devices.

    Thanks again,
    patrick
     

    ronsonol

    MP Donator
  • Premium Supporter
  • April 2, 2007
    178
    23
    Kingston
    Home Country
    Canada Canada
    The bright sends the ON if the device is off, but it still thinks the levels are 10 or 0, and not 100. When a device is turned on, it says ON (not any percentage), with the image level that has no yellow bars.

    So, then the dim button will send OFF - as you just made it. It seems like its relying on keeping variables/math to determine the status.

    After it polls, it seems to detect the correct level/image. I set the poll number in seconds very high to determine this. After polling, and getting the correct level, everything works as expected.

    Turn on:
    5/24/2007 6:26:20 PM - BSCLevelDevice: ControlButtonClick_Up: -cLevel: 0 -mlevel: 100 -pctadj 0.100000001490116 -deviceadj 10
    5/24/2007 6:26:20 PM - BSCLevelDevice: ControlButtonClick_Up: NewLevel: 10
    5/24/2007 6:26:20 PM - AhCmdLineController: BSCLevelChange: 10
    5/24/2007 6:26:20 PM - AclCommandSender: Sending Action: sendplc Appliance: d1 Arguments: on
    5/24/2007 6:26:20 PM - AclCommandSender: Command Output Recvd: 0
    5/24/2007 6:26:21 PM - AclCommandSender: RecvAction: recvplc,d1,On

    Turn off:
    5/24/2007 6:26:32 PM - AhCmdLineController: BSCLevelChange: 0
    5/24/2007 6:26:32 PM - AclCommandSender: Sending Action: sendplc Appliance: d1 Arguments: off
    5/24/2007 6:26:32 PM - AclCommandSender: Command Output Recvd: 0
    5/24/2007 6:26:32 PM - AclCommandSender: RecvAction: recvplc,d1,Off

    Poll:
    5/24/2007 6:36:58 PM - AclCommandSender: Sending Action: queryplc Appliance: d1 Arguments: on
    5/24/2007 6:36:58 PM - AclCommandSender: Command Output Recvd: 1
    5/24/2007 6:36:58 PM - AclCommandSender: Sending Action: queryplc Appliance: d1 Arguments: dim
    5/24/2007 6:36:58 PM - AclCommandSender: Command Output Recvd: 100

    Also, I checked the option to assume devices are OFF, and rebooted, yet they were still detected as unknown.

    Many thanks,
     

    patrick

    Portal Pro
    April 20, 2005
    608
    45
    Southeast
    Home Country
    United States of America United States of America
    ronsonol,

    Bike night @ the bar last night so did not get any work done until today.

    Made some changes.
    Hopfully fixed the devices off after reboot option.
    (Added a check in the query decoder)

    Changed the code to do a queryplc of the device state(and level)
    when the RecvAction event is raised instead of just trying to
    translate the RecvAction into device states/levels.
    My only concern is that the query will occur too soon after
    the command(before the state has actually changed) but I
    guess we will see.

    Hoping it works better for you this time.

    Thanks again,
    patrick
     

    ronsonol

    MP Donator
  • Premium Supporter
  • April 2, 2007
    178
    23
    Kingston
    Home Country
    Canada Canada
    Patrick,

    It is working well. About the query being too soon, I only noticed once of about 10 tries where it didn't detect the 100% level. Just after reboot.

    Yes, I can confirm, that the first time a level device is turned ON, it doesnt get the 100% level picture, but the next times it does.

    Other than that it is working just as it should.

    Also, the option to assume devices are off is now working after reboot.

    Many thanks for everything.
     

    ronsonol

    MP Donator
  • Premium Supporter
  • April 2, 2007
    178
    23
    Kingston
    Home Country
    Canada Canada
    Patrick,

    Here's what your great plugin has done for me - I thought I'd post some screens so everyone else can see what it does! An x10 setup for a few items is fairly inexpensive...the hardware may be flakey sometimes, but the software support has just greatly improved!

    Also, I'll include an updated xml that seems to work better in the Revision skin, at least it does on my screen at 1280x720.

    Many thanks.
     

    patrick

    Portal Pro
    April 20, 2005
    608
    45
    Southeast
    Home Country
    United States of America United States of America
    ronsonol,

    Those screen shots look great!

    If you want to try again I added a bright 100% command after the On command
    so hopefully the 100% level picture will get picked up.

    Thanks again!!
    patrick
     

    Users who are viewing this thread

    Top Bottom