alexryd / homebridge-shelly-ng

Homebridge plugin for the next generation of Shelly devices
GNU General Public License v3.0
121 stars 44 forks source link

Configuration as WindowsCovering for Shelly 2PM not working #56

Closed DiMaSchine closed 1 year ago

DiMaSchine commented 1 year ago

Hi,

I have have a Shelly 2 PM that controls a windows shutter. Previously this worked fine with the Shelly 2.5. However, the 2 PM only is recognized as a windows, not as a window cover. I have configured it as a cover in the config and restarted everything several times, but it is still only being shown as a window.

I am doing something wrong?

`{

"name": "Shelly NG",

        "mdns": {
            "enable": true
        },
        "devices": [
            {
                "exclude": false,
                "switch:0": {
                    "exclude": false,
                    "type": "switch"
                },
                "switch:1": {
                    "exclude": false,
                    "type": "switch"
                },
                "switch:2": {
                    "exclude": false,
                    "type": "switch"
                },
                "switch:3": {
                    "exclude": false,
                    "type": "switch"
                },
                "cover:0": {
                    "exclude": false,
                    "type": "windowCovering"
                }
            }
        ],
        "platform": "ShellyNG"
    }
] `
boehlefeld commented 1 year ago

No expert here. Your config seems legit, but you can try to add id. I was using window before and then switched to windowCovering as well.
You may remove your cached devices and start over. But for me it was not necessary.

                {
                    "id": "shellyplus2pm-xxxxxxxxxxxxxx",
                    "exclude": false,
                    "name": "Shady 1",
                    "cover:0": {
                        "exclude": false,
                        "type": "windowCovering"
                    }
                },
DiMaSchine commented 1 year ago

Ok, now it worked for me. For everyone having the same issue in the future:

Now it is being recognized as a cover.

Steffen0587 commented 1 year ago

@DiMaSchine: I have the same problem. I have now also tried to reinstall the plugin and I have also deleted the Shelly +2PM from the cache. Unfortunately, it is still displayed only as a window. You have written that you have also set it in the initial plugin window as a cover. Where did you do that. I can only set this in the configuration json file.

SilvioMigu commented 9 months ago

Ok, now it worked for me. For everyone having the same issue in the future:

  • I removed the device from the config file and from the cache
  • I de-installed the plug in
  • I re-installed the plug in
  • In the initial Plug In windows, which shows up after the installation and restart, I added the device via the ip address (my shellys all have a fixed IP) and defined it there directly as cover.

Now it is being recognized as a cover.

Hello @DiMaSchine

I've already done what you advise, but I still can't switch from window to windowCovering. I already uninstalled and reinstalled When I install the plugin, it immediately adds shelly to homekit.

In the Hoobs settings, I've tried everything, and nothing.

Can you show your configuration? Please Thanks

DiMaSchine commented 9 months ago

Can you show your configuration? Please Thanks

Hi, here is the (I hope) relevant part of the config. Is this what you meant?

{ "name": "Shelly NG", "mdns": { "enable": true }, "devices": [ { "id": "shellyplus2pm-44YYYYYYY3c", "name": "playceholder", "exclude": false, "hostname": "192.168.178.203", "switch:0": { "exclude": false, "type": "switch" }, "switch:1": { "exclude": false, "type": "switch" }, "switch:2": { "exclude": false, "type": "switch" }, "switch:3": { "exclude": false, "type": "switch" }, "cover:0": { "exclude": false, "type": "windowCovering" } } ], "platform": "ShellyNG" },

DiMaSchine commented 9 months ago

@DiMaSchine: I have the same problem. I have now also tried to reinstall the plugin and I have also deleted the Shelly +2PM from the cache. Unfortunately, it is still displayed only as a window. You have written that you have also set it in the initial plugin window as a cover. Where did you do that. I can only set this in the configuration json file.

Sorry for being so late. Did you figure it out in the meantime? Othwerwise let me know.

SilvioMigu commented 9 months ago

Hello @DiMaSchine

I'll try in a little while. You put the code directly on the plugin or you gonna go to the hoobs' advvanced?

SilvioMigu commented 9 months ago

Decide only removed, when i remove the plugin.

When I remove the device from the Hoobs cache, when Hoobs restarts, it adds the device again.

When I remove the plugin, I can then remove the hoobs cache provision.

Then when I install the plugin, the device is immediately added and in the plugin settings, this is: { "platform": "Shelly NG" }

So I delete the configuration and paste yours there, with my settings, right?

SilvioMigu commented 9 months ago

It's work πŸ™ŒπŸ™ŒπŸ™ŒπŸ‘Œ Thanks a lot image

SilvioMigu commented 9 months ago

I changed the default name of the device and put it in the code and it now works. Thank you very much

SilvioMigu commented 9 months ago

now in plugin shellyNg, appears like this: image

SilvioMigu commented 9 months ago

in advance, it appears like this:

Captura de ecrã 2023-12-07, às 23 10 25

SilvioMigu commented 9 months ago

this part of the code went to the end of the line ;)

{ "platform": "ShellyNG", "name": "Shelly NG" } ]