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.
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
]
}
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 )
Solved it by myself:
Number:Length Distance_fromWork "Distance from Work [%.1f km]" (gGPS_Tracker) {channel="gpstracker:tracker:BB:workDistance"}