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
DexDeadly

Quick Up & Running OpenHAB

Question

If you are running OpenHAB you can easily integrate with a one line HTTP GET in an action file.  This is a very basic method but could get you up and running within a few mins.  Example:

Create a file named lights_before_trivia.txt

Place this line in the document and replace with the following information:

http://INSERT_LAN_IP:INSERT_PORT/CMD?NAME_OF_SW/GROUP=VALUE

INSERT_LAN_IP = The IP of your OpenHAB server
INSERT_PORT = The Port in which your OpenHAB server is on
NAME_OF_DIM/SW = Put the name of the Switch or Dimmer you want to send the command to Example: Light_HomeTheater_Back_Sw
VALUE = If your sending to a SWITCH use either ON or OFF, if you are sending to a DIMMER use any value between 0 - 100.

Example:

http://192.168.1.10:8080/CMD?Light_HomeTheater_Back_Sw=OFF

Save the file and place in your actions command folder on your Kodi system where you have the CinemaVision folders.  Then within the Sequence editor add the action.  In the example above I placed this right before the trivia slides start.  Once you place the action in, point it to your newly created .txt file.  Save your sequence and run it, your lights should now react within the sequence.

** NOTE: If you have security enabled within OpenHAB you will need to add an additional line to your action file.  The 2nd line in the action file will need to be the following:
HEADERS: {"Authorization": "Basic=XXXXX"}  - You can generate the Basic=XXXX by using the Postman plugin for Chrome. Using Postman you can place in your user credentials and the header line will generate for you.  You can than place this within the header line and you will than be able to send your JSON request lines with authorization turned on.  Here is an example of how the action file can look 

http://192.168.1.10:8080/CMD?Light_HomeTheater_Back_Sw=OFF
HEADERS: {"Authorization": "Basic=XXXXXX"}

** NOTE:Currently when sending a new brightness the dimmer will be a quick change and not a gradual.**  Currently working on a smoother dim which might be done using a rule, but if you want to be up and running with OpenHAB quick heres one way to do it.  I'll post my working example of a smoother dim once I have it.

Edited by DexDeadly
use the code button to avoid formatting

Share this post


Link to post
Share on other sites

10 answers to this question

Recommended Posts

  • 0

Thank you for posting this extremely helpful for the community. :)

Is there anyway to Edit?  I'd like to make a couple edits for clarification now that I reread what is in there.  

Share this post


Link to post
Share on other sites
  • 0

I'll take a look at group permissions when I get home. There may be an unchecked box

I'm assuming there is an edit time setting

Share this post


Link to post
Share on other sites
  • 0

Hello if you could update it to this:

If you are running OpenHAB you can easily integrate with a one line HTTP GET in an action file.  This is a very basic method but could get you up and running within a few mins.  Example:

Create a file named lights_before_trivia.txt

Place this line in the document and replace with the following information:

http://INSERT_LAN_IP:INSERT_PORT/CMD?NAME_OF_SW/GROUP=VALUE

INSERT_LAN_IP = The IP of your OpenHAB server
INSERT_PORT = The Port in which your OpenHAB server is on
NAME_OF_DIM/SW = Put the name of the Switch or Dimmer you want to send the command to Example: Light_HomeTheater_Back_Sw
VALUE = If your sending to a SWITCH use either ON or OFF, if you are sending to a DIMMER use any value between 0 - 100.

Example:

http://192.168.1.10:8080/CMD?Light_HomeTheater_Back_Sw=OFF

Save the file and place in your actions command folder on your Kodi system where you have the CinemaVision folders.  Then within the Sequence editor add the action.  In the example above I placed this right before the trivia slides start.  Once you place the action in, point it to your newly created .txt file.  Save your sequence and run it, your lights should now react within the sequence.

** NOTE:Currently when sending a new brightness the dimmer will be a quick change and not a gradual.**  Currently working on a smoother dim which might be done using a rule, but if you want to be up and running with OpenHAB quick heres one way to do it.  I'll post my working example of a smoother dim once I have it.

Also GamePheonix, from what it looks like is your forum does not allow any post to be edited by users after someone has already replied.  Just noticed this.

Share this post


Link to post
Share on other sites
  • 0

Hi

i would like to turn off my light by action command.

Must be packed information always to a .txt file?

I control my light via Arduino. 
If I enter http://192.168.178.70/index.html?schalte&5 into my browser, 

he starts the light via radio-controlled socket.

Now I have just a HTTP GET command in CinemaVision register.

How does it work? Reads CinemaVision the text file?

Here are my current steps:

GET /index.html?schalte&5
Host: 192.168.178.70
Authorization: Basic *******

 

Thanks for your help =)

best regards

Nils

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.