eclipse-kuksa / kuksa-python-sdk

The Python SDK for Eclipse KUKSA
Apache License 2.0
3 stars 5 forks source link

Kuksa Client: Subscription not providing Updates for Array Types #26

Closed wba2hi closed 2 months ago

wba2hi commented 2 months ago

Based on this issue: https://github.com/eclipse-kuksa/kuksa-databroker/issues/15

Run Databroker docker run -it --rm ghcr.io/eclipse-kuksa/kuksa-databroker:main --port 55556

Run two Kuksa Clients: docker run -it --rm --net=host ghcr.io/eclipse-kuksa/kuksa-python-sdk/kuksa-client:main grpc://192.168.5.2:55556

In Kuksa Client 1 - Subscribe to Vehicle.OBD

     ⢀⣤⣶⣾⣿⢸⣿⣿⣷⣶⣤⡀
    ⣴⣿⡿⠋⣿⣿   ⠈⠙⢿⣿⣦
   ⣾⣿⠋  ⣿⣿  ⣶⣿  ⠙⣿⣷
  ⣸⣿⠇   ⣿⣿⠠⣾⡿⠃   ⠸⣿⣇  ⣶ ⣠⡶⠂ ⣶  ⢰⡆ ⢰⡆⢀⣴⠖ ⢠⡶⠶⠶⡦   ⣰⣶⡀
  ⣿⣿    ⠿⢿⣷⣦⡀     ⣿⣿  ⣿⢾⣏   ⣿  ⢸⡇ ⢸⡷⣿⡁  ⠘⠷⠶⠶⣦  ⢠⡟⠘⣷
  ⢹⣿⡆   ⣿⣶⠈⢻⣿⡆   ⢰⣿⡏  ⠿ ⠙⠷⠄ ⠙⠷⠶⠟⠁ ⠸⠇⠈⠻⠦ ⠐⠷⠶⠶⠟ ⠠⠿⠁ ⠹⠧
   ⢿⣿⣄  ⣿⣿  ⠿⣿  ⣠⣿⡿
    ⠻⣿⣷⡄⣿⣿   ⢀⣠⣾⣿⠟    kuksa-client CLI
     ⠈⠛⠇⢿⣿⣿⣿⣿⡿⠿⠛⠁     0.4.2.post16+git.bfa9205d

Connecting to VSS server at 192.168.5.2 port 55556 using KUKSA GRPC protocol.
TLS will not be used.
INFO 2024-05-07 07:27:06,490 kuksa_client.grpc No Root CA present, it will not be possible to use a secure connection!
INFO 2024-05-07 07:27:06,490 kuksa_client.grpc.aio Establishing insecure channel
gRPC channel connected.
Test Client> subscribe Vehicle.OBD
{
    "subscriptionId": "91758c6c-d9b4-4a8b-9843-3cbc33338716"
}

In Kuksa Client 2 - Publish new Data for Vehicle.OBD.DTCList


     ⢀⣤⣶⣾⣿⢸⣿⣿⣷⣶⣤⡀
    ⣴⣿⡿⠋⣿⣿   ⠈⠙⢿⣿⣦
   ⣾⣿⠋  ⣿⣿  ⣶⣿  ⠙⣿⣷
  ⣸⣿⠇   ⣿⣿⠠⣾⡿⠃   ⠸⣿⣇  ⣶ ⣠⡶⠂ ⣶  ⢰⡆ ⢰⡆⢀⣴⠖ ⢠⡶⠶⠶⡦   ⣰⣶⡀
  ⣿⣿    ⠿⢿⣷⣦⡀     ⣿⣿  ⣿⢾⣏   ⣿  ⢸⡇ ⢸⡷⣿⡁  ⠘⠷⠶⠶⣦  ⢠⡟⠘⣷
  ⢹⣿⡆   ⣿⣶⠈⢻⣿⡆   ⢰⣿⡏  ⠿ ⠙⠷⠄ ⠙⠷⠶⠟⠁ ⠸⠇⠈⠻⠦ ⠐⠷⠶⠶⠟ ⠠⠿⠁ ⠹⠧
   ⢿⣿⣄  ⣿⣿  ⠿⣿  ⣠⣿⡿
    ⠻⣿⣷⡄⣿⣿   ⢀⣠⣾⣿⠟    kuksa-client CLI
     ⠈⠛⠇⢿⣿⣿⣿⣿⡿⠿⠛⠁     0.4.2.post16+git.bfa9205d

Connecting to VSS server at 192.168.5.2 port 55556 using KUKSA GRPC protocol.
TLS will not be used.
INFO 2024-05-07 07:26:44,516 kuksa_client.grpc No Root CA present, it will not be possible to use a secure connection!
INFO 2024-05-07 07:26:44,516 kuksa_client.grpc.aio Establishing insecure channel
gRPC channel connected.
Test Client> setValue Vehicle.OBD.DTCList 1,2,3,4,5
OK

In Kuksa Client 1 - Update not received - verify current value:

Test Client> getValue Vehicle.OBD.DTCList
{
    "path": "Vehicle.OBD.DTCList",
    "value": {
        "value": {
            "values": [
                "1",
                "2",
                "3",
                "4",
                "5"
            ]
        },
        "timestamp": "2024-05-07T07:28:33.104737+00:00"
    }
}