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


How to make HC2 know when "MY CAR" arrives at home


Recommended Posts

Posted
Anyone found a solution with Geofancy to send the http-command on the 3/4G network? I don't wanna use portforwarding. My fibaro app works great remotely... should be possible for a simple http-request too I hope.

Nine

+1

I've been trying over and over but can't get it to work.

Where are the geeks ?

Please login or register to see this image.

/emoticons/default_icon_biggrin.gif" alt=":-D" />

Yeah me neither, and even with port forwarding it doesnt work.

  • Replies 61
  • Created
  • Last Reply

Top Posters In This Topic

Posted

Dear All,

I've resolved the problem of port forwarding with a php script on a local web server.

Geofancy recalls the php script and the php script makes the http request to HC2.

It works fine for me!

Here the simple code of the php script:

Please login or register to see this code.

Posted
Dear All,

I've resolved the problem of port forwarding with a php script on a local web server.

Geofancy recalls the php script and the php script makes the http request to HC2.

It works fine for me!

Here the simple code of the php script:

Please login or register to see this code.

I changed the code a bit by removing the print_r line, as this caused the code to be executed twice. Not sure if this causes any trouble, but it now seems to work fine.

I setup a PHP server on my Server using a freeware software package called WAMP.

After some editing and creating a port forward, everything seems to be running fine now using the external IP.

Still have to test the GeoFancy app (beware there are 2 applications that can do the same thing one called GEOFancy the other GEOFency the first is free the 2nd will cost a few Euro's.) I'll have to see if the free app works like it should now I am sure the external API connection is working.

And I'll have to see for an extended period if the app is reliable, and then apply this to all users and change the code for arming and disarming my alarm.

Posted

Currently testing with Geofancy and till now it's working properly on the IPhone and it won't drain the battery.

Posted

I changed the code a bit by removing the print_r line, as this caused the code to be executed twice.

I'm not a developer but with print_r you can see the response of the call. For example with an http request where a scene start, there is no response. In my case the code is executed only one time.

[ Added: 2015-01-07, 00:33 ]

I'm testing me too Geofancy and seems work fine. I've ordered a USB Bluethooth for my Rasp because I would like to improve an iBeacon. Geofancy support it too.

Posted
Knowing your car is home doesn't make home so smart. Who cares about the car. It's about you. I don't always leave house by car, I walk, drive bicycle, someone picks me up... It's more about knowing that am I at home or not.

It can be done with GPS or simple button, as stated above. There is keyfob for carrying controller with keys, this fits into pocket and can be used to inform HC2 about things you want it to know.

Single button:

Please login or register to see this link.

Four buttons:

Please login or register to see this link.

I've got that four key version, works fine with HC2.

I wouldn't recommend that Zwave.Me KeyFob to anyone, I have two and both are giving me issue's, the Battery won't last longer than a few weeks, I had to re-solder the battery holder on the PCB a couple of times because it comes loose. The range is terrible. Totally not happy with them.

I don't recommend it too. I had same problems and now I am not using it any more.

  • Topic Author
  • Posted
    Im sure you clever Guys have thought about it and have a sollution

    Please login or register to see this image.

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

    I use the Bluetooth in my car stereo, and have my utility-server flip a global var depending on if it is in range or not.

    Care to explain a little further how you did it ?

    I have a couple of virtual servers running, so its easy to create a new one if needed to do it.

    Im not interested in having a switch/button in the car. I want to know if the car are home or not and when its coming home and leaving aswell

    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" /> A step in a fully automatic home..

    The ""button in car" is an easy fix and doable with an OEM button in most cars.

    Posted
    Im sure you clever Guys have thought about it and have a sollution

    Please login or register to see this image.

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

    I use the Bluetooth in my car stereo, and have my utility-server flip a global var depending on if it is in range or not.

    Care to explain a little further how you did it ?

    I just use WMI from PS

    Get-WmiObject -query "SELECT Caption FROM Win32_PnPEntity WHERE

    ConfigManagerErrorCode = 0 and and PNPDeviceID like '%&0035622%'"

    Replace the PNPDeviceID with the device you want to probe for.

    In my setup i let the server autoconnect as soon as the device is in range. But of cource you could probe devices in range instead if you wish. Downside for me is that my phones cannot connect to the stereo until i have driven away from the house. But.. good enough for me.

    Please login or register to see this image.

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

    Edit: Eh, just realized i need to rebuild that logic.. I now have a Raspberry in the car.. I Could just poll my UniFi WiFi Controller

    Please login or register to see this image.

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

    Posted

    I changed the code a bit by removing the print_r line, as this caused the code to be executed twice. Not sure if this causes any trouble, but it now seems to work fine.

    SDeath, you are right! The code is executed twice!

    I've solved it by deleting the second line. So the response will be always printed.

    Please login or register to see this code.

    Posted

    I changed the code a bit by removing the print_r line, as this caused the code to be executed twice. Not sure if this causes any trouble, but it now seems to work fine.

    SDeath, you are right! The code is executed twice!

    I've solved it by deleting the second line. So the response will be always printed.

    Please login or register to see this code.

    Yeah that's what I'm thinking of doing too, I gave it anotger thought the other day and realized that would be a better approach. =-)

    Still need to change it though but it seems to work great with Geofancy. So will start using it soon I think.

    • 4 weeks later...
    Posted
    Guys,

    I use this string "http://user:password@ipadress:port/api/callAction?deviceID=49&name=turnOn"

    But I do not use any remote connections. I have forwarded a port to the HC2. This works the best.

    I've been playing around with this for a while and I can't get it to work.

    "http://user:password@ipadress:port/api/callAction?deviceID=49&name=turnOn" works fine from a browser but what do the settings need to be in Geofancy itself?

    What is your exact setup in Geofancy if I may ask you?

    Thanks!

    Posted

    Only sure way I can think of is put it on the driveway and drive over it.

    Please login or register to see this image.

    /emoticons/default_icon_mrgreen.gif" alt=":mrgreen:" />

    Posted
    Only sure way I can think of is put it on the driveway and drive over it.

    Please login or register to see this image.

    /emoticons/default_icon_mrgreen.gif" alt=":mrgreen:" />

    The build quality suggests they thought of that! Probably the only scenario the box wouldn't crash!

    Posted
    Guys,

    I use this string "http://user:password@ipadress:port/api/callAction?deviceID=49&name=turnOn"

    But I do not use any remote connections. I have forwarded a port to the HC2. This works the best.

    I've been playing around with this for a while and I can't get it to work.

    "http://user:password@ipadress:port/api/callAction?deviceID=49&name=turnOn" works fine from a browser but what do the settings need to be in Geofancy itself?

    What is your exact setup in Geofancy if I may ask you?

    Thanks!

    It doesn't work like that directly, the command only works over the local network.

    So what you do is setup a PHP server, and let GEOFency connect to two PHP files and the PHP files will send the command on the local network to your HC2.

    I used WAMP software package as a PHP server.

    Posted

    Boefje6432, port forwarding in the geofancy http request doesn't work.

    If you have a DDNS and a local webserver, yes, you can use successfully Geofancy with a simple php script.

    Let me know if you want other info.

    Posted

    I wasn't looking at port forwarding, more runnig it off the local network only and I'd be already happy if I can ge tthat up and running.

    So if I type in "http://user:password@ipadress:port/api/callAction?deviceID=49&name=turnOn" in any browser it works just fine but if I use the same string in Geofancy it doesn't. So my question is, what should I use as settings in Geofancy? Do I need to fill in the basic HTTP authentication or not?

    Then there are the Global HTTP settings where you can send a test command, what should I fill in there? at the moment I use "http://user:password@ipadress:port/api/callAction?deviceID=49&name=turnOn" (Post) and HTTP basic authentication off but that doesn't work either.

    Posted
    I wasn't looking at port forwarding, more runnig it off the local network only and I'd be already happy if I can ge tthat up and running.

    So if I type in "http://user:password@ipadress:port/api/callAction?deviceID=49&name=turnOn" in any browser it works just fine but if I use the same string in Geofancy it doesn't. So my question is, what should I use as settings in Geofancy? Do I need to fill in the basic HTTP authentication or not?

    Then there are the Global HTTP settings where you can send a test command, what should I fill in there? at the moment I use "http://user:password@ipadress:port/api/callAction?deviceID=49&name=turnOn" (Post) and HTTP basic authentication off but that doesn't work either.

    Try the GET-Method... It works for me.

    Posted
    Try the GET-Method... It works for me.

    Doh that worked

    Please login or register to see this image.

    /emoticons/default_icon_idea.gif" alt=":idea:" /> . Thanks!

    Posted

    Maybe silly question:

    how do you know on what port the hc2 is listening?

    "http://user:password@ipadress:port/api/callAction?deviceID=49&name=turnOn"

    txs

    Posted

    It is only for a request outside your LAN, when you use portforwarding. Otherwise you doesn't need the port.

    Join the conversation

    You can post now and register later. If you have an account, sign in now to post with your account.

    Guest
    Reply to this topic...

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