homebridge-shelly-ng icon indicating copy to clipboard operation
homebridge-shelly-ng copied to clipboard

Added support for Shelly Plus 1 Mini

Open sw-koenig opened this issue 1 year ago • 6 comments

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

sw-koenig avatar Oct 02 '23 20:10 sw-koenig

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? 🙏

lukyer avatar Oct 28 '23 21:10 lukyer

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

djcargo avatar Oct 31 '23 19:10 djcargo

great! how to install still fork?

jakubkasparek avatar Nov 02 '23 17:11 jakubkasparek

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?

holetse avatar Dec 02 '23 01:12 holetse

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

sw-koenig avatar Dec 02 '23 13:12 sw-koenig

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.

jtowe1 avatar Mar 01 '24 20:03 jtowe1