dehsgr / node-red-contrib-meross

This provides nodes for controlling Meross devices.
ISC License
10 stars 6 forks source link

Support for Thermostat MTS200? #23

Open S474N opened 1 year ago

S474N commented 1 year ago

Will be also supported thermostat?

https://www.meross.com/smart-thermostat/smart-wi-fi-thermostat/116

dehsgr commented 1 year ago

You might try it out. I don't have such device. Feel free to give feedback.

S474N commented 1 year ago

Fiddler is not for iOS :( Is possible to catch communication with another way?

dehsgr commented 1 year ago

You should use fiddle or its alternatives as proxy, not directly on iOS. ;-)

S474N commented 1 year ago

Good point, I'm idiot :D

What information do you need?

{
    "payload": {
        "holdAction": [
            {
                "channel": 0
            }
        ]
    },
    "header": {
        "messageId": "b71825d87xxxxxxxx",
        "method": "GET",
        "from": "http:\/\/192.168.1.125\/config",
        "payloadVersion": 1,
        "namespace": "Appliance.Control.Thermostat.HoldAction",
        "uuid": "22090721xxxxxxxxxxx",
        "sign": "fd0c78xxxxxxxxxxxxx",
        "triggerSrc": "iOSLocal",
        "timestamp": 1671474018
    }
}
{
    "header": {
        "messageId": "a99aee42xxxxxxxxxx",
        "namespace": "Appliance.Control.Thermostat.Schedule",
        "triggerSrc": "iOSLocal",
        "method": "GETACK",
        "payloadVersion": 1,
        "from": "/appliance/2209072xxxxxxxxxxxxxx/publish",
        "uuid": "22090xxxxxxxxxx",
        "timestamp": 1671474019,
        "timestampMs": 867,
        "sign": "f80xxxxxxxx"
    },
    "payload": {
        "schedule": [
            {
                "channel": 0,
                "section": 6,
                "sun": [
                    [
                        390,
                        200
                    ],
                    [
                        90,
                        250
                    ],
                    [
                        300,
                        250
                    ],
                    [
                        300,
                        100
                    ],
                    [
                        240,
                        250
                    ],
                    [
                        120,
                        200
                    ]
                ],
                "mon": [
                    [
                        390,
                        200
                    ],
                    [
                        90,
                        250
                    ],
                    [
                        300,
                        100
                    ],
                    [
                        300,
                        100
                    ],
                    [
                        240,
                        250
                    ],
                    [
                        120,
                        200
                    ]
                ],
                "tue": [
                    [
                        390,
                        200
                    ],
                    [
                        90,
                        250
                    ],
                    [
                        300,
                        100
                    ],
                    [
                        300,
                        100
                    ],
                    [
                        240,
                        250
                    ],
                    [
                        120,
                        200
                    ]
                ],
                "wed": [
                    [
                        390,
                        200
                    ],
                    [
                        90,
                        250
                    ],
                    [
                        300,
                        100
                    ],
                    [
                        300,
                        100
                    ],
                    [
                        240,
                        250
                    ],
                    [
                        120,
                        200
                    ]
                ],
                "thu": [
                    [
                        390,
                        200
                    ],
                    [
                        90,
                        250
                    ],
                    [
                        300,
                        100
                    ],
                    [
                        300,
                        100
                    ],
                    [
                        240,
                        250
                    ],
                    [
                        120,
                        200
                    ]
                ],
                "fri": [
                    [
                        390,
                        200
                    ],
                    [
                        90,
                        250
                    ],
                    [
                        300,
                        100
                    ],
                    [
                        300,
                        100
                    ],
                    [
                        240,
                        250
                    ],
                    [
                        120,
                        200
                    ]
                ],
                "sat": [
                    [
                        390,
                        200
                    ],
                    [
                        90,
                        250
                    ],
                    [
                        300,
                        250
                    ],
                    [
                        300,
                        100
                    ],
                    [
                        240,
                        250
                    ],
                    [
                        120,
                        200
                    ]
                ]
            }
        ]
    }
}
S474N commented 1 year ago
{
    "payload": {
        "mode": [
            {
                "channel": 0
            }
        ]
    },
    "header": {
        "messageId": "fa0317fc58e5xxxxxxxxxxx",
        "method": "GET",
        "from": "http:\/\/192.168.1.125\/config",
        "payloadVersion": 1,
        "namespace": "Appliance.Control.Thermostat.Mode",
        "uuid": "220907xxxxxxxxxxxxx",
        "sign": "465a5xxxxxxxxxxxxxxxxx",
        "triggerSrc": "iOSLocal",
        "timestamp": 1671474018
    }
}
{
    "header": {
        "messageId": "fa0317fc58xxxxxxxxxxx",
        "namespace": "Appliance.Control.Thermostat.Mode",
        "triggerSrc": "iOSLocal",
        "method": "GETACK",
        "payloadVersion": 1,
        "from": "/appliance/220907xxxxxxxxxxxxxxxx/publish",
        "uuid": "220907xxxxxxxxxxxxxxxxxxxxxx",
        "timestamp": 1671474018,
        "timestampMs": 775,
        "sign": "465a5xxxxxxxxxx"
    },
    "payload": {
        "mode": [
            {
                "channel": 0,
                "onoff": 0,
                "mode": 4,
                "state": 0,
                "currentTemp": 225,
                "heatTemp": 260,
                "coolTemp": 180,
                "ecoTemp": 120,
                "manualTemp": 190,
                "warning": 0,
                "targetTemp": 190,
                "min": 50,
                "max": 350,
                "lmTime": 1671474018
            }
        ]
    }
}
dehsgr commented 1 year ago

Which payload is associated with which action? You should provide deeper information what you did and which was the corresponding output. I think guessing would not bring me/us forward. 🤓

S474N commented 1 year ago

Opened Meross app and clicked on thermostat. Do you have some IM? Discord, Messenger,...?

dehsgr commented 1 year ago

you might mail me directly at dehsgr at sign outlook dot sign com.

S474N commented 1 year ago

I thought some instant messages :)

dehsgr commented 1 year ago

Not enough time for IM. :-(

S474N commented 1 year ago

OK, what information do you need to know?

As I wrote - I opened Meross app and then clicked on my thermostat (it's only one accessory from meross).

dehsgr commented 1 year ago

I think you just performed more than one simpe click as you posted 4(!) JSON objecs. As I told here I need more specific information which action is triggering which payload and which configuration information you set.

I don't have such device. So to bring things forward I need any information as detailed as you can - just a step-by-step tutorial...

S474N commented 1 year ago

First is Request and second is Reponse. Same in another post.

dehsgr commented 1 year ago

OK. I see. But you did two different actions. What actions were them? I see Appliance.Control.Thermostat.Mode and Appliance.Control.Thermostat.HoldAction but what do them? You will have to provide much more information.

S474N commented 1 year ago

First is while opening app, second while clicking to thermostat.

dehsgr commented 1 year ago

Ok. And what is the action behind clicking the Thermostat? Should I really ask each detail? 🥶 Common! Tell me a bit more. Screen Shots regarding each payload could be more efficient.

Imagine: I don‘t have such device so it is a totally blackbox for me what is on your site. And you are the one which is asking for supporting this device.

Don‘t forget: I invest my free time here for no return...

S474N commented 1 year ago

I know, but that is main reason, why I wanted IM, because it's faster to response, etc. I will arrange all screens and payloads.

Cyberbeni commented 1 year ago

Hi @dehsgr, there are 2 flows I'm interested in:

  1. setting brightness -> this can be done 0-8 from the app, which gets translated to x12.5, so 0-100
  2. get current temperature and state for logging (and I guess setting mode/target temperatures didn't require too much plus effort, so I also included those), setting temperature can be done in 0.5C increments

Here is a file with sample requests/responses and some notes: Meross thermostat.md

And some screenshots: 2023-01-08 18 32 31 2023-01-08 18 32 42 2023-01-08 18 32 23

Let me know if you need anything else.

dehsgr commented 1 year ago

Hi @Cyberbeni, thanks for input and the given information. Which devices do support brightness? This is for correctly decision where to place the code. Thanks again.

Cyberbeni commented 1 year ago

I only have the MTS200 (there are 2 variants but the only difference is that one gives power on the output and the other is NO or NC depending on how you wire it), don't know if other devices support brightness.

S474N commented 1 year ago

Hi, sorry for not communicating but I'm sick. I also have the brightness setting in the device menu in the Meross application, but I have no idea what it's for. Unfortunately, I don't have any other Merros devices either.

Cyberbeni commented 1 year ago

The brightness is for the device itself, so if you don't want it to display the current temperature/mode at night, you can set the standby brightness to 0 then set it back to non-0 during the day. (The app doesn't have scheduling for this, that's why I want to do it in node-red)