This is what I use in Node-Red if anyone is interested…
I have it to go to the bin every 5 runs based on the state going from cleaning>idle or cleaning>returning so it works on spot/zone cleaning and a regular run.
I know this is not the best way because goto target command changes the status to cleaning (at least on S5) therefore will increase the clean count but I have it so it can only do this once between docking so even if it goes back to idle and then you start spot cleaning it wont increase the count again.
its set to notify Alexa if I’m home and notify the app if I am not.
[{"id":"e01fdcb5.09304","type":"api-call-service","z":"9864b332.ab508","name":"Empty Vacuum Announcement","server":"1b082828.a31468","version":1,"debugenabled":false,"service_domain":"notify","service":"alexa_media_living_room_echo_plus","entityId":"","data":"{\"message\":\"Please empty the vacuum\",\"data\":{\"type\":\"announce\"}}","dataType":"json","mergecontext":"","output_location":"","output_location_type":"none","mustacheAltTags":false,"x":2410,"y":860,"wires":[[]]},{"id":"9778b5b9.f50228","type":"function","z":"9864b332.ab508","name":"Reset The Clean Counter (After 5 Runs)","func":"msg.reset = true;\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","x":1440,"y":800,"wires":[["b2da08ea.65bf08"]]},{"id":"50ae9228.58494c","type":"function","z":"9864b332.ab508","name":"Clean count decrease","func":"msg.decrement = 1;\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","x":1160,"y":880,"wires":[["b2da08ea.65bf08"]]},{"id":"b2da08ea.65bf08","type":"counter","z":"9864b332.ab508","name":"","init":"5","step":1,"lower":"","upper":"","mode":"decrement","outputs":"1","x":1380,"y":880,"wires":[["a8557782.491ef8"]]},{"id":"a8557782.491ef8","type":"switch","z":"9864b332.ab508","name":"","property":"count","propertyType":"msg","rules":[{"t":"eq","v":"0","vt":"str"}],"checkall":"true","repair":false,"outputs":1,"x":1510,"y":880,"wires":[["9778b5b9.f50228","a3bad66b.355408"]]},{"id":"cd983b0a.75d8e8","type":"inject","z":"9864b332.ab508","name":"decrement","repeat":"","crontab":"","once":false,"topic":"","payload":"","payloadType":"date","x":1220,"y":980,"wires":[["b2da08ea.65bf08"]]},{"id":"325abad0.66acc6","type":"inject","z":"9864b332.ab508","name":"increment","repeat":"","crontab":"","once":false,"topic":"","payload":"","payloadType":"date","x":1200,"y":940,"wires":[["b2da08ea.65bf08"]]},{"id":"b1a1c792.a0ad98","type":"inject","z":"9864b332.ab508","name":"Reset Both Counters","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":"","topic":"","payload":"","payloadType":"date","x":1110,"y":820,"wires":[["8f2c7778.f13498","b2da08ea.65bf08"]]},{"id":"a3bad66b.355408","type":"api-call-service","z":"9864b332.ab508","name":"Goto Bin","server":"1b082828.a31468","version":1,"debugenabled":false,"service_domain":"vacuum","service":"send_command","entityId":"vacuum.chip","data":"{\"command\":\"go_to\",\"params\":{\"spot_id\":\"KitchenBin\"}}","dataType":"json","mergecontext":"","output_location":"payload","output_location_type":"msg","mustacheAltTags":false,"x":1660,"y":880,"wires":[["4ae2006f.46bae"]]},{"id":"9f943d76.951be","type":"ha-wait-until","z":"9864b332.ab508","name":"","server":"1b082828.a31468","outputs":1,"entityId":"vacuum.chip","entityIdFilterType":"exact","property":"state","comparator":"is","value":"idle","valueType":"str","timeout":"0","timeoutType":"num","timeoutUnits":"seconds","entityLocation":"payload","entityLocationType":"msg","checkCurrentState":true,"blockInputOverrides":true,"x":2020,"y":900,"wires":[["c79c55.a139d3a8"]]},{"id":"4ae2006f.46bae","type":"stoptimer","z":"9864b332.ab508","duration":"5","units":"Second","payloadtype":"num","payloadval":"0","name":"(Wait for Positioning)","x":1840,"y":860,"wires":[["9f943d76.951be"],[]]},{"id":"c79c55.a139d3a8","type":"api-current-state","z":"9864b332.ab508","name":"Home?","server":"1b082828.a31468","version":1,"outputs":2,"halt_if":"home","halt_if_type":"str","halt_if_compare":"is","override_topic":false,"entity_id":"person.xalies","state_type":"str","state_location":"payload","override_payload":"msg","entity_location":"data","override_data":"msg","blockInputOverrides":false,"x":2180,"y":900,"wires":[["e01fdcb5.09304"],["be75ee3f.8298"]]},{"id":"be75ee3f.8298","type":"api-call-service","z":"9864b332.ab508","name":"App Notification - Empty Vacuum","server":"1b082828.a31468","version":1,"debugenabled":false,"service_domain":"notify","service":"mobile_app_pixel_3","entityId":"","data":"{\"message\":\"Vacuum waiting to be emptied\",\"title\":\"Empty Vacuum\"}","dataType":"json","mergecontext":"","output_location":"","output_location_type":"none","mustacheAltTags":false,"x":2420,"y":920,"wires":[[]]},{"id":"400771d0.528cd","type":"trigger-state","z":"9864b332.ab508","name":"Vacuum State (Cleaning>Idle)","server":"1b082828.a31468","exposeToHomeAssistant":false,"haConfig":[{"property":"name","value":""},{"property":"icon","value":""}],"entityid":"vacuum.chip","entityidfiltertype":"exact","debugenabled":false,"constraints":[{"targetType":"this_entity","targetValue":"","propertyType":"current_state","comparatorType":"is","comparatorValueDatatype":"str","comparatorValue":"idle","propertyValue":"new_state.state"}],"outputs":3,"customoutputs":[{"messageType":"default","messageValue":"","messageValueType":"json","comparatorPropertyType":"previous_state","comparatorType":"is","comparatorValue":"cleaning","comparatorValueDataType":"str","comparatorPropertyValue":"old_state.state"}],"outputinitially":false,"state_type":"str","x":130,"y":900,"wires":[[],[],["708be626.0cf168"]]},{"id":"43e7b87c.9c37c8","type":"function","z":"9864b332.ab508","name":"Reset idle counter","func":"msg.reset = true;\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","x":350,"y":960,"wires":[["8f2c7778.f13498"]]},{"id":"708be626.0cf168","type":"function","z":"9864b332.ab508","name":"msg object","func":"msg.decrement = 1;\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","x":390,"y":880,"wires":[["8f2c7778.f13498"]]},{"id":"8f2c7778.f13498","type":"counter","z":"9864b332.ab508","name":"","init":"1","step":1,"lower":"","upper":"","mode":"decrement","outputs":"1","x":580,"y":880,"wires":[["760a4513.e54d2c"]]},{"id":"760a4513.e54d2c","type":"switch","z":"9864b332.ab508","name":"Pass though only one count (until reset at dock)","property":"count","propertyType":"msg","rules":[{"t":"eq","v":"0","vt":"str"}],"checkall":"true","repair":false,"outputs":1,"x":840,"y":880,"wires":[["50ae9228.58494c"]]},{"id":"44f08fae.5e58d","type":"server-state-changed","z":"9864b332.ab508","name":"Reset when docked","server":"1b082828.a31468","version":1,"exposeToHomeAssistant":false,"haConfig":[{"property":"name","value":""},{"property":"icon","value":""}],"entityidfilter":"vacuum.chip","entityidfiltertype":"exact","outputinitially":false,"state_type":"str","haltifstate":"docked","halt_if_type":"str","halt_if_compare":"is","outputs":2,"output_only_on_state_change":true,"for":0,"forType":"num","forUnits":"minutes","ignorePrevStateNull":false,"ignorePrevStateUnknown":false,"ignorePrevStateUnavailable":false,"ignoreCurrentStateUnknown":false,"ignoreCurrentStateUnavailable":false,"x":90,"y":960,"wires":[["43e7b87c.9c37c8"],[]]},{"id":"2a5f0281.6b0dde","type":"trigger-state","z":"9864b332.ab508","name":"Vacuum State (Cleaning>Returning)","server":"1b082828.a31468","exposeToHomeAssistant":false,"haConfig":[{"property":"name","value":""},{"property":"icon","value":""}],"entityid":"vacuum.chip","entityidfiltertype":"exact","debugenabled":false,"constraints":[{"targetType":"this_entity","targetValue":"","propertyType":"current_state","comparatorType":"is","comparatorValueDatatype":"str","comparatorValue":"returning","propertyValue":"new_state.state"}],"outputs":3,"customoutputs":[{"messageType":"default","messageValue":"","messageValueType":"json","comparatorPropertyType":"previous_state","comparatorType":"is","comparatorValue":"cleaning","comparatorValueDataType":"str","comparatorPropertyValue":"old_state.state"}],"outputinitially":false,"state_type":"str","x":150,"y":840,"wires":[[],[],["708be626.0cf168"]]},{"id":"1fcec11e.e2cf2f","type":"comment","z":"9864b332.ab508","name":"Goto Bin: Every 5 Runs","info":"","x":100,"y":760,"wires":[]},{"id":"1b082828.a31468","type":"server","z":"","name":"Home Assistant","legacy":false,"addon":true,"rejectUnauthorizedCerts":true,"ha_boolean":"y|yes|true|on|home|open","connectionDelay":true,"cacheJson":true}]
Edit: noticed a mistake in mine, fixed here