alexryd / homebridge-shelly-ng

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

Added support for Shelly Plus 1 Mini #88

Open sw-koenig opened 1 year ago

sw-koenig commented 1 year ago

Resolves #87

Dependency As the model IDs for the devices are defined in node-shellies-ng, the following Pull-Request must be merged first: https://github.com/alexryd/node-shellies-ng/pull/7

Shelly has released "mini" versions for some of their new generation products. They basically have the same functions as the normal ones, but using different model IDs.

Change has been tested successfull in my local setup with the homebridge-shelly-ng plugin. Best regards, Swen

lukyer commented 11 months ago

Great job! Waiting for this to get my new Minis in homebridge. @alexryd would you find some time to merge this and deploy new version of shelly-ng? 🙏

djcargo commented 11 months ago

I will be also very happy to get Minis support :)

jakubkasparek commented 11 months ago

great! how to install still fork?

holetse commented 10 months ago

Hmm, I am encountering an issue with this PR.

Specifically, the upstream changes to node-shellies-ng seems to have been made off of this commit (HEAD of main at fork time), and thus contains this commit which came after the 1.5.1 release. The change to DeviceDiscoverer is not compatible with homebridge-shelly-ng, giving a bunch of typescript errors around the change from an abstract class to an interface, e.g.:

src/platform.ts:39:45 - error TS2689: Cannot extend an interface 'DeviceDiscoverer'. Did you mean 'implements'?
export class ConfigDeviceDiscoverer extends DeviceDiscoverer {

It seems like this PR needs to address that change to the DeviceDiscoverer, or node-shellies-ng additions need to be made off of this commit.

@sw-koenig Thoughts?

sw-koenig commented 10 months ago

Hi @holetse, you're probably right. I'm not an expert for Typescript and thus did not looked into this in detail. I could only test the changes in my local homebridge setup, by directly modifying the .js files, which perfectly works for me. I couldn't managed to build the projects locally and use the local builds in homebridge. So maybe, there are additional changes needed, to be compatible with that change to DeviceDiscover in node-shellies-ng.

Best regards, Swen

jtowe1 commented 7 months ago

Yeah it looks like there are commits in node-shellies-ng to main after the v1.5.1 release (here https://github.com/alexryd/node-shellies-ng/releases/tag/v1.5.1 it says 6 commits to main since this release) and homebridge-shelly-ng uses v1.5.1. Seems like maybe a new release of node-shellies-ng needs to be cut and then a new version of homebridge-shelly-ng needs to be made using the updated node-shellies-ng.