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 device and IP Camera


Guest ygh
 Share

Question

Guest ygh

Dear All,

I have created a virtual device to control a Foscam IP camera. Basicaly, the V-Foscam virtual device has 2 buttons:

(i) Button 1: Activate the motion detector + email

(ii) Button 2: De-activate the motion detector + no email

I use the following script for the button 1:

GET 192.168.xx.yy:8090/set_alarm.cgi?motion_armed=1&mail=1&user="mylogin"&pwd="mypassword" HTTP/1.10x0D0x0A0x0D0x0A

For some unknown reason it does NOT work when I press the button 1. The same command directly on the firefox address bar works fine !

Any advice or someone faced the same issue?

Thanks,

YG

HC2 v1.045

www.ghafoor.org

Link to comment
Share on other sites

Recommended Posts

  • 0

Hi,

Sorry i cant help but I also uses foscam cameras. Can you tell me a little about your ideas?

When/how will you trigger the virtual devices?

I'd like to see a solution were the motion triggers recording that is saved into the cloud. Idea?

Kristian

Link to comment
Share on other sites

  • 0
Guest ygh
  • Inquirer
  • Hi,

    You can have a lot of usage. For example, I want to "arm" or activate the camera with motion detector+email every day when I leave to office. Meaning the camera will be activated from Monday to Friday between 8h30 and 18h30. It will be also usefull to use the virtual device in a script. This can be also used within a global script managing your alarm for the house.

    The standard HC2 function of a camera taking a snapshot and send the results by email works fine in a script. I am looking for some advanced facilities by using CGI embeded commands in a HTPP query.

    Regarding the recording into a cloud directory, you should look in the camera functions to upload pictures or video by FTP. That's also part of my next experimentation.

    Regards,

    YG

    My HC2 blog is at www.ghafoor.org

    Link to comment
    Share on other sites

    • 0
    Guest ygh
  • Inquirer
  • Hi,

    I made a little change in the button 1 script:

    GET 192.168.xx.yy:8090/set_alarm.cgi?motion_armed=1&user="mylogin"&pwd="mypassword" HTTP/1.10x0D0x0A0x0D0x0A

    GET 192.168.xx.yy:8090/set_alarm.cgi?mail=1&user="mylogin"&pwd="mypassword" HTTP/1.10x0D0x0A0x0D0x0A

    Basicaly I have splited the initial HTTP request in two queries: There is still no result.

    Is there any where some HC2 logs that can be consulted?

    Any advice will be appreciated

    Please login or register to see this image.

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

    Regards,

    YG

    My HC2 blog is at www.ghafoor.org

    Link to comment
    Share on other sites

    • 0
    Guest ygh
  • Inquirer
  • I am still in version v1.045 ! LUA is in the beta release if I am correct.

    Any other advice, please?

    Link to comment
    Share on other sites

    • 0
    Guest GG
  • Inquirer
  • GET 192.168.xx.yy:8090/set_alarm.cgi?motion_armed=1&user="mylogin"&pwd="mypassword" HTTP/1.10x0D0x0A0x0D0x0A

    Exactly where have you entered the above string in the configuration?

    I mean that the actual data sent to the receiver in a GET command should not contain ip-address and port. Ip-address and port are used to connect to the remote part and then you send the GET-command.

    Or have I missed something?

    Link to comment
    Share on other sites

    • 0
    Guest ygh
  • Inquirer
  • I entered the "GET 192..." string in the advanced tab of the virtual device and in the box for the button script definition.

    I think the IP address of the camera needs to be provided otherwise it is not possible to find it.

    Unless if the HC2 uses the IP address defined in the general camera tab. Will check tonight without using the IP address in the button script !

    It is good hint - thanks.

    Regards,

    YG

    My HC2 blog is at www.ghafoor.org

    Link to comment
    Share on other sites

    • 0
    Guest GrZeCh
  • Inquirer
  • Hello,

    I'm wondering .. does your second button works fine? I have situation where I have two virtual devices (each has two buttons) and they where working fine at the beggining (first day) but after that they just stopped working. I even can't edit or delete them (when I'm trying to do that nothing is happening - no spinning dots either). Does anyone who is using virtual devices with latest beta encountered this issue also?

    Regards

    Link to comment
    Share on other sites

    • 0
    Guest ygh
  • Inquirer
  • Hi,

    All is working fine now ! My HC2 in version 1.045 talks "fluently" with my IP camera (Foscam). All you need is to create a virtual device with the IP address/port of the camera and some dedicated button for each function:

    - Button 1: Activate motion detector

    - Button 2: activate email + picture in case of alert

    - Button 3: de-activate the motion detector

    The HTTP request with the GET works fine. You need to be careful and avoid any space or control characters otherwise it is a real mess !

    In order to access the device in your iPhone, a script for each button is required but this is acceptable for the time being till Fibaro makes the next update of the iOS application !

    Regards,

    YG

    My HC2 blog is at www.ghafoor.org

    Link to comment
    Share on other sites

    • 0

    Nice!

    So now you have a scene activated every day between 8AM - 5PM triggering button 1-3 in sequence.

    The 4th button whould then be to send push notification to your smartphone upon activation.

    Can you please share some details behind each button and knowledge transfer for a rookie.

    Very mush appreciated!

    Link to comment
    Share on other sites

    • 0
    Guest ygh
  • Inquirer
  • Hi KristianO,

    I will share those details in my next post on my blog

    Please login or register to see this image.

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

    Just working on it to make it interesting !

    Regards,

    YG

    My HC2 blog is at www.ghafoor.org

    Link to comment
    Share on other sites

    • 0

    Thanks a lot!

    This is your next project!

    Please login or register to see this image.

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

    Please login or register to see this link.

    Link to comment
    Share on other sites

    • 0
    Guest ygh
  • Inquirer
  • Interesting - Do you provide the lock?

    Please login or register to see this image.

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

    Link to comment
    Share on other sites

    • 0
    Guest guidetti
  • Inquirer
  • For some reason I am not able to make the set_alarm working.

    In the virtual device setting I specify the IP address and port, and in the string area the following:

    GET /set_alarm.cgi?motion_armed=1&user="mylogin"&pwd="mypasswd" HTTP/1.10x0D0x0A0x0D0x0A

    Of course the command is working in the web browser!

    I use the 1.047 version release

    Elio

    Link to comment
    Share on other sites

    • 0
    Guest ygh
  • Inquirer
  • Hi,

    can you confirm that you do NOT use any quotation mark for login and password, please

    Regards,

    YG

    Link to comment
    Share on other sites

    • 0
    Guest guidetti
  • Inquirer
  • I use the quotation just to avoid the merge of the login name with the rest of the characters, example &pwd

    Elio

    Link to comment
    Share on other sites

    • 0
    Guest guidetti
  • Inquirer
  • yes, it works without quotation, unbelievable!

    thanks very much!

    Elio

    Link to comment
    Share on other sites

    • 0
    Guest ygh
  • Inquirer
  • Good ! I lost a couple of days with the quotation mark !

    YG

    [ Added: 2013-02-15, 12:03 ]

    Hi,

    If interested, here is a new tutorial "IP camera control & Virtual device" available in www.ghafoor.org

    YG

    Link to comment
    Share on other sites

    • 0

    HI

    Thanks YG for posting this i have managed to get the virtual buttons to turn on and off the alarm functions on my camera. When i create the scene to activate though i cannot see my virtual device? nothing shows up? Any ideas anyone?

    Link to comment
    Share on other sites

    • 0
    Guest ygh
  • Inquirer
  • Hi,

    Did you also define a LOCAL variable as I did in the blog's tutorial...?

    YG

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