Hello,
i would like to send commands from EventGhost (HTPC Win8x64) to FHEM (Ubuntu).
So I can turn on an off the lights (that ar originally controlled via FHEM), using my HTPC-IR-Controller.
FHEM is reachable via telnet port 7072 and via http port 8083.
In the webbrowser i only have to send on or off command in the address bar.
The following links are switching the lamp directly from the call in the address bar on or off.
"http://192.168.167.132:8083/fhem?cmd.my ... itch3%20[b]on[/b]&room=Wohnzimmer"
"http://192.168.167.132:8083/fhem?cmd.my ... itch3%20[b]off[/b]&room=Wohnzimmer"
But how can I do this using EventGhost. Is the webserver plugin able to do this?
This should run complete in background without opening an window, so that wathing tv will not be influenced.
Another way I┬┤ve tried, is using an VB Script. The script itself is working. But there is an unwanted delay because of the sleep timer.
Further I can not start the script via EventGhost. I┬┤ve tried to start it with an batch file but the VBScript then is not working.
I think it has something to do with the user-rights, because telnet can not be found.
If I start the batch manually via dubble click or as admin, it┬┤s working.
<job>
<script language="VBScript">
Option Explicit
On Error Resume Next
Dim WshShell
set WshShell=CreateObject("WScript.Shell")
WshShell.run "cmd.exe"
WScript.Sleep 100
WshShell.SendKeys "telnet 192.168.167.132 7072"
WshShell.SendKeys ("{Enter}")
WScript.Sleep 1000
WshShell.SendKeys "set myITSwitch3 on"
WshShell.SendKeys ("{Enter}")
WScript.Sleep 1000
WshShell.SendKeys "quit"
WshShell.SendKeys ("{Enter}")
WScript.Sleep 1000
WshShell.SendKeys ("{Enter}")
WshShell.SendKeys "exit"
WshShell.SendKeys ("{Enter}")
WScript.Quit
</script>
</job>
I am looking for a way to control FHEM without much delay.
Has anyone an idea for me or already experiences in this direction?
thanks for respone
regards
Notice: This forum has been recovered from an old backup, so some content, links, and dates may be outdated. The forum is currently read-only while we restore sign-in and registration functionality. Details
If you find this forum valuable and would like to help keep it online, donations to help cover hosting and domain costs are greatly appreciated, but never expected. You can support the forum through Buy Me a Coffee or Ko-fi. Thank you for helping preserve the EventGhost community.
If you find this forum valuable and would like to help keep it online, donations to help cover hosting and domain costs are greatly appreciated, but never expected. You can support the forum through Buy Me a Coffee or Ko-fi. Thank you for helping preserve the EventGhost community.
Send Commands to FHEM
Re: Send Commands to FHEM
Yes!spynet wrote:But how can I do this using EventGhost. Is the webserver plugin able to do this?
It has an action: "send event to another webserver" which does exactly what you want.
Re: Send Commands to FHEM
I┬┤ve tried to use this action already.
I┬┤ve first installed the Plugin.
If I click -> Add Action... -> Webserver -> Send event to another webserver
There appears lots of errors in the log, but there are no parameters to set up.
Do you know, how to use this Action?
I┬┤ve first installed the Plugin.
If I click -> Add Action... -> Webserver -> Send event to another webserver
There appears lots of errors in the log, but there are no parameters to set up.
Do you know, how to use this Action?
Re: Send Commands to FHEM
well, I should know it, after all I wrote it...
What do you mean by "there are no parameters to set up"?
What did you enter here:
What do you mean by "there are no parameters to set up"?
What did you enter here:
Re: Send Commands to FHEM
I've not seen that windows before.
When I klick "send event to another Webserver" to add an action, only the errors in the log appears.
I will try it tomorrow with another installation when i'm back from business trip.
When I klick "send event to another Webserver" to add an action, only the errors in the log appears.
I will try it tomorrow with another installation when i'm back from business trip.
Re: Send Commands to FHEM
If you are not using the latest Version (2.0) You can also try to use that version which you can find here viewtopic.php?f=9&t=1663&start=45 - it shouldn't make a difference, but you never know 
Last edited by Sem;colon on Fri Jan 24, 2014 9:03 pm, edited 1 time in total.
Re: Send Commands to FHEM
I┬┤ve used the version included in EventGhost_0.4.1.r1640_Setup.exe
With Version 2 of WebServer plugin, everything works fine. That saves a lot of work for me.
Thank you
With Version 2 of WebServer plugin, everything works fine. That saves a lot of work for me.
Thank you
