Home Assistant Downstream MQTT connections to LT-22222-L

Viewed 60

Hi All,

I can't seem to find much info on this topic so I thought I'd throw it out there to the community.

I have a Dragino LT-22222-L LoRa I/O Controller connected to a Dragino LPS8v2 Gateway running Chirpstack. I have the device connected and communicating with HA via my MQTT mosquitto broker for upstream sensor information. Currently only AVI1_V Voltage readings.

mqtt:
    sensor:
      - name: "gate_battery_voltage"
        device_class: voltage
        unique_id: "gate_battery_voltage"
        state_topic: "lorawan/bf4d4375-c907-4ebc-9fbe-f819eaf45566/device/a840416e165b9925/event/up"
        unit_of_measurement: "V"
        value_template: "{{ value_json.object.AVI1_V }}"

Now I'm onto controlling the Relays via Downstream connections to RO1 and RO2

Any ideas, examples or links to references would be helpful.

Thanks in advance

1 Answers

For anyone else trying to work out how to integrated the LT-22222-L with chirpstack & Home Assistant. Below is my mqtt config for configuration.yaml

mqtt:
    sensor:
      - name: "gate_battery_voltage"
        device_class: voltage
        unique_id: "gate_battery_voltage"
        state_topic: "lorawan/bf4d4375-c907-4ebc-9fbe-f819eaf45566/device/a840416e165b9925/event/up"
        unit_of_measurement: "V"
        value_template: "{{ value_json.object.AVI1_V }}"

    switch:
      - name: "gate_relay_RO1"
        unique_id: "gate_relay_RO1"
        state_topic: "lorawan/bf4d4375-c907-4ebc-9fbe-f819eaf45566/device/a840416e165b9925/event/up"
        command_topic: "lorawan/bf4d4375-c907-4ebc-9fbe-f819eaf45566/device/a840416e165b9925/command/down"
        payload_on: '{"devEui": "a840416e165b9925", "confirmed": true, "fPort": 1, "data": "AwER"}'
        payload_off: '{"devEui": "a840416e165b9925", "confirmed": true, "fPort": 1, "data": "AwAR"}'
        value_template: "{{ value_json.object.RO1_status }}"
        state_on: "ON"
        state_off: "OFF"
      - name: "gate_relay_RO2"
        unique_id: "gate_relay_RO2"
        state_topic: "lorawan/bf4d4375-c907-4ebc-9fbe-f819eaf45566/device/a840416e165b9925/event/up"
        command_topic: "lorawan/bf4d4375-c907-4ebc-9fbe-f819eaf45566/device/a840416e165b9925/command/down"
        payload_on: '{"devEui": "a840416e165b9925", "confirmed": true, "fPort": 1, "data": "AxEB"}'
        payload_off: '{"devEui": "a840416e165b9925", "confirmed": true, "fPort": 1, "data": "AxEA"}'
        value_template: "{{ value_json.object.RO2_status }}"
        state_on: "ON"
        state_off: "OFF"