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

For those that did not know .net was in scenes


Question

Posted

.net in scenes if you had not worked it out. Has been there since alpha.

Change for your password this is admin:admin

Please login or register to see this code.

  • Answers 48
  • Created
  • Last Reply

Top Posters For This Question

Recommended Posts

  • 0
Posted

arg still can't get it to work :/

  • 0
Posted

3 hard reboots and its back to normal!

[ Added: 2015-01-18, 20:14 ]

sj3fk3

you have added the header yes?

[ Added: 2015-01-18, 20:15 ]

Content-Type: application/x-www-form-urlencoded

not sure if its a requirement but looks like it should be included?

[ Added: 2015-01-18, 20:16 ]

headers = {

["Content-Type"] = "application/x-www-form-urlencoded"

}

  • 0
  • Inquirer
  • Posted

    to head off the next question

    Please login or register to see this code.

    • 0
    Posted

    Please login or register to see this link.

    wt-heck is that some decoding or encoding?

    • 0
  • Inquirer
  • Posted

    You need to encode your user password into the header

    headers = {

    ['Authorization'] = 'Basic YWRtaW46YWRtaW4='

    }

    only works for admin admin

    • 0
    Posted

    this is for pushover no password required i though? just token,user,message according to api

    • 0
    Posted
    Function for POST method, proper data must be passed as argument:

    Please login or register to see this code.

    Thanks! But I'm clueless how to incorporate this with the payload I need to send :/

    • 0
  • Inquirer
  • Posted

    not tested but something like

    Please login or register to see this code.

    not tested as I am away from home so can not test

    • 0
    Posted
    That .net was in scenes

    Do you know where I can find the documentation? If searched my @$$ off and can't find it.

    [ Added: 2015-01-19, 13:52 ]

    not tested but something like

    not tested as I am away from home so can not test

    Does not do anything :/ Not even an error..

    • 0
  • Inquirer
  • Posted

    Go on Dean you have a machine to test on. A few lines to fix

    • 0
    Posted

    i tried but i do not understand why the admin:admin code was required that you put after? do we need to authenticate with the homecenter to even allow any put requests?

    • 0
    Posted
    You need to encode your user password into the header

    headers = {

    ['Authorization'] = 'Basic YWRtaW46YWRtaW4='

    }

    only works for admin admin

    No basic auth for pushover It is useless

    Please login or register to see this image.

    /emoticons/default_icon_wink.gif" alt=";-)" /> Pushover only need

    Please login or register to see this code.

    Maybe you do not know: No basic Auth to request fibaro API, example:

    Please login or register to see this code.

    • 0
  • Inquirer
  • Posted

    Nice did not know they had that port on loopback.

    Thanks

    • 0
    Posted

    Can anyone point me to the documentation of this .net module? Or even the source? I would really like to get

    Please login or register to see this link.

    to work with fibaro.

    • 0
  • Inquirer
  • Posted

    There is some on developer.fibaro.com but does not cover loopback

    It also does not cover https but as far as I know that is because that is still on wish list

    • 0
    Posted

    This works! Finally I can send pushover mgs via lua! \o/

    --[[

    %% properties

    %% globals

    --]]

    local selfhttp = net.HTTPClient({timeout=2000})

    local msg = "anything you want"

    local requestBody='token=entertoken&user=enteruser&message=' ..msg

    selfhttp:request('https://api.pushover.net/1/messages.json', {

    options={

    headers = selfhttp.controlHeaders,

    data = requestBody,

    method = 'POST',

    timeout = 5000

    },

    success = function(status)

    local result = json.decode(status.data);

    print("status");

    if result.status then

    print("successful");

    print("Request: " ..result.request);

    else

    print ("failed")

    end

    end,

    error = function(error)

    print "ERROR"

    print(error)

    end

    })

    • 0
    Posted

    sj3fk3, Can you please advise. I tried the code in a VD but gets

    "[ERROR] 10:25:52: line 6: attempt to index global 'net' (a nil value)"

    I have removed all blanks.

    • 0
    Posted

    KristianO, you must have HC in version 4.x

    • 0
    Posted

    A.Socha,

    I have HC2 in 4.031

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