Jump to content

Welcome to Smart Home Forum by FIBARO

Dear Guest,

 

as you can notice parts of Smart Home Forum by FIBARO is not available for you. You have to register in order to view all content and post in our community. Don't worry! Registration is a simple free process that requires minimal information for you to sign up. Become a part of of Smart Home Forum by FIBARO by creating an account.

 

As a member you can:

  •     Start new topics and reply to others
  •     Follow topics and users to get email updates
  •     Get your own profile page and make new friends
  •     Send personal messages
  •     ... and learn a lot about our system!

 

Regards,

Smart Home Forum by FIBARO Team


  • 0

LUA Assistance


Question

Posted

Hi All,

I have successfully been able to control my JVC projector via Hercules from my laptop, I have spent days and days trawling the internet and the Fibaro forums trying to find how to create a VD with LUA to just turn on and off the projector.

 

Despite finding guides and tutorials on creating VD with LUA I am struggling with creating the necessary commands, I have started with the below and its about as far as I can get.

 

I need to find a way to create a connection to the projector and acknowledge it then within 5 secs send a command called PJ_REQ then send the hex command to 21 89 01 50 57 31 0A which is power on.

 

Once I can work out how to do this then it will be easy to create the power off command.

 

local command = "POWER-ON";
--------------------------------------------------------
local device = fibaro:getSelfId();
local ipaddress = fibaro:getValue(device, "IPAddress");
local port = fibaro:getValue(device, "TCPPort");
FIBARO = Net.FHttp(ipaddress,port)

0000   e0 da dc 03 f2 eb 00 1c 42 91 e6 25 08 00 45 00   ........B..%..E.
0010   00 2f d4 4c 40 00 80 06 11 b5 0a 00 00 19 0a 00   ./.L@...........
0020   00 af e0 c7 50 4a 12 c9 7c ff 03 bc 82 2e 50 18   ....PJ..|.....P.
0030   fa dc d5 52 00 00 21 89 01 50 57 30 0a            ...R..!..PW0.

 

 

 

Any help for a non programmer would be greatly appreciated

 

Kind regards

BK

2 answers to this question

Recommended Posts

  • 0
Posted (edited)

the 1st of you should NOT create topics with the same subject

 

the second IMHO it's NOT http - it's TCP/IP proto

 

if you can't develop or port source for example from python

Please login or register to see this link.

to LUA - asking somebody for example via donation to develop this device

 

PS:  no I can't develop.

PSS: some hints

 

    local hostname = "192.168.1.77"

    local port = 20554

 

    local tcpSocket = Net.FTcpSocket(hostname, port)

    wr, err = tcpSocket:write(
      string.char(0x21, 0x89, 0x01, 0x50, 0x57, 0x31, 0x0A)
    );

Edited by 10der
  • 0
Posted (edited)

@10der  ? 3,80 €

Edited by ggoetz56
  • Thanks 1

Join the conversation

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

Guest
Answer this question...

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