wez / govee2mqtt

Govee2MQTT: Connect Govee lights and devices to Home Assistant
MIT License
490 stars 32 forks source link

Help for a not supported device (H713C) #136

Open tommi00 opened 8 months ago

tommi00 commented 8 months ago

Govee Device SKU

H713C (it's the simplest with less functions heater by Govee)

Govee2MQTT Version

2024.01.24-ea3cd430

Describe the issue

Goodmorning, I bought two H713C heater by Govee and I would like to setup them in HA in order to be controlled easily. I tried to configure it anyway despite it not being supported, but there are some problem: the degrees are shown in fahrenheit with the celsius symbol, the auto mode does not work correctly and the chosen/set temperature is always set to "-4" and the three modes "low", "medium", "high" are not present. Will the device be supported soon? How can I do otherwise? Thanks in advance

Startup Diagnostics

OVEE_MQTT_HOST=core-mosquitto GOVEE_TEMPERATURE_SCALE=F ++ cd /app ++ exec /app/govee serve GOVEE_EMAIL=REDACTED GOVEE_PASSWORD=REDACTED GOVEE_MQTT_PASSWORD=REDACTED GOVEE_MQTT_USER=addons GOVEE_MQTT_PORT=1883 [2024-02-19T08:55:40 INFO govee::commands::serve] Starting service. version 2024.01.24-ea3cd430 [2024-02-19T08:55:40 INFO govee::commands::serve] Querying platform API for device list [2024-02-19T08:55:42 INFO govee::commands::serve] Querying undocumented API for device + room list [2024-02-19T08:55:43 INFO govee::service::iot] Connected to IoT: CONNACK code 0: Connection Accepted. [2024-02-19T08:55:43 INFO govee::commands::serve] Starting LAN discovery [2024-02-19T08:55:43 INFO govee::commands::serve] Waiting 10 seconds for LAN API discovery [2024-02-19T08:55:43 INFO govee::service::iot] IoT (re)connected with status CONNACK code 0: Connection Accepted. And then devices MAC addresses with settings: for example: [2024-02-19T08:55:53 INFO govee::commands::serve] Devices returned from Govee's APIs [2024-02-19T08:55:53 INFO govee::commands::serve] Camera Chiara ([mac address] H713C) [2024-02-19T08:55:53 INFO govee::commands::serve] Platform API: devices.types.heater. supports_rgb=false supports_brightness=false [2024-02-19T08:55:53 INFO govee::commands::serve] color_temp=None segment_rgb=None [2024-02-19T08:55:53 INFO govee::commands::serve] Undoc: room=None supports_iot=true ble_only=false [2024-02-19T08:55:53 INFO govee::commands::serve]

Additional Logs

No response

Home Assistant Logs

No response

Anything else?

No response

NFis commented 7 months ago

The Smart Space Heater H713C works for me with Version 2024.02.05-4c4fa0db (Docker). There is a bug with sensor-xxx-sensortemperature: although configured GOVEE_TEMPERATURE_SCALE=C the current temperature is shown in Fahrenheit with unit "°C". See Issue https://github.com/wez/govee2mqtt/issues/149

My workaround is a template sensor in Home Assistant:

The target temperature (advise-set-temperature) works fine and can be set in °C.

A workaround for missing Fan-Modes via Rest-API: https://community.home-assistant.io/t/govee-appliances-heaters-fans-purifiers/520678

tommi00 commented 6 months ago

The Smart Space Heater H713C works for me with Version 2024.02.05-4c4fa0db (Docker). There is a bug with sensor-xxx-sensortemperature: although configured GOVEE_TEMPERATURE_SCALE=C the current temperature is shown in Fahrenheit with unit "°C". See Issue #149

My workaround is a template sensor in Home Assistant:

  • name: "Smart_Space_Heater_Temperature_C" unique_id: smart_space_heater_temperature_c state: '{{ (states("sensor.smart_space_heater_temperature")|float-32.0) *5.0/9.0 }}' unit_of_measurement: "°C" device_class: temperature icon: mdi:thermometer

The target temperature (advise-set-temperature) works fine and can be set in °C.

A workaround for missing Fan-Modes via Rest-API: https://community.home-assistant.io/t/govee-appliances-heaters-fans-purifiers/520678

How do you control the power? (Low, Medium, High)

NFis commented 6 months ago

My Rest integration in Home Assistant for govee in configuration.yaml:

rest_command:
  govee_control:
    url: https://openapi.api.govee.com/router/api/v1/device/control
    headers:
      Content-Type: 'application/json'
      Govee-API-Key: '<<> your_key >>>>'
    payload: '{ "requestId": "uuid",
                "payload":{ "sku": "{{ model }}", 
                "device": "{{ device }}",
                "capability": 
                  { "type": "{{ type }}",
                    "instance": "{{ instance }}",
                    "value": {{ value }}}}}'

    method: POST
    verify_ssl: false

Using it with the service rest_command, mode low:

service: rest_command.govee_control
data:
  device: << your devide xx:xx:xxx:xx:xx:xx:xx:xx
  model: H713C
  type: devices.capabilities.work_mode
  instance: workMode
  value: "{\"workMode\":1, \"modeValue\":1}"

This are the three modeValues: low: 1 mid: 2 high: 3

tommi00 commented 4 months ago

My Rest integration in Home Assistant for govee in configuration.yaml:

rest_command:
  govee_control:
    url: https://openapi.api.govee.com/router/api/v1/device/control
    headers:
      Content-Type: 'application/json'
      Govee-API-Key: '<<> your_key >>>>'
    payload: '{ "requestId": "uuid",
                "payload":{ "sku": "{{ model }}", 
                "device": "{{ device }}",
                "capability": 
                  { "type": "{{ type }}",
                    "instance": "{{ instance }}",
                    "value": {{ value }}}}}'

    method: POST
    verify_ssl: false

Using it with the service rest_command, mode low:

service: rest_command.govee_control
data:
  device: << your devide xx:xx:xxx:xx:xx:xx:xx:xx
  model: H713C
  type: devices.capabilities.work_mode
  instance: workMode
  value: "{\"workMode\":1, \"modeValue\":1}"

This are the three modeValues: low: 1 mid: 2 high: 3

Sorry but I'm not so expert with HA, can you please tell me how to do that and where to insert the code you wrote? Do have I to keep active the govee2mqtt addon?

NFis commented 4 months ago

Ok, let me explain the sentence of my post "My Rest integration in Home Assistant for govee in configuration.yaml" in more detail:

How to use this restful_command: You call the rest_command.govee_control as a service (in a script, with a button, in an automation, in Developer tools, ..., ) and in the data section you write the parameters for the wanted functionality.

The govee2mqtt addon is not necessary.

tommi00 commented 4 months ago

Thank you! I'll try that!