How about Unified Remote?
It’s an app for Android that allows you to control various devices (like Windows machine).
You simply install server app on PC and you’re ready to go.
indeed, I was referring to the setup in which you run OpenHAB on Linux, and ‘control’ the shutdown of a Windows computer. Likewise, I use a shell script which ssh’es into Linux workstations to shut them down.
Thanks for your answers. net rcp is something I already
looked into but it’s rather limited and functionality is different
between Windows versions, a user with password is needed (I think to
remember), …
Actually, it’s net rpc, as in Remote Procedure Call. Yes, on Windows this is (as far as I know) since NT always a an authenticated action. I think the reasoning for that design should be pretty clear.
Running an SSH server on Windows is possible, and from there you can hack just about anything together with tools ranging from PowerShell to KiXtart to batch files, etc. Some applications expose their own interface for remote control purposes like Media Player Classic, VLC or some Bittorrent clients. If I am not mistaken, the SSH service will also require an authenticated login, though.
I’m not a kodi user, I use a heavily modified Freevo system in a custom ‘media center system’ that I wrote and built a while back, but if I’m not mistaken you can add just about any command to kodi, and operate kodi via HTTP commands. That should cover everything you need, no?
Guys, I’ve found a satisfying solution to my initial question:
I’m utilizing MQTT (which is quite nice as a protocol already widely used in the home automation area). “WinThing” is an MQTT client developed in Java to receive all kinds of Windows system commands, including executing a command, opening a URL or shutting down the system. Have a look:
Hello out there, i am a new beginner to openHAb project.
I´m happy that now my shutter and light configuration is working but now i have a problem with mqqt and win thing.
My goal is to remote shutdown and start 2 Windows 10 PC´s (start maybe with windows login if possible would be great) from openhab
Openhab is running on Synology NAS
Here are the steps i´ve already done. only to be sure thats the right way.
I have installed mosquitto-1.4.11-install-win32 on one of the Windows 10 Pc´s only one first to test (i found a guide i copied the dlls and everything seems to be running fine. It also starts as a Service should work perfect.
Then i start the Winthing.jar manually through windows cmd console (first afterwars it will work automatically)
i got status messages from engine: like winthing/system/commands/open and alle the others
and at least: Subscribed, Sending initial Message, Engine Started
So hopefully it looks like its running
I have copied exactly the items the rule and to test also the sitemap from above to the conf folder openhab.
But now its not working.
in events.log i see:
WZ_PC_Command’ received command shutdown
2017-05-20 08:47:00.620 [ItemStateChangedEvent ] - WZ_PC_Command changed from NULL to shutdown
2017-05-20 08:47:00.732 [ItemStateChangedEvent ] - WZ_PC_Command changed from shutdown to NULL
and on openhab.log:
i have nothing
informations: installed openhab 2.1 snapshot and mqqt binding and also action but still not working
maybe you have an answer for me to get this fixed. or other solution for remote pc start/shutdown start progamm etc …
Hey! As always when dealing with MQTT you should use an mqtt client on another device to debug the communication betwen your devices. For PC i can recommend mqtt-spy, for android or iOS you’ll also find apps. Use one of these to troubleshoot the communication.
First thanks for the given solution!
I think i done every step like you guys but it seems that i got an problem with the rules above.
Here are the steps i´ve done. Installed and configured mosquitto as broker on my raspberry. As client i tried to use my Windows10 PC, with winthing service. Inside openhab i´ve configured items, sitemap and rules like @ThomDietrich. So far so good.
The connection between mosquitto and my winthing clients works fine! I´ve tested the connection with MQTTlens application from chrome and was so able to send and execute commands on my Windows10 Client. Perfect!
The only thing that doesnt work is the execution from openhab. My log for the rule:
2017-07-06 10:20:31.886 [ERROR] [.script.engine.ScriptExecutionThread] - Rule 'PC Command': An error occured during the script execution: The name 'publish(<XStringLiteralImpl>,<XStringLiteralImpl>,<XStringLiteralImpl>)' cannot be resolved to an item or type.
i would like to get this running on my HTPC do you have any tutorial info on the process to get the Java files to run on windows? I have my MQTT broker set up on a PI3 running openhab but I am confused as to setting up the winthing files on my HTPC. There is very little information about the actual install on the Github page. Let me know if you could help with the necessary command lines. Thanks
You need to “escape” the percent sign by putting another percent sign in front of it. I know it sounds weird but it’s a programming thing with special charters.
So it would be command=“net rpc shutdown -I 192.x.x.x. -U MyUser%%SuperSecret”
You can look at the conversation on Stackoverflow for more info.
Sorry to ask but where do i get this .jar files ??
'cause when i go to the url link to Github all files I get there now i get in a .zip file and theres a lot of files in that .zip file but no winthing.jar files…Im confused and new to this but I really love openhab2 and got a lot of sonoff stuff working with my setup today and a mqtt server on raspberry pi 3 and feel that the next step now I want to control some software on my windows 10 machine.