Jump to content
C4 Forums | Control4

Control4 - Python Lighting


saagar91

Recommended Posts

Hello,

 

I'm working on writing a Python library to do what navigator can do. With the use of Python many complex functions could be achieved.

 

Currently, I have lighting implemented. The description is in my blog:

http://theengineeringguy.blogspot.com/2014/03/control4-set-lights-with-python.html

 

The python code is in my git repo:

https://github.com/sapatel91/pyControl4

 

Also, for anyone who is new to Python I'll consider making a tutorial to set it up if there's interest. I use Eclipse with the PyDev plugin and it works great.

 

The version of Director I have is 2.1.1.135702

 

If you have any questions, please ask.

Link to comment
Share on other sites


I think you mean do what navigator can do but regardless of terminology good work.

 

I corrected it. I'm new to the Control4 set up. I've been playing with it for a few days now. It's been hard to find a lot of support online. I found a few guides on SOAP commands, etc. A lot of it was in Lua. I figured I'd do it in Python because there's a plethora of modules also it would be cool to use a Beaglebone or Raspberry Pi to run some macros.

Link to comment
Share on other sites

C4SOAP is actual an internal non supported API.  As such you'll pretty much find nothing about it online.  It'll probably be better to write a driverworks driver with a serversocket and communicate to that way.  You'll find you'll get more support from Control4 and there is a slimer chance that an update will break it.

Link to comment
Share on other sites

As Alan mentioned, C4Soap is not well documented outside of Control4, but it's certainly available in the current version for this sort of functionality.

 

Besides my Lua scripts, if you do a search for 'c4soap' on Google, there are a few other libraries that do some limited C4Soap functionality.

 

None of the libraries out there seem to implement much of the C4Soap protocol, other than SendToDevice, etc.

 

 

Be aware that there's no support for any C4Soap functionality, and that Control4 may at some point remove the ability to access C4Soap without a certificate, or some other restriction, although at the moment, that's not the case.

 

RyanE

Link to comment
Share on other sites

As Alan mentioned, C4Soap is not well documented outside of Control4, but it's certainly available in the current version for this sort of functionality.

 

Besides my Lua scripts, if you do a search for 'c4soap' on Google, there are a few other libraries that do some limited C4Soap functionality.

 

None of the libraries out there seem to implement much of the C4Soap protocol, other than SendToDevice, etc.

 

 

Be aware that there's no support for any C4Soap functionality, and that Control4 may at some point remove the ability to access C4Soap without a certificate, or some other restriction, although at the moment, that's not the case.

 

RyanE

 

Yeah, I'm gonna do some more hacking around and see what I can discover with C4Soap. I wonder if I can send TV remote commands.  All I think I need is lighting and tv remote functionality. It would be nice to integrate that with some sort of voice recognition.

Link to comment
Share on other sites

  • 6 years later...

Hello, I'm working with an individual who has a physical disability and uses a Windows 10 computer with eye tracking. He has a Control4 system and he wants to be able to use it in order to control his tv. I see that you were going to work on this ability. Any chance you have made any progress? The device he's using is able to execute programs with arguments so I'm thinking about doing something I did similar to Roku where I have something like the following

<<RUN-PROGRAM>>("%SystemDrive%\custom apps\NuVoice Roku\roku.pyw" "volume_up")

Any suggestions on where I might go from here will be appreciative!

Link to comment
Share on other sites

I think it would make more sense to use something like curl or wget for windows, and then send URL Get commands to a driver on the Control4 system that would accept those commands, and would then send commands to the TV driver.

My Web Events driver (which is *very* basic, and doesn't do a ton) can fire events received from url or wget, and then you could in that driver do programming on when a command is received, and depending on which command is sent, send the appropriate command to the TV driver.

https://untestedhacks.com/2013/web-events-driver/

RyanE

 

Link to comment
Share on other sites

This thread is quite old. Please consider starting a new thread rather than reviving this one.

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

Important Information

By using this site, you agree to our Terms of Use.