[PORT] - Send Events to EventGhost

@arnb, I'm hoping to you can save me one more time. I have everything working right to running the EG command from the browser ( http://192.168.xxx.xxx:ppp?Dimmer) . I have attempted a RM command to initiate the command but it seems i can't. Could you help with the syntax?

  • Set the windows computer to a fixed IP address in your router

  • Assuming the windows machine IP address is 192.168.1.100, and the Event Ghost port is 9999, that command from the Hub would be 192.168.0.100:9999?Dimmer
    Change the IP address and port to match your setup

The following Groovy sample code is taken from my SmartUps module, routine def rebootWindows(). Never tried this in RM.

def rebootWindows()
	{
	log.warn "SmartUPS rebootWindows command entered"
	def egCommand = java.net.URLEncoder.encode("HE.rebootWindows")
	def egHost = "${settings.ip}:${settings.port}" 
	sendHubCommand(new hubitat.device.HubAction("""GET /?$egCommand HTTP/1.1\r\nHOST: $egHost\r\n\r\n""", hubitat.device.Protocol.LAN))
}
1 Like

Great it's working. Your pointers got me going. Thank you.
The RM rule turned out to be simple;

Send GET to: http://192.168.xxx.xxx:pp?Dimmer

1 Like

Hi Guys!

Is there a noob-friendly guide "how to send Eventghost triggers TO the hubitat" ??

Have you tried my post 33 above?

Update: and post 42 above

Perhaps I misunderstood, are you wanting to receive data in HE?

Yes, i do.

I have a HTPC, which i control with the PS3 DVD Remote.

The 1 to 7 buttons on top switch my most important lights
with eventghost, which triggers a fs20 usb wireless transmitter.

Now, iยดm switching from fs20 to zigbee/Hubitat i need an alternative way to trigger the lights.

having read through this post, I feel I understand most of it and should be able to grasp it as i go.

but the question I want to ask before I go too deep into this is, will I in some way be able to alter and control the master volume of my pc from my hubitat dashboard? would be great if it could be with an actual volume controller but would be acceptable if its from just vol Up and Vol Down buttons,

It should be possible by:

  • creating a "virtual audioVolume" device

  • add the device's volume setting to the dashboard, generating a volume slider

  • Find a EG plugin or Windows command that adjusts the PC's volume

  • Create an RM or groovy module that monitors the virtual device's volume setting, then sends an http get command (of your design with the volume percent) to EG when it changes.

  • Create an EG macro that monitors for your command, then adjusts the volume

Lots of moving parts, enjoy the challenge.

1 Like

Appreciated man.

Some good food for thought there and plenty to get stuck into.

Why I've choosen to do all the difficult things before attempting light bulbs is beyond me :joy::joy:

1 Like

Shout out to @arnb for all the support he's provided here.

4 Likes

@arnb not sure if you are able to help me any further, ive managed most the steps and got eventghost operational and created the virtual slider.

im looking into this whole groovy module part, and im loosing my mind :smiley:

any pointers? or where i should be looking to learn how to do this?

I tried adding my Aeon Minimote and it would not come up under the "Button" option. It appears that "capability "Button" has been deprecated. So....

A couple of changes required to the Send Events to EventGhost code

Find "myButton", "capability.button"
and replace with "myButton", "capability.pushableButton"

Find (last line of the code) sendHubCommand(new hubitat.device.HubAction("""GET /?$egRestCommand HTTP/1.1\r\nHOST: $egHost\r\n\r\n""", physicalgraph.device.Protocol.LAN))

and replace with sendHubCommand(new hubitat.device.HubAction("""GET /?$egRestCommand HTTP/1.1\r\nHOST: $egHost\r\n\r\n""", hubitat.device.Protocol.LAN))

Is this something that would work for my issue too? I'ms trying to add hank One key scene controller to Evetghost but it's not there at all. Thought it is button but seems it's not..
Does you solution fix issue with Hank too?

I never heard of this device. Have you used this elsewhere other than Hubitat. I used the Minimote in ST but when I ported it to Hubitat I could not add it to EG for the reasons I described above. One way to find out. Make the changes I noted above and see. :wink:

Yep it works in ST and it works in Hubitat too..but doesn't count as button or anythin else in Eg :slightly_frowning_face:

EDIT: Device can be used either Hank one Key scene controller or generic zwave centralscene controller. Hank one key can be found under "buttons" after I made those changes to code. Generic centralscene controller is under "switch". Both do send button press commands to event log but nothing goes to eventghost.
I made couple virtual devices for eventghost use too and they work normally and eg log shows their actions. Nothing with these buttons.. :frowning:

Has nayone had an issue when installing the driver?
I get this error after trying to install the driver...

unable to resolve class physicalgraph.device.HubAction @ line 126, column 17. unable to resolve class physicalgraph.device.HubAction @ line 137, column 17. unable to resolve class physicalgraph.device.HubAction @ line 149, column 20.

Did you use the code from 5he first post in this tbread?

Replace all occurrences of the above with hubitat.

Hi,

I've been playing around with Tasker and AutoRemote, which lead me to EventGhost. One question I have is, if I want to send a message using a HTTP Get to my Android tablet, but not go through the Internet-based URL, i.e. a local LAN call, can I do that without needing to install EventGhost, or do I have EventGhost installed on my PC and make the HTTP Get call to my PC which then directs it on to my tablet?

Thanks,
Simon

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.