AirCon icon indicating copy to clipboard operation
AirCon copied to clipboard

Precision for fglair devices

Open emoses opened this issue 3 years ago • 8 comments

For my device (a fujistu system that uses fglair-us) values go to/from the device in 10ths of a degree C, with a step of 0.5 degree; when controlling it in fahrenheit, 68ºF -> 200, 69ºF -> 205, 70ºF -> 210, etc.

I renamed the "precision" value to "scale", because it's really the scale factor for converting the temperature to/from the device value, and I added a new "precision" value that aligns with the "precision" value on HA's mqtt discovery topic; that is, how big the step is between two accepted temp values.

That precision value is now published to HA, and I'm able to control the temperature in HA to the degree F, where before it would ignore single-degree changes in F because it was rounding to the nearest degree C.

This supercedes #220

emoses avatar Mar 31 '23 05:03 emoses

@emoses I just installed your fork (https://github.com/emoses/AirCon) on my installation, and it doesn't appear to be working. Everything seems to function as the master, but if I set a 0.5degC increment in the FGLair app or on the thermostat, it doesn't reflect the half degree in HA. Is there anything else I need to change?

lubindent avatar Jun 07 '23 19:06 lubindent

@lubindent I'm in the US, using HA in F, but HA is happy to set temperatures to 0.5C increments. I wonder what your MQTT INFO looks like. Here's a partial of mine; what do your precision and temperature unit say? You can see this if you go to the Device, click on "MQTT INFO", and expand the MQTT Discovery Topic payload.

name: AC000W00...
unique_id: <redacted>
device:
  identifiers:
    - hisense_ac_<redacted>
  manufacturer: Hisense (fglair-us)
  model: AP-WC2E
  name: AC000W00...
  sw_version: bc 2.6.17-fgl2 06/29/20 09:03:57 ID jre/mfg/2dfbf5d
availability:
  - topic: hisense_ac/LWT
  - topic: hisense_ac/<redacted>/available/status
precision: 0.5
temperature_unit: C

emoses avatar Jun 07 '23 20:06 emoses

Still showing precision of 1.

` name: AC000W003103105 unique_id: b8d7af3f721c device: identifiers: - hisense_ac_b8d7af3f721c manufacturer: Hisense (fglair-us) model: AP-WC2E name: AC000W003103105 sw_version: bc 2.6.17-fgl2 06/29/20 09:03:57 ID jre/mfg/2dfbf5d availability:

  • topic: hisense_ac/LWT
  • topic: hisense_ac/b8d7af3f721c/available/status precision: 1 temperature_unit: C fan_mode_command_topic: hisense_ac/b8d7af3f721c/fan_speed/command fan_mode_state_topic: hisense_ac/b8d7af3f721c/fan_speed/status fan_modes:
  • auto
  • quiet
  • low
  • medium
  • high mode_command_topic: hisense_ac/b8d7af3f721c/operation_mode/command mode_state_topic: hisense_ac/b8d7af3f721c/operation_mode/status modes:
  • 'off'
  • fan_only
  • heat
  • cool
  • dry
  • auto swing_mode_command_topic: hisense_ac/b8d7af3f721c/af_vertical_swing/command swing_mode_state_topic: hisense_ac/b8d7af3f721c/af_vertical_swing/status swing_modes:
  • 'on'
  • 'off' temperature_command_topic: hisense_ac/b8d7af3f721c/adjust_temperature/command temperature_state_topic: hisense_ac/b8d7af3f721c/adjust_temperature/status max_temp: '30' min_temp: '16' platform: mqtt `

lubindent avatar Jun 07 '23 21:06 lubindent

Hm, looks like you've got the same model as me, so it should work. Can you try deleting the config_ac*.json files in aircon's config directory and restarting aircon? It might not re-publish the mqtt discovery topic unless it's going through its discovery phase.

emoses avatar Jun 07 '23 22:06 emoses

Deleted the config files, restarted HA and the plugin. New config file self regenerated, and MQTT payload still reporting precision = 1degC.

lubindent avatar Jun 07 '23 22:06 lubindent

Oh I should ask: how exactly are you running Aircon? I run it "by hand" in a separate docker container, not as an AddOn, and I didn't make any updates to the add-on config; if you're running my fork as an addon it's gonna still be running the upstream (dieger).

emoses avatar Jun 07 '23 22:06 emoses

I have the same issue in FGLair App I can use te "precision 0.5" but is reported like precision 1 in MQTT payload. Mine is running like an Add-on.

SrBurner avatar Jun 10 '23 17:06 SrBurner

I’m running it as an add-on as well.On Jun 10, 2023, at 2:48 PM, SrBurner @.***> wrote: I have the same issue in FGLair App I can use te "precision 0.5" but is reported like precision 1 in MQTT payload. Mine is running like an Add-on.

—Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you were mentioned.Message ID: @.***>

lubindent avatar Jun 11 '23 04:06 lubindent