Hi,
I use this MQTT client plugin to get location data from owntracks into variables which I can use to update pimatic location. Everything works as it should but one small issue:
I have created a device (MQTTSensor) importing the topic of owntracks into two variables “lat” and "lon"
The variables are displayed correctly showing the numbers but if I try to update the location plugin with the lat and lon variables from this mqttsensor device the whole array from the owntracks topic is copied.
So in short: Is there an option to just get the variable information? The device shows just the lat lon variables correctly but the information included in each lat and lon variable is not just the number but the whole topic:
So $Michael_mobile_phone.lat shows if I read it with a dummyvariabledevice:
e.g.: {"_type":“location”,“acc”:21,“batt”:91,“lat”:48.0181122,“lon”:16.2969471,“tid”:“mi”,“tst”:1474275140}
instead of just:
48.0181122
Ine hint: I changed the $Michael_mobile_phone.lat to be a string (instead of number) as number cuts of the decimals just showing:
48.02
instead of
48.0181122
In my view there is a behaviour in MQTTSensors wich maymbe should not be this way. Besides this is there a quick option to extract just the lat information from {"_type":“location”,“acc”:21,“batt”:91,“lat”:48.0181122,“lon”:16.2969471,“tid”:“mi”,“tst”:1474275140} and pasting it into a pimatic variable?
Br
Mike