iklein99 / homebridge-smartthings

This is a plugin to Homebridge to connect your Smartthings network into Apple Home Kit.
Apache License 2.0
150 stars 52 forks source link

Samsung refirigator not working properly , it poll only one temprature freezer or fridge randomally #256

Open niruse opened 2 months ago

niruse commented 2 months ago

Sometimes I see the fridge temperature, and sometimes I see the freezer temperature. I couldn't see both on the HomeBridge plugin. I use both Home Assistant and HomeBridge. I added the content below to my configuration.yaml on Home Assitant and ignored my fridge from this plugin for now.

Set the device ID to the relevant ID. Set the bearer token to your bearer token. Hope it may help someone :).

rest:
    scan_interval: 60
    resource: https://api.smartthings.com/v1/devices/{{device id}}/status
    headers:
      Authorization: Bearer {{breaer token}}
    sensor:
      - name: "samsung_cooler_temperature"
        value_template: "{{ value_json.components.cooler.temperatureMeasurement.temperature.value }}"
        unit_of_measurement: '°C'
        icon: "mdi-thermometer"
        device_class: "temperature"

      - name: "samsung_cooler_set_temperature"
        value_template: "{{ value_json.components.cooler.thermostatCoolingSetpoint.coolingSetpoint.value }}"
        unit_of_measurement: '°C'
        icon: "mdi-thermometer"
        device_class: "temperature"

      - name: "samsung_freezer_temperature"
        value_template: "{{ value_json.components.freezer.temperatureMeasurement.temperature.value }}"
        unit_of_measurement: '°C'
        icon: "mdi-thermometer"
        device_class: "temperature"

      - name: "samsung_freezer_set_temperature"
        value_template: "{{ value_json.components.freezer.thermostatCoolingSetpoint.coolingSetpoint.value }}"
        unit_of_measurement: '°C'
        icon: "mdi-thermometer"
        device_class: "temperature"

    binary_sensor:
      - name: "samsung_cooler_door"
        value_template: "{{ value_json.components.cooler.contactSensor.contact.value }}"
        device_class: "opening"

      - name: "samsung_frezzer_door"
        value_template: "{{ value_json.components.freezer.contactSensor.contact.value }}"
        device_class: "opening"   
wild-a commented 1 month ago

Where did you get the binary sensors IDs for the fridge doors?

niruse commented 1 month ago

Where did you get the binary sensors IDs for the fridge doors?

Download Postman, run a query using a bearer token, with the URL query - https://api.smartthings.com/v1/devices/ You will get a list of all your devices.

wild-a commented 1 month ago

Download Postman, run a query using a bearer token, with the URL query - https://api.smartthings.com/v1/devices/

You will get a list of all your devices.

Perfect. I was able to set up my fridge, washer and dryer following your config data above. Thank you.

niruse commented 1 month ago

Download Postman, run a query using a bearer token, with the URL query - https://api.smartthings.com/v1/devices/ You will get a list of all your devices.

Perfect. I was able to set up my fridge, washer and dryer following your config data above. Thank you.

That's fantastic to hear! I'm glad the config data was helpful for setting up your devices :-).