bwp91 / homebridge-meross

Homebridge plugin to integrate Meross devices into HomeKit.
MIT License
196 stars 32 forks source link

Support for Refoss RSG100 (same as MSG100) #218

Closed mag2007 closed 3 years ago

mag2007 commented 3 years ago

Describe Your Problem: I am trying to use your plugin with my Refoss door opener RSG100. I could show it under my Homekit, when I set my model name to MSG100. Refoss is same as Meross. The account used for the app can be used on the both apps. Firstly, I added my garage door opener in the Refoss app, but then I downloaded the Meross app, and my garage door opener was inside the app. I am not sure, what there is missing, maybe only one config with some "Refoss" config, instead on static Meross.

Maybe it should be FR, but I thought I would start it first with this support request.

Logs:

HOOBS 579A@Garage@Garage@Current Door State] The read handler for the characteristic 'Current Door State' didn't respond at all!. Please check that you properly call the callback!
[HOOBS 579A@Garage@Garage@Target Door State] The read handler for the characteristic 'Target Door State' didn't respond at all!. Please check that you properly call the callback!
1.3.2021, 11:29:22 [Garage] Error: connect ETIMEDOUT 192.160.0.100:80
1.3.2021, 11:29:27 [Garage] Failed to POST to the Meross Device MSG100 at 192.160.0.100: Error: connect ETIMEDOUT 192.160.0.100:80
    at TCPConnectWrap.afterConnect [as oncomplete] (net.js:1146:16) {
  errno: -110,
  code: 'ETIMEDOUT',
  syscall: 'connect',
  address: '192.160.0.100',
  port: 80
}

Homebridge Config:

{
            "accessory": "Meross",
            "plugin_map": {
                "plugin_name": "homebridge-meross",
                "index": 0
            },
            "channel": 0,
            "messageId": "messageIDFromHTTPCatcher",
            "timestamp": timestampFromHTTPCatcher,
            "sign": "signFromHTTPCatcher",
            "deviceUrl": "192.160.0.100",
            "model": "MSG100",
            "name": "Garage",
            "serialNumber": "rundomNumbers",
            "firmwareRevision": "3.1.15",
            "garageDoorOpeningTime": 15
        }

Environment:

donavanbecker commented 3 years ago

@mag2007 could you by chance install the cloud version of this plugin?

homebridge-meross-cloud and then turn on the deviceDiscovery feature and get me the output? I might be able to add this support if I can see how commands are being sent.

LordJohnWhorfin commented 3 years ago

I also had a Refoss RSG100 and it's been working fine using the Meross MSG100 settings. Wladislav, in your Homebridge config,

        "messageId": "messageIDFromHTTPCatcher",
        "timestamp": timestampFromHTTPCatcher,
        "sign": "signFromHTTPCatcher",

should be configured with information you collect by installing a free app called HTTPCatcher on your phone, which lets you spy on the data exchanged between the Meross app and their server. The instructions page shows you where to find the info. Replace the "xxxFromHTTPCatcher" by the values you read, and tada! your gate controller will start working. I have the same, and it works great, it's totally identical to the Meross MSG100. No idea of the reasoning behind the Refoss branding.

mag2007 commented 3 years ago

For this plugin, I did everything as the instruction said. I can see the garage opener in HomeKit but it does not respond. See log. I just needed to setup the model to MSG100 instead RSG100. The placeholders from my config are from the HTTP catcher. I tried multiple different responses.

I already installed the meross cloud, it could find the garage opener, but it says, it does not support it. Here is the discovery:

4.3.2021, 08:10:04 [MerossCloud] Device Type: msg100, is currently not supported. Submit Feature Requests Here: https://git.io/JtfVC

4.3.2021, 08:10:05 [MerossCloud] All-Data: {"all":{"system":{"hardware":{"type":"msg100","subType":"us","version":"3.5.0","chipType":"mt7682","uuid":"xxx","macAddress":"xx:xx:xx:xx:xx"},"firmware":{"version":"3.1.15","compileTime":"2020/04/15 XX:XX:XX GMT +08:00","wifiMac":"xx:xx:xx:xx:xx","innerIp":"XXX.XXX.XXX.XXX","server":"mqtt-eu.meross.com","port":443,"userId":xxx},"time":{"timestamp":xxx,"timezone":"Europe/Berlin","timeRule":[[xxx],[xxx],[xxx],[xxx],[xxx],[xxx],[xxx],[xxx],[xxx],[xxx],[xxx],[xxx],[xxx],[xxx],[xxx],[xxx],[xxx],[xxx],[xxx],[xxx]]},"online":{"status":1}},"digest":{"togglex":[{"channel":0,"onoff":1,"lmTime":0}],"triggerx":[{"channel":0,"id":"xxx","count":1}],"timerx":[],"garageDoor":[{"channel":0,"open":0,"lmTime":xxx}]}}}

4.3.2021, 08:10:05 [MerossCloud] System-Abilities: {"payloadVersion":1,"ability":{"Appliance.Config.Key":{},"Appliance.Config.WifiList":{},"Appliance.Config.Wifi":{},"Appliance.Config.Trace":{},"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.DNDMode":{},"Appliance.Control.Multiple":{"maxCmdNum":5},"Appliance.Control.ToggleX":{},"Appliance.Control.TimerX":{"sunOffsetSupport":1,"notify":["Appliance.GarageDoor.State"]},"Appliance.Control.TriggerX":{"notify":["Appliance.GarageDoor.State"]},"Appliance.Control.Bind":{},"Appliance.Control.Unbind":{},"Appliance.Control.Upgrade":{},"Appliance.GarageDoor.State":{},"Appliance.GarageDoor.Config":{},"Appliance.Digest.TriggerX":{},"Appliance.Digest.TimerX":{}}}

LordJohnWhorfin commented 3 years ago

I didn't use MerossCloud (it wasn't available when I set up my RSG100), all I did was set it up as an MSG100 (like you did), I just followed the instructions on the wiki configuration page to obtain the messageID, timestamp and sign values, and updated my config with those values. Also, obviously you need to make a permanent DHCP reservation for the RSG100 so it's always at the same IP address.

mag2007 commented 3 years ago

Weird...I did everything you described. Maybe I will try later on again with new data from HTTP catcher.

Update I tried again with new data, it is not working... I wonder why. Has you inserted your real SN? Or is any fake number okay?

donavanbecker commented 3 years ago

Can you try the latest beta?

insomniaforever commented 3 years ago

I installed the non-cloud version of the plugin on Hoobs, and the door opens and closes fine, but I do receive errors saying "No Response" within the "Home" app. The log is as follows:

3/13/2021, 6:02:48 PM [HOOBS 998D@Garage@Garage@Obstruction Detected] Unhandled error thrown inside read handler for characteristic: callback is not a function 3/13/2021, 6:02:48 PM [HOOBS 998D@Garage@Garage@Target Door State] characteristic value expected number and received undefined 3/13/2021, 6:02:48 PM [HOOBS 998D@Garage@Garage@Current Door State] characteristic value expected number and received undefined 3/13/2021, 6:02:48 PM [HOOBS 998D@Garage@Garage@Obstruction Detected] Unhandled error thrown inside read handler for characteristic: callback is not a function 3/13/2021, 6:02:48 PM [Garage] TypeError: callback is not a function 3/13/2021, 6:02:49 PM [Garage] TypeError: callback is not a function

The only things I couldn't find from HTTPcatcher are:

  1. "serialNumber": "rundomNumbers",
  2. "firmwareRevision": "3.1.15",

I am not sure if these are the parameters that cause the issue. I am very new to programming, I would appreciate it if someone can help shed some light on where I can find these two numbers?

Thank you.

donavanbecker commented 3 years ago

@insomniaforever This plugin is developed for homebridge not HOOBS.

I would recommend moving to homebridge.

insomniaforever commented 3 years ago

@insomniaforever This plugin is developed for homebridge not HOOBS.

I would recommend moving to homebridge.

Thanks man, I have done it, but it still shows Callback is not a function, and the "Home" app still shows "No Response".

[13/03/2021, 21:29:01] [homebridge-meross] This plugin threw an error from the characteristic 'Obstruction Detected': Unhandled error thrown inside read handler for characteristic: callback is not a function. See https://git.io/JtMGR for more info. [13/03/2021, 21:29:01] [homebridge-meross] This plugin generated a warning from the characteristic 'Current Door State': characteristic value expected valid finite number and received "undefined" (undefined). See https://git.io/JtMGR for more info. [13/03/2021, 21:29:01] [homebridge-meross] This plugin generated a warning from the characteristic 'Target Door State': characteristic value expected valid finite number and received "undefined" (undefined). See https://git.io/JtMGR for more info. [13/03/2021, 21:29:01] [Garage] TypeError: callback is not a function [13/03/2021, 21:29:01] [Garage] TypeError: callback is not a function

Not sure if there are other parameters I need to set up.

donavanbecker commented 3 years ago

@insomniaforever try heading back to v3.5.0 with the UI

insomniaforever commented 3 years ago

@insomniaforever try heading back to v3.5.0 with the UI

Thanks a lot man, you are super helpful here. I checked previous versions and figured that it could be the plugin settings due to the newer hardwares introduced by Meross. After rolling back, everything works great!

Thanks again.

donavanbecker commented 3 years ago

v5.0.0 is released report any issues.

mag2007 commented 3 years ago

Well I am lost. I moved to Homebridge. Clean install. Firstly I tried the latest version. It did not work (moved accessory to platform). Then reverted back to 3.5.0 (moved config back). Getting the same error Error: connect ETIMEDOUT

insomniaforever commented 3 years ago

Well I am lost. I moved to Homebridge. Clean install. Firstly I tried the latest version. It did not work (moved accessory to platform). Then reverted back to 3.5.0 (moved config back). Getting the same error Error: connect ETIMEDOUT

I am using Meross garage opener MSG100 without Homekit ability.

You need to install the plugin called Meross something, and then you need to change your different types of IDs in the configuration coding page. The following IDs can be captured by an app called HTTPCatcher. Start the app and click on the on button, and then open your garage door using Meross App, then you can stop the HTTPCathcer app, and you should be able to filter to find out the following information in the app, modify them in your Homebridge settings and you should be good to go. I didnt try the latest version but is still using 3.5.0.

    "messageId": "messageIDFromHTTPCatcher",
    "timestamp": timestampFromHTTPCatcher,
    "sign": "signFromHTTPCatcher",