Jump to content

Chowmain - Generic TCP Command Driver


Recommended Posts

Chowmain - Generic TCP Command Driver

Control4 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.

Features

  • Everything is programmed from the actions tab
  • HTTP commands
  • Ascii based TCP commands
    • Definable IP Address, Port and Command
    • Command can contain special character delimiters such as carriage returns or line feeds (eg \r\n).
  • Ascii based UDP commands
    • Definable IP Address, Port and Command
    • Command can contain special character delimiters such as carriage returns or line feeds (eg \r\n).
  • Wake-On LAN command
    • Can 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 Questions

Can 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 Guide

How do I buy the driver?
This driver is developed by Chowmain software & apps and is distributed and supported by Houselogix, Inc. 

Download Driver / Purchase Licence

Who do i contact for technical support?
This driver is developed by Chowmain software & apps and is distributed and supported by Houselogix, Inc. 

Support

Do 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. 

TCPcommand2.png

TCPcommand1.png

Link to post
Share on other sites

  • Replies 55
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

Popular Posts

I am getting quite a few enquiries about how to integrate iOS shortcuts with our updated Generic TCP Command driver. As such i have updated the documentation to walk programmers through how it wo

Thanks for the feedback.  I'll put it on the feature request list.

There is a way to do this if you have the Homebridge driver by @Joshua Pressnell.  Homebridge creates a web API of a sort on port 8070. So the command http://192.168.1.12:8070/38/level/22 will set the

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.

Link to post
Share on other sites

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.

Link to post
Share on other sites

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.

Link to post
Share on other sites

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.

Link to post
Share on other sites

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.

Link to post
Share on other sites
  • 8 months later...

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,

Link to post
Share on other sites
  • 3 months later...

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&param=udevice&idx=IDX&nvalue=0&svalue=TEMP

 

Thanks,

 

Mark.

 

Link to post
Share on other sites

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.

Link to post
Share on other sites

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&param=udevice&idx=104&nvalue=0&svalue=PARAM{1146,1012} HTTP/1.0\r\n\r\n

 

Is converted to...

 

  GET /json.htm?type=command&param=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.

Link to post
Share on other sites
  • 2 weeks later...

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! 

Link to post
Share on other sites

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.

Link to post
Share on other sites
  • 2 weeks later...

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!

Link to post
Share on other sites
  • 2 weeks later...

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.

Link to post
Share on other sites

Hi

I 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

If 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.

Link to post
Share on other sites

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!

Link to post
Share on other sites
  • 2 years later...

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

Link to post
Share on other sites
  • 3 weeks later...

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.

Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


×
×
  • Create New...