[Plugin] X10 Home Automation (1 Viewer)

WileECoyote

MP Donator
  • Premium Supporter
  • October 14, 2008
    1,156
    220
    Cary, NC
    Home Country
    United States of America United States of America
    • Thread starter
    • Moderator
    • #51
    @ WileECoyote

    Yes, having ‘event driven’ actions would be a great addition. I for one would really like MediaPortal to pause a movie and bring the lights up when the phone rings or someone comes to the door.

    Regarding triggering macros, by running xAP Floorplan in the background I can trigger macros far beyond what you are proposing here. For example I can modify a macro at runtime based on who’s in the room, the temperature, the time etc. Also I can stagger execution in a macro for a more pro look. I’m not saying it’s easy to setup but it is already possible.

    Also only about half the people who have X10 will be able to use your plugin since it’s CM15 only, and no-one who has a more modern home automation setup such as C-Bus, Rako or Z-Wave can.

    The point I was making is that all this code is already written and functional (with skins for Blue, StreamedMP, ReVision, Replicant and Monochrome), the only thing that needs to added is event driven actions in MediaPortal/Patrick’s plugin (ideally bi-directional), I’ve had a look at Patrick’s code and it would seem possible to add this function. Just trying to save you some effort.

    I will go with dobyken's observation on this one (see his post above.) I did download the code at one point, but there are so many components, it seemed like modifying just one could break everything else. Dont get me wrong, no diss to Patrick he is a great developer, I just couldnt quickly follow what was going on.

    As far as it just being compatible with the CM15 you are correct. I have a few other testers that are working with the CM11, but other than that it will probably not be compatible with any other controllers in the first version. The later versions will possibly have more support, but only if they have API's. I develop strickly on API's like the ActiveHome Pro SDK or like the Netflix plugin. Im sorry if there are others that will be left out and would like to include all, but you have to start somewhere....
     

    dobyken

    MP Donator
  • Premium Supporter
  • June 8, 2009
    68
    2
    Florida Gulf Coast
    Home Country
    United States of America United States of America
    There's no Blue3 or Blue3Wide folders in your archive. Your extension installer
    defaults to those and they're the only skins I have installed. You're calling specific fonts
    such as Mediastream4 so the files don't appear to be generic. I'd install one of the
    other skins but I think you need to get it working in the basic MP new setup which is
    what mine is.
    @dobyken

    Try the attached xml file. I packaged my whole build directory for X10, so you can pretty much ignore the rest...

    Thanks again for testing this for me! This will help me taylor the installation process for everyone else (that uses it anyway) :)

    :D
     

    WileECoyote

    MP Donator
  • Premium Supporter
  • October 14, 2008
    1,156
    220
    Cary, NC
    Home Country
    United States of America United States of America
    • Thread starter
    • Moderator
    • #53
    There's no Blue3 or Blue3Wide folders in your archive. Your extension installer
    defaults to those and they're the only skins I have installed. You're calling specific fonts
    such as Mediastream4 so the files don't appear to be generic. I'd install one of the
    other skins but I think you need to get it working in the basic MP new setup which is
    what mine is.

    Okay, try this one on for size :)
     

    dobyken

    MP Donator
  • Premium Supporter
  • June 8, 2009
    68
    2
    Florida Gulf Coast
    Home Country
    United States of America United States of America
    OK got it working..the service was stopped for some reason..at least I don't remember stopping it and it's set on automatic. I select "By Room"
    then click on a room and no devices appear. I select "By Device" and the three I added show up. Clicked on HT Spots and they turned on. I had to get out of my recliner to turn them off. I assume that the power symbol should be an on/off toggle. The up/down arrows have me confused as to what purpose they serve. From the menu section if I arrow up the media controls pop up on the top of the screen. Also on my display (a lot of overscan) the menu bar on the right side only shows partial text ie Show by Ro" Show by De". Since there's a lot of dead space you should be able to shift the Menu and Action bars over to the left a bit. The left side listing the number of rooms/devices looks fine.




    Okay, try this one on for size :)
     

    WileECoyote

    MP Donator
  • Premium Supporter
  • October 14, 2008
    1,156
    220
    Cary, NC
    Home Country
    United States of America United States of America
    • Thread starter
    • Moderator
    • #55
    MP 1.1 is using Documents & Settings\All Users\Application Data etc for the
    skin files.
    When I clicked to load the x10 Pluging MP showed a black screen with
    message Missing or invalid file: but no name.
    Here's the error log

    2009-08-19 15:17:36.687500 [ERROR][MPMain]: Error initializing window:X10_Client.X10Main Unable to connect to the remote server mscorlib
    Server stack trace:
    at System.Net.HttpWebRequest.GetRequestStream()
    at System.Runtime.Remoting.Channels.Http.HttpClientTransportSink.ProcessAndSend(IMessage msg, ITransportHeaders headers, Stream inputStream)
    at System.Runtime.Remoting.Channels.Http.HttpClientTransportSink.ProcessMessage(IMessage msg, ITransportHeaders requestHeaders, Stream requestStream, ITransportHeaders& responseHeaders, Stream& responseStream)
    at System.Runtime.Remoting.Channels.SoapClientFormatterSink.SyncProcessMessage(IMessage msg)

    Exception rethrown at [0]:
    at System.Runtime.Remoting.Proxies.RealProxy.HandleReturnMessage(IMessage reqMsg, IMessage retMsg)
    at System.Runtime.Remoting.Proxies.RealProxy.PrivateInvoke(MessageData& msgData, Int32 type)
    at X10_Remote.ServerRemote.GetDevices()
    at X10_Client.X10Main.Init()
    at MediaPortal.GUI.Library.PluginManager.LoadWindowPlugin(String strFile)
    2009-08-19 15:17:41.109375 [ERROR][MPMain]: No translation found for id 111099

    Hey dobyken,
    Yes, that skin file was made for MP 1.1, so we should be good there. Have you tried to enter the IP of the server instead of the host name "mscorlib"?

    You will also get the same error if the service is not running on the server machine...
     

    dobyken

    MP Donator
  • Premium Supporter
  • June 8, 2009
    68
    2
    Florida Gulf Coast
    Home Country
    United States of America United States of America
    Yes, that error came up when the service wasn't running. I did use the IP for the server
    parameter. Let me know when you have it polished up a bit and all the base features working.
    Create a full install package and I'll try it out on a fresh copy of MP. The minimum features
    I need are On/Off - Dim/Bright and and event timer. I assume the service runs events even if MP is
    not running...I don't have MediaPortal up all the time.

    Hey dobyken,
    Yes, that skin file was made for MP 1.1, so we should be good there. Have you tried to enter the IP of the server instead of the host name "mscorlib"?

    You will also get the same error if the service is not running on the server machine...
     

    WileECoyote

    MP Donator
  • Premium Supporter
  • October 14, 2008
    1,156
    220
    Cary, NC
    Home Country
    United States of America United States of America
    • Thread starter
    • Moderator
    • #57
    Yes, that error came up when the service wasn't running. I did use the IP for the server
    parameter. Let me know when you have it polished up a bit and all the base features working.
    Create a full install package and I'll try it out on a fresh copy of MP. The minimum features
    I need are On/Off - Dim/Bright and and event timer. I assume the service runs events even if MP is
    not running...I don't have MediaPortal up all the time.

    Hey Dobyken,
    Thanks again for your testing. I appreciate you taking the time to help me work through some of issues...

    So to be clear, you were not able to get it working within MP?

    I split the 'events' into two different categories. The server configuration has Scheduled Events that run at a pre-determined time. The Client configuration has Macros that run when an event is triggered (i.e. Start/Stop/Pause a movie.)

    Yes it will run Scheduled events even if MP is not running, that was one of the reasons for the re-design, I wanted to make the server piece a stand alone. You should be able to set up Scheduled events in the Server confinguration now, if you want to turn lights/recepticles on and off at a scheduled interval.

    Thanks again!
     

    dobyken

    MP Donator
  • Premium Supporter
  • June 8, 2009
    68
    2
    Florida Gulf Coast
    Home Country
    United States of America United States of America
    Mr Coyote,

    It appears that the service is not starting automatically. I thought it might
    be due to the login name so I changed it to use the system account but it still
    didn't start when I rebooted. It does work properly if I manually start the
    service. I did not see any entries in the system log about the service aborting
    after it was started. There are 2 errors in the system log each time I reboot. The
    first is a timeout waiting for the service to connect and the second is the failure
    to respond in a timely manner.





    Hey Dobyken,
    Thanks again for your testing. I appreciate you taking the time to help me work through some of issues...

    So to be clear, you were not able to get it working within MP?

    I split the 'events' into two different categories. The server configuration has Scheduled Events that run at a pre-determined time. The Client configuration has Macros that run when an event is triggered (i.e. Start/Stop/Pause a movie.)

    Yes it will run Scheduled events even if MP is not running, that was one of the reasons for the re-design, I wanted to make the server piece a stand alone. You should be able to set up Scheduled events in the Server confinguration now, if you want to turn lights/recepticles on and off at a scheduled interval.

    Thanks again!
     

    bodiroga

    Portal Pro
    January 1, 2008
    241
    46
    Home Country
    Spain Spain
    Hi WileECoyote!

    I am now at home so I can test your plugin in my CM11 (sorry for the delay!).

    I'm using an original Windows XP with SP3 and I have problems installing the plugin. Let's go:

    1) Ok, plugin downloaded.

    2), 3), 4) and 5) Ok, plugin installed correctly.

    6) and 7) InstallService_x86.bat (XP SP3 32 bits) clicked and a MSDOS black screen aprears for about one second (I'm not able to read the text that appears). Oh, well, I finally achieve to get and screen save of the error, here you are. Also, in the Windows Event Viewer I can view an error, but I don't understand it.

    8) Another Windows error happens when I click on the X10_Service.exe. Here is the Windows error (I hope that the translation is OK):

    "Can not start service from the command line or a debugger. First, you must install a Windows service (using installutil.exe) and then open it with ServerExplorer, the administrative tool for Windows services or NET START command."

    9), 10), 11) ... I haven't tried them.

    Wile, do you know what happens? Can we (you) do anything?

    Thanks for all your work and effort.

    Best regards,

    Aitor

    EDIT: Woooooowwwww, I am a fucking genius!!! :D:D:D:D:D:D:D Reading carefully the error screen I've uploaded I realized that the program don't find the X10_Service.exe in "Program Files", because in my Windows (Spanish) that folder is called "Archivos de programa". Creating folder "C:/Program Files/Team Mediaportal/Mediaportal/plugins/x10" the plugin has been installed correctly. Hallelujah! Wile, if you can, correct that "error" because all non-English (American) users will have problems installing the plugin.

    EDIT2: Shit, I get the same error when I press X10_Service.exe before installing "InstallService":

    "Can not start service from the command line or a debugger. First, you must install a Windows service (using installutil.exe) and then open it with ServerExplorer, the administrative tool for Windows services or NET START command."

    What can I do?
     

    Attachments

    • Captura.JPG
      Captura.JPG
      46.1 KB

    bodiroga

    Portal Pro
    January 1, 2008
    241
    46
    Home Country
    Spain Spain
    Forget my previous post, I've solved those problems and tomorrow I will try to configure the plugin correctly.

    Thanks Wile for your work, THANKS.

    Regards,

    Aitor
     

    Users who are viewing this thread

    Top Bottom