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

Php script from virtual device


Question

Posted

How to call a php script On My local webserver using a virtul device wo LUA?

I try to add the ip:port together with a GET of the Php script but nothing happens.

Pasting all in one URL in the browser and it works just fine.

Please help!

Recommended Posts

  • 0
Posted

KristianO, I use this code to reboot my HC2 from HCL and work for me

Please login or register to see this image.

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

Please login or register to see this code.

Can you post your network settings ? DHCP or Static IP ? ETc...

  • 0
Posted

KristianO, you was eat "/"

I have now tried both,

GET /sonos/sonos.php?message=Coming_home&volume=30&force_unmute=1 HTTP/1.1

Host: 10.0.1.10

Authorization: Basic (Base64 usr:pwd string)

0x0D0x0A0x0D0x0A

  • 0
  • Inquirer
  • Posted

    Soscha, i have tried With both With and without /. (As you can see in picture before)

    I have made another test to the same IP and that worked.

    Still I can't get this Php script to work, it's always working using a http URL from browser.

    Can Fibaro connect to my computer to check what's going wrong?

    [ Added: 2014-03-21, 15:28 ]

    Krikroff, I use static ip on both and the Webserver is running apache on OsX.

    • 0
    Posted

    With the same subnet mask for your server and HCL ?

    • 0
  • Inquirer
  • Posted

    Yes, the thing is that I on the same server run an application called securityspy. This application also have a Webserver that uses port 8000.

    This Webserver response to my cgi calls using another virtual device to start/stop the recording of my cameras upon alarm breach.

    So the problem is isolated to the Php calls on my apache Webserver using another port.

    I can't understand why a local URL request work but can't do the same from my HC.

    • 0
    Posted

    I did experience the same kind of problem with a PAW serveur, i solved using TCP on my HC2...

    Have you try wo Authorization ?

    • 0
  • Inquirer
  • Posted

    Yes I have tried a lot different...

    Please login or register to see this image.

    /emoticons/default_sad.png" alt=":(" srcset="https://forum.fibaro.com/uploads/emoticons/[email protected] 2x" width="20" height="20" />

    - GET with host and authorization

    - GET with string only

    - POST, waiting for response etc

    Can you provide some examples so I don't miss anything?

    • 0
    Posted

    If you are on HCL the only way is

    Please login or register to see this code.

    make a try with another server to clarify the situation ?

    • 0
  • Inquirer
  • Posted

    I Will try when i come back home! Thanks a lot!

    What I still can't understand is the the simplest GET to my cameras on the same server works just fine wo user/pwd and now with this I need it.

    And passing the Php script in the browser using an URL does not require any usr/pwd.

    It's just confusing...

    [ Added: 2014-03-25, 21:36 ]

    Krikroff, works like a sharm! Thanks a lot!

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