Code Monkey home page Code Monkey logo

winthing's People

Contributors

mghaan avatar msiedlarek avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

winthing's Issues

Running as system tray application

A nice solution to control a Windows machine via MQTT without the pain of Microsoft. I like it ;) I'll be using it in my smart home solution! Do you have further plans for the project? How would you like to move the running application to the windows system tray?

Example JSON for Node-RED

Hi

Sorry, not a bug as such, but I've spent the last couple of hours trying to send a well-formed JSON message to winthing using Node-RED and Mosquito on Debian and I'm getting nowhere.

Do you have a full example for the run message?

As an example, I have sent (plus tens of other variants) the following and always get the same errors from winthing; either "Inavlid JSON" or "Invalid Arguments";

{
    "winthing/system/commands/run": [
        "notepad.exe",
        "c:/out.txt",
        "c:/"
    ]
}

Sorry for posting as a bug but there's no discussion section for this project.

Publish "winthing/system/online" before suspend or hibernate

Should'n winthing publish a "winthing/system/online:false" message just before the suspend or hibernate command is executed?
Ideally it would also publish this when the system is suspended by other means than an MQTT command ;-)

And it would be great if it also could publish a "winthing/system/online:true" after resuming from suspend or hibernate.

Doesn't work when running as service?

Hi, I've been using winthing for a while now and it's been great! so first off, thank you!
What I can't seem to get working is running the program as a .bat service.
I can get it to run, and publish "true" topic: winthing/system/system/online while running as a service, but it does not seem to respond to its subscribed topics, I can confirm I am sending the messages to the subscribed topics.
It works flawlessly when its running in a cmd window.

Any ideas? I don't know what to try next...

Didn't recieve the Broadcast Message

Hey there,

First I have to thank you a lot! Very great Project.

I can Publish messages without Problems.
But I did not recieve the Broadcast Message when the program is starting.
I am listen to with mqttfx to the topic winthing/system/online, but I don't get any status message.
If you have an idea let me know.

Best regards
Dominik

Project does not compile in JDK 11.0.1 cause of finalize() deprecation

See log:

[WARNING] COMPILATION WARNING :
[INFO] -------------------------------------------------------------
[WARNING] /D:/Users/foo/Documents/GitHub/winthing/src/main/java/com/fatico/winthing/systems/radeon/RadeonService.java:[41,20] finalize() in java.lang.Object has been deprecated
[WARNING] /D:/Users/foo/Documents/GitHub/winthing/src/main/java/com/fatico/winthing/systems/radeon/RadeonService.java:[43,14] finalize() in java.lang.Object has been deprecated
[INFO] 2 warnings
[INFO] -------------------------------------------------------------
[INFO] -------------------------------------------------------------
[ERROR] COMPILATION ERROR :
[INFO] -------------------------------------------------------------
[ERROR] /D:/Users/foo/Documents/GitHub/winthing/src/main/java/com/fatico/winthing/systems/radeon/RadeonService.java: warnings found and -Werror specified
[INFO] 1 error

don't reconnect after hibernation

hey,
is it somehow possible to get the program to reconnect after the pc wakes up from hibernation?

`22:28:46.049 [main] INFO com.fatico.winthing.messaging.Engine - Sending initial messages...
22:28:46.049 [main] INFO com.fatico.winthing.messaging.Engine - Engine started.
23:15:44.894 [MQTT Rec: WinThing] ERROR com.fatico.winthing.messaging.Engine - Connection lost.

mouseclick

17:36:27.850 [main] INFO com.fatico.winthing.messaging.Engine - Trying to reconnect in 5 seconds...
17:36:32.852 [main] INFO com.fatico.winthing.messaging.Engine - Connecting to tcp://192.168.1.248 as WinThing...
17:36:32.855 [main] INFO com.fatico.winthing.messaging.Engine - Connected.
17:36:32.855 [main] INFO com.fatico.winthing.messaging.Engine - Subscribing to topics...`

mqtt commands were working fine then stopped.

I was using mqtt command and it was working, I used the topic winthing/system/commands/run

and i sent something like "[word1]"

it worked fine, and now its not working , and I changed no settings.

14:40:00 ERROR [MQTT Call: DILLYDALLY-PC/com.fatico.winthing.messaging.Engine] Error while processing system/commands/run(["vpnon"]): Could not run command: vpnon

Connection crash on special characters

The connection seems to crash every time an unexpected special character is send. Example:

Topic winthing/system/commands/open

Publish notepad.exe --> Correctly executed
Publish notepad.ex --> Correctly handled (Cannot open URI: notepad.ex)
Publish C:\notepad.exe or c:/ or ¯\_(ツ)_/¯ -->

23:59:12.841 [MQTT Call: WinThing] ERROR com.fatico.winthing.messaging.Engine - Connection lost.
23:59:12.842 [main] INFO  com.fatico.winthing.messaging.Engine - Trying to reconnect in 5 seconds...
23:59:17.842 [main] INFO  com.fatico.winthing.messaging.Engine - Connecting to tcp://xxx as WinThing...

Jar file is working, but exe file is showing error "This application requires a Java Runtime Environment 1.8 (64-bit)"

I'm starting jar file from windows command line an it works fine. (I'm using a bat file with the command like java -Dbroker="..." ... -jar winthing-1.4.2.jar)

But I would prefer to use winthing-1.4.2.exe file. But when I double click it in the exploer

This application requires a Java Runtime Environment 1.8 (64-bit)

Screenshot 2020-06-04 at 11 45 34

I think that I have JRE installed (the the jar file work fine when running from command line), but the .exe file does not. I've read the docs in this repo, but I can't find the answer.

Can you please explain what should be done to make exe file work.

Disconnection problems

I am using Winthing on several Windows machines, it's really useful! On one of my machines, a laptop, I just cannot seem to keep it connected:

07:41:19.033 [main] INFO  com.fatico.winthing.messaging.Engine - Connecting to tcp://thor.local:1883 as WinThing...
07:41:19.033 [main] INFO  com.fatico.winthing.messaging.Engine - Connected.
07:41:19.033 [main] INFO  com.fatico.winthing.messaging.Engine - Subscribing to topics...
07:41:19.033 [main] INFO  com.fatico.winthing.messaging.Engine -   - winthing/keyboard/commands/press_keys
07:41:19.033 [main] INFO  com.fatico.winthing.messaging.Engine -   - winthing/system/commands/run
07:41:19.033 [main] INFO  com.fatico.winthing.messaging.Engine -   - winthing/desktop/commands/set_display_sleep
07:41:19.033 [main] INFO  com.fatico.winthing.messaging.Engine -   - winthing/system/commands/reboot
07:41:19.033 [main] INFO  com.fatico.winthing.messaging.Engine -   - winthing/system/commands/open
07:41:19.033 [main] INFO  com.fatico.winthing.messaging.Engine -   - winthing/system/commands/shutdown
07:41:19.033 [main] INFO  com.fatico.winthing.messaging.Engine -   - winthing/desktop/commands/close_active_window
07:41:19.033 [main] INFO  com.fatico.winthing.messaging.Engine - Subscribed.
07:41:19.033 [main] INFO  com.fatico.winthing.messaging.Engine - Sending initial messages...
07:41:19.033 [main] INFO  com.fatico.winthing.messaging.Engine - Engine started.
07:41:19.033 [main] INFO  com.fatico.winthing.messaging.Engine - Trying to reconnect in 5 seconds...
07:41:19.143 [MQTT Rec: WinThing] ERROR com.fatico.winthing.messaging.Engine - Connection lost.

That message keeps repeating forever. On the broker side I see nothing out of the ordinary either.

I have used both winthing-1.1.0 as well as 1.4.1 to test.

delete the first "/"

Hi guys. Some mqtt brokers require the prefix to start with "/". Winthing just cuts it off. For myself, I decided this so "// prefix = prefix.replaceFirst (" ^ / + "," ");"
But it would be nice to give more freedom to users.

Documentation: path delimiter

Working: ["notepad.exe"]
Not working: ["C:\Program Files (x86)\Kodi\Kodi.exe"]
Working: ["C:\\Program Files (x86)\\Kodi\\Kodi.exe"]
Working: ["C:/Program Files (x86)/Kodi/Kodi.exe"]

Please correct the README

change winthing in the topic

cant find any function that I can change the topic

from
winthing/keyboard/commands/press_keys
to
PC1/keyboard/commands/press_keys
or
PC2/keyboard/commands/press_keys
can we add a function to make this ?

winthing.ini \ whitelist.ini not being applied

Both files are in the same directory as the exe\jar and contain
asdrufale = "c:\windows\system32\calc.exe"

a payload to winthing/system/commands/run with [asdrufale] yields:

23:44:46 ERROR [MQTT Call: WinThing/com.fatico.winthing.messaging.Engine] Error while processing system/commands/run(["asdrufale"]): Could not run command: asdrufale

What's worse is that whatever i put into that file seems to get ignored, leaving full execution control upon the windows machine (as default behavior)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.