krahabb / meross_lan

Home Assistant integration for Meross devices
MIT License
415 stars 45 forks source link

mts200b: Issue with Preset Temperature Update and Missing Documentation for Schedule #355

Closed robertoamd90 closed 2 months ago

robertoamd90 commented 8 months ago

Hi,

I have integrated 6 mts200b devices via MQTT into my MQTT broker, hosted on Home Assistant using the Mosquito add-on, and I'm very satisfied!

I have encountered 2 minor issues:

  1. When I change a preset from Home Assistant, the command is reflected correctly on the mts200b, but the new temperature associated with the preset is not updated on Home Assistant as the new target temperature.
  2. In the latest release (currently v4.5.0), you have added schedule read and configuration features, but I can't find any documentation about these.

Thank you for your great work; I'm very grateful.

Roberto

krahabb commented 8 months ago

Hello @robertoamd90, Usually, on the MTS100 (where I test the code) the current target gets updated after a while when you just update the presets setpoints. This is likely due to the fact that the MQTT message is getting PUSHed only after a while (this happens for different status messages though and is likely a way to avoid sending too much traffic when the device is getting operated)

The schedule instead is a very mess: it is something more than a toy at the moment since the HA framework doesn't have a proper entity system to manage this kind of feature so I figured out how to use the calendar entity which is the closest available. At this point the calendar entity is well..a calendar, and seems to fit but there are a lot of subtleties trying to synchronize the HA calendar entity with the valve schedule. This is a long story to say: don't expect too much ;)

You can set a new schedule by entering a new event with the target temperature typed in the event summary. Since the MTS schedule has its own rules, when entering an event this way, meross_lan 'converts' this info to something acceptable by the MTS. For example:

robertoamd90 commented 8 months ago

Hello @krahabb,

Thank you for your reply; I appreciate it.

Regarding the first point I noticed, if I change the preset directly on the device, after the blinking time, the preset and the associated temperature update on Home Assistant. However, when the preset change starts from Home Assistant, I have to reload the integration on the device to get the update of the new temperature.

I have two hypotheses:

  1. When I change the preset from HA, the device sends the new temperature to the MQTT broker, but the integration doesn't capture the message.
  2. When I change the preset from HA, the device doesn't send the new temperature to the MQTT broker because the original app sets the new temperature from the preset value directly.

I haven't done any thorough testing to verify my hypotheses yet. I hope to be able to do so soon!

for the scheduling, I did not understand where i can make the setup, temperature, slot etc.

Thank you,

Roberto