I’ve had a few requests for this driver lately, sorry I haven’t posted it before now.
This driver accepts connections on the main (master) controller on port 8080, and sets a variable with the sent command, and fires an event.
i.e. if you do a URL Get to the following address:
http://CONTROLLER_IP_ADDRESS:8080/MYCOMMAND
The Control4 ‘COMMAND’ variable will contain MYCOMMAND, and the ‘Command Received’ event will be fired.
In Control4 programming, you can program against the command name received in the COMMAND variable.
The driver can be found here:
Just like to say thanks for the free driver. I now have a c4 prowl notification when motion is detected in my birdhouse (raspberry pi with motion running). Thanks Ryan
This doesn’t work on mine, I am on version 1.7 currently. Do I need to reset the controller? I have a HC-300.
Yeah, it’s 2.2+ only. There’s no way to do Server Sockets in DriverWorks before 2.2, I believe.
I guess I need my dealer to install the Driver for me, correct?
Correct.
I am getting weird behaviour, on a HC300 test director I have no issues adding on 2.5.1 on a main HC800 I get “Add Item Error, unable to add”
Have you seen that before?
Usually this indicates you have a version of ComposerPro that’s different than the system you’re running, and/or you have some project corruption.
Great driver! Answered a lot of questions for me about c4 sockets. Is there any way to have my web-site (via PHP) outside of the local network send a command without forwarding ports on my router? I’m trying to send help documents to my clients that can be popped up on a touchscreen.
I have the driver in my control4 system put but what should I do more?
Any security issues by allowing this port to be internet facing? Should i change my root password on my controller? I’m using tasker to track when im home or not and would like to be able to fire events after i leave my home.
Hello Ryan,
Have you had any more development on the Web Events Driver ?
I have just had Control4 installed in my home and wanted to send HTTP commands from EventGhost to Control4.
Hi, I have DL your Web events driver but when typing http://192.168.50.230:8080/ I don’t get and web page load?
The Priimary director is 50.230, and have tried re-booting the system running 2.7.1. Is the driver still compatible with newer OS?
Is this still working in 2.7?
Pingback: HomeKit for Control4 | Control 4 Driver Programming
RyanE, thanks for all your Control4 work I’ve seen here and elsewhere.
I just had my dealer install WebEvents on my HC800 running C4 2.8.0. When I use my browser to invoke WebEvents, the webpage returned is as expected (the command string I sent is shown as the “Command”). The C4 “Command Received” event is fired but, when I look at the C4 list of variables, the COMMAND variable is never created. So I created three C4 string variables “COMMAND”, “Command” and “command” but, according to the variable values shown in C4, none of those variables are updated following a “Command Received” event. So I’m stuck and wondering if you have any suggestions? I’ll understand if you don’t reply. 🙂
Joe
*yes*, there are probably security issues with this driver.
I don’t *know* of any security issues, but I wouldn’t do it.
It’s an incredibly simple driver, and I haven’t put any time into ensuring it is in any way secure.
I wouldn’t personally put it on an internet facing port.
Thanks for this driver, i was using it fine for a while then one day crashed my HC250 meaning it would simply keep rebooting (worked fine after removing the driver)
Now i’ve narrowed it down to whenever i access the IPADDRESS:8080, it shows me the small webpage, then crashes director.
I edited the driver to use a different port (8001) which seems to work. Something that is appearing in the debug is GET URL: [favicon.ico], after the command, is this required?
favicon.ico is your browser (Chrome or Firefox, etc.) asking for the ‘favorite’ icon from the website. It’s what you’d see in your browser’s tab for that site.
You can just ignore that. The driver doesn’t take it into account.
I’m not sure why you would be getting a reboot loop when accessing the driver using port 8080, glad to hear it’s working on 8001.
Thanks for the driver. However, I am not getting any response when submitting a url. My HC800, OS 2.8 does not seem to be “listening” on TCP port 8080. I have edited to try other ports. Each with equal failure.
I have since updated to 2.8.1 and Pro 281. Each time I edit the driver, I restart composer. Still no response. It almost seems like the driver never loads. Can you direct me to any areas to trouble shoot?
A little help with programming in Composer. I have the driver working to send one command, how do I program it to send different commands? Under programming in Composer, when I select the driver and see “Command Received”, how do I set/add additional commands? Thanks
I installed the driver, but it doesn’t appear in “Manage Driver” in Composer 2.8.1. I am confident it’s installed because if I try and re-install it, it will tell me it’s already instaleld and the same version.
Thoughts for me?
Axel and RyanE, how can I save to c4i after editing the port to 8001 in driverworks, it only allows me to save to c4zproj format.
The driver opens up 8080 port on controller but gets no response and the web page keep loading
Thanks!
Hello, thx for this great driver!
I try something… it didn’t work
http://IP:8080/C4:SetVariable(TEMPERATURE, 20)
With the variable TEMPERATURE already created.
How can i put “20” in “TEMPERATURE” variable?
Thx
Could this be updated to respond with a value? The home bridge HTTP plugin allows for a “status URL” and a “brightness URL”. Status URL expects 0 or 1 for off/on. Brlightness URL expects an integer value indicating brightness level. Would be really cool if we could configure a command to reply with the state of a particular light/dimmer/fan so that the HomeKit UI is properly updated.
I went ahead and made the updates, if anybody is interested.
1) I updated the driver to have a property for the web port. Since several of the C4 api calls are asynchronous, if multiple commands come into the driver quickly (like for setting scenes), then the driver gets confused and only processes the last command received. Thus, if you’re going to use this with HomeKit, it makes the most sense to have a one-to-one driver mapping between the HTTP driver and the devices you want to control. So we need to be able to have a property to set the HTTP port, since each driver needs a unique port.
2) I updated the driver to have a RESPONSE variable that can be set to indicate the status of a C4 device. For lights, you can set it to 0 (off) or 1 (on) and for dimmers you can set it from 0 (off) to 100 (full on). This allows home bridge to keep the status of the devices in HomeKit in sync with the actual status of the C4 devices.
I know this is a very old thread but can you share the updates you did to the driver?
Hi Ryan!
My Controller ip is 192.168.1.10
I downloaded your Web Event Driver, but it doesn’t work perfectly.
It only works if i don’t use commands!
I.e. http://192.168.1.10:8080/test -> Request is:
Connection Successful
Command: None
Why does the command not work?
I use Composer 2.8.2!
Hope you can help me.
Greets from Austria
Wolfgang
Thanks a lot for this driver! I have a “door station” device with a door bell button on it. It’s an IP device, so I was able to program it to hit a URL when that button is pressed, and then use one of the Control4’s relay to ring my actual physical doorbell. Very cool!
I love the simplicity of this driver!
One question: the “COMMAND” control4 variable – is this something I need to create as a variable name, or is there a globally significant Control4 “COMMAND” variable I can access from Composer?
In the Netherlands we use Smart Meters for electricity and gas usage, using a Raspberry Pi it can report current usage and show monthly/daily usage.
Could this driver be used to collect this data for Control4 and then build a gauge interface arround this driver or would you recommend doing it a different way?
Smart meter has a P1 port (rj11 connection) can send data like this:
1-3:0.2.8(40)
0-0:1.0.0(XXXXXXXW)
0-0:96.1.1(45303XXXXXXXXXXXXXXXXX)
1-0:1.8.1(000018.947*kWh)
1-0:1.8.2(000000.000*kWh)
1-0:2.8.1(000000.714*kWh)
1-0:2.8.2(000000.000*kWh)
0-0:96.14.0(0001)
1-0:1.7.0(00.860*kW)
1-0:2.7.0(00.000*kW)
0-0:17.0.0(999.9*kW)
0-0:96.3.10(1)
0-0:96.7.21(00006)
0-0:96.7.9(00005)
1-0:99.97.0(1)(0-0:96.7.19)(000101000001W)(2147483647*s)
1-0:32.32.0(00000)
1-0:32.36.0(00000)
0-0:96.13.1()
0-0:96.13.0()
1-0:31.7.0(004*A)
1-0:21.7.0(00.856*kW)
1-0:22.7.0(00.000*kW)
0-1:24.1.0(003)
0-1:96.1.0(473XXXXXXXXXXXXXXXXXXXXXXXXX)
0-1:24.2.1(140125220000W)(00008.116*m3)
0-1:24.4.0(1)
!04F0
Thanks for any pointers!
Colin
Hi Ryan,
Thanks for this. Super useful still. I’m wondering if it’s possible to invoke an http fetch from within my C4 system. For example, user presses a Custom Button and in response, a url is called .. http://server/rest/api/dosomething ?
this driver no longer fires in os 3.1.3
Great Thanks!
Siri is working now with shortcuts! Great!
Will this driver work with the increased security of OS3, more specifically OS3.2?