[APP] Shelly - Smart solutions for every home and office

I changed to my old router yesterday, could that be the issue?

Restarted Homey, router plugs and app several times yes.

Sounds like your router changed all DHCP reservations, so every Shelly probably has a different IP address.

You where a great help, and you where spot on :+1: changed the IP in homey to the one in the Shelly App and it responded, thank you and have a great Christmas/New Year :blush:

1 Like

You’re welcome! We’ve all been there :wink: Merry Christmas!

UPDATE: worked after many more attempts 
 no idea that the reason was 



Cannot add a PlusPlugS with updated Firmware 1.7.1

But the link mentioned works. IP is correct. Never had any problems so far with any other Shelly Plugs (however they had an older firmware when added - maybe that’s the reason?)

{"name":"MyPlug","id":"shellyplusplugs-d4d4daf42488","mac":"D4D4DAF42488","slot":1,"model":"SNPL-00112EU","gen":2,"fw_id":"20250924-062721/1.7.1-gd336f31","ver":"1.7.1","app":"PlusPlugS","auth_en":false,"auth_domain":null}

Hello,

I’m experiencing an issue with the Shelly app where it’s automatically configuring the outbound WebSocket with a malformed URL format on my Gen 3 devices. This appears to be a bug that I am facing in my Homey SHS (self hosted server).

The Problem:

When I add Shelly Gen 3 devices (specifically Shelly 1PM Mini Gen3) to Homey, the outbound WebSocket gets automatically configured as:

ws://192.168.0.138:4:6113/

Note the :4 in the middle - this should be:

ws://192.168.0.138:6113/

The malformed URL causes significant delays in status updates (5+ seconds) because the WebSocket connection fails and Homey falls back to polling. When I manually correct the URL to the proper format, updates become instant as expected with WebSocket push notifications.​

Tests Performed:

  1. Initial discovery: Multiple Gen 3 devices all showed the same malformed :4:6113 pattern

  2. Removed and re-added devices: Consistently produces the same malformed URL

  3. Turned off Homey: Disabled Homey temporarily - the configuration remained unchanged during the shutdown period

  4. Manual correction: Changing to ws://192.168.0.138:6113/ temporarily fixes the issue with instant updates

Conclusion:

The evidence points to the Homey Shelly app’s auto-configuration mechanism inserting the :4 during device pairing or WebSocket setup. The biggest problem is that manual correction doesn’t permanently fix the issue - the app continuously overwrites the WebSocket configuration back to the malformed format, making it impossible to maintain a stable WebSocket connection.​

Environment:

  • Homey Pro (Early 2023) - Self-hosted on Unraid

  • Homey IP: 192.168.0.138

  • Device: Shelly 1PM Mini Gen3

  • Shelly App version: [current version as of December 2025]

  • Expected format: **ws://HOMEY_IP:6113/**​

Can anyone understand why the URL construction is adding :4 between the IP address and port 6113, and why the app keeps overwriting manual corrections? This appears to be a string formatting bug in the auto-configuration code.

Thank you!

1 Like

I’m having the same issue.

On Gen1 devices the CoIoT url is also malformed. It should be :5683, but it is :4

Exactly! That also happens to me on my Shelly dimmers that are also Gen1 devices!

Are you using Homey self host or other version?

self hosted.

I’ve e-mailed the developer of the app, but haven’t got a reply.

Update:
I’ve checked the code and I think I’ve found it.

Root cause:
In lib/helper/LocalIp.ts:11-14:

ip = await homey.cloud.getLocalAddress();
// Homey adds a port, so remove that
// Old implement was always removing the last three characters, so keep using that for now
ip = ip.slice(0, -3);

The code assumes getLocalAddress() returns an IP with a 2-digit port (like :80), so it removes the last 3 characters. However, Homey self-hosted uses port 4860 (and 4859), so getLocalAddress() returns 192.168.2.170:4860. Removing 3 characters leaves 192.168.2.170:4 instead of 192.168.2.170.

This corrupted IP is then used in:

  • lib/util.js:4044 for Gen2+ websocket config: ws://${homey_ip}:6113/
  • lib/util.js:4018 for Gen1 CoIoT config: coiot_peer=${homey_ip} (which should append :5683)

Additionally, the check in drivers/device.js:160 keeps re-corrupting manually fixed URLs. It checks if the current server URL contains homey_ip (the corrupted 192.168.2.170:4). Since a correct URL like ws://192.168.2.170:6113/ doesn’t contain :4, the code thinks the URL is wrong and “fixes” it back to the malformed version.

Suggested fix:
Replace the naive slice(0, -3) with proper port removal:

ip = await homey.cloud.getLocalAddress();
// Homey adds a port, so remove that
const lastColon = ip.lastIndexOf(‘:’);
if (lastColon !== -1) {
ip = ip.substring(0, lastColon);
}

This correctly handles any port length.

I will mail this info again to the developer, maybe he reads this forum.

4 Likes

Hello, first of all I wanted to thank you for all the work done and the support provided. Could you tell me if there are plans to integrate the solenoid valve?

Thanks @gzeel that seems to be the root cause! Hopefully it gets a fix soon.

Do you think it would be possible for you to do a PR with your fix?

hello,

thanks for the app i use it a lot with a shelly 1 pm gen 4 in combination with a add on for a temperatuur sensor.

i have the shelly’s connected trough the shelly app because it is not posible to connect them trough zigbee(ore is that changed?) and from the shelly app i connected them to homey.

but i have a litte of a deley/not sending al the data trough. i have 4 ore 5 temperatur sensor connected to the addon of the most of the shelly’s. The 4th and the 5th sensor lack with responding on the homey app. the fist 3 sensors work correctly
if i go to the shelly app i see that they have changed the value but it is not send trough to homey.

so i have 2 question’s?

what is the reason for not good responding on temp sensor 4 and 5?
and wil it be posible in the future to connect the shelly with addon trough zigbee?

Missing Shelly devices in Homey – Are dry-contact inputs supported?

Hi everyone,

I’m planning a wired setup and noticed something strange. The following Shelly devices don’t appear in the Homey Shelly app device list:

  • Shelly Pro 4PM (LAN + Wi-Fi, 4 relays + 4 dry-contact inputs)

  • Shelly Plus i4 (Wi-Fi, 4 dry-contact inputs)

  • Shelly Wave i4 (Z-Wave, 4 dry-contact inputs)

I can add them via “Any Wi-Fi device” in Homey, but my question is:

Are the dry-contact inputs on these devices actually supported in Homey?
For example, I’d like to use them for:

  • Input 1: Window magnetic contact

  • Input 2: PIR motion sensor

  • Input 3: Garage door contact

  • Input 4: 230V smoke detector (relay output)

Has anyone gotten the Shelly X2i wall display working in Homey Pro 2023 yet?

I'm planning to buy it, but I can't find any information about whether it can be integrated into Homey.

Mainly because it can also be used as a thermostat.

I'm curious about your findings.

I have made a connection to integrate the Shelly display to my homey via Bluetooth with one of my Shelly power meters which are connected to the internet and obviously my WiFi. The integration works fine and the devices are connected, but they don’t report the temperature and humidity to homey. In the Shelly app it works fine and the refresh rate is fast. As there is no Zigbee app for this device I cannot connect them with zigbee.

Anyone an idea how I can make this work?

Hi,

I’m considering using the Wall Display but have an hard time figuring out what functions it supports. I know it integrates with Homey and with the display i can control other Shelly devices. But at what level can I control other devices (not Shelly) with Homey in between? Directly? Through flows?

Maybe someone can share some pictures how you integrated non shelly devices?

Gr,

Erwin

Hey,

I can’t create an issue on GitHub so reporting here: i received and included my BLU H&T Display ZB, included it in Homey using BT and it’s not reporting temp or humidity.

2 Likes

If i start reading this topic from the beginning there is written,

Help, i need support?!
Are you in need of additional support? please use the email link. 





There is a link to their email adres. I think that is up to date.
Maybe that wil work?

The last Github request is from november 1 2024. If i am correct.

Since the last update I have the following issue in the flow editor:

ScreenRecording2026-01-12at22.39.44-ezgif.com-video-to-gif-converter

All Shelly devices do this and this make the flow editor very slow. When opening the lines are not even loading for a while. Also editing is very slow and clicking save gives a timeout. When I disable the Shelly app everything works like normal but I can’t use the Shelly devices then. I tried contacting the author but I’m not getting a response and not being able to edit my flows annoys me. The flows which were already there before the update work fine and continue working like normal.

someone who can help me?
I have connected::

5x Shelly 1pm gen-4 mini
1x Shelly 2pm gen-4
1x Shelly 1pm gen-4 mini with power measurement

When adding new devices, they have the same issue. Also, removing and adding them again doesn’t solve it.

I even tried getting the project on GitHub and deploying a older version of the app to Homey but I didn’t get permission to install the drenso package.

Someone who can help me out? Can I control an ZigBee or Zwavel device known in Homey and not made by Shelly?