Smartthings Samsung JetBot AI Integration

Hi, Have just got a Samsung JetBot AI+ vacuum to replace my worn out Neato, foolishly thought it would work nicely with HA as many other Samsung things do, but sadly turns out the vac isn’t part of the official HA Smartthings integration and there’s nothing relevant on HACS. Looks like other people are having the same question @marcusd10 @alex-w-k @proxyswe @paulb1803 .

I’ve got HA automations that trigger the vac at the best time for our household, which the Smartthings app cannot do. It’d be wonderful if the HA integration could include vac controls (even just basic start, stop)

Apols for tagging @andrewsayre, saw you were the maintainer of the HA Integration and wondered if there’s any way vac control could be implemented?

There is an API which I believe should do this, but I’m not a dev an not able to write python or understand code.
https://developer.smartthings.com/
and a web interface
https://my.smartthings.com/advanced

Happy to help with testing and apols again for tagging people in, just trying to pull a conversation together.

Thank you anyone :slight_smile:

Amanda

A fair bit of faffing, but I’ve got some basic stuff working using rest commands and sensors.

You need a Personal Access Token from here https://account.smartthings.com/tokens
Store it in secrets.yaml

Get deviceID from Smartthings

Basic start / stop cleaning…

This creates actions that can be called by an automation:

rest_command:
  jetbot_start:
    url: "https://api.smartthings.com/v1/devices/<deviceID>/commands"
    method: post
    headers:
      Authorization: !secret smartthings_pat
      Content-Type: "application/json"
      Accept: "application/vnd.smartthings+json;v=1"
    payload: '{"commands": [{"component": "main", "capability": "samsungce.robotCleanerOperatingState", "command": "start"}]}'
  jetbot_stop:
    url: "https://api.smartthings.com/v1/devices/<deviceID>/commands"
    method: post
    headers:
      Authorization: !secret smartthings_pat
      Content-Type: "application/json"
      Accept: "application/vnd.smartthings+json;v=1"
    payload: '{"commands": [{"component": "main", "capability": "samsungce.robotCleanerOperatingState", "command": "returnToHome"}]}'

This creates sensors, there’s a ton of data that comes back from the API, not sure how to use some of it, but this is what I’ve figured out so far:

rest:
  - resource: https://api.smartthings.com/v1/devices/<deviceID>/status
    headers:
      Authorization: !secret smartthings_pat
      Accept: "application/vnd.smartthings+json;v=1"
    sensor:
      - name: "JetBot Test status sensor"
        value_template: "{{ value_json.components.main['samsungce.robotCleanerOperatingState'].operatingState.value }}"
      - name: "JetBot Test battery sensor"
        value_template: "{{ value_json.components.main['battery'].battery.value }}"
        device_class: battery
        unit_of_measurement: "%"
      - name: "JetBot Test Robot HEPA filter sensor"
        value_template: "{{ value_json.components.main['custom.hepaFilter'].hepaFilterStatus.value }}"
      - name: "JetBot Test Base HEPA filter sensor"
        value_template: "{{ value_json.components.station['custom.hepaFilter'].hepaFilterStatus.value }}"
      - name: "JetBot Test Motor Filter sensor"
        value_template: "{{ value_json.components.main['samsungce.robotCleanerMotorFilter'].motorFilterStatus.value }}"
      - name: "JetBot Test Base Dust Bag state"
        value_template: "{{ value_json.components.station['samsungce.robotCleanerDustBag'].status.value }}"
      - name: "JetBot Test Turbo Mode"
        value_template: "{{ value_json.components.main['robotCleanerTurboMode'].robotCleanerTurboMode.value }}"

Love to get the cleaning map, live feed and obstacle images, but a bit stuck on how to get them.

I was also playing with the template vacuum entity, not sure what use it is to be honest. This is very basic, but its a start:

vacuum:
  - platform: template
    vacuums:
      jetbot_ai:
        value_template: "{{ states('sensor.jetbot_test_status_sensor') }}"
        battery_level_template: "{{ states('sensor.sensor.jetbot_test_battery_sensor')}} "
        start:
          action: rest_command.jetbot_start
        stop:
          action: rest_command.jetbot_stop

sorry for late reply moved house and nevefr got round to re setting up HA. the codes above where did you put these ro get it to work? it would be great if i could copy and paste it in. but i am having to learn again as i habent used it for long time now.

thanks for the help
marcus

@Kitkat @marcusd10 - I’d also interested in this integration and my python knowledge would be enough (probably) to develop the integration but I don’t have the incentive to do it until I can specify the room which should be cleaned.
I asked about it on the SmartThings forum but the devs are now responding to basic requests for more info. If someone can provide the information on how to specify the room I’d be happy to help with this but I don’t know how to do it based on their documentation even though it’s using the 2 capabilities which are available. Also the specification if it should be using mop pads or only vacuuming would be useful.

They have events on their developer page to a specific device but the information is limited to capability and value but more they don’t provide.

It seems straightforward to get a list of rooms and room ID’s, but I can’t see how to use them to instruct a specific room to be cleaned.

Another interesting development, but doesn’t give any light on how to clean specific rooms GitHub - oukene/smartthings_customize