[SOLVED] GpsTracker multiple regionDistance?

Hey, dummy question about gpstracker thing.
can I add more than one regionDistance?
What am I missing?

Thing gpstracker:tracker:tt   "My tracker" [trackerId="tt"] {
    Channels:
            Type regionDistance : homeDistance "Distance from Home" [
                regionName="Home",
                regionCenterLocation="30,31",
                regionRadius=50
            ],
	  Type regionDistance : workDistance "Distance from Work" [
                regionName="Work",
                regionCenterLocation="10,12",
                regionRadius=50
            ]
}

Thanks!

I haven’t tried this binding but check the documentation and the items example for adding workDistance. I think you can only have one regionDistance entry in the Things file.:thinking:

In the documentation it looks like you can add multiple channels legendaries note example and what I have sent not really working…

Comparing you things file to the example in the doc’s you may need to define a distance thing in addition to your single thing. Also note that each thing has a different ID.

Doc example:

//tracker definition
Thing gpstracker:tracker:1   "XY tracker" [trackerId="XY"]

//tracker definition with extra distance channel
Thing gpstracker:tracker:EX   "EX tracker" [trackerId="EX"] {
    Channels:
            Type regionDistance : homeDistance "Distance from Home" [
                regionName="Home",
                regionCenterLocation="11.1111,22.2222",
                regionRadius=100,
                accuracyThreshold=30
            ]
}

I’ve find out, I had an extra comma between the channels…
thanks

Glad you have it working.:+1:

Please mark the topic solved by clicking the square box on the post that provided the solution and edit the title to start with [Solved].

Thanks

EDIT: I see you edited the title.

Thanks, again

Can you tell me, how i can show the distance from home and work in the sitemap?

Number:Length   Distance_fromHome   "Distance from Home [%.1f km]"    (gGPS_Tracker)  {channel="gpstracker:tracker:BB:distanceSystem"}

This works for home. But how can i use this for distance_to_work too? Where can i configure the second location in this line? I have defined 2 locations like your things-file in the first post. (without the comma :wink: )

Solved it by myself:

Number:Length   Distance_fromWork   "Distance from Work [%.1f km]"    (gGPS_Tracker)  {channel="gpstracker:tracker:BB:workDistance"}