Hello
I an swaping a Digitalstrom installation for HA. I have nearly got everything set up but I can’t get my head around SHelly Plus devices.
I have installed shelly discovery gen 2 https://github.com/bieniu/ha-shellies-discovery-gen2 using HACS and copy poasted the AUtomation to go with it. The old Shelly Discovery (gen 1) is working fine. Python too.
On the Shelly i4 I set up the MQTT by enabling it, Enabled
-RPC status notifications over MQTT:
and
Generic status update over MQTT:
Added the host: 10.10.10.10:1883
username and password for MQTT
I installed the script on the Shelly i4 by Adding a script and calling it: send_device_status.js
And copy pasted the script from Github in
let CONFIG = { topic_prefix: null };
Shelly.call("MQTT.GetConfig", {}, function (config) {
CONFIG.topic_prefix = config.topic_prefix;
});
function SendDeviceStatus() {
Shelly.call("Shelly.GetStatus", {}, function (status) {
MQTT.publish(CONFIG.topic_prefix + "/status/rpc", JSON.stringify({ "result": status }));
});
}
let UpdateTimer = Timer.set(300000, true, SendDeviceStatus);
And enabled it pressed “Save and Run”.
I restarted HA and nothing shows up. I pressed the buttons on the i4 and still nothing.
I have no idea how to debug. I installed MQTT Discovery on my Notebook and the Shelly shows up there (When I connect to my HA). But I can’t see the Device in HA.
Where did I go wrong? Any help welcome!
Thank You!