MagicMirror Forum
    • Recent
    • Tags
    • Unsolved
    • Solved
    • MagicMirror² Repository
    • Documentation
    • 3rd-Party-Modules
    • Donate
    • Discord
    • Register
    • Login
    A New Chapter for MagicMirror: The Community Takes the Lead
    Read the statement by Michael Teeuw here.

    MQTT payload

    Scheduled Pinned Locked Moved General Discussion
    2 Posts 2 Posters 333 Views 2 Watching
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • H Offline
      h_vestbo
      last edited by

      I want to show info from a MQTT server on my mirror.
      Its a big payload on the topic, coming from a ttn sensor.
      For a noob, whats the best way to pick out just some of the info from the payload?

      Example of the payload from the topic:

      {“end_device_ids”:{“device_id”:“eui-a84041d0f187ec73”,“application_ids”:{“application_id”:“roatoppen”},“dev_eui”:“A84041D0F187EC73”,“join_eui”:“A840410000000101”,“dev_addr”:“260B15F1”},“correlation_ids”:[“gs:uplink:01HQ56FZSCBY0SP7PAVYR6F9DC”],“received_at”:“2024-02-21T06:43:49.882988265Z”,“uplink_message”:{“session_key_id”:“AY3Hi2rqxf75puTSvmOKRQ==”,“f_port”:2,“f_cnt”:40,“frm_payload”:“DgsANQAADH//f/8=”,“decoded_payload”:{“ADC_CH0V”:0, “BatV”:3.595, “Digital_IStatus”:“L”, “Door_status”:“OPEN”, “EXTI_Trigger”:“FALSE”, “TempC1”:5.3, “TempC2”:3276.7, “TempC3”:3276.7, “Work_mode”:“3DS18B20”},“rx_metadata”:[{“gateway_ids”:{“gateway_id”:“eui-5030354148724750”,“eui”:“5030354148724750”},“time”:“2024-02-21T06:43:49.143920Z”,“timestamp”:962651492,“rssi”:-117,“channel_rssi”:-117,“snr”:-18.25,“location”:{“latitude”:59.610908127642695,“longitude”:5.824582718642445,“altitude”:20,“source”:“SOURCE_REGISTRY”},“uplink_token”:“CiIKIAoUZXVpLTUwMzAzNTQxNDg3MjQ3NTASCFAwNUFIckdQEOTKg8sDGgwIpbfWrgYQ87bMwgIgoJ2AlIKBCQ==”,“received_at”:“2024-02-21T06:43:49.651226007Z”}],“settings”:{“data_rate”:{“lora”:{“bandwidth”:125000, “spreading_factor”:12, “coding_rate”:“4/5”}}, “frequency”:“868100000”, “timestamp”:962651492, “time”:“2024-02-21T06:43:49.143920Z”},“received_at”:“2024-02-21T06:43:49.677482764Z”,“consumed_airtime”:“1.482752s”,“locations”:{“user”:{“latitude”:59.61374942705063,“longitude”:5.812596894821476,“source”:“SOURCE_REGISTRY”}},“version_ids”:{“brand_id”:“dragino”, “model_id”:“lsn50v2-d20”, “hardware_version”:“unknown_hw_version”, “firmware_version”:“1.1”, “band_id”:“EU_863_870”},“network_ids”:{“net_id”:“000013”,“ns_id”:“EC656E0000000181”,“tenant_id”:“ttn”,“cluster_id”:“eu1”,“cluster_address”:“eu1.cloud.thethings.network”}}}

      The info I want to use is the TempC1 value

      wishmaster270W 1 Reply Last reply Reply Quote 0
      • wishmaster270W Offline
        wishmaster270 Module Developer @h_vestbo
        last edited by

        @h_vestbo Hi, my MMM-ValuesByNotification module is able to select single values in Json structures by JsonPath so does my MMM-MQTTbridge module.
        You can receive the MQTT message with my MMM-MQTTbridge module, trigger a notification and display it with the MMM-ValuesByNotification module.

        1 Reply Last reply Reply Quote 0
        • 1 / 1
        • First post
          Last post
        Enjoying MagicMirror? Please consider a donation!
        MagicMirror created by Michael Teeuw.
        Forum managed by Sam, technical setup by Karsten.
        This forum is using NodeBB as its core | Contributors
        Contact | Privacy Policy