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

ETH008 and lua (virtual device)


SpaceCompany
 Share

Question

I bought this ETH008 relay card which you can controll with https commands.
Im both new to programming and lua.. now when I send a string to this IP card, I can see the relay will switch, but when I send the command trough a new created virtual device, it wont work...

Can someone help me along the way to set this up :
IP adress of the card is 192.168.1.42
port 17494
user : user
password : password
http string to switch on relay #2 for 5 seconds is : http://192.168.1.42/io.cgi?DOA1=50

what and how do I set this up within a virtual device ?

Link to comment
Share on other sites

5 answers to this question

Recommended Posts

  • 1

Maybe this can help you 

find attached VD.

Please login or register to see this attachment.

 

please replace IP adress portnumber = 80

this must work I am using 2 ethernetcards and working as charme.

 

 

  • Like 1
Link to comment
Share on other sites

  • 0

Hi

 

did you managed to make it work? I'm lost on programming it 

 

Link to comment
Share on other sites

  • 0

local _deviceIp = fibaro:get(fibaro:getSelfId(), "IPAddress");
local _devicePort = fibaro:get(fibaro:getSelfId(), "TCPPort");
HTTP = Net.FHttp(_deviceIp, _devicePort);
HTTP:setBasicAuthentication("user", "password") 
response, status, errorCode = HTTP:GET('/io.cgi?DOA1=50')

 

deze in string invullen. en je IP adres en poort in algemeen invullen.

Dit zou de klus moeten klaren, maar ik krijg het niet aan de gang. Heb jij het inmiddels aan de gang? zo ja hoe dan? want bij mij werkt het niet onder 4.160.

Edited by TSN
added info
Link to comment
Share on other sites

  • 0

on what version are u running? it worked a few times, and now it stopped working.

 

edit:

deleted and reinstalled, now its working great.  thanks alot RobS.

Edited by TSN
solved
Link to comment
Share on other sites

  • 0

Hi guys,

I use two of these boards aswel, in combination with the VD above.

Now, however, I would like to see the state of the relay in the VD.

Is it possible to read out the status of the relay? I think it should be possible because in the app (from robot-electronics) it shows if the relay is on or off.

Once I know how, I can adapt the VD accordingly.

 

Link to comment
Share on other sites

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.

 Share

×
×
  • Create New...