Announcement

Collapse
No announcement yet.

Help with new install

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Help with new install

    So I've been struggling trying to get this working and am having mixed success.

    I've got the plug-in installed and the http server running on port 81. I've got egigeozone installed on my android phone that I want to use for geofence purposes.

    Internally if I browse to 192.168.0.xxx:81/phlegigeozone I get this message
    Error! Fence data check failed.

    So - I'm assuming that my server is running or I wouldn't get a response at all - but something is wrong.

    Any help would be appreciated.

    Mark

    #2
    Originally posted by MarkJames View Post
    So I've been struggling trying to get this working and am having mixed success.

    I've got the plug-in installed and the http server running on port 81. I've got egigeozone installed on my android phone that I want to use for geofence purposes.

    Internally if I browse to 192.168.0.xxx:81/phlegigeozone I get this message
    Error! Fence data check failed.

    So - I'm assuming that my server is running or I wouldn't get a response at all - but something is wrong.

    Any help would be appreciated.

    Mark
    The message does indeed indicate that the plug-in is listening OK. Did you test that URL from the browser on your HS3 machine or from another machine on the same LAN?

    Paul..

    Comment


      #3
      Hi,

      Thanks for responding. I had actually droped egigeozone to try backitude and see if that would work better.

      I'm not sure, though.

      If I look in the log now I'm seeing entries like this

      ??.648605319541&longitude=-1??.64963324936217&accuracy=8.0&loc_timestamp=1491322753&req _timestamp=1491322763&offset=-07%3A00;202;0.03
      4/4/2017 9:46:05 AM;/phlbackitude;72.143.225.106:55432;latitude=??.48463127685381 &longitude=-1??.55178430949597&accuracy=48.0&loc_timestamp=1491324366&re q_timestamp=1491324377&offset=-07%3A00;202;0.022
      4/4/2017 9:47:03 AM;/phlbackitude;72.143.225.106:55437;latitude=??.4846305847168& longitude=-1??.5517807006836&accuracy=48.0&loc_timestamp=1491324366&req _timestamp=1491324437&offset=-07%3A00;202;0.022


      Is this correct? I still only have 2 phlocation devices - the two that were created when I first started with egigeozone.

      Thanks!

      mark

      Comment


        #4
        If you have a look through the user guide, it explains the difference between geofencing apps like EgiGeoZone and position reporting apps like Backitude.

        There is some info in the guide on how to set up the plug-in with both services.

        Paul..

        Comment


          #5
          Hello Paul,
          I'm also working on getting this setup on GeoFency and I've read the help file. Two questions:
          1) The URL that we put in the GeoFency app for the HS server info (http://yourhomeseerserverortnumber/phlgeofency), I would assume this should be the external IP address for my modem? Or the LAN IP?

          2) If this is an external IP, I need to open this port on my router for this to work?

          Sorry for the basic internet questions, getting familiar with how this sort of thing works.
          Thank you!
          HS4 4.2.6.0 &HSTouch Designer 3.0.80
          Plugin's:
          BLBackup, BLOccupied, BLShutdown, EasyTrigger, Ecobee, Nest, AK Bond
          EnvisaLink DSC, PHLocation, Pushover, SONOS, Blue Iris, UltraRachio3,
          weatherXML, Jon00 Alexa Helper, Network Monitor, MyQ, Z-Wave

          Comment


            #6
            I can answer that one

            So you have to start the http server running and give it a port other than the default 80 which HS3 is using. I used 81.

            From inside your LAN the ip for that server would be http://192.yourip:81

            I can't imagine why you would only want to use it inside the LAN though so you'll want it visible to the outside world.

            In that case you'll need to assign a port forward in your router. Let's say you use 8081. You would forward your external ip (this will depend on whether you use dyndns for your own IP or myhs) on port 8081 to 192.yourip:81 internally

            So let's say you have a domain name - mydomain.com
            Your HS3 is running on 192.168.0.20
            Your HTTP server for PHL is running on port 81
            You've port forwarded 8081 to 192.168.0.20 on port 81

            Your URL would be http://mydomain.com:8081/phlgeofancy externally
            internally it would be 192.168.0.20:81

            Don't forget to start the http server - it doesn't start by default
            Hope that helps.

            mark


            If you want to access your location only from inside y

            Comment


              #7
              Help with new install

              Originally posted by MarkJames View Post
              I can answer that one



              So you have to start the http server running and give it a port other than the default 80 which HS3 is using. I used 81.



              From inside your LAN the ip for that server would be http://192.yourip:81



              I can't imagine why you would only want to use it inside the LAN though so you'll want it visible to the outside world.



              In that case you'll need to assign a port forward in your router. Let's say you use 8081. You would forward your external ip (this will depend on whether you use dyndns for your own IP or myhs) on port 8081 to 192.yourip:81 internally



              So let's say you have a domain name - mydomain.com

              Your HS3 is running on 192.168.0.20

              Your HTTP server for PHL is running on port 81

              You've port forwarded 8081 to 192.168.0.20 on port 81



              Your URL would be http://mydomain.com:8081/phlgeofancy externally

              internally it would be 192.168.0.20:81



              Don't forget to start the http server - it doesn't start by default

              Hope that helps.



              mark





              If you want to access your location only from inside y


              Hey Mark,

              I know the feeling when you find a post that you can answer....I still have a lot to learn from the everyone here but little by little I'm getting better and finding some posts that I can help out with every once in a while.



              Sorry for the confusion of my original post, I don't want to use it internally, when I saw your initial post, I noticed that you used a 192.XXX IP which is typically an internal IP address, I'm guessing now that you were just using that when you were testing.



              In coming up with some of my questions about how to start up the http server, I noticed that in your answer you mentioned "the http server for PHL", that was helpful as I was looking through Tools>Setup on the Network tab for how to setup http. Just a suggestion for Paul, in you help file I would suggest putting a reference to setting up the http in PHL under the GeoFency setup section.



              Questions:

              1) I don't have my own IP and only use MyHS to avoid opening a port in my router. If I use MyHS can I still avoid opening a port?



              2) So if I'm using MyHS, all I need to do is:

              Under the PHL http setup section

              1- put in a random port number

              2- Input username and password

              3 - Toggle http server to on

              Then in the GeoFency app

              1- Input the http link in the howto doc for myhs in the Webhook URL settings with the port number I used

              2- Input the username and password I setup in the PHL http setup screen



              Thank you for all your help Mark!
              Last edited by The Profit; April 24, 2017, 04:03 PM.
              HS4 4.2.6.0 &HSTouch Designer 3.0.80
              Plugin's:
              BLBackup, BLOccupied, BLShutdown, EasyTrigger, Ecobee, Nest, AK Bond
              EnvisaLink DSC, PHLocation, Pushover, SONOS, Blue Iris, UltraRachio3,
              weatherXML, Jon00 Alexa Helper, Network Monitor, MyQ, Z-Wave

              Comment


                #8
                No worries.

                Sorry - I don't use myhs so I'm not sure how that works.

                One thing I found that was really helpful, though, is if you go to the help file in the phlocation plugin and don't bother with the index but instead look in 2 spots

                1 - the FAQ - this has the URLs for all the different methods
                2 - do a search for geofancy (I used backitude and egigeozone) - There was actually some very good instructions buried in there on how to set these up. They're very much NOT intuitive

                I actually uninstalled the plugin and went with Tasker autolocation. I was having too many issues with it that I couldn't resolve with my geofence

                Good luck!

                mark

                Comment


                  #9
                  Originally posted by The Profit View Post
                  Hey Mark,
                  I know the feeling when you find a post that you can answer....I still have a lot to learn from the everyone here but little by little I'm getting better and finding some posts that I can help out with every once in a while.

                  Sorry for the confusion of my original post, I don't want to use it internally, when I saw your initial post, I noticed that you used a 192.XXX IP which is typically an internal IP address, I'm guessing now that you were just using that when you were testing.

                  In coming up with some of my questions about how to start up the http server, I noticed that in your answer you mentioned "the http server for PHL", that was helpful as I was looking through Tools>Setup on the Network tab for how to setup http. Just a suggestion for Paul, in you help file I would suggest putting a reference to setting up the http in PHL under the GeoFency setup section.

                  Questions:
                  1) I don't have my own IP and only use MyHS to avoid opening a port in my router. If I use MyHS can I still avoid opening a port?

                  2) So if I'm using MyHS, all I need to do is:
                  Under the PHL http setup section
                  1- put in a random port number
                  2- Input username and password
                  3 - Toggle http server to on
                  Then in the GeoFency app
                  1- Input the http link in the howto doc for myhs in the Webhook URL settings with the port number I used
                  2- Input the username and password I setup in the PHL http setup screen

                  Thank you for all your help Mark!
                  It doesn't work with MyHS - yet. In February Paul said he would look into it, but it is not an option at this time. If you use a DDNS for your WAN IP you can point to that and whatever port number you assign to the PHL webserver. If you don't have a DDNS you would have to use your WAN IP.

                  Either way you will have to forward an external port to the internal IP address of your HS server and the port number you assigned to the PHL webserver. There is no need to translate the port, you can use the default port 8256 and forward that port straight through to your internal HS IP address. You will also need to put in a firewall rule for the port.

                  On mine I post to http://mydomain.com:8256/phlgeofency My forwarding rule just sends port xxxx on the WAN IP to the same port on my HS IP.
                  HS4 Pro, 4.2.19.16 Windows 10 pro, Supermicro LP Xeon

                  Comment


                    #10
                    I've done some preliminary testing on getting data into the plug-in via the json interface which technically should work through myHS, however because of the number of different services the plug-in currently supports, there's quite a lot of work involved integrating them and even then I won't be able to achieve 100% integration with myHS.

                    I've been particularly busy at work for the last month so haven't had a lot of time from plug-in development but I will endevour to get something working before the end of April.

                    Paul..

                    Comment


                      #11
                      Ok - well, I'm back at this and I'm just stumped.

                      I'm using backitude because I had some luck with it last week. As of today not so much.

                      So I've configured the backitude plugin according to the help file
                      server is mydomain:8084
                      port forward is set for tcp/udp for 8084 to 192.168.0.xxx:8084
                      request type is post
                      successful response is 202
                      authentication is basic auth only
                      password and user are set
                      custom fields are set - I'm assuming that the reference ID I want is the one with my name that says 'no status root' at the moment - that reference is in customfield 1 (1) and in 1 (2) is PHLID
                      All the lower case fields are filled in properly

                      I've enabled http logging
                      I've started the server
                      It says 'running (8084)

                      I've put a dump of the log when it starts at the bottom.


                      So if I browse to mydomain:8084 I get a 404
                      If I browse to mydomain:8084/phlbackitude I get a blank page
                      There is no folder html/phlbackitude or html/phlocation/phlbackitude - this seems wrong. My phlocation folders are empty save for a maps and logs folder which are empty except for the icons in the maps folder

                      Despite having http logging enabled I see 0 http requests in the plugin config page.

                      Any thoughts? I'm pulling my hair out.

                      [edit]

                      So this morning, after having left backitude running all night, things have changed a bit

                      I can log in to mydomain:8084 using my user/pass. All I get is a 'Error - empty data string'. But I think that's what I'm supposed to see

                      In the log folder there is now a file with todays date and the following
                      PHLocation http Log File. Created 4/13/2017 7:08:50 AM
                      ========================================
                      DATE;REQURL;REQFROM;DATA;RESULT;TTIME
                      4/13/2017 7:08:50 AM;/phlbackitude;myip:52820;;400;0.021

                      As I sat here backitude fired but it gave an error message - 404 not found for the custom server. I'm starting to think that this is a router port forwarding issue.

                      I'm running tomato firmware on my router and enabled DMZ for the ip that HS is on. I guess I'll wait and see if that helps.

                      Thanks,

                      mark



                      Apr-12 11:53:33 PM PHLocation (Startup) Finished at 11:53:33.589
                      Apr-12 11:53:33 PM PHLocation (StartDQThreads) Fence DQ thread started OK.
                      Apr-12 11:53:33 PM PHLocation (StartDQThreads) Pos DQ thread started OK.
                      Apr-12 11:53:33 PM PHLocation (BuildCommonPlaces) Total common places enabled: 0
                      Apr-12 11:53:33 PM PHLocation (CreateDeviceLists) Finished.
                      Apr-12 11:53:33 PM PHLocation (CreateDeviceLists) Message panel DvRef: 367
                      Apr-12 11:53:33 PM PHLocation (CreateDeviceLists) There are no active custom user devices. Setting monitoring to OFF.
                      Apr-12 11:53:33 PM PHLocation (CreateDeviceLists) No AppLv Timer devices found. Don't start AppLv Timer.
                      Apr-12 11:53:33 PM PHLocation (CreateDeviceLists) Loc Timer type devices found. Start LocTimer.
                      Apr-12 11:53:33 PM PHLocation (CreateDeviceLists) No FM User type devices added to poll list. Don't do polling.
                      Apr-12 11:53:33 PM PHLocation (http) Server thread started OK on port 8084
                      Apr-12 11:53:33 PM PHLocation (CreateDeviceLists) Total PI devices found = 13
                      Apr-12 11:53:33 PM PHLocation (CreateDeviceLists) Message panel device found and set with DvRef: 367
                      Apr-12 11:53:33 PM PHLocation (CreateDeviceLists) Other type device PHLCCS[366]BK added to PI main dev list.
                      Apr-12 11:53:33 PM PHLocation (CreateDeviceLists) Other type device PHLCAL[365]BK added to PI main dev list.
                      Apr-12 11:53:33 PM PHLocation (CreateDeviceLists) Other type device PHLCNK[364]BK added to PI main dev list.
                      Apr-12 11:53:33 PM PHLocation (CreateDeviceLists) Other type device PHLCSP[363]BK added to PI main dev list.
                      Apr-12 11:53:33 PM PHLocation (CreateDeviceLists) Other type device PHLCAC[362]BK added to PI main dev list.
                      Apr-12 11:53:33 PM PHLocation (CreateDeviceLists) Loc Timer type device PHLCTM[361]BK added to Timer list.
                      Apr-12 11:53:33 PM PHLocation (CreateDeviceLists) Loc Timer type device PHLCTM[361]BK added to PI main dev list.
                      Apr-12 11:53:33 PM PHLocation (CreateDeviceLists) Other type device PHLCLO[360]BK added to PI main dev list.
                      Apr-12 11:53:33 PM PHLocation (CreateDeviceLists) Other type device PHLCLA[359]BK added to PI main dev list.
                      Apr-12 11:53:33 PM PHLocation (CreateDeviceLists) Other type device PHLCZC[358]BK added to PI main dev list.
                      Apr-12 11:53:33 PM PHLocation (CreateDeviceLists) Other type device PHLCCN[357]BK added to PI main dev list.
                      Apr-12 11:53:33 PM PHLocation (CreateDeviceLists) Other type device PHLCTN[356]BK added to PI main dev list.
                      Apr-12 11:53:33 PM PHLocation (CreateDeviceLists) Other type device PHLCSA[355]BK added to PI main dev list.
                      Apr-12 11:53:33 PM PHLocation (CreateDeviceLists) Active User type device PHLCUS[354]BK added to usertypes list.
                      Apr-12 11:53:33 PM PHLocation (CreateDeviceLists) Active User type device PHLCUS[354]BK added to users list.
                      Apr-12 11:53:33 PM PHLocation (CreateDeviceLists) User type device PHLCUS[354]BK added to PI main dev list.
                      Apr-12 11:53:33 PM PHLocation (CreateDeviceLists) Found plug-in User type device PHLCUS[354]BK
                      Apr-12 11:53:32 PM PHLocation (CreateDeviceLists) Started.
                      Apr-12 11:53:32 PM PHLocation (Startup) Database structure update not required.
                      Apr-12 11:53:32 PM PHLocation (Startup) Database version is: 9
                      Apr-12 11:53:31 PM PHLocation (Startup) Plug-in version is: 3.0.1.84
                      Apr-12 11:53:31 PM PHLocation Warning (LoadWebServerSettings) Bypass auth is active for the set range(s) of IP addresses.
                      Apr-12 11:53:31 PM PHLocation (LoadPiSettings) UTC offset secs: -25200
                      Apr-12 11:53:31 PM PHLocation (LoadPiSettings) Using stored iCloud client ID: E
                      Apr-12 11:53:31 PM PHLocation (LoadPiSettings) iCloud give up after 5 tries.
                      Apr-12 11:53:31 PM PHLocation (LoadPiSettings) iCloud max retries set to 6
                      Apr-12 11:53:31 PM PHLocation (LoadPiSettings) Logging of http requests to file is ON.
                      Apr-12 11:53:31 PM PHLocation (LoadPiSettings) Message panel enabled.
                      Apr-12 11:53:31 PM PHLocation (LoadPiSettings) BinPath = C:\Program Files\HomeSeer HS3\Data\PHLocation\
                      Apr-12 11:53:31 PM PHLocation (LoadPiSettings) DataPath = C:\Program Files\HomeSeer HS3\Data\PHLocation\PHLocation.phd
                      Apr-12 11:53:31 PM PHLocation (LoadPiSettings) MapPath = html\PHLocation\Maps\
                      Apr-12 11:53:31 PM PHLocation (LoadPiSettings) ImagePath = images\PHLocation\
                      Apr-12 11:53:31 PM PHLocation (LoadPiSettings) LogPath = html\PHLocation\Logs\
                      Apr-12 11:53:31 PM PHLocation (LoadPiSettings) HSAppPath = C:\Program Files\HomeSeer HS3
                      Apr-12 11:53:31 PM PHLocation (Startup) System decimal separator used is [.]
                      Apr-12 11:53:31 PM PHLocation (Startup) Detected OS is Windows version 6.1.7601.65536
                      Apr-12 11:53:31 PM PHLocation (Startup) Begins at 11:53:31.083
                      Apr-12 11:53:31 PM Plug-In Finished initializing plug-in PHLocation
                      Apr-12 11:53:30 PM Info Plugin PHLocation has connected. IP:127.0.0.1:61382
                      Last edited by MarkJames; April 13, 2017, 09:29 AM.

                      Comment


                        #12
                        I notice from your log that you have the bypass IP address range active. Switch this off to begin with. You will need to stop the http server, switch off then re-start the http server.

                        There are no files relating to the http processing. Its all done internally.

                        From a browser that is not on the same LAN as your HS3 machine (e.g. a mobile device connected only to 3/4G) try the following url

                        Code:
                        http://yourdomain:8084/phlbackitude
                        You should be prompted for credentials. If so, then this indicates that the plug-in is listening on the chosen port. If you go ahead and enter the credentials you should see the "Error empty data string" message. This is normal.

                        If the above test works and you get the error message, then the issue is in the Backitude configuration. Make sure that the url is entered correctly including the http:// prefix.

                        Set debug level to 2 on the plug-in general config page then force an update from Backitude. You should see a whole lot of log activity as the plug-in processes the incoming data.

                        Email me the resulting logs and I'll take a look.

                        Paul..

                        Comment


                          #13
                          Thanks Paul,

                          Apparently I'm too stupid to live.

                          I had the custom server url set to http://mydomain.com:myport/backitude instead of PHLbackitude.

                          Sorry to waste your time and thanks very much for your patience with me.

                          mark
                          Last edited by MarkJames; April 14, 2017, 11:12 AM.

                          Comment


                            #14
                            It's been a while since I used Backitude here so I will need to install it and have a play.

                            A 404 would indicate that the url is incorrect.
                            You shouldn't need to specify the user/pass in the url.
                            Make sure that there are no spaces in the url particularly at the beginning and end of the string.

                            When Backitude communicates successfully with the plug-in you should see a whole lot of log activity showing the actual data that was received.

                            Drop me an email and I'll give you some details for a test rig I have set up here and you can try getting the Backitude data to come my way.

                            Paul..

                            Comment


                              #15
                              Originally posted by MarkJames View Post
                              Thanks Paul,

                              Apparently I'm too stupid to live.

                              I had the custom server url set to http://mydomain.com:myport/backitude instead of PHLbackitude.

                              Sorry to waste your time and thanks very much for your patience with me.

                              mark
                              Ah... I didn't see your last post before hitting the submit button.

                              Not a problem, at least you have it working now

                              Paul..

                              Comment

                              Working...
                              X