Giter Club home page Giter Club logo

Comments (45)

dylanfrankcom avatar dylanfrankcom commented on June 13, 2024 2

Hey @tbones1! Thanks for including the payload of the device. The sent request looks pretty similar to other devices so I think it can be implemented. I will look into this over the coming days. As @donavanbecker mentioned, neither of us have the product but we can try our best and see what we can do.

from homebridge-meross.

tbones1 avatar tbones1 commented on June 13, 2024 2

Hi @dylanfrankcom, that would be amazing. I'm happy to do some testing and help with any troubleshooting.

from homebridge-meross.

tbones1 avatar tbones1 commented on June 13, 2024 1

Awesome. Sorry I haven't used GitHub before, should I recreate above under the Pull section?

from homebridge-meross.

tbones1 avatar tbones1 commented on June 13, 2024 1

Okay cheers, I now understand a bit more about how GitHub works 👍

from homebridge-meross.

donavanbecker avatar donavanbecker commented on June 13, 2024 1

The garage door support is so complicated, I underestimated it and just spent one day to debug the logic. My neighbours may notice my garage door kept closing/opening during the night 😂

Here's my pull request #29

Problems left:

  1. How can we get open/close notifications from Meross?

I've observed the traffic, the iOS app is relying on Apple's Push Notification Service to receive the state updates.

  1. Meross can't stop closing a door (And my implementation will be messed up if we try to stop closing/opening)

  2. Meross doesn't support stopped state

  3. Meross doesn't support obstruction state

I have merged this in the latest beta, if you would like to try, follow these instructions.

from homebridge-meross.

 avatar commented on June 13, 2024 1

Hey,
I hacked together garage door support by calling a python script using this library: https://github.com/albertogeniola/MerossIot
I was going to try and do it purely in js but it seems like you’re already close to having it working.

from homebridge-meross.

CocoaBob avatar CocoaBob commented on June 13, 2024 1

Currently I'm using a fixed duration (20 sec) to tell if the door is OPEN, but I see there's an option in the app to let users choose how long their opener will take to complete the opening (my screenshot shows 15s).

I'm wondering if I should add that setting too, and remove the serial number setting (since it still works without serial number). But currently I'm too busy to WFH 😂, probably will have some time during the weekends. Let me see if I can add this option tonight.

And yes, @Vati80 @tbones1 @HarrySteff, please send me some feedbacks if you have any time to test it, thanks!

IMG_B39265903039-1

from homebridge-meross.

Vati80 avatar Vati80 commented on June 13, 2024 1

Hi @donavanbecker and @CocoaBob ,

I have extensively tested the meross plugin for the Last 2-3 days. In my opinion, it works great. I also tested different WLAN with the same settings in Config.json. So far... I have not found any errors and I am really very happy with them. A big compliment to you for this Great work! I love it.

Cheers Vati

from homebridge-meross.

donavanbecker avatar donavanbecker commented on June 13, 2024

You can submit a Pull Request for this and i can merge it.

from homebridge-meross.

donavanbecker avatar donavanbecker commented on June 13, 2024

No, If you are able code this to work with this plugin i can merge it with this plugin so you can use the garage door opener on this plugin. I can't add it myself.

from homebridge-meross.

donavanbecker avatar donavanbecker commented on June 13, 2024

It’s not that I don’t want to, I just don’t know how too. And don’t have the product to test it

from homebridge-meross.

dylanfrankcom avatar dylanfrankcom commented on June 13, 2024

@tbones1 Could you post the information from the GET / GETACK request too? Also, is the lmTime value in each payload different?

from homebridge-meross.

donavanbecker avatar donavanbecker commented on June 13, 2024

Just released Version 1.1.0, if you want to give it a try. This does not include support for the garage door, we need you to reach out on discord so that we can get more info from you.

from homebridge-meross.

lami974 avatar lami974 commented on June 13, 2024

Hello, I'm not a developer, but I have two MSG100s. As far as I can, I can help you with the tests. What do you need for the next. I also dumped the network and I have the same thing as @tbones1

from homebridge-meross.

donavanbecker avatar donavanbecker commented on June 13, 2024

@lami974 can you reach out to us on the homebridge discord server?

from homebridge-meross.

lami974 avatar lami974 commented on June 13, 2024

« Oznu/homebridge:no-avahi » on NAS Synology server, in docker. « Alpine Linux (3.11.6) »

from homebridge-meross.

donavanbecker avatar donavanbecker commented on June 13, 2024

Homebridge Discord Server

from homebridge-meross.

HarrySteff avatar HarrySteff commented on June 13, 2024

It would be very great if this plugin would support the msg100. I also own such a device. If I can do anything except coding, please give me info. Thank you!

from homebridge-meross.

donavanbecker avatar donavanbecker commented on June 13, 2024

@HarrySteff Are you on the discord server?

from homebridge-meross.

HarrySteff avatar HarrySteff commented on June 13, 2024

No, at the moment i am not... i will try it later...
Oh, now iam there ;-)

from homebridge-meross.

Vati80 avatar Vati80 commented on June 13, 2024

Hi donavanbecker,

Thank you very much for your efforts!
I would also like to offer my support, for testing. I have a Meross MSG100 Garage Door Opener. HomeBridge runs on a Raspberry Pi. I have a Discord Account too.

Cheers Vati

from homebridge-meross.

tbones1 avatar tbones1 commented on June 13, 2024

@tbones1 Could you post the information from the GET / GETACK request too? Also, is the lmTime value in each payload different?

Posted in Discord
ImTime is different and appears to be UNIX time

from homebridge-meross.

CocoaBob avatar CocoaBob commented on June 13, 2024

I got one, since I thought it was already supported by this plugin 😂

After collecting several HTTP requests, I noticed that the messageId and sign are always changing, and they are all 32 characters. I guess they were AES 128 hash codes calculated from a key + current timestamp + some other factor.

Let me try to use a Jailbroken iPhone to analyze their iOS app.

from homebridge-meross.

CocoaBob avatar CocoaBob commented on June 13, 2024

OK, forget about what I said just now, I noticed that there was a firmware update, which said it would improve the security of open/close... But after updating the firmware, now I can control the door with Postman 😂

Let me check it further.

from homebridge-meross.

CocoaBob avatar CocoaBob commented on June 13, 2024

The garage door support is so complicated, I underestimated it and just spent one day to debug the logic. My neighbours may notice my garage door kept closing/opening during the night 😂

Here's my pull request #29

Problems left:

  1. How can we get open/close notifications from Meross?
    I've observed the traffic, the iOS app is relying on Apple's Push Notification Service to receive the state updates.
  2. Meross can't stop closing a door (And my implementation will be messed up if we try to stop closing/opening)
  3. Meross doesn't support stopped state
  4. Meross doesn't support obstruction state

from homebridge-meross.

Vati80 avatar Vati80 commented on June 13, 2024

Hello, thank you for the great work. I installed the beta today. What content do I have to enter in the fields: "messageId", "timestamp" and "sign"? Is there an example config for the MSG100?
Cheers Vati

from homebridge-meross.

CocoaBob avatar CocoaBob commented on June 13, 2024

@Vati80 Yes, you still need to sniffer the traffic and get the messageId, timestamp and sign from the app's request. Here's a screenshot of the settings in Homebridge Config UI X.

image

And here's another screenshot of my Homebridge config.json file.
image

from homebridge-meross.

CocoaBob avatar CocoaBob commented on June 13, 2024

Sorry, I made a mistake in the last commit, just fixed it this morning, please try again after merging PR #30 .

from homebridge-meross.

donavanbecker avatar donavanbecker commented on June 13, 2024

Sorry, I made a mistake in the last commit, just fixed it this morning, please try again after merging PR #30 .

#30 has been merged into latest beta.

from homebridge-meross.

Vati80 avatar Vati80 commented on June 13, 2024

@CocoaBob i sniff my traffic with the Wireshark app (OS X). I try it for hours... sorry but I can't find the entries for "messageId", "timestamp" and "sign". I found the IP, respectively the "Meross-Smart-Garage.fritz.box" entries. When i open the line i don't see the searched entries. What else can I do

Frame 792: 98 bytes on wire (784 bits), 98 bytes captured (784 bits) on interface en1, id 0
Interface id: 0 (en1)
Interface name: en1
Interface description: Ethernet 2
Encapsulation type: Ethernet (1)
Arrival Time: May 23, 2020 20:13:31.057012000 CEST
[Time shift for this packet: 0.000000000 seconds]
Epoch Time: 1590257611.057012000 seconds
[Time delta from previous captured frame: 0.024757000 seconds]
[Time delta from previous displayed frame: 0.025423000 seconds]
[Time since reference or first frame: 1.815874000 seconds]
Frame Number: 792
Frame Length: 98 bytes (784 bits)
Capture Length: 98 bytes (784 bits)
[Frame is marked: False]
[Frame is ignored: False]
[Protocols in frame: eth:ethertype:ip:icmp:data]
[Coloring Rule Name: ICMP]
[Coloring Rule String: icmp || icmpv6]
Ethernet II, Src: ChengduM_xx:xx:xx (xx:xx:xx:xx:xx:xx), Dst: XXXXX-Mac-Pro.fritz.box (xx:xx:xx:xx:xx:xx)
Destination: XXXXX-Mac-Pro.fritz.box (xx:xx:xx:xx:xx:xx)
Address: XXXXX-Mac-Pro.fritz.box (xx:xx:xx:xx:xx:xx)
.... ..0. .... .... .... .... = LG bit: Globally unique address (factory default)
.... ...0 .... .... .... .... = IG bit: Individual address (unicast)
Source: ChengduM_xx:xx:xx (xx:xx:xx:xx:xx:xx)
Address: ChengduM_xx:xx:xx (xx:xx:xx:xx:xx:xx)
.... ..0. .... .... .... .... = LG bit: Globally unique address (factory default)
.... ...0 .... .... .... .... = IG bit: Individual address (unicast)
Type: IPv4 (0x0800)
Internet Protocol Version 4, Src: Meross-Smart-Garage.fritz.box (192.xxx.xxx.xxx), Dst: XXXXX-Mac-Pro.fritz.box (192.xxx.xxx.xxx)
0100 .... = Version: 4
.... 0101 = Header Length: 20 bytes (5)
Differentiated Services Field: 0x00 (DSCP: CS0, ECN: Not-ECT)
0000 00.. = Differentiated Services Codepoint: Default (0)
.... ..00 = Explicit Congestion Notification: Not ECN-Capable Transport (0)
Total Length: 84
Identification: 0xf37d (62333)
Flags: 0x0000
0... .... .... .... = Reserved bit: Not set
.0.. .... .... .... = Don't fragment: Not set
..0. .... .... .... = More fragments: Not set
Fragment offset: 0
Time to live: 255
Protocol: ICMP (1)
Header checksum: 0xe1cb [validation disabled]
[Header checksum status: Unverified]
Source: Meross-Smart-Garage.fritz.box (192.xxx.xxx.xxx)
Destination: XXXXX-Mac-Pro.fritz.box (192.xxx.xxx.xxx)
Internet Control Message Protocol
Type: 0 (Echo (ping) reply)
Code: 0
Checksum: 0xe5fa [correct]
[Checksum Status: Good]
Identifier (BE): 18243 (0x4743)
Identifier (LE): 17223 (0x4347)
Sequence number (BE): 3581 (0x0dfd)
Sequence number (LE): 64781 (0xfd0d)
[Request frame: 786]
[Response time: 25.423 ms]
Data (56 bytes)
Data: 070707070707070707070707070707070707070707070707…
Text: \a\a\a\a\a\a\a\a\a\a\a\a\a\a\a\a\a\a\a\a\a\a\a\a\a\a\a\a\a\a\a\a\a\a\a\a\a\a\a\a\a\a\a\a\a\a\a\a\a\a\a\a\a\a\a\a
[Length: 56]

from homebridge-meross.

donavanbecker avatar donavanbecker commented on June 13, 2024

@Vati80 try using the Getting Credentials wiki.

from homebridge-meross.

Vati80 avatar Vati80 commented on June 13, 2024

@donavanbecker oh man... Thank you so much! It was done in 2 minutes. Before, I tried for hours...

cheers Vati

from homebridge-meross.

donavanbecker avatar donavanbecker commented on June 13, 2024

@CocoaBob @Vati80 @tbones1 @HarrySteff, with the latest beta. how is everything working? Any issues?
If there are no issues, do you think this is ready for release?
Since @dylanfrankcom and myself don't have the MSG-100, we can't really test this so need your results to know when to release.

from homebridge-meross.

HarrySteff avatar HarrySteff commented on June 13, 2024

Thank you for all your work, until now I unfortunately could not test it... but I will definitely do so in the next couple of days. Thank you so much...

from homebridge-meross.

lami974 avatar lami974 commented on June 13, 2024

Hi @donavanbecker @CocoaBob

It works great for me on my two MSG 100. Thank you so much…

from homebridge-meross.

donavanbecker avatar donavanbecker commented on June 13, 2024

I have released Version 2.0.0:

Changes

  • added Support for MSG-100 (Garage Door Opener).

IMPORTANT

Homebridge v1.0.0

  • Changed homebridge requirement to be v1.0.0 or higher.

from homebridge-meross.

Kokorone avatar Kokorone commented on June 13, 2024

I have this same garage opener the MSG-100, but there is a parameter for the "duration of press" that needs to be added to the homebridge plugin. Its already being passed through as timestampMs right after the timestamp value. My garage opener requires a 2 second press (244ms in the request) for it to actually begin opening or closing so despite it being added to homebridge just fine, its not triggering when requested.

from homebridge-meross.

CocoaBob avatar CocoaBob commented on June 13, 2024

@Kokorone I just tried the official Meross app, the signal duration can be set in the app, and will be saved to MSG-100 directly. (I captured the request) So I guess after setting the value, our Homebridge plugin should be able to Open/Close the opener correctly?

Based on what I captured, the signal duration setting is another HTTP request, the parameter isn't included in my Open/Close requests. If you could send me an example of the request, to see how duration of press parameter is included in Open/Close requests, that would be perfect.

Here's the open the door request captured on my side, I don't see the duration setting

{
    "payload": {
        "state": {
            "channel": 0,
            "uuid": "__UUID__",
            "open": 1
        }
    },
    "header": {
        "messageId": "__MESSAGE_ID__",
        "method": "SET",
        "from": "http:\/\/192.168.0.124\/config",
        "sign": "__SIGN__",
        "namespace": "Appliance.GarageDoor.State",
        "triggerSrc": "iOS",
        "timestamp": 1595540879,
        "payloadVersion": 1
    }
}

Here's the set signal duration request captured on my side

{
    "payload": {
        "config": {
            "signalDuration": 500
        }
    },
    "header": {
        "messageId": "__MESSAGE_ID__",
        "method": "SET",
        "from": "http:\/\/192.168.0.128\/config",
        "sign": "__SIGN__",
        "namespace": "Appliance.GarageDoor.Config",
        "triggerSrc": "iOS",
        "timestamp": 1595542266,
        "payloadVersion": 1
    }
}

from homebridge-meross.

Kokorone avatar Kokorone commented on June 13, 2024

@Kokorone I just tried the official Meross app, the signal duration can be set in the app, and will be saved to MSG-100 directly. (I captured the request) So I guess after setting the value, our Homebridge plugin should be able to Open/Close the opener correctly?

Based on what I captured, the signal duration setting is another HTTP request, the parameter isn't included in my Open/Close requests. If you could send me an example of the request, to see how duration of press parameter is included in Open/Close requests, that would be perfect.

Here's the open the door request captured on my side, I don't see the duration setting

{
    "payload": {
        "state": {
            "channel": 0,
            "uuid": "__UUID__",
            "open": 1
        }
    },
    "header": {
        "messageId": "__MESSAGE_ID__",
        "method": "SET",
        "from": "http:\/\/192.168.0.124\/config",
        "sign": "__SIGN__",
        "namespace": "Appliance.GarageDoor.State",
        "triggerSrc": "iOS",
        "timestamp": 1595540879,
        "payloadVersion": 1
    }
}

Here's the set signal duration request captured on my side

{
    "payload": {
        "config": {
            "signalDuration": 500
        }
    },
    "header": {
        "messageId": "__MESSAGE_ID__",
        "method": "SET",
        "from": "http:\/\/192.168.0.128\/config",
        "sign": "__SIGN__",
        "namespace": "Appliance.GarageDoor.Config",
        "triggerSrc": "iOS",
        "timestamp": 1595542266,
        "payloadVersion": 1
    }
}

Interesting. Here is what I’m getting from the http capture app.

{
  "header": {
    "messageId": "cb8d04916156ac32995b3990331d7659",
    "namespace": "Appliance.System.Online",
    "triggerSrc": "iOS",
    "method": "GETACK",
    "payloadVersion": 1,
    "from": "/appliance/1911080065387090804648e1e9111579/publish",
    "timestamp": 1595538826,
    "timestampMs": 244,
    "sign": "7b719b6dcb58e59757f28459386f59ca"
  },
  "payload": {
    "online": {
      "status": 1
    }
  }
}

I have 2 seconds configured in my Meross app for the MSG-100 but all toggling the switch in homebridge does is toggle it “off” then after a few seconds it turns back on and the garage does nothing.

from homebridge-meross.

CocoaBob avatar CocoaBob commented on June 13, 2024

@Kokorone But it works in the official app? Strange, let me test more. And please let me know the hardware/firmware versions, maybe something is different.

from homebridge-meross.

Kokorone avatar Kokorone commented on June 13, 2024

@CocoaBob yup no issues at all with the app or the widget for the app. Here is a screenshot of the firmwares
E602E7EB-53EF-4C63-B17A-928FDB04DC35

from homebridge-meross.

CocoaBob avatar CocoaBob commented on June 13, 2024

@Kokorone
This is the request you posted yesterday

{
  "header": {
    "messageId": "cb8d04916156ac32995b3990331d7659",
    "namespace": "Appliance.System.Online",
    "triggerSrc": "iOS",
    "method": "GETACK",
    "payloadVersion": 1,
    "from": "/appliance/1911080065387090804648e1e9111579/publish",
    "timestamp": 1595538826,
    "timestampMs": 244,
    "sign": "7b719b6dcb58e59757f28459386f59ca"
  },
  "payload": {
    "online": {
      "status": 1
    }
  }
}

Do you know where it was sent to? My captured request was sent to http://192.168.0.128/config

And do you have other Meross devices at home? For example, another smart switch?

I think timestampMs simply means millisecond of the timestamp, because timestamp is in second, they added another attribute/parameter to support millisecond I guess.

from homebridge-meross.

Kokorone avatar Kokorone commented on June 13, 2024

@CocoaBob I only have the one meross device, with a static ip of 192.168.1.161. I grabbed the values from http catcher from http://192.168.1.161/config

You may be right about the Ms, which would make this even stranger that its not working

from homebridge-meross.

Kokorone avatar Kokorone commented on June 13, 2024

@CocoaBob I may have found the problem, After opening and closing the garage 4 times, I see no network traffic other than the initial 2 requests to 192.168.1.161 with the /config. Closing and reopening the app is enough to make these two requests happen. I'm not sure how its possible for the opener to not send any traffic for the open and close commands though?

IMG_3412

from homebridge-meross.

Kokorone avatar Kokorone commented on June 13, 2024

@CocoaBob unfortunately I can only chalk it up to meross having some firmware update that blocked the functionality between firmware 3.1.13 and 3.1.15. I've tried setting the unit back up with httpcatcher running and trying every possible parameter configuration, even going so far as to buy a new unit.

The unit no longer reports a "Appliance.GarageDoor.State" when opening or closing with the latest firmware meaning it is useless to try and send a command replicating that.

from homebridge-meross.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.