Ad Widget

Collapse

LLD Issues

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • SanMonitor
    Member
    • Aug 2022
    • 48

    #1

    LLD Issues

    Hi everyone,

    I've been trying for a few days to configure a new LLD to monitor some chargestations.
    For some reason I just can't get it to work. Whatever I do, I always get stuck on either empty macro's, the error 'an item with this key already exists' or macro's filled with an array that I don't know how to split.
    Like I tried to make a dependent item on the 'master' data using the chargepoint code as macro (which then returns a json with all the connectors) and then creating a dependent item on this prototype but the macro has both e_id's in it and I can't split them up.

    Maybe someone here can help me out?
    Sorry the explanation is chaotic but I've been staring at this too long and have a hard time wrapping my head around it.


    The e_id is the only truly unique id for each connector & the endgoal would be to have a trigger if connector_status = offline.
    Ideally I would also be able to pick up the code the connector is linked with, since this would make it easier to read where the connector is located.

    I've simplified the data a bit since there's a lot of clutter I don't need.:

    {
    "data": {
    "props": {
    "chargepoints": {
    "data": [
    {
    "connectors" : [
    {
    "chargepoint": {
    "status": "online",
    "code": "MACHINE1"
    },
    "connector_status": "online",
    "e_id": "ABC123"
    } ,
    {
    "chargepoint": {
    "status": "online",
    "code": "MACHINE1"
    },
    "connector_status": "online",
    "e_id": "ABC456"
    }
    ],
    },
    {
    "connectors" : [
    {
    "chargepoint": {
    "status": "online",
    "code": "MACHINE2"
    },
    "connector_status": "online",
    "e_id": 'XYZ123"
    },
    {
    "chargepoint": {
    "status": "online",
    "code": "MACHINE2"
    },
    "connector_status": "online",
    "e_id": "XYZ456"
    }
    ]
    }
    ]
    }
    }
    }


    }
    Any ideas or help welcome,
    Thanks
Working...