control Renard with...
 
Notifications
Clear all

control Renard with PHP

38 Posts
13 Users
0 Reactions
13.2 K Views
jaywalk101
Posts: 760
Topic starter
(@jaywalk101)
Prominent Member
Joined: 15 years ago
[#18531]

Hey guys,

I'm working on a little project that will allow my visitors to control my lights for this year. I'm thinking about just segmenting an 8 channel Renard controller and allowing visitors to turn off/on the channels through the web. I'm going to try to achieve this through PHP and my local web server running IIS. I'm way in the early stages however. Here is a copy of some simple PHP code I have pieced together through research. I'm still not sure how I'm going to integrate this in my show, but I have all year to figure it out.

In this example, I'm just controlling 3 channel dumb RGB strip. I will keep updating this post and document my progress and findings. Please feel free to add any comments or suggestions because I know this has been done before. Thanks!


37 Replies
cparsons2391
Posts: 160
(@cparsons2391)
Estimable Member
Joined: 16 years ago

Keep us updated! I think this is interesting!


Reply
jaywalk101
Posts: 760
Topic starter
(@jaywalk101)
Prominent Member
Joined: 15 years ago

Well,

After some help from P.Short, there is no way I can address each channel individually without using some kind of logic. Which means I'm going to have to declare some variables or arrays.. Anyways.. I'll figure this out and keep everyone updated. Thanks!


Reply
Posts: 2167
(@djulien)
Noble Member
Joined: 19 years ago

Interesting idea!

Does your setup allow calling a COM object? If so, then you may be able to just add some code to instantiate the Vixen plug-ins and pass in the channel values. Then the plug-ins would do their normal job of formatting the data and sending it out over the COM port. Basically, your web server would take the place of the data stored within the sequence, rather than also duplicating the fomating logic that is in the plug-ins.

don


Reply
jaywalk101
Posts: 760
Topic starter
(@jaywalk101)
Prominent Member
Joined: 15 years ago

As of right now I still haven't nailed down exactly what I'm trying to do. Right now, I don't have anything interfacing with Vixen however. What I'm trying to achieve is rather simple, but the programming the logic is going to be a challenge for me.

Basically I'm thinking about designing a keyboard "piano" style interface with 8 keys. The user can swipe their finger over each key (channel) and trigger an ON/OFF event. I think I can achieve this with onmouseover events with AJAX or some kind of synchronous scripting language so the page will not refresh every time a response is triggered. This idea is more tailored towards visitors outside watching my show with their smartphone, but I want the interface to be compatible with all web browser platforms so I could implement a webcam or something so people can see it from anywhere.

Let me know if this seems plausible. I think I'm on the right track.... 🙂


Reply
kychristmas
Posts: 3947
(@kychristmas)
Famed Member
Joined: 18 years ago

As a Web Developer, I certainly like the effort. I don't want to be negative, but there are a great deal of issues with using HTTP with "Synchronous" requirements. Of course, it depends on the how "Synchronous" you really need. By design, HTTP is Asychronous. As such, timing control is difficult at best. Over the public internet, it's darn near impossible. Tools like AJAX only make it appear synchronous to the user becaue they remove that Page-lvel Request/Response aspect. In fact, the first letter in AJAX stands for Asynchronous. Of course, you are talking about user controlled lighting and not some sort of manufacuring or healthcare application where absolute timing is required. If it isn't perfect, it really won't matter. The Web-cam makes it even more difficult because webcasting has a built-in delay as well. Of course, much of this is reduced if you host and broadcast on a local server.

I lost all my favorites last spring, but I had a link to a site with a WebCam and controls that allowed the visitors to turn various lights off and on. It was very well-done, but a bit simpler than your idea. It did suffer a bit from lag that would make a Piano-type effect from. Perhaps someone else know of this link. It may not even exist now.

In my new job in Healthcare Data Integration, I have exposure to a number of applications that are web-based, but provide realtime views of things such as Vitals and Fetal Monitoring. It's done by integrating Local JAVA or Actice-X controls that establish more of a Socket connection back to a server. The Web server and browser provide a container, but the actual is control is not done through HTTP. It works great but sucks for cross-platform compatibility and require local security settings that I would never allow from an unknown source.

Keep at it! No matter what, your project will help you understand lighting control and especially the Renard protocols much better. At best, it will trigger help from folks much smarter than I and you might come up with a solution.

I would encourage you to look at Android and iPhone apps that are out there in some Beta form as well as the Vixen Server/Trigger capabilities. They will at least help you see what has been done as well as attempted and failed.


Reply
jaywalk101
Posts: 760
Topic starter
(@jaywalk101)
Prominent Member
Joined: 15 years ago

Thanks for your response KY!! I was a web developer at one point in my life, but now I'm primarily network/voip/telcom... but web development is my true passion. I find this as a challenge. I'm a little rusty when it comes to the newest web technologies.. I think JQUERY is the big thing now?? 🙂


Reply
jaywalk101
Posts: 760
Topic starter
(@jaywalk101)
Prominent Member
Joined: 15 years ago
jaywalk101 wrote:I think JQUERY is the big thing now?? 🙂

Did a search on JQUERY... looks like I may be going in this direction... http://www.askaboutphp.com/213/php-and-jquery-submit-a-form-without-refreshing-the-page.html


Reply
kychristmas
Posts: 3947
(@kychristmas)
Famed Member
Joined: 18 years ago
jaywalk101 wrote:Thanks for your response KY!! I was a web developer at one point in my life, but now I'm primarily network/voip/telcom... but web development is my true passion. I find this as a challenge. I'm a little rusty when it comes to the newest web technologies.. I think JQUERY is the big thing now?? 🙂

Just remember that all these tools do not replace the the basics of the HTTP protocol. While it may now appear that a web-application is synchronous because great tools like AJAX/Jquery, ultimately if the function is communicating with the server, it is still a asynchronous request/response going on there. Ultimately, its getting fast and cheap for this to happen with very little "lag time" so the end-result may be sufficient for your needs.

I have gone the other way. While I tend to do a little Web-development on my own here and there, my primary Job has switched to Maintaining and Administering Single Sign-On and Context Management solutions. As a result, I'm way behind on new technologies too.

Good Luck and keep us up-to-date.


Reply
jaywalk101
Posts: 760
Topic starter
(@jaywalk101)
Prominent Member
Joined: 15 years ago
kychristmas wrote:
I have gone the other way. While I tend to do a little Web-development on my own here and there, my primary Job has switched to Maintaining and Administering Single Sign-On and Context Management solutions. As a result, I'm way behind on new technologies too.

Do you work at a hospital? I work at one and we're currently implementing single sign-on (RF badge swipe) terminal sessions... Pretty cool stuff!!


Reply
Page 1 / 4
Share: