Jump to content

Welcome, Guest!

Be a part of CinemaVision today! Once registered and logged in, you will have access to public chat and your own private messenger, you can view and contribute guides, collaborate on the forums, review downloads, give reputation to your fellow members, contribute content and so much more. Registering is quick and completely free, so what are you waiting for?
   Sign In    Sign Up

Become a RedCarpet Club Member Today!

Lorem ipsum dolor sit amet, sea eu causae aperiri periculis, iusto affert soleat an sea, soluta petentium inciderint nec no. Dolorum reprimique ullamcorper sed ad. Ei quo malorum singulis, tota mundi feugait ut pro. Choro utamur inimicus ex sea. Tota dicit te usu. Sea ad erant possim reformidans. An modus detraxit postulant vel. Per no habeo ludus qualisque. Vix legere singulis legendos et, an cum eius soluta accumsan. Facer discere no nec.
   Join Now

Download the Kodi Add-on Today!

Lorem ipsum dolor sit amet, sea eu causae aperiri periculis, iusto affert soleat an sea, soluta petentium inciderint nec no. Dolorum reprimique ullamcorper sed ad. Ei quo malorum singulis, tota mundi feugait ut pro. Choro utamur inimicus ex sea. Tota dicit te usu. Sea ad erant possim reformidans. An modus detraxit postulant vel. Per no habeo ludus qualisque. Vix legere singulis legendos et, an cum eius soluta accumsan. Facer discere no nec.
  • 0
Guest xbmcgotham

code handling of "Carriage Returns"

Question

Guest xbmcgotham

Hi, was wondering. How does the code handle "Carriage Returns"?

For example I will need to add the following serial command into the action script:

"HTTP POST"... For the URL: http:///api/host/modules/1/ports/1/data

And this is the "body" where the following serial data must be used:

*pow=on#

Would it just be like this?

# URL
http:///api/host/modules/1/ports/1/data
# Body
*pow=on#

Or does the script need a different input to be able to send the correct serial command?

Thanks for the info.

Share this post


Link to post
Share on other sites

5 answers to this question

Recommended Posts

  • 0
3 hours ago, xbmcgotham said:

Hi, was wondering. How does the code handle "Carriage Returns"?

For example I will need to add the following serial command into the action script:

"HTTP POST"... For the URL: http:///api/host/modules/1/ports/1/data

And this is the "body" where the following serial data must be used:

*pow=on#

Would it just be like this?

# URL
http:///api/host/modules/1/ports/1/data
# Body
*pow=on#

Or does the script need a different input to be able to send the correct serial command?

Thanks for the info.

From what you said, it sounds like it needs a POST to that address. Try this:

# This command powers on something, I'm not sure what
http:///api/host/modules/1/ports/1/data
POST:{*pow=on#}

Does Homewizard have any API documentation? We might be able to help more if we knew what you were trying to do, and what the documentation outlined. :)

Share this post


Link to post
Share on other sites
  • 0
Guest xbmcgotham

Hi,

 

Thanks for helping.

I tried the code, however no activity. The response I get from the "Parser Messenger":

 

VALIDATE (ProjectorON.cvaction):

OK

TEST (ProjectorON.cvaction):

Action (HTTP) URL: http://<localip>/api/host/modules/1/ports/1/data
Action (HTTP) Response:
  

 

In this case its not the Homewizard that is requested to handle to command but the BenQ TH670s Projector through its RS232 serial cable connected to the network using a Global Cache iTach Flex device (http://www.globalcache.com/products/itachflex/). I have taken the correct code for switching ON the projector through the serial interface from the attached file (3. Command Table) and tested the same code using the Flex iTest (http://www.globalcache.com/downloads/) software which can be use to test if a command is correct and if it works. In my case the iTest worked perfect with the code and was able to switch on the projector through the Flex device.

So, my challenge is to find the correct way of inserting the serial command into the cinema vision action script so that it is able to send the same command to the projector.

Hope their are any other ideas. :-)

 

Thanks again.

 

 

benq_rs232_commands-1.pdf

Share this post


Link to post
Share on other sites
  • 0

Hi guys,

I am getting stuck here. Please help me solve this very easy problem. :-)

I have had detailed contact with the code developer of the hardware tool Cinemavision is talking to.

We identified that the problem is with the way the automation script within CinemaVision is executing the given code trigger in the body.

Below I will show you what code is used to succesfully excecute the "Switch Projector ON" trigger through a REST Client (https://www.getpostman.com):

 

On the attached screenshot (Postman) you can see the REST Client instruction we excecute.

On the attached screenshot (Powon) you can see the body code that is executed to switch on the projector. Please pay attention to the CR in the shown code. The CR is needed to have the execution be successful.

We tried everything within the "action file", however none of the changes we made was succefull in switching on the projector.

This is the response/question the developer had for CinemaVision developer:

Quote

"Can a non-ASCII control character be sent in the body of the POST request. If Yes, then how do we do this for a CR. If No, they should consider adding this little functionality in the code as its fairly standard and widely used within home automation systems"

Can someone please help fix this problem as its the last thing needed to integrate the home cinema. :-)

 

Thanks guys, appreciated!

 

postman.png

powon.png

Share this post


Link to post
Share on other sites
  • 0
2 hours ago, xbmcgotham2014 said:

Hi guys,

I am getting stuck here. Please help me solve this very easy problem. :-)

I have had detailed contact with the code developer of the hardware tool Cinemavision is talking to.

We identified that the problem is with the way the automation script within CinemaVision is executing the given code trigger in the body.

Below I will show you what code is used to succesfully excecute the "Switch Projector ON" trigger through a REST Client (https://www.getpostman.com):

 

On the attached screenshot (Postman) you can see the REST Client instruction we excecute.

On the attached screenshot (Powon) you can see the body code that is executed to switch on the projector. Please pay attention to the CR in the shown code. The CR is needed to have the execution be successful.

We tried everything within the "action file", however none of the changes we made was succefull in switching on the projector.

This is the response/question the developer had for CinemaVision developer:

Can someone please help fix this problem as its the last thing needed to integrate the home cinema. :-)

 

Thanks guys, appreciated!

 

postman.png

powon.png

Turns out, I totally forgot to reply to you. Dang.

So long story short, we don't have the ability to do this built into Actions currently. It's been put on the list of features to add in our next round of development. You might be able to accomplish this via Python script, and use the Action to call that Python script.

When we wrote the way Action syntax works, we didn't know that some manufacturers used methods like this. :)

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

About Us

CinemaVision began in 2014 as a collaboration to create content for use with your home theater, offering movie trivia slides and video bumpers. It has since grown to be THE PREMIER WAY to create and customize your preshow experience. Download the CinemaVision add-on for Kodi today from the official Kodi repository, and easily create a sequence of trivia, videos, trailers, home automation triggers and more that will bring the experience of a movie theater straight to your screen!

×

Important Information

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