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

Virtual Devices Tutorial


Question

Posted

Hello,

Anyone has documentation to learn how to handle virtual devices in general so that I can work on adding any specific wants I have (projector...etc) ?

Regards

[ Added: 2014-06-09, 16:24 ]

Any help with this ???

[ Added: 2014-06-09, 16:24 ]

Any help with this ???

8 answers to this question

Recommended Posts

  • 0
Posted

No documentation but Google has vast knowledge for you.

  • 0
  • Inquirer
  • Posted

    The issue is I do not know what to google to be honest.... Is it a general knowledge thing or specific per device?

    • 0
    Posted

    Could you please specify your problem? Maybe give us example of device you want to create? Or search for ready examples of devices posted by users of this forum.

    • 0
  • Inquirer
  • Posted

    There is no specific device, i am just speaking in general, i have seen some examples of controlling other devices on the network.via virtual devices like the example of a lock on a vera controller... i just wanted to know what i can study on my own to know more about the concept of virtual devices...

    • 0
    Posted

    I think the best way to do this is to study exiting cases, importing devices from forum and looking at the code. Feel free to ask questions here if you don't get the way something works.

    • 0
    Posted

    We're working on a new application note about Virtual Devices, how to use them and what the different settings are.

    They're quite easy - once you understand how they work

    Please login or register to see this image.

    /emoticons/default_icon_smile.gif" alt=":-)" />

    We already have some examples available for controlling iTach devices and the Sprinkler panel - these show how to create the virtual device and how it does what it needs to for that example. But we're going to have a more generic introduction. Same as we've done for the Block Editor Scenes.

    We plan to have this available by the end of next week.

    • 0
    Posted

    We're working on a new application note about Virtual Devices, how to use them and what the different settings are.

    They're quite easy - once you understand how they work

    Please login or register to see this image.

    /emoticons/default_icon_smile.gif" alt=":-)" />

    We already have some examples available for controlling iTach devices and the Sprinkler panel - these show how to create the virtual device and how it does what it needs to for that example. But we're going to have a more generic introduction. Same as we've done for the Block Editor Scenes.

    We plan to have this available by the end of next week.

     

    Hi Mark,

     

    I looked at Vesternet, but that particular APP note is not on the site. It would plug an enormous hole in the available knowledge about this Fibaro feature.

    Is it still planned to have it available for the world?

     

    Regards,

    Erwin

    • 0
    Posted

    I think the best way to do this is to study exiting cases, importing devices from forum and looking at the code. Feel free to ask questions here if you don't get the way something works.

    Can you please explain the following as I have a Yale lock that will not work with Fibaro and want to get it to work as per this method:

    I am having real trouble understanding how to write the following into a virtual device, can you please assist?

     

     

    I.e., add your locks to Vera3 / Lite and control them via virtual devices in HC2.

    Code is very basic (note DeviceNum=6 - it means sixth device on Vera3):

    Open button:

    HC2 = Net.FHttp("172.16.1.111",3480)

    response,status,errorCode = HC2:GET("/data_request?id=action&output_format=xml&DeviceNum=6&serviceId=urn:micasaverde-com:serviceId:DoorLock1&action=SetTarget&newTargetValue=1")

    fibaro:log("Night Latch Lock command sent")

    Close button:

    HC2 = Net.FHttp("172.16.1.111",3480)

    response,status,errorCode = HC2:GET("/data_request?id=action&output_format=xml&DeviceNum=6&serviceId=urn:micasaverde-com:serviceId:DoorLock1&action=SetTarget&newTargetValue=0")

    fibaro:log("Night Latch Unlock command sent")

    Request status and change icon:

    local selfId = fibaro:getSelfId();

    HC2 = Net.FHttp("172.16.1.33",3480)

    response,status,errorCode = HC2:GET("/data_request?id=variableget&DeviceNum=6&serviceId=urn:micasaverde-com:serviceId:DoorLock1&Variable=Status")

    fibaro:log(response)

    if response == "0" then

    fibaro:log(status)

    fibaro:call(selfId, "setProperty", "currentIcon", "1004")

    --fibaro:log("lock opened" )

    else

    fibaro:call(selfId, "setProperty", "currentIcon", "1003")

    -- fibaro:log("lock closed")

    end

    fibaro:sleep(60*1000);

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