Announcement

Collapse
No announcement yet.

Keyboard and Mouse Sensor plug-in - HS3 Beta testing

Collapse
This is a sticky topic.
X
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Keyboard and Mouse Sensor plug-in - HS3 Beta testing

    This Keyboard and Mouse Sensor plug-in (KMS) is designed to allow HomeSeer to detect any mouse or keyboard activity on a local or a remote computer. It sets a device status to "On" as soon as it detects a mouse movement/click or a key stroke on the keyboard, and it sets it back to "Off" after X seconds of inactivity, where X is configurable.

    One possible use for this plugin is to detect occupancy or lack of occupancy in a room. For example I have this plugin installed on my desktop PC and HomeSeer configured to turn on the lights in this room as soon as I move the mouse, and turn them off after 3 minutes of inactivity (no mouse movement/click or key stroke during 3 minutes).

    Please read the User Guide before installing.

    Please report any bug.

    Installation:
    • download the zip attached to this post and save it in the HS3 application folder in /updates3/zips
    • download the file named updater_override.txt attached to this post and save it in the HS3 application folder.
    • go to the "PLUG-INS > Manage" page and click the "Update Listing" button, then click "Additional interfaces > Test Plugin" and check the KMS line.
    • click the "Download and Install" button
    • enable the plugin from the "PLUG-INS > Manage" page
    • delete updater_override.txt from your HS3 application folder
    Changes to v3.0.0.7
    - Added Off control to force sensor to Off

    Changes to v3.0.0.6
    - Enhanced exception handling.

    Changes to v3.0.0.5
    - Added monitoring of remote instances from local main instance
    - Added possibility to enable/disable mouse/keyboard sensor
    - Added possibility to log to file, and added timestamp in console and files
    - Fixed action and triggers
    - Fixed shutdown of plugin when it is disconnected from server.

    Changes to v3.0.0.3
    - Fixed autoreconnect command line option

    Changes to v3.0.0.2:
    - Fixed problem with remote instances using the local device instead of creating their own.

    Changes to v3.0.0.1:
    - Added keyboard shortcut triggers
    Attached Files
    Last edited by spud; March 31, 2019, 06:39 PM.

    #2
    Originally posted by spud View Post
    This Keyboard and Mouse Sensor plug-in (KMS) is designed to allow HomeSeer to detect any mouse or keyboard activity on a local or a remote computer. It sets a device status to "On" as soon as it detects a mouse movement/click or a key stroke on the keyboard, and it sets it back to "Off" after X seconds of inactivity, where X is configurable.

    One possible use for this plugin is to detect occupancy or lack of occupancy in a room. For example I have this plugin installed on my desktop PC and HomeSeer configured to turn on the lights in this room as soon as I move the mouse, and turn them off after 3 minutes of inactivity (no mouse movement/click or key stroke during 3 minutes).

    Please report any bug.

    Installation:
    • download the zip attached to this post and save it in the HS3 application folder in /updates3/zips
    • download the file named updater_override.txt attached to this post and save it in the HS3 application folder.
    • go to the "PLUG-INS > Manage" page and click the "Update Listing" button, then click "Additional interfaces > Test Plugin" and check the KMS line.
    • click the "Download and Install" button
    • enable the plugin from the "PLUG-INS > Manage" page
    • delete updater_override.txt from your HS3 application folder
    Hi Spud,

    Nice idea. I setup the plugin on my HS machine. Then what? Is the client just a remote instance of the plugin?
    _______________________________________________

    HS3 : HSpro (3.0.0.460) on Win2012 (vm on ESXi)
    Plugins: HSTouch, UPBSpud, Kinect, Nest, IFTTT, DirecTV, EasyTrigger, Imperihome, Zwave, RFXcom, UltraMon3, UltraWeatherBug3, UltraGCIR3, UltraLog3, UltraPioneer, PHLocation, Pushover, Pushalot, MCSSPrinklers S, JowiHue
    Jon00 Plugins: Bluetooth Proximity, Performance Monitor, DB Chart, Links

    Comment


      #3
      Originally posted by jlrichar View Post
      Hi Spud,

      Nice idea. I setup the plugin on my HS machine. Then what? Is the client just a remote instance of the plugin?
      Exactly, unlike the HS2 version there is no server/client coded in the plugin, you just install the plugin on the machine where you want to detect keyboard and mouse activity and run it from there.

      Comment


        #4
        Any chance that it could listen for specific key combinations?

        Comment


          #5
          Originally posted by kideon View Post
          Any chance that it could listen for specific key combinations?
          yeah that would be a nice feature to be able to trigger some events with keyboard shortcuts.
          I will add it in a future version.

          Comment


            #6
            in version 3.0.0.1, I have added a keyboard shortcut trigger. You can now trigger a HS event using a keyboard shortcut, it works whatever program the focus is on.

            for example the event in the screenshot below turn on some lights if I press "Ctrl + L" on my keyboard

            Click image for larger version

Name:	shortcut.jpg
Views:	2
Size:	48.3 KB
ID:	1176170

            Comment


              #7
              Hello Spud,

              Got your plugin installed from the updater and followed your instructions for install. Tried to create 2 devices (1 for the HS machine, and the 2nd for remote pc called OfficePC). Only the HS Machine has created a device and reports its status changes.

              The remote device called "OfficePC" has an error message on the plugin instance (CRITICAL: Plugin has disconnected.) Also see lots of connect and reconnect errors in the log. One thing I notice is the HS machine trying to connect to a local ip for the remote "OfficePC).

              Does this indicate a setup error and do I need to erase any config file?

              Heres the logs and any help would be greatful

              Aug-14 4:22:09 AM Info Plugin KMS with instance: OfficePC has disconnected
              Aug-14 4:22:09 AM Info Plugin KMS with instance OfficePC has connected. IP:192.168.1.113:51991
              Aug-14 4:22:03 AM KMS INFO Refreshing Keyboard Shortcuts to monitor
              Aug-14 4:22:03 AM KMS INFO KMS version 3.0.0.1
              Aug-14 4:22:03 AM Info Plugin KMS with instance OfficePC has connected. IP:127.0.0.1:61088
              Aug-14 4:22:03 AM Error Error launching plugin: Item has already been added. Key in dictionary: 'KMS:OfficePC' Key being added: 'KMS:OfficePC'
              Aug-14 4:22:03 AM Error Error launching plugin: Item has already been added. Key in dictionary: 'KMS:OfficePC' Key being added: 'KMS:OfficePC'
              Aug-14 4:22:03 AM Warning I/O interface KMS is down, executable is not running, restarting ...
              Aug-14 4:22:03 AM Warning I/O interface KMS is down, executable is not running, restarting ...
              Aug-14 4:22:03 AM Warning I/O interface KMS is down, executable is not running, restarting ...
              Aug-14 4:22:03 AM Error Initializing plug-in(2): KMS Instance:OfficePC:Object reference not set to an instance of an object.STACK: at System.Runtime.Remoting.Messaging.LogicalCallContext.Propaga teIncomingHeadersToCallContext(IMessage msg) at System.Runtime.Remoting.Proxies.RealProxy.PrivateInvoke(Mess ageData& msgData, Int32 type) at HomeSeerAPI.IPlugInAPI.InitIO(String port) at Scheduler.clsHSPI.CheckInterfaces()
              Aug-14 4:21:07 AM Info Plugin KMS with instance: OfficePC has disconnected
              Aug-14 4:21:07 AM Info Plugin KMS with instance OfficePC has connected. IP:192.168.1.113:51983
              HSPro: 3.0.0.194
              PL: Insteon PLM 3.0.5.20,Insteon Thermostat 3.0.1.1 , UltraM1G, RainRelay8, UltraECM3, UltraPioneerAVR3, BLBackup, weatherXML, Jon00 Network & PC Monitor
              HW : Win 7 64bit, Intel i7-2600, 16 GB DDR3 Ram, 60 Plus Insteon Dual Band Devices, Rain8 Pro2, Elk M1 Gold, Brueltech GreenEye.

              Comment


                #8
                Originally posted by CharlieWayne View Post
                Hello Spud,

                Got your plugin installed from the updater and followed your instructions for install. Tried to create 2 devices (1 for the HS machine, and the 2nd for remote pc called OfficePC). Only the HS Machine has created a device and reports its status changes.

                The remote device called "OfficePC" has an error message on the plugin instance (CRITICAL: Plugin has disconnected.) Also see lots of connect and reconnect errors in the log. One thing I notice is the HS machine trying to connect to a local ip for the remote "OfficePC).

                Does this indicate a setup error and do I need to erase any config file?

                Heres the logs and any help would be greatful
                How do you start the OfficeXP instance?

                You don't need to create and start the remote plugin instance from the Manage > PLUG-INS page. You just have to start HSPI_KMS.exe (with parameters) from the command line on your remote machine.

                Comment

                Working...
                X