Windows PC Indigo Plugin, Beta released

User avatar
GlennNZ
Posts: 1873
Joined: Sun Dec 07, 2014 3:33 pm
Location: Central Coast, Australia

Windows PC Indigo Plugin, Beta released

Post by GlennNZ »

WinRemote Plugin

Image

This is a plugin for Indigodomo that aims to create any Windows Computer as a IndigoDomo device. This is a plugin for those users that a have a few/more Windows operating systems running somewhere, it brings them into the Indigo server fold.

To do this we need two way communication back and forward to indigo.

This is achieved through running a simple server with this plugin on Indigo and a separate windows tray application to periodically communicate back to the Indigo Server.

eg. (Yah! a Indigo Icon in Windows 10)
Image

(other Windows methods such as WMI communication etc.etc. were trialled but were very difficult to set up in my one case let alone others and I abandoned this approach)

The two apps - One Indigo Server, One Windows Computer - IndigoPlugin Communicator - communicate through a single port
This Defaults to port 9123.

Why bother? Some reasons:
* Probably most basically - can turn on/turn off windows PCs easily within Indigo/HomeBridge/Alexa
* Can Message Windows PC on events as required
* Can check running Foreground application and trigger timers on these events -eg. to much minecraft, not enough maths-online
* Can check CPU usage/Memory Free and can trigger if issues


Setup

To setup install the WinRemote IndigoPlugin on your Indigo Server. Select the port to use/defaults to port 9123.
Or leave it at the default.

For the plugin to work - the Windows Application needs to be able to 'talk' to the Indigo Server on this port.

Both Indigo Mac and the Windows Computer must allow communication or traffic through firewall on this port.
Open up Firewalls to either this port or this app to allow this.

Once the WinRemote plugin is installed on the Mac. Enable it if not enabled.

Ideally create a Devices Directory in Indigo Server Called "Windows Computers"

When new Windows Computer devices are created they will be placed here.
Once created, they can be moved/renamed etc as needed and will not be recreated unless deleted.

The devices are only created either at startup of the IndigoPlugin Communicator app, or when the connect button is pressed. So if you need to recreate a Indigo Device just re-press connect on the Communicator app.

On Windows Computer
Run Installer for your version of Windows (32bit or 64bit). If not sure just use 32bit - not sure there is any practical difference.
The Installer also should create a startup entry so app will run on Startup/log in of that user.

Next run the IndigoPlugin Communicator app.

This application requires .Net 4.6 installed to run.
(standard on Windows 10, separate install on some Windows 8)
If needed it will prompt for download, download, install and run again. (doesn't need restart)

As the Application is not set up will need a few settings need to be entered.

Image

Application should open a window for you to enter you Indigo Server details IP address, and the Port you have set within the Indigo Mac WinRemote Plugin (defaults to 9123)
eg.
IndigoServer IP - 192.168.1.6 -- Enter your indigoserver IP address
Port - Defaults to 9123 - set with Indigo WinRemote Plugin
e.g if as above Should Enter 192.168.1.6:9123

Once entered press the Connect Button.
(if your Ip is entered correctly and no firewall or port issues should see this)

Image

This should connect to running WinRemote Indigo Plugin on Indigo Server
(If any error messages will display below - most likely are failure to connect because of incorrect IP/Ports or firewall based settings.)
Once connected, choose Debug Log options and click Save
(this will be the last time you see this window)
Double click the taskbar icon to make disappear/reappear

Now you should see a little indigo icon in the Windows Taskbar.
See here:
Hover mouse over and you will see connected and the time of last communication.
eg
Image


You then just repeat this process, with same IP/port for every Windows computer you want to communicate with.


Back to Indigo Mac Server
Now on the Mac server within the 'Windows Computers' folder or the main device folder you should see a new 'Windows Computer' Device.

This has the following states

Image

* CPU - Current cpu usage
* ForegroundApp - the Current Application that has focus/is in the Foreground
* MemFree - Memory free
* deviceIsOnline - true/false
* Hostname - Name of the Computer
* IP Address - Current IP Address of the computer
* MACaddress - the MAC address of the Network device communicating with the IndigoServer
* pendingCommands - list of current pending commands (only one at once is supported)
* idleTime - time the computer has not had any user keyboard/mouse interaction in Minutes
* upTime - time the System has been 'Up' for

(some of these settings take a few minutes to be calculated, pulled, particularly the MAC address)

Actions

Image

You will notice there is also a Turn On/Turn Off button control for this new Windows Computer.
This is also duplicated in a Action Group for Turn-On/Turn-Off

This will Turn-Off the selected computer within 10seconds with a 10 second warning.
Turn-On uses the MacAddress to send a Wake-On-Lan signal to that computer.
(The computer must be able to response to WOL signals which require sometimes BIOS settings/Windows Network Settings changes)

Other Actions include
Send Message - this will pop up and Send Message to the selected Computer(s)
e.g Windows 8 (Windows 10 is more impressive in my mind)
Image
&
Windows 10
Image

The message and the commands (with exception of Turn-On) will be sent at the next communication (every 60 seconds)

Lock Workstation - returns Windows PC to locked screen (leaves user logged in though)

Beta up Here:
https://github.com/Ghawken/IndigoPlugin ... e/releases
Last edited by GlennNZ on Thu Mar 08, 2018 6:32 pm, edited 7 times in total.
User avatar
Colorado4Wheeler
Posts: 2794
Joined: Mon Jul 20, 2009 10:48 am
Location: Colorado

Re: Windows PC Indigo Plugin, Coming Soon.......

Post by Colorado4Wheeler »

Very cool!
My Modest Contributions to Indigo:

HomeKit Bridge | Device Extensions | Security Manager | LCD Creator | Room-O-Matic | Smart Dimmer | Scene Toggle | Powermiser | Homebridge Buddy

Check Them Out Here
User avatar
matt (support)
Site Admin
Posts: 21542
Joined: Mon Jan 27, 2003 1:17 pm
Location: Texas
Contact:

Re: Windows PC Indigo Plugin, Coming Soon.......

Post by matt (support) »

Neat!
Image
howartp
Posts: 4559
Joined: Thu Jan 09, 2014 4:43 pm
Location: West Yorkshire, UK

Re: Windows PC Indigo Plugin, Coming Soon.......

Post by howartp »

Awesome!!!

I’ve got a python script on my Win PCs that AutoHotKey runs when the PC is idle for x minutes.

This forms part of my “is room occupied” logic so lights don’t go off if PC is active.

This would be a great extension of your app.


Sent from my iPhone using Tapatalk Pro
User avatar
GlennNZ
Posts: 1873
Joined: Sun Dec 07, 2014 3:33 pm
Location: Central Coast, Australia

Re: Windows PC Indigo Plugin, Coming Soon.......

Post by GlennNZ »

Colorado4Wheeler wrote:Very cool!
Thanks - means a lot, as really just some simple python stuck together, with some C# (oh the joys of a compiled language)
howartp wrote:Awesome!!!
I’ve got a python script on my Win PCs that AutoHotKey runs when the PC is idle for x minutes.
This forms part of my “is room occupied” logic so lights don’t go off if PC is active.
This would be a great extension of your app.
Thanks again.
Fantastic Suggestion! , and done.

Any more keep them coming!

Image

Idle time for each computer in minutes (may add trigger)

Edit:
Have also added Windows PC - Logged in Username, and total System Uptime (in Hours)

Glenn
User avatar
Colorado4Wheeler
Posts: 2794
Joined: Mon Jul 20, 2009 10:48 am
Location: Colorado

Re: Windows PC Indigo Plugin, Coming Soon.......

Post by Colorado4Wheeler »

My roots are in PC development on compiled languages like VB and C. Heck, the primary subscribed software for my company is a program I wrote in VB fifteen years ago that's still maintained in VB to this day (too much trouble to convert and it works so why mess with it). I wrote my first Basic program around 1983 on my 5.25" floppy disk :).
My Modest Contributions to Indigo:

HomeKit Bridge | Device Extensions | Security Manager | LCD Creator | Room-O-Matic | Smart Dimmer | Scene Toggle | Powermiser | Homebridge Buddy

Check Them Out Here
howartp
Posts: 4559
Joined: Thu Jan 09, 2014 4:43 pm
Location: West Yorkshire, UK

Re: Windows PC Indigo Plugin, Coming Soon.......

Post by howartp »

Snap, though I wasn’t born till ‘84!

VB and VB.Net, plus I tweak a C#.Net app we had built for us that’s in use daily at work.

Now mainly Powershell and PHP, apart from when I’m doing Indigo.

If you guys know Strike It Lucky / Strike It Rich, on tv, I programmed that for a fundraiser at Church a couple of years ago. 30 client PCs and a server/host to control them.


Sent from my iPhone using Tapatalk Pro
User avatar
Colorado4Wheeler
Posts: 2794
Joined: Mon Jul 20, 2009 10:48 am
Location: Colorado

Re: Windows PC Indigo Plugin, Coming Soon.......

Post by Colorado4Wheeler »

howartp wrote:Snap, though I wasn’t born till ‘84!
Thanks, I don't feel old at all now :roll:. I had completed two tours and three theaters by the time you were 8!
My Modest Contributions to Indigo:

HomeKit Bridge | Device Extensions | Security Manager | LCD Creator | Room-O-Matic | Smart Dimmer | Scene Toggle | Powermiser | Homebridge Buddy

Check Them Out Here
User avatar
jay (support)
Site Admin
Posts: 19232
Joined: Wed Mar 19, 2008 11:52 am
Location: Austin, Texas
Contact:

Re: Windows PC Indigo Plugin, Coming Soon.......

Post by jay (support) »

Colorado4Wheeler wrote:I wrote my first Basic program around 1983 on my 5.25" floppy disk :).
I wrote my first Basic program in 1982(ish) on a TRS-80 Model III - I went after school to the local trade school and asked the teacher if I could use one of the unused TRS-80s to learn programming while she taught a data processing class - she was a friend of my Mom :). I then continued to learn on an Apple II Plus which my school found second-hand after some serious begging. It was in the assistant principle's office so I got ribbed about spending a lot of time in the principle's office. :lol:
Jay (Indigo Support)
Twitter | Facebook | LinkedIn
User avatar
Colorado4Wheeler
Posts: 2794
Joined: Mon Jul 20, 2009 10:48 am
Location: Colorado

Re: Windows PC Indigo Plugin, Coming Soon.......

Post by Colorado4Wheeler »

jay (support) wrote:I wrote my first Basic program in 1982(ish) on a TRS-80 Model III
Same model here! I got a TI99-4A after that and that's when I got serious about programming. I was using computer before I wrote my first real program but I still remember having the binder for Basic out and going through every command. Like I said, somewhere around 1983, we could have been coding the same language on the same computer at the same time :).
My Modest Contributions to Indigo:

HomeKit Bridge | Device Extensions | Security Manager | LCD Creator | Room-O-Matic | Smart Dimmer | Scene Toggle | Powermiser | Homebridge Buddy

Check Them Out Here
User avatar
DaveL17
Posts: 7323
Joined: Tue Aug 20, 2013 11:02 am
Location: Chicago, IL, USA
Contact:

Windows PC Indigo Plugin, Coming Soon.......

Post by DaveL17 »

jay (support) wrote:
Colorado4Wheeler wrote:I wrote my first Basic program around 1983 on my 5.25" floppy disk :).
I wrote my first Basic program in 1982(ish) on a TRS-80 Model III - I went after school to the local trade school and asked the teacher if I could use one of the unused TRS-80s to learn programming while she taught a data processing class - she was a friend of my Mom :). I then continued to learn on an Apple II Plus which my school found second-hand after some serious begging. It was in the assistant principle's office so I got ribbed about spending a lot of time in the principle's office. Image
Maybe you should’ve spent more time in English class. It’s principal. Image

I went from a TRS-80 on to C=64 with a floppy drive and a 300 baud modem. I sent my first email with that C=64.


Sent from my iPhone using Tapatalk
I came here to drink milk and kick ass....and I've just finished my milk.

My Plugins and Scripts
jalves
Posts: 783
Joined: Sun Jun 16, 2013 11:35 am

Re: Windows PC Indigo Plugin, Coming Soon.......

Post by jalves »

I have absolutely no use for this plugin. But! would it be possible to do this to support a Raspberry Pi?
Running Indigo 2024.2.1 on a 24" iMac M4), OS X 26.0
Jeff
User avatar
Professor Falken
Posts: 304
Joined: Sun Mar 29, 2015 7:07 am

Re: Windows PC Indigo Plugin, Coming Soon.......

Post by Professor Falken »

A TRS-80 was actually my second machine. Before that I had something from Heathkit... I think it was called a Sinclair.

Of course, I think all that time spent doing BASIC has ruined me for any of these modern languages. I am slowly trying to learn python for Indigo purposes only, but unlike many on this board, my day job is entirely non-IT (except for, of course, using computers).

I am glad to see that some here also started on BASIC though. Perhaps there is hope for me yet.
User avatar
kw123
Posts: 8705
Joined: Sun May 12, 2013 4:44 pm
Location: Dallas, TX
Contact:

Re: Windows PC Indigo Plugin, Coming Soon.......

Post by kw123 »

What’s missing for rpi that myq and pibeacon do not offer ?


Sent from my iPhone using Tapatalk
User avatar
DaveL17
Posts: 7323
Joined: Tue Aug 20, 2013 11:02 am
Location: Chicago, IL, USA
Contact:

Re: Windows PC Indigo Plugin, Coming Soon.......

Post by DaveL17 »

Professor Falken wrote:A TRS-80 was actually my second machine. Before that I had something from Heathkit... I think it was called a Sinclair.

Of course, I think all that time spent doing BASIC has ruined me for any of these modern languages. I am slowly trying to learn python for Indigo purposes only, but unlike many on this board, my day job is entirely non-IT (except for, of course, using computers).

I am glad to see that some here also started on BASIC though. Perhaps there is hope for me yet.
Same goes for me. Basic —> Python. When I came to Indigo, I didn’t know Python existed (I gave up on trying to learn Lua). Now I use Python at work, too (I don’t work in IT.)

If I can do it, you certainly can.


Sent from my iPhone using Tapatalk
I came here to drink milk and kick ass....and I've just finished my milk.

My Plugins and Scripts
Post Reply

Return to “Windows PC Remote Plugin”