Addig my map caused an unexpected issue

Hello!

I have been trying to set up a tracking service for a long time and came across with openremote.

I have got a hand full of Teltonika FMC920s and FMC230s.

Setup was starigt forward using the guide, I run this in a docker image on a windows machine.

I was able to connect one of each type and get some data without location as I am sitiing inside.

image

So I went ahead and started doing what is written in the “Developer Guide: Working on maps” and watched the video on YouTube “How to: white labeling of your free open source IoT platform” here I have jumped right to the part where he is talking about the custom map.

Since than I have a nice map which is for some reasons not even centered (I have the right coordinates)

But I did not get any data form the devices, even tried a new one and the following error pops up in the docker logs:

2024-11-05 23:05:49 manager-1     | 2024-11-05 23:05:49.225  INFO    [Thread-0 (ActiveMQ-serve..7fc)] nager.mqtt.ActiveMQORSecurityManager.API : Un-supported request sub: topic=master/002/867747072572702/commands, connection=/172.20.0.5:34364, clientID=867747072572702, subject=anonymous
2024-11-05 23:05:50 manager-1     | 2024-11-05 23:05:50.708  INFO    [Thread-1 (ActiveMQ-serve..7fc)] nager.mqtt.ActiveMQORSecurityManager.API : Un-supported request pub: topic=master/002/867747072572702/data, connection=/172.20.0.5:34364, clientID=867747072572702, subject=anonymous
2024-11-05 23:05:50 manager-1     | 2024-11-05 23:05:50.709  SEVERE  [Thread-1 (ActiveMQ-serve..7fc)] ache.activemq.artemis.core.protocol.mqtt : AMQ834002: Error processing control packet: MqttPublishMessage[fixedHeader=MqttFixedHeader[messageType=PUBLISH, isDup=false, qosLevel=AT_MOST_ONCE, isRetain=false, remainingLength=249], variableHeader=MqttPublishVariableHeader[topicName=master/002/867747072572702/data, packetId=-1], payload=PooledSlicedByteBuf(ridx: 0, widx: 216, cap: 216/216, unwrapped: PooledUnsafeDirectByteBuf(ridx: 252, widx: 252, cap: 1024))]
2024-11-05 23:05:50 manager-1     | ActiveMQSecurityException[errorType=SECURITY_EXCEPTION message=AMQ229032: User: null does not have permission='SEND' on address master.002.867747072572702.data]
2024-11-05 23:05:50 manager-1     |     at org.apache.activemq.artemis.core.security.impl.SecurityStoreImpl.check(SecurityStoreImpl.java:315)
2024-11-05 23:05:50 manager-1     |     at org.apache.activemq.artemis.core.server.impl.ServerSessionImpl.securityCheck(ServerSessionImpl.java:509)
2024-11-05 23:05:50 manager-1     |     at org.apache.activemq.artemis.core.server.impl.ServerSessionImpl.doSend(ServerSessionImpl.java:2301)
2024-11-05 23:05:50 manager-1     |     at org.apache.activemq.artemis.core.server.impl.ServerSessionImpl.send(ServerSessionImpl.java:1934)
2024-11-05 23:05:50 manager-1     |     at org.apache.activemq.artemis.core.server.impl.ServerSessionImpl.send(ServerSessionImpl.java:1873)
2024-11-05 23:05:50 manager-1     |     at org.apache.activemq.artemis.core.protocol.mqtt.MQTTPublishManager.sendToQueue(MQTTPublishManager.java:241)
2024-11-05 23:05:50 manager-1     |     at org.apache.activemq.artemis.core.protocol.mqtt.MQTTProtocolHandler.handlePublish(MQTTProtocolHandler.java:322)
2024-11-05 23:05:50 manager-1     |     at org.apache.activemq.artemis.core.protocol.mqtt.MQTTProtocolHandler.act(MQTTProtocolHandler.java:162)
2024-11-05 23:05:50 manager-1     |     at org.apache.activemq.artemis.utils.actors.Actor.doTask(Actor.java:32)
2024-11-05 23:05:50 manager-1     |     at org.apache.activemq.artemis.utils.actors.ProcessorBase.executePendingTasks(ProcessorBase.java:68)
2024-11-05 23:05:50 manager-1     |     at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136)
2024-11-05 23:05:50 manager-1     |     at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635)
2024-11-05 23:05:50 manager-1     |     at org.apache.activemq.artemis.utils.ActiveMQThreadFactory$1.run(ActiveMQThreadFactory.java:118)

So I am a big clueless at his point. Not to mention this is my first docker experience as well.

And comment is highly appreciated that might move us forward.

Greetings,
Zoszko

Good afternoon @Zoszko ,

It appears that you’ve made a mistake when configuring your Teltonika devices.

From the error message, I see that you have used master/002/%imei%/commands or data. The correct topics to use in the configuration, as shown in the quick-start are like

  • {realm Name}/{random client ID}/teltonika/%imei%/data
  • {realm Name}/{random client ID}/teltonika/%imei%/commands

So in your case, configure your device like this:

  • master/002/teltonika/%imei%/data
  • master/002/teltonika/%imei%/commands

On the map issue you’re facing, maybe it’ll help if you reverse the latitude and longitude values in your input to the map configuration.

Let me know if this solves the issue!

Hello @panos !

So i have been trying to get back to the point where I can recieve the data.

And figured out the following:

If I have the docker-compose.yml like this:

 manager:
    image: pankalog/fleet-management:${MANAGER_VERSION:-latest}
    restart: always
    depends_on:
      keycloak:
        condition: service_healthy
    volumes:
      - manager-data:/storage
      - deployment-data:/deployment
      #- ./deployment:/deployment

I have got the ‘demo’ map, and data coming:

2024-11-07 06:36:09 manager-1     | 2024-11-07 06:36:09.878  INFO    [Thread-3 (ActiveMQ-serve..e52)] atics.teltonika.TeltonikaMQTTHandler.API : CONNECT: Device 001 connected to topic master/001/teltonika/867747072572488/commands.
2024-11-07 06:36:10 manager-1     | 2024-11-07 06:36:10.349  WARNING [Thread-280 (ActiveMQ-cli..ads)] atics.teltonika.TeltonikaMQTTHandler.API : The new value is empty!
2024-11-07 06:36:10 manager-1     | 2024-11-07 06:36:10.349  SEVERE  [Thread-280 (ActiveMQ-cli..ads)] atics.teltonika.TeltonikaMQTTHandler.API : Could not parse Asset State Duration data
2024-11-07 06:36:10 manager-1     | 2024-11-07 06:36:10.349  SEVERE  [Thread-280 (ActiveMQ-cli..ads)] atics.teltonika.TeltonikaMQTTHandler.API : java.lang.Exception
2024-11-07 06:36:10 manager-1     | 2024-11-07 06:36:10.349  INFO    [Thread-280 (ActiveMQ-cli..ads)] atics.teltonika.TeltonikaMQTTHandler.API : Updating 15 attributes of CarAsset with IMEI 867747072572488 at Timestamp Optional[Attribute{name='lastContact', type='dateAndTime', value='2024-11-07 06:34:20.0', timestamp='1730957660000'} ]
2024-11-07 06:36:39 manager-1     | 2024-11-07 06:36:39.694  INFO    [Thread-0 (ActiveMQ-serve..e52)] atics.teltonika.TeltonikaMQTTHandler.API : DISCONNECT: Device 001 disconnected from topic master/001/teltonika/867747072572488/commands

Once I uncomment the #- ./deployment:/deployment line I have my precious map, with the little center point issue.

Folder structure:

d:\openremote\docker-compose.yml
d:\openremote\mapdata\input.mbtiles
d:\openremote\.deployment\map\mapdata.mbtiles
d:\openremote\.deployment\map\mapsettings.json
d:\openremote\.deployment\openremote.log.0
d:\openremote\deployment\map\mapdata.mbtiles
d:\openremote\deployment\map\mapsettings.json
d:\openremote\deployment\openremote.log.0
d:\openremote\deployment\openremote.log.0.1
d:\openremote\mapdata\output.mbtiles

So the problem is the way I add the mapdata that is for sure.

I will try to reverse teh coordinates to see if that helps the center point issue.

So to confirm, coordinate switch did not help with the centering issue, and had the connection issues again, so I reverted back to amsterdam map to atleast collect data.

Hey @Zoszko ,

As a quick note, if you already have a fleet telematics installation running, you should use that instead of the docker-compose.yml file that the whitelabeling guide suggests. So you would install the fleet management application and then proceed with the guide from the point where OpenRemote is running. The reason I say that is because you also require the deployment image that is specifically tailored to the fleet telematics variant.

After that, you can continue with the guide as normal.

    volumes:
      - manager-data:/storage
      - deployment-data:/deployment
      #- ./deployment:/deployment

There is an issue here. Basically, once you un-comment the last line, there are two different directories on your computer that are trying to map to the /deployment folder inside the Docker container. Basically, it’ll only use one of the mappings to that folder.

Maybe something like this would work?

volumes:
  - manager-data:/storage
  - deployment-data:/deployment
  - ./deployment/map/mapdata.mbtiles:/deployment/map/mapdata.mbtiles

Where you map each different file required to its correct location.

The errors you are getting in the logs indicate that the AVL parameter with ID 250 (the Trip parameter) was not present in the data received from the device, and the errors are related to AssetStateDuration, so the sessions widget, so it’s not actively dropping any messages.

Can you tell me a bit more about the “map centering issue”? Is the map being centered somewhere that’s (close) to the point you’re setting, or is it not somewhere you understand/relatively set it to?

@panos Thanks for the quck replies!

I think I am using the right yml:

image: pankalog/fleet-deployment:${DEPLOYMENT_VERSION:-latest}

I will test this:

  - ./deployment/map/mapdata.mbtiles:/deployment/map/mapdata.mbtiles

tomorrow.

When I click the map, it goes to the bottom right corner of the area.

I can confirm that the center coordinates are good. If I copy them to goole maps it shows the right data location. Even the device that is sending data is giving the same coordinates.

Hey @Zoszko ,

If the map takes you to the bottom right, it means that the map center has not been configured correctly.

Using the hint you gave that you can paste the coordinates on Google, it means that you actually have to switch them. For example, this is the center of Eindhoven when I get it by right-clicking on Google Maps: 51.44183413977071, 5.477035794416612. To have the center of the map be the center of Eindhoven in OpenRemote, you’d have to switch the coordinates: 5.477035794416612, 51.44183413977071 . If you paste this one on Google Maps, it takes you to the coast of Somalia.

This is due to Mapbox, the map we use, using LngLat, instead of LatLng, something that other services use.

Let me know if this helps!