Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MST960 reading current values is not possible #337

Open
optima-software opened this issue Dec 14, 2023 · 4 comments
Open

MST960 reading current values is not possible #337

optima-software opened this issue Dec 14, 2023 · 4 comments
Labels
enhancement New feature or request no-stale

Comments

@optima-software
Copy link

The device MST960 is delivered with a temperature sensor and can trigger to heat or cool.
But it is not possible to get the current measured temperature (sensor or outside), nor the configured target temperature via API. Methods like async_get_current_temperature() are not supported.

Due to this issue, it can not be integrated in home automations.

Are there any ideas how to deal with it?

@albertogeniola albertogeniola added enhancement New feature or request no-stale labels Jan 2, 2024
@impulsio
Copy link
Contributor

impulsio commented Jan 14, 2024

Hello,
I myself also interested for the device MTS960 handler (https://shop.meross.com/products/thermostat-960).
I thought it will be handle by ThermostatModeMixin class but it's not.

What I have when sync is :
[2024-01-14 14:42:42][DEBUG][meross_iot.manager] : The following devices are new to me: [{"uuid": "2307143728429860080148e1e9d14236", "online_status": "ONLINE", "dev_name": "Thermostat cumulus", "dev_icon_id": "device_mts960_eu", "bind_time": "2023-12-28T18:21:36", "device_type": "mts960", "sub_type": "eu", "channels": [{}], "region": "eu", "fmware_version": "4.2.6", "hdware_version": "4.0.0", "user_dev_icon": "", "icon_type": 1, "skill_number": null, "domain": "mqtt-eu-2.meross.com", "reserved_domain": "mqtt-eu-2.meross.com"}]

And this :
[2024-01-14 14:42:42][DEBUG][meross_iot.device_factory] : Building managed device for Thermostat cumulus (2307143728429860080148e1e9d14236). Reported abilities: {'Appliance.Config.Key': {}, 'Appliance.Config.WifiList': {}, 'Appliance.Config.Wifi': {}, 'Appliance.Config.WifiX': {}, 'Appliance.Config.Trace': {}, 'Appliance.Config.Info': {}, 'Appliance.System.All': {}, 'Appliance.System.Hardware': {}, 'Appliance.System.Firmware': {}, 'Appliance.System.Debug': {}, 'Appliance.System.Online': {}, 'Appliance.System.Time': {}, 'Appliance.System.Clock': {}, 'Appliance.System.Ability': {}, 'Appliance.System.Runtime': {}, 'Appliance.System.Report': {}, 'Appliance.System.Position': {}, 'Appliance.System.Factory': {}, 'Appliance.Control.Multiple': {'maxCmdNum': 3}, 'Appliance.Control.Bind': {}, 'Appliance.Control.Unbind': {}, 'Appliance.Control.Upgrade': {}, 'Appliance.Control.Thermostat.ModeB': {}, 'Appliance.Control.Thermostat.ScheduleB': {}, 'Appliance.Control.Thermostat.CtlRange': {}, 'Appliance.Control.TempUnit': {}, 'Appliance.Control.Thermostat.Alarm': {}, 'Appliance.Control.Thermostat.AlarmConfig': {}, 'Appliance.Control.Thermostat.CompressorDelay': {}, 'Appliance.Control.PhysicalLock': {}, 'Appliance.Control.Thermostat.Frost': {}, 'Appliance.Control.Thermostat.Calibration': {}, 'Appliance.Control.Thermostat.DeadZone': {}, 'Appliance.Control.ConsumptionX': {}, 'Appliance.Control.Electricity': {}, 'Appliance.Control.ConsumptionConfig': {}, 'Appliance.Control.Sensor.History': {}, 'Appliance.Control.Thermostat.Timer': {}}

So it seems to handle ElectricityMixin and ConsumptionXMixin which is great.
It should handle also ThermostatMixin and not ThermostatModeMixin I guess that should be added in MerossIOT because not exist yet.

We will be please @albertogeniola if you can add it to the code :)

Sincerely,
Jérôme

@impulsio
Copy link
Contributor

impulsio commented Jan 14, 2024

Adding payload :
[2024-01-14 14:42:42][DEBUG][meross_iot.manager] : Received message from topic /app/3592867-c0dece0f5812b3e7972e86ba8bf79dea/subscribe: b'{"header":{"messageId":"1ec6e8c7ce4188e104691ae305d4d879","namespace":"Appliance.System.Ability","method":"GETACK","payloadVersion":1,"from":"/appliance/2307143728429860080148e1e9d14236/publish","timestamp":1705239762,"timestampMs":293,"sign":"188b11c2678efa8f0ce094d7b9794cb7"},"payload":{"payloadVersion":1,"ability":{"Appliance.Config.Key":{},"Appliance.Config.WifiList":{},"Appliance.Config.Wifi":{},"Appliance.Config.WifiX":{},"Appliance.Config.Trace":{},"Appliance.Config.Info":{},"Appliance.System.All":{},"Appliance.System.Hardware":{},"Appliance.System.Firmware":{},"Appliance.System.Debug":{},"Appliance.System.Online":{},"Appliance.System.Time":{},"Appliance.System.Clock":{},"Appliance.System.Ability":{},"Appliance.System.Runtime":{},"Appliance.System.Report":{},"Appliance.System.Position":{},"Appliance.System.Factory":{},"Appliance.Control.Multiple":{"maxCmdNum":3},"Appliance.Control.Bind":{},"Appliance.Control.Unbind":{},"Appliance.Control.Upgrade":{},"Appliance.Control.Thermostat.ModeB":{},"Appliance.Control.Thermostat.ScheduleB":{},"Appliance.Control.Thermostat.CtlRange":{},"Appliance.Control.TempUnit":{},"Appliance.Control.Thermostat.Alarm":{},"Appliance.Control.Thermostat.AlarmConfig":{},"Appliance.Control.Thermostat.CompressorDelay":{},"Appliance.Control.PhysicalLock":{},"Appliance.Control.Thermostat.Frost":{},"Appliance.Control.Thermostat.Calibration":{},"Appliance.Control.Thermostat.DeadZone":{},"Appliance.Control.ConsumptionX":{},"Appliance.Control.Electricity":{},"Appliance.Control.ConsumptionConfig":{},"Appliance.Control.Sensor.History":{},"Appliance.Control.Thermostat.Timer":{}}}}'

@optima-software
Copy link
Author

... on more data.zip from meross_sniffer may help :-)
data.zip

@impulsio
Copy link
Contributor

impulsio commented Oct 14, 2024

Hello,
In abilities I saw this :

 'Appliance.Control.Thermostat.ModeB': {},
 'Appliance.Control.Thermostat.ScheduleB': {},
 'Appliance.Control.Thermostat.CtlRange': {},
 'Appliance.Control.TempUnit': {},
 'Appliance.Control.Thermostat.Alarm': {},
 'Appliance.Control.Thermostat.AlarmConfig': {},
 'Appliance.Control.Thermostat.CompressorDelay': {},
 'Appliance.Control.Thermostat.Frost': {},
 'Appliance.Control.Thermostat.Calibration': {},
 'Appliance.Control.Thermostat.DeadZone': {},
 'Appliance.Control.ConsumptionConfig': {},
 'Appliance.Control.Sensor.History': {},
 'Appliance.Control.Thermostat.Timer': {}}

I saw Thermostat abilities but not matching the actual list :

 CONTROL_THERMOSTAT_MODE = 'Appliance.Control.Thermostat.Mode'
 CONTROL_THERMOSTAT_WINDOWOPENED = 'Appliance.Control.Thermostat.WindowOpened'

So I test something : I update file enums.py to modify Mode > ModeB and update file thermostat.py to modify get('mode') to get('modeB'). I reach to get a ThersmostatState that gives me these keys :

Code is

therm=dev.get_thermostat_state()
logger.debug(therm._state.items())

Result is
dict_items([('channel', 0), ('mode', 1), ('targetTemp', 1900), ('working', 1), ('currentTemp', 1626), ('state', 1), ('onoff', 1), ('sensorStatus', 1)])

With this results, some commands on ThermostatState works like current_temperature_celsius (temperature should be divided by 100 and not 10 by the way).

@albertogeniola I can work on this if you want to :) If I write some codes do you want a new mixin or I order to make it work in ThermostatModeMixin ?

Sincerely,
Jérôme

@impulsio impulsio mentioned this issue Nov 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request no-stale
Projects
None yet
Development

No branches or pull requests

3 participants