I installed the latest version of Shelly MQTT.
After Shelly MQTT hardware configuration, the Shelly PRO 2PM does not appear on device list.
On the hardware list there is no port number for Shelly MQTT.
"Shelly MQTT" is configured with 127.0.0.1:1883, the same as "MQTT Client Gateway with LAN interface".
What is possible to do with that?
Shelly PRO 2PM not recognized as device
Moderator: leecollings
-
- Posts: 8
- Joined: Monday 19 April 2021 17:36
- Target OS: Raspberry Pi / ODroid
- Domoticz version:
- Contact:
Shelly PRO 2PM not recognized as device
- Attachments
-
- 202201170914_01.png (46.81 KiB) Viewed 1436 times
Re: Shelly PRO 2PM not recognized as device
-
- Posts: 3
- Joined: Monday 06 February 2023 9:55
- Target OS: NAS (Synology & others)
- Domoticz version:
- Contact:
Re: Shelly PRO 2PM not recognized as device
Hi, have you been able to solve the problem with the Shelly Pro 2PM shutter switch and Domoticz?
Thanks.
Thanks.
-
- Posts: 178
- Joined: Tuesday 07 June 2016 22:09
- Target OS: Raspberry Pi / ODroid
- Domoticz version: 2023.2
- Location: Netherlands
- Contact:
Re: Shelly PRO 2PM not recognized as device
I got it fixed with this script code (which needs to be entered in ShellyPlus2PM script:
This works on ShellyPlus2PM firmware 1.0.0
Blind/Cover devices are being detected in Domoticz when using ShellyTeacher4Domo.
Keep in mind that you need to add the devices through Users \ set devices in Domoticz V2023.2 to be able to see them as device.
With this script also able to control cover with slider in Domoticz.
Devices are being updated based on MQTT.
Code: Select all
let CONFIG = {
shelly_id: null,
};
Shelly.call("Shelly.GetDeviceInfo", {}, function (result) {
if (result && result.id) {
CONFIG.shelly_id = result.id;
MQTT.subscribe(
buildMQTTStateCmdTopics("rpc"),
DecodeDomoticzFaultyJSON
);
} else {
console.log("Failed to get Shelly device info:", result);
}
});
function buildMQTTStateCmdTopics(topic) {
let _t = topic || "";
return CONFIG.shelly_id + "/" + _t;
}
/**
* @param {string} topic
* @param {string} message
*/
function DecodeDomoticzFaultyJSON(topic, message) {
try {
let trimmedMessage = message.trim();
if (trimmedMessage) {
let req = JSON.parse(trimmedMessage);
for (let r in req) {
if (r.indexOf("GoToPosition") !== -1) { // Check if "GoToPosition" is present in the key
SetCoverPosition(req[r]);
break;
}
}
}
} catch (error) {
console.log("Error parsing JSON:", error);
}
}
function SetCoverPosition(position) {
Shelly.call("Cover.GoToPosition", {
id: 0,
pos: position,
});
}
Blind/Cover devices are being detected in Domoticz when using ShellyTeacher4Domo.
Keep in mind that you need to add the devices through Users \ set devices in Domoticz V2023.2 to be able to see them as device.
With this script also able to control cover with slider in Domoticz.
Devices are being updated based on MQTT.
-
- Posts: 1
- Joined: Saturday 28 October 2023 10:30
- Target OS: Linux
- Domoticz version:
- Location: india
- Contact:
Re: Shelly PRO 2PM not recognized as device
How to fix the Shelly PRO 2PM not being recognized as a device in Domoticz using the ShellyPlus2PM script? I would be very happy if you could let me know, thanks
-
- Posts: 216
- Joined: Saturday 10 November 2018 18:29
- Target OS: Raspberry Pi / ODroid
- Domoticz version:
- Location: Hungary
- Contact:
Re: Shelly PRO 2PM not recognized as device
You have to use ShellyTeacher script.
https://github.com/enesbcs/shellyteacher4domo
There is a video about it:
https://www.youtube.com/watch?v=3PvYhFIsVN4
In case you also need ShellyPlus2PM position device, you need Domoticz 2023 beta 15601 or later and enable "MQTT Control" option at the Shelly device side.
https://github.com/enesbcs/shellyteache ... r-Position
Who is online
Users browsing this forum: No registered users and 1 guest