Mqttitude 1.8

After update to 1.8 RC I get this error from Mqttitude Binding

2016-01-09 22:42:35.637 [ERROR] [b.m.internal.MqttitudeConsumer] - Unable to calculate relative location for Presence_Elias_PhoneMqtt as there is no lat/lon configured for ‘home’
2016-01-09 22:42:35.674 [ERROR] [b.m.internal.MqttitudeConsumer] - Unable to calculate relative location for Presence_Oliver_PhoneMqtt as there is no lat/lon configured for ‘home’
2016-01-09 22:42:35.736 [ERROR] [b.m.internal.MqttitudeConsumer] - Unable to calculate relative location for Presence_Mike_PhoneMqtt as there is no lat/lon configured for ‘home’

I have this in openhab.cfg

mqttitude:home.lat=60.121212
mqttitude:home.lon=17.101010
mqttitude:geofence=100

/Mike

The Mqttitude binding code itself wasn’t changed since 1.7, but that’s not proof there isn’t some other 1.8-related issue. In the meantime, are you sure that the openHAB server is in fact reading the exact openhab.cfg file that contains those lines?

Could you add this to logback.xml:

<logger name="org.openhab.binding.mqttitude" level="TRACE"/>

and see if the log shows you more about the issue?

2016-01-10 21:41:03.292 [DEBUG] [.m.internal.MqttitudeActivator] - Mqttitude binding has been started.
2016-01-10 21:41:03.465 [DEBUG] [.b.m.internal.MqttitudeBinding] - Registering Mqttitude consumer for owntracks/elias/galaxys4 (on mosquitto)
2016-01-10 21:41:03.483 [DEBUG] [.b.m.internal.MqttitudeBinding] - Registering Mqttitude consumer for owntracks/oliver/iphone6 (on mosquitto)
2016-01-10 21:41:03.485 [TRACE] [b.m.internal.MqttitudeConsumer] - Message received on topic owntracks/elias/galaxys4: {“_type”:“location”,“lat”:60.XXXXXX,“lon”:17.XXXXXX,“tst”:1452458032,“acc”:67,“batt”:61,“tid”:“ep”}
2016-01-10 21:41:05.150 [TRACE] [b.m.internal.MqttitudeConsumer] - Checking item Presence_Elias_PhoneMqtt…
2016-01-10 21:41:05.155 [ERROR] [b.m.internal.MqttitudeConsumer] - Unable to calculate relative location for Presence_Elias_PhoneMqtt as there is no lat/lon configured for ‘home’
2016-01-10 21:41:05.160 [DEBUG] [.b.m.internal.MqttitudeBinding] - Registering Mqttitude consumer for owntracks/eva/iphone5 (on mosquitto)
2016-01-10 21:41:05.160 [TRACE] [b.m.internal.MqttitudeConsumer] - Message received on topic owntracks/oliver/iphone6: {“tst”:1454764158,“acc”:65,“_type”:“location”,“alt”:21,“lon”:17.XXXXXX,“vac”:28,“p”:100.3435516357422,“lat”:60.XXXXXX,“batt”:52,“tid”:“op”}
2016-01-10 21:41:05.206 [TRACE] [b.m.internal.MqttitudeConsumer] - Checking item Presence_Oliver_PhoneMqtt…
2016-01-10 21:41:05.207 [ERROR] [b.m.internal.MqttitudeConsumer] - Unable to calculate relative location for Presence_Oliver_PhoneMqtt as there is no lat/lon configured for ‘home’
2016-01-10 21:41:05.210 [DEBUG] [.b.m.internal.MqttitudeBinding] - Registering Mqttitude consumer for owntracks/mike/galaxys6 (on mosquitto)
2016-01-10 21:41:05.219 [TRACE] [b.m.internal.MqttitudeConsumer] - Message received on topic owntracks/mike/galaxys6: {“_type”:“location”,“lat”:60.XXXXXX,“lon”:17.XXXXXX,“tst”:1452385229,“acc”:50,“batt”:17,“tid”:“mp”}
2016-01-10 21:41:05.219 [DEBUG] [.b.m.internal.MqttitudeBinding] - Activating Mqttitude binding
2016-01-10 21:41:05.228 [DEBUG] [.b.m.internal.MqttitudeBinding] - Mqttitude binding configuration updated, ‘home’ location specified (Lat: 60.XXXXXXX, Long: 17.XXXXXX) with a geofence of 100.0m.
2016-01-10 21:41:05.231 [DEBUG] [.b.m.internal.MqttitudeBinding] - Unregistering Mqttitude consumer for owntracks/elias/galaxys4 (on mosquitto)
2016-01-10 21:41:05.288 [TRACE] [b.m.internal.MqttitudeConsumer] - Checking item Presence_Mike_PhoneMqtt…
2016-01-10 21:41:05.290 [ERROR] [b.m.internal.MqttitudeConsumer] - Unable to calculate relative location for Presence_Mike_PhoneMqtt as there is no lat/lon configured for ‘home’
2016-01-10 21:41:05.293 [DEBUG] [.b.m.internal.MqttitudeBinding] - Unregistering Mqttitude consumer for owntracks/oliver/iphone6 (on mosquitto)
2016-01-10 21:41:05.299 [DEBUG] [.b.m.internal.MqttitudeBinding] - Unregistering Mqttitude consumer for owntracks/eva/iphone5 (on mosquitto)
2016-01-10 21:41:05.303 [DEBUG] [.b.m.internal.MqttitudeBinding] - Unregistering Mqttitude consumer for owntracks/mike/galaxys6 (on mosquitto)
2016-01-10 21:41:05.311 [DEBUG] [.b.m.internal.MqttitudeBinding] - Registering Mqttitude consumer for owntracks/elias/galaxys4 (on mosquitto)
2016-01-10 21:41:05.317 [DEBUG] [.b.m.internal.MqttitudeBinding] - Registering Mqttitude consumer for owntracks/oliver/iphone6 (on mosquitto)
2016-01-10 21:41:05.323 [TRACE] [b.m.internal.MqttitudeConsumer] - Message received on topic owntracks/elias/galaxys4: {“_type”:“location”,“lat”:60.XXXXXX,“lon”:17.XXXXXX,“tst”:1452458032,“acc”:67,“batt”:61,“tid”:“ep”}
2016-01-10 21:41:05.381 [TRACE] [b.m.internal.MqttitudeConsumer] - Checking item Presence_Elias_PhoneMqtt…
2016-01-10 21:41:05.384 [TRACE] [b.m.internal.MqttitudeConsumer] - Location received for Presence_Elias_PhoneMqtt: Lat: 60.XXXXXX, Long: 17.XXXXXX
2016-01-10 21:41:05.388 [DEBUG] [b.m.internal.MqttitudeConsumer] - Presence_Elias_PhoneMqtt is inside the ‘home’ geofence (13.44878502105628m)
2016-01-10 21:41:05.393 [TRACE] [b.m.internal.MqttitudeConsumer] - Message received on topic owntracks/oliver/iphone6: {“tst”:1454764158,“acc”:65,“_type”:“location”,“alt”:21,“lon”:17.XXXXXX,“vac”:28,“p”:100.3435516357422,“lat”:60.XXXXXXX,“batt”:52,“tid”:“op”}
2016-01-10 21:41:05.405 [DEBUG] [.b.m.internal.MqttitudeBinding] - Registering Mqttitude consumer for owntracks/eva/iphone5 (on mosquitto)
2016-01-10 21:41:05.441 [TRACE] [b.m.internal.MqttitudeConsumer] - Checking item Presence_Oliver_PhoneMqtt…
2016-01-10 21:41:05.446 [TRACE] [b.m.internal.MqttitudeConsumer] - Location received for Presence_Oliver_PhoneMqtt: Lat: 60.XXXXXX, Long: 17.XXXXXX
2016-01-10 21:41:05.451 [DEBUG] [b.m.internal.MqttitudeConsumer] - Presence_Oliver_PhoneMqtt is inside the ‘home’ geofence (8.048209776930209m)
2016-01-10 21:41:05.459 [DEBUG] [.b.m.internal.MqttitudeBinding] - Registering Mqttitude consumer for owntracks/mike/galaxys6 (on mosquitto)
2016-01-10 21:41:05.467 [TRACE] [b.m.internal.MqttitudeConsumer] - Message received on topic owntracks/mike/galaxys6: {“_type”:“location”,“lat”:60.XXXXXX,“lon”:17.XXXXXX,“tst”:1452385229,“acc”:50,“batt”:17,“tid”:“mp”}
2016-01-10 21:41:05.506 [TRACE] [b.m.internal.MqttitudeConsumer] - Checking item Presence_Mike_PhoneMqtt…
2016-01-10 21:41:05.510 [TRACE] [b.m.internal.MqttitudeConsumer] - Location received for Presence_Mike_PhoneMqtt: Lat: 60.XXXXXX, Long: 17.XXXXXX
2016-01-10 21:41:05.512 [DEBUG] [b.m.internal.MqttitudeConsumer] - Presence_Mike_PhoneMqtt is inside the ‘home’ geofence (16.90165787307668m)

It seems to working but it receives the first location before it has loaded configuration.

/Mike

Hi Mike, it does seem to be a bug that the binding is subscribed before it has read its configuration. Could you open an issue or should I?

I can open an issue.

/Mike

1 Like

Hi, @watou, @tnemrap, and everyone reading,

I’m having issues with OwntTracks and OpenHAB, and maybe there is a relation with this issue.

Info:

  • broker mosquitto
  • OwnTracks for Android version 0.5.23. Can’t set the Topic in the menus
  • “Share” is selected with my “work” waypoint (the only Waypoint i’ve set)
  • i receive the publish with mymqtt and i don’t see any publish message to a topic/subtopic referring to the word ‘event’ or ‘waypoint’

Here is my OpenHAB log:

2016-03-07 13:10:17.496 [DEBUG] [.m.internal.MqttitudeActivator] - Mqttitude binding has been started.
2016-03-07 13:10:17.549 [DEBUG] [.b.m.internal.MqttitudeBinding] - Registering Mqttitude consumer for owntracks/myuser/CelLG (on mosquitto)
2016-03-07 13:10:17.554 [DEBUG] [.b.m.internal.MqttitudeBinding] - Registering Mqttitude consumer for owntracks/myuser/CelLG/event (on mosquitto)
2016-03-07 13:10:17.558 [TRACE] [b.m.internal.MqttitudeConsumer] - Message received on topic owntracks/myuser/CelLG: {"_type":"location","lon":-XX.XXXX478,"tid":"LG","t":"u","acc":30,"tst":1457362884,"lat":-XX.XXXX332}
2016-03-07 13:10:18.458 [TRACE] [b.m.internal.MqttitudeConsumer] - Checking item LG_work...
2016-03-07 13:10:18.460 [ERROR] [b.m.internal.MqttitudeConsumer] - Unable to calculate relative location for LG_work as there is no lat/lon configured for 'home'
2016-03-07 13:10:18.462 [DEBUG] [.b.m.internal.MqttitudeBinding] - Activating Mqttitude binding

2016-03-07 13:11:51.315 [TRACE] [b.m.internal.MqttitudeConsumer] - Message received on topic owntracks/myuser/CelLG: {"_type":"location","lon":-XX.XXXX427,"tid":"LG","t":"u","acc":30,"tst":1457363511,"lat":-XX.XXXX316}
2016-03-07 13:11:51.348 [TRACE] [b.m.internal.MqttitudeConsumer] - Checking item LG_work...
2016-03-07 13:11:51.350 [ERROR] [b.m.internal.MqttitudeConsumer] - Unable to calculate relative location for LG_work as there is no lat/lon configured for 'home'

2016-03-07 13:15:21.334 [TRACE] [b.m.internal.MqttitudeConsumer] - Message received on topic owntracks/myuser/CelLG: {"_type":"location","lon":-XX.XXXX596,"tid":"LG","t":"u","acc":30,"tst":1457363721,"lat":-XX.XXXX325}
2016-03-07 13:15:21.369 [TRACE] [b.m.internal.MqttitudeConsumer] - Checking item LG_work...
2016-03-07 13:15:21.372 [ERROR] [b.m.internal.MqttitudeConsumer] - Unable to calculate relative location for LG_work as there is no lat/lon configured for 'home'

Any help will be highly appreciated.

Thank you very much!
Max

Have you configured your home position in openhab.cfg?

/Mike

So, i set up the “home” location in openhab.cfg and the error messages dissapeared… the “optional” in openhab.cfg is not as optional as it says?

# Optional. The latitude/longitude coordinates of 'home'.

I 'm trying to use Regions only and not Manual mode…

this is my log:

2016-03-07 19:25:49.712 [DEBUG] [.b.m.internal.MqttitudeBinding] - Registering Mqttitude consumer for owntracks/myuser/CelLG (on mosquitto)
2016-03-07 19:25:49.729 [DEBUG] [.b.m.internal.MqttitudeBinding] - Registering Mqttitude consumer for owntracks/myuser/CelLG/event (on mosquitto)
2016-03-07 19:25:49.735 [TRACE] [b.m.internal.MqttitudeConsumer] - Message received on topic owntracks/myuser/CelLG: {"_type":"location","lon":-XX.XXX8306,"tid":"LG","acc":48,"tst":1457385663,"lat":-XX.XXX4588}
2016-03-07 19:25:50.714 [TRACE] [b.m.internal.MqttitudeConsumer] - Checking item LG_work...
2016-03-07 19:25:50.716 [ERROR] [b.m.internal.MqttitudeConsumer] - Unable to calculate relative location for LG_work as there is no lat/lon configured for 'home'
2016-03-07 19:25:50.717 [DEBUG] [.b.m.internal.MqttitudeBinding] - Activating Mqttitude binding
2016-03-07 19:25:50.725 [DEBUG] [.b.m.internal.MqttitudeBinding] - Mqttitude binding configuration updated, 'home' location specified (Lat: -XX.XXX46, Long: -XX.XXX83) with a geofence of 50.0m.
2016-03-07 19:25:50.728 [DEBUG] [.b.m.internal.MqttitudeBinding] - Unregistering Mqttitude consumer for owntracks/myuser/CelLG (on mosquitto)
2016-03-07 19:25:50.762 [DEBUG] [.b.m.internal.MqttitudeBinding] - Unregistering Mqttitude consumer for owntracks/myuser/CelLG/event (on mosquitto)
2016-03-07 19:25:50.767 [DEBUG] [.b.m.internal.MqttitudeBinding] - Registering Mqttitude consumer for owntracks/myuser/CelLG (on mosquitto)
2016-03-07 19:25:50.773 [DEBUG] [.b.m.internal.MqttitudeBinding] - Registering Mqttitude consumer for owntracks/myuser/CelLG/event (on mosquitto)
2016-03-07 19:25:50.777 [TRACE] [b.m.internal.MqttitudeConsumer] - Message received on topic owntracks/myuser/CelLG: {"_type":"location","lon":-XX.XXX8306,"tid":"LG","acc":48,"tst":1457385663,"lat":-XX.XXX4588}
2016-03-07 19:25:50.805 [TRACE] [b.m.internal.MqttitudeConsumer] - Checking item LG_work...
2016-03-07 19:25:50.807 [TRACE] [b.m.internal.MqttitudeConsumer] - Location received for LG_work: Lat: -XX.XXX46, Long: -XX.XXX83
2016-03-07 19:25:50.809 [DEBUG] [b.m.internal.MqttitudeConsumer] - LG_work is inside the 'home' geofence (0.0m)
2016-03-07 19:25:51.108 [INFO ] [.service.AbstractActiveService] - HTTP Refresh Service has been started
2016-03-07 19:25:52.244 [ERROR] [.myopenhab.internal.MyOHClient] - Socket.IO error: not authorized
2016-03-07 19:25:53.043 [INFO ] [.service.AbstractActiveService] - NTP Refresh Service has been started
2016-03-07 19:27:10.668 [TRACE] [b.m.internal.MqttitudeConsumer] - Message received on topic owntracks/myuser/CelLG: {"_type":"location","lon":-XX.XXX8797,"tid":"LG","acc":54,"tst":1457386031,"lat":-XX.XXX4865}
2016-03-07 19:27:10.706 [TRACE] [b.m.internal.MqttitudeConsumer] - Checking item LG_work...
2016-03-07 19:27:10.709 [TRACE] [b.m.internal.MqttitudeConsumer] - Location received for LG_work: Lat: -XX.XXX485, Long: -XX.XXX88
2016-03-07 19:27:10.710 [DEBUG] [b.m.internal.MqttitudeConsumer] - LG_work is inside the 'home' geofence (5.4105885432813m)
2016-03-07 19:28:53.376 [TRACE] [b.m.internal.MqttitudeConsumer] - Message received on topic owntracks/myuser/CelLG: {"_type":"location","lon":-XX.XXX4268,"tid":"LG","acc":16,"tst":1457386133,"lat":-XX.XXX368}
2016-03-07 19:28:53.416 [TRACE] [b.m.internal.MqttitudeConsumer] - Checking item LG_work...
2016-03-07 19:28:53.418 [TRACE] [b.m.internal.MqttitudeConsumer] - Location received for LG_work: Lat: -XX.XXX367, Long: -XX.XXX426
2016-03-07 19:28:53.420 [DEBUG] [b.m.internal.MqttitudeConsumer] - LG_work is inside the 'home' geofence (38.26365272726311m)

would like an advice…
should i leave it like this?

thank you very much!!!
Max

Also my sitemap is not showing any change on the “Switch” item…
i beleive it should it be “On”…but is not…

:anguished:

Thanks!!!
Max

Hi @tnemrap, all,

Could you share your solution/configuration to make this work? (i mean Items,Sitemap, maybe Rules, android or iphone, etc)

Thank you very much!

Max

hi everyone,
i think my config is working now, and i really don’t know if it is 100% ok.
I mean, i still have some doubts, …

could it be possible that an Item “loses updates” (or something similar?) and then different icons (light bulbs, shields, etc) of my items turns into “disabled mode” ? (i mean, fro example shield icon in gray color, light icon next to switches off…)
?
is there a timeout?

I’m sorry but i can’t figure out the when and how it happens; so i don’t know how to put it into words to search for this issue i have…still investigating…

:rolling_eyes:
Max