homebridge-shelly-ng
homebridge-shelly-ng copied to clipboard
[Shelly NG] [shellypro4pm-ec62609ed9c4] Unknown device of model "SPSW-104PE16EU" discovered
Hi there,
Tried all configuration possible but, it sound's that for ShellyPro4PM something going wrong, no way to make the plugin accepting it. Note: I tried with and without mdns, same result. In fact, with mdns set to "true", only ShellyPro1 is going well, for Pro4PM, log always shows "Unknown device of model "SPSW-104PE16EU"
Here is some information that should/could help:
Log extract ==> [26/02/2023 19:47:29] [Shelly NG] mDNS device discovery started [26/02/2023 19:47:29] [Shelly NG] [shellypro4pm-ec62609ed9c4] Unknown device of model "SPSW-104PE16EU" discovered. [26/02/2023 19:47:29] [Shelly NG] [ShellyPro1] Device added
Command shelly ==> http://192.168.0.189/shelly {"name":null,"id":"shellypro4pm-ec62609ed9c4","mac":"EC62609ED9C4","model":"SPSW-104PE16EU","gen":2,"fw_id":"20230209-132431/0.13.0-g68ba560","ver":"0.13.0","app":"Pro4PM","auth_en":false,"auth_domain":null}
Config JSON ==> { "name": "Shelly NG", "platform": "ShellyNG", "mdns": { "enable": true }, "websocket": { "requestTimeout": 10, "pingInterval": 60, "reconnectInterval": [ 5, 10, 30, 60, 300, 600 ] }, "devices": [ { "id": "shellypro4pm-ec62609ed9c4", "name": "ShellyPro4PM", "exclude": false, "hostname": "192.168.0.69", "switch:0": { "exclude": false, "type": "switch" }, "switch:1": { "exclude": false, "type": "switch" }, "switch:2": { "exclude": false, "type": "switch" }, "switch:3": { "exclude": false, "type": "switch" } }, { "id": "shellypro1-30c6f78ae90c", "name": "ShellyPro1", "exclude": false, "hostname": "192.168.0.190", "switch:0": { "exclude": false, "type": "switch" } } ] }
Same for me: “ [3/10/2023, 8:38:26 AM] [Shelly NG] [shellypro4pm-ec62608991ac] Unknown device of model "SPSW-104PE16EU" discovered.” Plugin version 1.6.0 Shelly firmware version: 0.14.1
Man, I found a trick for that. You can go on the source code and replace the type of pm directly, then restart the plugin and it works 💪
Edit: Found it!
Thanx for the hint
This is my first rodeo with HomeBridge, so I have no clue on where to start searching and what file to search for and in. A hint would be appreciated.
In fact, if you grab the comment you will discover that someone made a pull to the owner of the plug-in. But since, no official release of the gen2 plugin.
And also, I published The hint in another post. Here was the post below.
But whatever, you did it and I wish you lot of fun with !!!
Cheers !!!
===========>>> Hello Guru !
The V2 of Shelly's Pro4PM device type is missing in package "\node-shellies-ng-main\src\devices" . On package we can find an object that support the model V1 or Pro4PM (model: "SPSW-004PE16EU") V2 of Pro4PM's model is "SPSW-104PE16EU"
See in source code (\node-shellies-ng-main\src\devices\shelly-pro-4-pm.ts) ==> export class ShellyPro4Pm extends Device { static readonly model: string = 'SPSW-004PE16EU'; static readonly modelName: string = 'Shelly Pro 4 PM';
Kindly, asking you to add the support of Pro4PM V2 please ?! In advance, thank you.
May the force be with you ! PaT,
Hi, I'm having exactly the same problem with a ShellyPlus1, where it is picked up but labelled as "undefined". Please see below-
[17/03/2023, 23:48:43] [Shelly NG] Initializing ShellyNG platform... [17/03/2023, 23:48:44] [Shelly NG] [shellyplus1-441793aa0614] Unknown device of model "undefined" discovered. [17/03/2023, 23:48:44] [Shelly NG] mDNS device discovery started
Here's the Shelly info- {"name":null,"id":"shellyplus1-441793aa0614","mac":"441793AA0614","gen":2,"fw_id":"20211201-095144/0.9.0-g741ce0c","ver":"0.9.0","app":"Plus1","auth_en":false,"auth_domain":null}
And the config.json- "id": "shellyplus1-441793aa0614", "name": "Chandelier", "exclude": false, "hostname": "192.168.1.71", "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": "window"
Other than editing the config.json, which isn't really coding anyway, I have no experience at all. I had to create a Github profile just to post this. Please, if anyone is able to help I'd appreciate it massively. Even if it's just putting in a request to the plugin author.
Many thanks in advance, SC
Hi @ClaudeFlammang @CorsicaPaT,
Can you please elaborate where to replace "SPSW-004PE16EU" by Pro4PM's model "SPSW-104PE16EU"? I receive the same error message "Unknown device of model "SPSW-104PE16EU" when trying to config the plugin for ShellyPro4PM. I assume the customization is not done in the json plugin configuration? I'm running Homebridge on a Rasperry Pi and I'm not sure if I have to adjust the file via using the console.
I would be very happy about a short how to.
Thank you very much!
Jlz
@julezzz89, hi man, everything was above so I can just had that on the other post someone made a pull request based on my request. Sadly, it is not taken in account yet by who wrote the plugin. You can check this version ready for a pull
However, if you want editing the current version you just have to adapt the code in your hb referred below. Just change the value of the string in the indicated file below using nano or vi, or any editor... Stop and start the plug-in and it is ok. The folder is in your hb folder installation. If you don't find it, use grep command to find where it is. Very easy...
See in source code (\node-shellies-ng-main\src\devices\shelly-pro-4-pm.ts) ==> export class ShellyPro4Pm extends Device { static readonly model: string = 'SPSW-004PE16EU'; static readonly modelName: string = 'Shelly Pro 4 PM';
Thanks @CorsicaPaT !!! It is working now - thanks to you and Chat GTP!
To all other noobs out there (like me), I executed following steps to make it work (at least for me - maybe there is a more professional way..!):
- Open Homebridge Portal in Browser
- Click on "Plugins" and deactivate "Homebridge Shelly Ng"
- Click in the right upper corner on the three dots and open the console
- Enter "Sudo su" to switch user to ensure you have write permissions
- Install text editor for console: "sudo apt-get -y install nano."
- Switch directory "cd /usr/"
- Search for the file "shelly-pro-4-pm.js" (I used "find . -print | grep -i shelly-pro-4-pm.js)
- Enter prompt: nano /usr/ ... your file path from previous step and hit enter to open the editor!
- Scroll down a bit to ShellyPro4Pm.model = 'SPSW-004PE16EU'; and replace it by 'SPSW-104PE16EU'
- Save your change - if you get error message "no writing permission" -> ensure you have switched user "Sudo su"
- Leave console and open "Plugins" of Homebridge again.
- Activate plugin "Homebridge Shelly Ng" again - restart your device.
- While restart you'll see a message like this in the Homebridge Protocol: [Shelly NG] [shellypro4pm-XXXXXXXXX] Device added
I hope I can save your time with this how to - spent to many hours for that easy job :-D
BR Jlz
Hi julezzz89, i change the ShellyPro4Pm.model SPSW-004PE16EU in SPSW-104PE16EU but in the log I see unknown device.
Issue still here, workarround works
Did you guys try the more active plugin cubi1337/homebridge-shelly-ds9? Alex seems to no longer maintaining this one. The other plugin should work as it has implemented both models (Shelly Pro 4 PM and Shelly Pro 4 PM V2) including the new model type string of Version 2 of the Shelly Pro 4 PM. Give it a try and report back here…