Configuring deebot with node-red

Hello,
i’m trying to configure my deebot robot with mqtt using the Node-Red integration in HA. The problem is that i get many values within the same payload that i can’t split and so i’m not able to create entities for each value.
This is what i get from mqtt:

That’s the full message from mqtt:

{"type":"MoppingSystemInfo","value":{"cleanStatus":"stop","cleanInfo":{"level":2},"waterInfo":{"enabled":false,"level":2}}}
{"type":"CurrentUsedCustomAreaValues","value":""}
{"type":"CurrentUsedSpotAreas","value":""}
{"type":"CleanReport","value":"stop"}
{"type":"ChargeState","value":"charging"}
{"type":"SleepStatus","value":"1"}
{"type":"LifeSpan","value":{"filter":83.93,"side_brush":-0.42,"main_brush":51.92}}
{"type":"BatteryInfo","value":100,"unit":"%"}

And that’s how i try to edit configuration.yaml but it’s not working.

mqtt:
  sensor:
    - name: "filter_left"
      state_topic: "vacuum/sensors"
      unit_of_measurement: ""
      value_template: "{{ value_json['value']['Lifespan']['value']}}"
    - name: "sidebrush"
      state_topic: "vacuum/sensors"
      unit_of_measurement: ""
      value_template: "{{ value_json['value']['BatteryInfo']['value']}}"

Thanks in advance to everyone will help.

node-red-contrib-ecovacs-deebot

Thanks, but i’m already using that integration. The problem is that mqtt messages contains a lot of data and i’m not able to split it with the filter value_template: "{{ value_json['value']['BatteryInfo']['value']}}"

I can’t help you with the MQTT sensor parsing. But I can show you an alternative using the NR companion integration.

image

[{"id":"b51fc1a293988508","type":"inject","z":"c89d915bdff0f798","name":"mqtt messages","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"","payloadType":"date","x":320,"y":1264,"wires":[["4fbeedcc91bc8631"]]},{"id":"4fbeedcc91bc8631","type":"switch","z":"c89d915bdff0f798","name":"","property":"payload.type","propertyType":"msg","rules":[{"t":"eq","v":"LifeSpan","vt":"str"},{"t":"eq","v":"BatterInfo","vt":"str"}],"checkall":"true","repair":false,"outputs":2,"x":478,"y":1264,"wires":[["82b7888ba893c894"],["64ece3ab0b6d67bb"]]},{"id":"82b7888ba893c894","type":"ha-entity","z":"c89d915bdff0f798","name":"filter left","server":"","version":2,"debugenabled":false,"outputs":1,"entityType":"sensor","config":[{"property":"name","value":"deebot filter left"},{"property":"device_class","value":""},{"property":"icon","value":""},{"property":"unit_of_measurement","value":""},{"property":"state_class","value":""},{"property":"last_reset","value":""}],"state":"payload.value.filter","stateType":"msg","attributes":[],"resend":true,"outputLocation":"payload","outputLocationType":"none","inputOverride":"block","outputOnStateChange":false,"outputPayload":"","outputPayloadType":"str","x":636,"y":1232,"wires":[[]]},{"id":"64ece3ab0b6d67bb","type":"ha-entity","z":"c89d915bdff0f798","name":"side brush","server":"","version":2,"debugenabled":false,"outputs":1,"entityType":"sensor","config":[{"property":"name","value":"deebot side brush"},{"property":"device_class","value":""},{"property":"icon","value":""},{"property":"unit_of_measurement","value":""},{"property":"state_class","value":""},{"property":"last_reset","value":""}],"state":"payload.value.side_brush","stateType":"msg","attributes":[],"resend":true,"outputLocation":"payload","outputLocationType":"none","inputOverride":"block","outputOnStateChange":false,"outputPayload":"","outputPayloadType":"str","x":646,"y":1280,"wires":[[]]}]

I’m also doing this same thing currently. Did you happen to figure this out?