Announcement

Collapse
No announcement yet.

traccar geofence

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

    traccar geofence

    Nevermind. I was able to get it working.


    Reading the userguide for phl2, I am trying to figure out what to put in the field "Authorization: Basic YOUR HS3 Hashed Credentials". I am connecting from a linux traccar machine to a seperate HS3 machine in the same network. Any help is appreciated.

    https://jphuddlestone.co.uk/phlocati.../TraccarF.html

    #2
    Hi,

    I'm struggling with the same problem: What am I supposed to enter instead of "Authorization: Basic YOUR HS3 Hashed Credentials"?
    Would you mind sharing what you did to get this working?

    Comment


      #3
      sooty , do you have a chance to shed some light on this issue?

      I have a Traccar server (and a MySQL server) running on the same computer as HS3. I've followed your documentation regarding Traccar that keithj69 also mentions: https://jphuddlestone.co.uk/phlocati.../TraccarF.html

      But as my previous post stated, I'm stuck as to what should be entered on the line that reads "Authorization: Basic YOUR HS3 Hashed Credentials" in your documentation. I've tried to Base64 encode the string "userassword" so that the configuration lines read something like this (no real credentials hashed):

      Code:
      <entry key='event.enable'>true</entry>
      <entry key='forward.json'>true</entry>
      <entry key='event.forward.enable'>true</entry>
      <entry key='event.forward.url'>[URL]https://connected2.homeseer.com/phl2api?dtype=TF[/URL]</entry>
      <entry key='event.forward.header'>
          Authorization: Basic aGFja2VyZnJpZW5kbHk6cGFzc3dvcmQ=
          cache-control: no-cache
      </entry>
      ...But no luck. After creating a PHLocation2 device of type "Traccar (F)", nothing else happens anywhere, nothing is updated, and there are no log entries in the Homeseer log besides mentioning the creation of the Traccar device. By the way, when creating the Traccar type device, I'm supposed to enter a device ID. This is the ID that Traccar uses internally to identify my phone or other devices, correct? (6 digit number found in the Traccar client on my phone)

      Traccar itself seems to operate correctly, my position being updated as it should when I'm on the move. There are no entries in the Traccar log suggesting sending data to Phlocation2. (I've restarted the Traccar server after updating the configuration).

      What am I not seeing here?

      What is the syntax of the "hashed credentials" before it is hashed, and is it correct to use Base64 encoding for hashing? I suspect I'm doing something wrong here, just can't find out what exactly.

      I'm grateful for any clues that might point me in the right direction!

      Comment


        #4
        Stuck at the same point here. Keithj69 says he solved his issue, but didn't tell us what he did.

        Comment


          #5
          Have you:

          Created the geofence in Traccar?
          Created the user/device in Traccar?
          Assigned that geofence to that user in Traccar?

          From memory events are only generated for fence crossings when the fence and user have been tied together.

          Comment


            #6
            jayph Husmann
            Code:
             <entry key='event.enable'>true</entry>
            <entry key='forward.json'>true</entry>
            <entry key='event.forward.enable'>true</entry>
            <entry key='event.forward.url'>[URL="https://connected2.homeseer.com/phl2api?dtype=TF"]http://local-ip-to-my-hs3-server/phl2api?dtype=TF[/URL]</entry>
            <entry key='event.forward.header'>
                Authorization: username/password    
            cache-control: no-cache </entry>
            I do not point traccar out to the web. I point it directly to my hs3 server. I do not think that the Authorization is needed but I do have my username and password added anyway.

            Also as Fellhahn mentions, you will need to setup the stuff in traccar first. Do not forget to add the user/device id inside of phlocation.

            Comment


              #7
              When I don't add my username/password in the traccar config file I get this in the Homeseer log:

              Web Server login failed due to bad user/pass format, from: 192.168.1.75 User: <string of encoded characters>

              I tried the format <username>/<password> and <username>@<password> , both base64 encoded and get similar error messages

              So traccar is trying to connect, but my user/pass format doesn't appear to be correct. Traccar is tracking my phone and I can see movement on Traccar's map.

              I'm getting the encode username & passwrod pass to Homeseer (showing up in the log). But log reports:

              --- Web Server login failed due to bad user/pass format, from: 192.168.1.75 User: username/password

              I've tried both username/password and username@password - same result. I also created a new login to make sure I hadn't forgotten the password.

              I think my format is wrong but don't know what right is.
              Last edited by jayph; October 3, 2019, 06:01 PM. Reason: More results.....

              Comment


                #8
                I just use the username/password format. If you put the full http://yourip/phl2api?dtype=TF Do you get a "Unrecognised Traccar data!" error? Also it is http and not https.
                I wonder if mine is working because I set this up at one point. https://forums.homeseer.com/forum/ho...ta-in-homeseer

                Comment


                  #9
                  I changed the unencoded format of username and password to username<colon>password and it is now working. I can't put the actual colon in because the forum changes it to a smiley face.

                  Comment


                    #10
                    Good to hear. Have fun setting up the new events.

                    Comment


                      #11
                      I'm looking into using Traccar and PHLocation2 for geofencing. I downloaded the Traccar client from android Play store, and android Malwarebytes informed me it has a problem "Android/Monitor.Traccar.HNS". Downloaded the apk directly from https://www.traccar.org/client/ and had the same result. I've sent a copy of the apk to Malwarebytes, but does anybody know about this ? I'm expecting it to be a method of telling people they are installing spyware, but I won't install the apk until I know more.
                      Win 11 Pro | HS4 Pro | Z wave plug in with UZB1 | BLUSBUIRT 2.0.11.0 | RFXtrx433 | Blue Iris CCTV | VU+ 4k with motorised dish | Emby | Hi-Phone HS2 | ESP32 with WLED |

                      Comment


                        #12
                        Nothing back from Malwarebytes yet, but I sent the apk to virustotal.com which doesn't seem fussed by it. My interpretation of the positive flag is that Traccar can be used to track people without their knowledge - Kaspersky and Zone Alarm flagged it at virustotal.com with "not a virus". I think I'm going to try this. If you don't hear from me I'll be trying to rescue my network
                        Win 11 Pro | HS4 Pro | Z wave plug in with UZB1 | BLUSBUIRT 2.0.11.0 | RFXtrx433 | Blue Iris CCTV | VU+ 4k with motorised dish | Emby | Hi-Phone HS2 | ESP32 with WLED |

                        Comment


                          #13
                          Malwarebytes got back to me, and it is NOT a problem. It is indeed that they don't like apps that they consider to be spyware.
                          Win 11 Pro | HS4 Pro | Z wave plug in with UZB1 | BLUSBUIRT 2.0.11.0 | RFXtrx433 | Blue Iris CCTV | VU+ 4k with motorised dish | Emby | Hi-Phone HS2 | ESP32 with WLED |

                          Comment

                          Working...
                          X