alanchow Posted March 27, 2014 Share Posted March 27, 2014 Chowmain - Generic TCP Command DriverControl4 allows for you to easily integrate infra red based audio/visual devices but it does not give you the ability to integrate TCP/IP based devices easily.This is where the Chowmain generic tcp command driver comes in. With customisable actions you can now easily fire off TCP or HTTP commands to any device or service contactable from your network.FeaturesEverything is programmed from the actions tabHTTP commandsSupports URL encoded usernames, passwords and ports eg http://192.168.1.131:32400/librarySupport for HTTP GET and HTTP PostSupport for HTTPSAscii based TCP commandsDefinable IP Address, Port and CommandCommand can contain special character delimiters such as carriage returns or line feeds (eg \r\n).Ascii based UDP commandsDefinable IP Address, Port and CommandCommand can contain special character delimiters such as carriage returns or line feeds (eg \r\n).Wake-On LAN commandCan be used to wake up a sleeping or powered off device that supports wake on lan (eg computers or NAS drives).Can be used to quickly integrate devices not normally integrated within Control4’s driver wizard by adding tcp commands to their events page.Frequently Asked QuestionsCan you give us some examples of how we could use this driver?* This driver is useful to fire commands to shut down NAS drives, fire off camera triggers, fire off commands to your PC using event ghost.* This driver can be used to access HTTP Post services such as SMS gateways, push notification services such as prowl and pnotify.com* This driver can be used to send Wake on Lan packets to supporting computers and NAS drives to turn them on from sleep or off modes.Are there any other cool things we can do with this driver?* You can also create quick simple IP based AV devices by firing off commands on the AV event. Though this is not substitution for a real IP driver it allows non driverworks developers to create simple drivers for their jobs where they cannot afford to hire a driverworks developer.How do I find out more information about the driver?Please see the links below for more information about the driver.Download Installation GuideHow do I buy the driver?This driver is developed by Chowmain software & apps and is distributed and supported by Houselogix, Inc. Download Driver / Purchase LicenceWho do i contact for technical support?This driver is developed by Chowmain software & apps and is distributed and supported by Houselogix, Inc. SupportDo you provide trial licences?All Chowmain drivers for Control4 come with a 48 hour trial. This is activated once you add the driver to the project. No additional steps are necessary. Quote Link to comment Share on other sites More sharing options...
msgreenf Posted March 27, 2014 Share Posted March 27, 2014 I really like this concept! Brainstorming good use cases now Sent from my Nexus 7 using Tapatalk Quote Link to comment Share on other sites More sharing options...
alanchow Posted March 27, 2014 Author Share Posted March 27, 2014 i use it to trigger my camera PTZ on doorbell press. Quote Link to comment Share on other sites More sharing options...
alanchow Posted March 27, 2014 Author Share Posted March 27, 2014 Could also be used to integrate pretty much any push notification service as well now that i think about it (eg http://pnotify.com/) Quote Link to comment Share on other sites More sharing options...
alanchow Posted March 27, 2014 Author Share Posted March 27, 2014 Could also be used to integrate pretty much any push notification service as well now that i think about it (eg http://pnotify.com/) Hrmm yes and no now that i look into it. pnotify uses http post. my driver only supports http get. Though you could write the custom HTTP post packet through the TCP message side of the driver and yes that would work but with a little more effort. Quote Link to comment Share on other sites More sharing options...
ILoveC4 Posted March 28, 2014 Share Posted March 28, 2014 So, I think I've figured out how to use a relay to tell the Control4 system whether or not the power is out in my house (my UPS units don't communicate to anything other than the NAS). I'm thinking there may be pratical use for THIS driver to turn some things back on that don't default turn on when power is supplied, by DO support WOL (my NAS is a good example of this). Does anyone know how I find out what the HTTP GET command is, or if there even is one, for the NAS? It can be powered on from a web console, would I just use WIRESHARK to sniff out that traffic? Would I track it somehow using my PFSense Firewall? I'm assuming that this can be used to send a WOL packet, or am I off here? I'm not an expert on that stuff. Quote Link to comment Share on other sites More sharing options...
alanchow Posted March 28, 2014 Author Share Posted March 28, 2014 So, I think I've figured out how to use a relay to tell the Control4 system whether or not the power is out in my house (my UPS units don't communicate to anything other than the NAS). I'm thinking there may be pratical use for THIS driver to turn some things back on that default turn on when power is supplied, by DO support WOL (my NAS is a good example of this). Does anyone know how I find out what the HTTP GET command is, or if there even is one, for the NAS? It can be powered on from a web console, would I just use WIRESHARK to sniff out that traffic? Would I track it somehow using my PFSense Firewall? I'm assuming that this can be used to send a WOL packet, or am I off here? I'm not an expert on that stuff. It doesn't currently support WOL but great idea. I'll implement it and roll it out next week. Will also do HTTP Post whilst i'm at it and general UDP packets. Keep the idea coming. Quote Link to comment Share on other sites More sharing options...
LSDave Posted March 28, 2014 Share Posted March 28, 2014 I thought there was a free WOL driver out there somewhere. Quote Link to comment Share on other sites More sharing options...
alanchow Posted March 30, 2014 Author Share Posted March 30, 2014 I thought there was a free WOL driver out there somewhere. I thought there was a free WOL driver out there somewhere. Nothing stopping you from using a free one. I'm just adding more features to mine to make mine the one stop driver for all generic commands It doesn't currently support WOL but great idea. I'll implement it and roll it out next week. Will also do HTTP Post whilst i'm at it and general UDP packets. Keep the idea coming. Wake On Lan and HTTP Post has been implemented into the driver. Driver will be pushed out via the Extra Vegetables auto update service to all those who already have the driver. Otherwise it'll be available to download from Extra Vegetables in the next few days. This means that HTTP Post services such as pnotify.com, prowl, various online SMS gateways can now be easily integrated by anyone. Quote Link to comment Share on other sites More sharing options...
zaphod Posted March 31, 2014 Share Posted March 31, 2014 So, I think I've figured out how to use a relay to tell the Control4 system whether or not the power is out in my house (my UPS units don't communicate to anything other than the NAS).If you did have a UPS connected to a PC you may be able to use the "UPS on battery" event to kick off a Task with the Windows task scheduler. If you are like me you have a myriad of UPSs all around the house and you can connect one of them to a PC that is generally turned on. Quote Link to comment Share on other sites More sharing options...
ControllAll Posted December 13, 2014 Share Posted December 13, 2014 Hi Alan, Earlier in this thread you mentioned UDP packets in the works, but it looks like it isn't in the latest driver. Do you know when that will make it in? Also, I've found when I use < or > in the command, it gets replaced by < and >, could these be added as escape characters so they'll make it into the TCP packet correctly? Thanks, Quote Link to comment Share on other sites More sharing options...
mt104 Posted March 17, 2015 Share Posted March 17, 2015 I've been using this driver for ages and find it very useful, thanks. Is it possible to include Control4 variables in an HTTP GET URL? I've seen mention of including PARAM{deviceid, variableid} but I'm not sure what that means. I'd like to use it to pass data from Control4 to a Domoticz server using URLs looking like /json.htm?type=command¶m=udevice&idx=IDX&nvalue=0&svalue=TEMP Thanks, Mark. Quote Link to comment Share on other sites More sharing options...
alanchow Posted March 17, 2015 Author Share Posted March 17, 2015 Hi Mark, PARAM{deviceid, variableid} is only supported in Generic TCP & UDP commands for now. The HTTP versions have not been implemented (i'll add that to my todo list). Please follow the instructions in the installation guide on how to use it. Quote Link to comment Share on other sites More sharing options...
mt104 Posted March 18, 2015 Share Posted March 18, 2015 Hi Alan, Ok, thanks for adding that to your to-do list. I've sorted out including the variable now, by using the generic TCP command, but I'm having problems with ampersands. I'm trying to send the following string, but a packet trace shows that the ampersands are escaped as would be usual for HTTP requests but which unfortunately isn't understood by this web server. This... GET /json.htm?type=command¶m=udevice&idx=104&nvalue=0&svalue=PARAM{1146,1012} HTTP/1.0\r\n\r\n Is converted to... GET /json.htm?type=command¶m=udevice&idx=104&nvalue=0&svalue=8 HTTP/1.0 If I telnet to the web server (Domoticz) and paste in the command without conversion then it works, but if I paste in the version with ampersands escaped like this then it fails. Is there a way to send an un-escaped ampersand? Thanks, Mark. Quote Link to comment Share on other sites More sharing options...
ControllAll Posted March 18, 2015 Share Posted March 18, 2015 I've gotten around this by Copying the "code" from the page in which I call the driver, editing the XML manually to remove the &, and then Pasting the code back into the code window. It's a bit of a pain to do, so hopefully Alan knows a better way. Quote Link to comment Share on other sites More sharing options...
alanchow Posted March 18, 2015 Author Share Posted March 18, 2015 Thanks. Seems like Control4 is sending & and &. I can make a change to the driver to truncate the amp; portion. In the meantime though please follow through wiht ControllAll's suggestion. Quote Link to comment Share on other sites More sharing options...
Peabods Posted March 30, 2015 Share Posted March 30, 2015 Thanks. Seems like Control4 is sending & and &. I can make a change to the driver to truncate the amp; portion. In the meantime though please follow through wiht ControllAll's suggestion.Hi Alan, I can't seem to have any luck trying to track down the version of this software for 2.5.3, i can only find the .c4z version. Is the .c4i no longer available? I want to try to use this to control my UDI ISY994i controller. Thanks for any help you can provide! Quote Link to comment Share on other sites More sharing options...
alanchow Posted March 30, 2015 Author Share Posted March 30, 2015 Hi Alan, I can't seem to have any luck trying to track down the version of this software for 2.5.3, i can only find the .c4z version. Is the .c4i no longer available? I want to try to use this to control my UDI ISY994i controller. Thanks for any help you can provide! We have discontinued support for OS 2.5.3 and lower as of Dec 31 2014. Our drivers require OS 2.6.0 and above to operate. Quote Link to comment Share on other sites More sharing options...
ControllAll Posted April 13, 2015 Share Posted April 13, 2015 Hi Alan, I'm having trouble getting variables to work correctly with HTTP GET. I had it working correctly, and then it stopped working. I have the Houselogix Auto Update service running, so I'm not sure if the issue started during a driver update or not. I'm currently on the latest (April 2015) version now. I've made up new programming in an attempt to get it to work, but still no luck. Any ideas? Right now the PARAM{100001,xxx} isn't being replaced in the GET address, it just gets passed right through as-is. Thanks! Quote Link to comment Share on other sites More sharing options...
alanchow Posted April 27, 2015 Author Share Posted April 27, 2015 Hi Alan, I'm having trouble getting variables to work correctly with HTTP GET. I had it working correctly, and then it stopped working. I have the Houselogix Auto Update service running, so I'm not sure if the issue started during a driver update or not. I'm currently on the latest (April 2015) version now. I've made up new programming in an attempt to get it to work, but still no luck. Any ideas? Right now the PARAM{100001,xxx} isn't being replaced in the GET address, it just gets passed right through as-is. Thanks! I just double checked the last update and can confirm this feature is in the driver. Ensure that the driver says version 8.4 in the properties. If you have further details please submit a ticket via the Houselogix support page. Quote Link to comment Share on other sites More sharing options...
dhicks Posted April 29, 2015 Share Posted April 29, 2015 HiI have some lights that work on tcp called connected py tcp they come from home depot. and i would like to know if this tcp driver will let me connect and control them for control 4 Quote Link to comment Share on other sites More sharing options...
alanchow Posted April 29, 2015 Author Share Posted April 29, 2015 HiI have some lights that work on tcp called connected py tcp they come from home depot. and i would like to know if this tcp driver will let me connect and control them for control 4If you know the protocol and have an understanding of how the device communicates then you can use it to control anything. Otherwise you're better off finding someone to write a driver for your device for you. Quote Link to comment Share on other sites More sharing options...
ControllAll Posted May 3, 2015 Share Posted May 3, 2015 I just double checked the last update and can confirm this feature is in the driver. Ensure that the driver says version 8.4 in the properties. If you have further details please submit a ticket via the Houselogix support page. I rebooted the controller again, and everything is working now. Thanks! Quote Link to comment Share on other sites More sharing options...
zaphod Posted November 8, 2017 Share Posted November 8, 2017 How would you send a variable as part of a command for an HTTP POST event? I have a Control4 variable called Temperature that I get from a weather station. How would I send that as part of the description in a long string that would look something like: add?apikey=abc123&application=Control4&event=Temperature%20Alert&description=THE%20EVENT%20DESCRIPTION%20HERE&priority=1 Quote Link to comment Share on other sites More sharing options...
zaphod Posted November 28, 2017 Share Posted November 28, 2017 I have a Feature request - is it possible to please add Headers for the HTTP POST command? I don't think this is available in the current driver. There is a field for Data but I don't think there is one for Headers. A Header field is a string that comes after the -H or --header. See the curl man page for more info. Ideally the driver would allow for 2-3 header parameters for HTTP POST commands? Here are examples of curl command that I would like to be able to do from the driver: curl -XPOST https://tesla.flawedmodel.com/api/1/vehicles/1234567890/command/sun_roof_controller -H "Authorization: Bearer e01b7d7862eeb7d1cf20a1220c1f328bb1f27de7" -d "state=close&percent=55" curl -XPOST https://tesla.flawedmodel.com/api/1/vehicles/1234567890/command/set_charge_limit -H "Authorization: Bearer e01b7d7862eeb7d1cf20a1220c1f328bb1f27de7" -H "Content-Type: application/json" -d "{\"percent\":62}" curl -XPOST https://tesla.flawedmodel.com/api/1/vehicles/1234567890/command/auto_conditioning_start -H "Authorization: Bearer e01b7d7862eeb7d1cf20a1220c1f328bb1f27de7" curl -XPOST https://tesla.flawedmodel.com/api/1/vehicles/1234567890/command/charge_start -H "Authorization: Bearer e01b7d7862eeb7d1cf20a1220c1f328bb1f27de7" This would allow the user of the driver to send OAUTH tokens, and also to send headers for fields like content type - as in the above examples. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.