Is it possible to add Shelly 2PM GEN 3 to Domoticz?

Topics (not sure which fora)
when not sure where to post, post here and mods will move it to right forum.

Moderators: leecollings, remb0

Daro1003
Posts: 181
Joined: Monday 14 November 2022 12:46
Target OS: Raspberry Pi / ODroid
Domoticz version: 2023.1
Location: Poland
Contact:

Re: Is it possible to add Shelly 2PM GEN 3 to Domoticz?

Post by Daro1003 »

Slider position and %% indicator does not work correctly in this flow.

1. If I set the shutter to 80% closed, the shutter is set to 20% closed.
2. If I set it to 20% closed, the shutter covers the window by 80%

In the case of the shelly node flow:
poprawne działanie.png
poprawne działanie.png (17.29 KiB) Viewed 1353 times
works correctly.
Daro1003
Posts: 181
Joined: Monday 14 November 2022 12:46
Target OS: Raspberry Pi / ODroid
Domoticz version: 2023.1
Location: Poland
Contact:

Re: Is it possible to add Shelly 2PM GEN 3 to Domoticz?

Post by Daro1003 »

The slider and % indicator do not show the status after setting the roller shutter using the local button on the wall.
suwak stanu.png
suwak stanu.png (12.4 KiB) Viewed 1286 times
I don't understand this:
The other 2 streams represent the communication between Domoticz and the Shelly
So why does the shelly node also provide the raspberry IP address? I should provide the shelly IP address in the shelly node since Domoticz communicates with shelly, it should be the IP address of Domoticz and shelly like this:
przepływzIP.png
przepływzIP.png (42.55 KiB) Viewed 1286 times
But this way no connection to shelly. Why is this bad?
I don't understand
User avatar
FireWizard
Posts: 1887
Joined: Tuesday 25 December 2018 12:11
Target OS: Raspberry Pi / ODroid
Domoticz version: Beta
Location: Voorthuizen (NL)
Contact:

Re: Is it possible to add Shelly 2PM GEN 3 to Domoticz?

Post by FireWizard »

Hello @Daro1003,

Without being impolite, I think you do not understand the MQTT principles.
as you said:
But this way no connection to shelly. Why is this bad?
I don't understand
I recommend to read the MQTT principles https://www.hivemq.com/mqtt/

Download that ebook in order to understand principles.

As far as I understand, you have installed Domoticz and Mosquitto (MQTT) on the same hardware.
That is okay and nothing wrong, but they operate fully independent, but because of the same hardware, they share the same IP address.

In Domoticz, you should tell ( and you did already) with MQTT server Domoticz will use (the same IP address.
So you have probably configured localhost or 192.168.0.40

In all your Shelly devices you should configure the MQTT broker's IP address. So, that will be: 192.168.0.40

As node RED communicates also to the same MQTT broker, all MQTT nodes, both MQTT input nodes and MQTT output nodes should also be configured with the MQTT brokers address, 192.168.0.40

Domoticz and Shelly do not communicate directly, technically they do not know of each others existence.

You are partly lucky, that your Node RED MQTT nodes, marked "IP Domoticz" communicate with MQTT Mosquitto, as said earlier, they share the same IP address, because they run on the same hardware.
However the MQTT nodes marked with "IP Shelly" will fail as they use the IP address of the Shelly, which is not a MQTT broker.

I will continue later.
User avatar
FireWizard
Posts: 1887
Joined: Tuesday 25 December 2018 12:11
Target OS: Raspberry Pi / ODroid
Domoticz version: Beta
Location: Voorthuizen (NL)
Contact:

Re: Is it possible to add Shelly 2PM GEN 3 to Domoticz?

Post by FireWizard »

Hello @Daro1993,

I noticed also that you switched again to the Shelly nodes in Domoticz.

I think, you should make a choice.

The Shelly nodes use the Shelly Cloud API, while with MQTT you have local communication.
It is one or the other.

Also you should answer the questions. Too often I have to guess, what does work and what does not work
E.g. See your screenshot, dated 15 Apr 2025, 12:50 .
Did you test the button, marked pos,50? And if so, did it work?
I asked again in my post, dated 20 Apr 2025, 19:48 , but it has not been answered.

and there are more things that are unclear.

You said:
Slider position and %% indicator does not work correctly in this flow.

1. If I set the shutter to 80% closed, the shutter is set to 20% closed.
2. If I set it to 20% closed, the shutter covers the window by 80%
That looks typical, that something is reversed, but unclear, if this was before or after, you modified the configuration of the Domoticz switch.

As said before, it is important that you understand MQTT communication and that you know how to deal with Node-RED

This week I will be traveling and I have no access to my Node-RED systems.

Regards
Daro1003
Posts: 181
Joined: Monday 14 November 2022 12:46
Target OS: Raspberry Pi / ODroid
Domoticz version: 2023.1
Location: Poland
Contact:

Re: Is it possible to add Shelly 2PM GEN 3 to Domoticz?

Post by Daro1003 »

Sorry but I didn't have time to work on this topic last week. The topic is still relevant and I would like the new GEN 3 shell to work with domoticz like the first versions 2.5 did.
Ponieważ węzeł RED komunikuje się również z tym samym brokerem MQTT, wszystkie węzły MQTT, zarówno węzły wejściowe MQTT, jak i węzły wyjściowe MQTT powinny być również skonfigurowane z adresem brokerów MQTT, 192.168.0.40

Domoticz i Shelly nie komunikują się bezpośrednio, technicznie rzecz biorąc, nie wiedzą o swoim istnieniu.

Masz częściowo szczęście, że twoje węzły MQTT Node RED, oznaczone jako "IP Domoticz" komunikują się z MQTT Mosquitto, jak wspomniano wcześniej, mają ten sam adres IP, ponieważ działają na tym samym sprzęcie.
Jednak węzły MQTT oznaczone jako "IP Shelly" ulegną awarii, ponieważ używają adresu IP Shelly, który nie jest brokerem MQTT.
Now I understand a bit how it works and why the IP address is the same
I noticed also that you switched again to the Shelly nodes in Domoticz.

I think, you should make a choice.
Yes, but only temporarily so that the shutter works with Domoticz. I would like it to work briefly via MQTT.
Węzły Shelly korzystają z interfejsu API Shelly Cloud, podczas gdy z MQTT masz komunikację lokalną.
I would like it to work locally via MQTT
E.g. See your screenshot, dated 15 Apr 2025, 12:50 .
Did you test the button, marked pos,50? And if so, did it work?
This is how I tested this button pos 50 - in Domoticz no reaction. The slider was NOT set to position 50.
That looks typical, that something is reversed, but unclear, if this was before or after, you modified the configuration of the Domoticz switch.
This is exactly what it looks like when something is reversed.

I tried to change it in the switch settings in domoticz but always some parameter works the other way around.

Currently on shelly nodes it works correctly.
That looks typical, that something is reversed, but unclear, if this was before or after, you modified the configuration of the Domoticz switch.
If I change the settings in the switch, the effect is the opposite - the roller blind moves correctly, but again the buttons in the domoticz button work the other way around - the one that indicates raising lowers the roller blind and the one that indicates lowering raises the roller blind.
User avatar
FireWizard
Posts: 1887
Joined: Tuesday 25 December 2018 12:11
Target OS: Raspberry Pi / ODroid
Domoticz version: Beta
Location: Voorthuizen (NL)
Contact:

Re: Is it possible to add Shelly 2PM GEN 3 to Domoticz?

Post by FireWizard »

Hello @Daro1003,

You wrote:
Sorry but I didn't have time to work on this topic last week. The topic is still relevant and I would like the new GEN 3 shell to work with domoticz like the first versions 2.5 did.
Don't worry. It is your project, not mine, and so you have to nfind the right time to work on it.

Because we have to use the same starting point, can you tell or show me exactly how the configuration of the Domoticz switch looks like?

Reverse Open/Close state?
Reverse Position?

Regards
Daro1003
Posts: 181
Joined: Monday 14 November 2022 12:46
Target OS: Raspberry Pi / ODroid
Domoticz version: 2023.1
Location: Poland
Contact:

Re: Is it possible to add Shelly 2PM GEN 3 to Domoticz?

Post by Daro1003 »

OtwarteOpcjhe.png
OtwarteOpcjhe.png (16.74 KiB) Viewed 632 times
Otwarte.png
Otwarte.png (14.25 KiB) Viewed 632 times
So here it is:
ROLLER SHUTTER IN OPEN POSITION.
In the above configuration:
1. The top buttons work correctly, raising the roller blind
2. The bottom button works correctly, lowering the roller blind
3. The slider indicates the OPEN position - ok

If I click the slider at 25%, the roller blind should cover the window by 25%, while the roller blind covers the window by 75%

If I click on 75% on the slider, the roller blind covers the window by 25%
4. The inscription indicating the roller blind position works in reverse. So currently the roller blind is OPEN, but there is an inscription that it is CLOSED.
If the roller blind is closed, the inscription will be that it is OPEN.
Daro1003
Posts: 181
Joined: Monday 14 November 2022 12:46
Target OS: Raspberry Pi / ODroid
Domoticz version: 2023.1
Location: Poland
Contact:

Re: Is it possible to add Shelly 2PM GEN 3 to Domoticz?

Post by Daro1003 »

OtwarteOpcje2.png
OtwarteOpcje2.png (15.13 KiB) Viewed 629 times
OTWARTA2.png
OTWARTA2.png (14.04 KiB) Viewed 629 times
Case 2:
ROLLER SHUTTER IN OPEN POSITION.
In the above configuration:
1. The top buttons work correctly, raising the roller shutter - ok
2. The bottom button works correctly, lowering the roller shutter - ok
3. The slider indicates the CLOSED position - wrong - false
If I click the slider at 25%, it sets correctly and covers 25% of the window. If I set the slider to 75%, the roller shutter covers 75% of the window correctly. The slider is incorrectly indicated in the closed/open position.

4. The inscription indicating the roller shutter position works the other way around. So currently the roller shutter is OPEN, but there is an inscription that it is CLOSED.
If the roller shutter is closed, the inscription will be that it is OPEN.
Daro1003
Posts: 181
Joined: Monday 14 November 2022 12:46
Target OS: Raspberry Pi / ODroid
Domoticz version: 2023.1
Location: Poland
Contact:

Re: Is it possible to add Shelly 2PM GEN 3 to Domoticz?

Post by Daro1003 »

OPCJE3.png
OPCJE3.png (16.02 KiB) Viewed 628 times
OTWARTE3.png
OTWARTE3.png (14.22 KiB) Viewed 628 times
Case 3:
ROLLER SHUTTER IN OPEN POSITION.
In the above configuration:
1. Top buttons work incorrectly lower the roller shutter
2. Bottom button works incorrectly raises the roller shutter
3. Slider - as above
4. Inscription - position indicator works correctly shows correctly OPEN
Daro1003
Posts: 181
Joined: Monday 14 November 2022 12:46
Target OS: Raspberry Pi / ODroid
Domoticz version: 2023.1
Location: Poland
Contact:

Re: Is it possible to add Shelly 2PM GEN 3 to Domoticz?

Post by Daro1003 »

In each of the above cases, the slider does not indicate the position if I change the position with the local button on the wall next to the window.
User avatar
FireWizard
Posts: 1887
Joined: Tuesday 25 December 2018 12:11
Target OS: Raspberry Pi / ODroid
Domoticz version: Beta
Location: Voorthuizen (NL)
Contact:

Re: Is it possible to add Shelly 2PM GEN 3 to Domoticz?

Post by FireWizard »

Hello @Daro1003,

From your 3 previous posts I conclude:

1. The UP and DOWN buttons work correct, if the Reverse Open/Close State checkbox is NOT checked.

2 in all cases the slider position does not match with the text.
What Domoticz version do you use?

Can you confirm?

Did you do the test with the Shelly nodes or with MQTT?

Regards
Daro1003
Posts: 181
Joined: Monday 14 November 2022 12:46
Target OS: Raspberry Pi / ODroid
Domoticz version: 2023.1
Location: Poland
Contact:

Re: Is it possible to add Shelly 2PM GEN 3 to Domoticz?

Post by Daro1003 »

1. The UP and DOWN buttons work correct, if the Reverse Open/Close State checkbox is NOT checked.
YES
2 in all cases the slider position does not match with the text.
YES
What Domoticz version do you use?
WersjaDomoticz.png
WersjaDomoticz.png (14.62 KiB) Viewed 615 times
Did you do the test with the Shelly nodes or with MQTT?
1. I performed tests with MQTT nodes:
WezłyMQTT.png
WezłyMQTT.png (40.81 KiB) Viewed 615 times
2. With shelly nodes the domoticz button works properly.
User avatar
FireWizard
Posts: 1887
Joined: Tuesday 25 December 2018 12:11
Target OS: Raspberry Pi / ODroid
Domoticz version: Beta
Location: Voorthuizen (NL)
Contact:

Re: Is it possible to add Shelly 2PM GEN 3 to Domoticz?

Post by FireWizard »

Hello @Daro9,

There is one thing more, we should agree on.

If we click the most left button, we see a short pop-up, indicating "Switching Open" and if we click the right button, we see a pop-up, showing "Switching Close". This alright..

In your first example, no check boxes are ticked. In case of an "Open" Blind , the slider is fully right.
So in fact indicating 100% Open. In case of a "Closed" Blind, the slider is fully left, indicating 0% Open (equal to 100% Closed)

Is that also your way you consider the slider indication?
So moving from left to right, do you read that as moving from 0% Open (fully Closed) to 100% Open.?

Or is your way of thinking the other way around?
So if you move the slider from left to right, do you read that as 0% Closed (fully Open) to 100% Closed?

Do not look to the behavior of your Blinds. We make that later. First, I want to select the configuration of the switch in Domoticz.

Regards.
Daro1003
Posts: 181
Joined: Monday 14 November 2022 12:46
Target OS: Raspberry Pi / ODroid
Domoticz version: 2023.1
Location: Poland
Contact:

Re: Is it possible to add Shelly 2PM GEN 3 to Domoticz?

Post by Daro1003 »

So I would like it to work like in the shelly 2.5 model:

Roller shutter open:
shelly2,5OPEN.png
shelly2,5OPEN.png (11.37 KiB) Viewed 596 times


Roller shutter closed:
shelly2,5Closed.png
shelly2,5Closed.png (11.71 KiB) Viewed 596 times
Shelly model 2.5 roller shutter switch settings:
OptionsShelly2,5.png
OptionsShelly2,5.png (15.33 KiB) Viewed 596 times
I think it would be good to build an action so that none of the above switch options need to be checked.
Or is your way of thinking the other way around?
So if you move the slider from left to right, do you read that as 0% Closed (fully Open) to 100% Closed?
YES.
I would like it to work exactly as you write and as I showed in the above pictures which are responsible for shelly 2.5

For me:
Position 0% is fully OPEN
Position 100% is fully CLOSED
Position 25% is a window covered by 25% - 1/4 covered window.
User avatar
FireWizard
Posts: 1887
Joined: Tuesday 25 December 2018 12:11
Target OS: Raspberry Pi / ODroid
Domoticz version: Beta
Location: Voorthuizen (NL)
Contact:

Re: Is it possible to add Shelly 2PM GEN 3 to Domoticz?

Post by FireWizard »

Hello @Daro1003,

You wrote:
For me:
Position 0% is fully OPEN
Position 100% is fully CLOSED
Position 25% is a window covered by 25% - 1/4 covered window.
This means that you have to tick the box marked Reverse Position:

I will work with a virtual swich with this configuration.

B.t.w.

It is probably a good idea to upgrade from 2024.7 to 20025.1, before you get issues with libssl 3

Regards
User avatar
FireWizard
Posts: 1887
Joined: Tuesday 25 December 2018 12:11
Target OS: Raspberry Pi / ODroid
Domoticz version: Beta
Location: Voorthuizen (NL)
Contact:

Re: Is it possible to add Shelly 2PM GEN 3 to Domoticz?

Post by FireWizard »

Hello @Daro1003,,,

I configured a (virtual) Domoticz Switch (Blinds Percentage) as follows:

Screenshot_Shelly_Blinds_Percentage.png
Screenshot_Shelly_Blinds_Percentage.png (44.54 KiB) Viewed 571 times

This switch is configured as below (Press "Edit")

Screenshot_Shelly_Blinds_percentage_Config.png
Screenshot_Shelly_Blinds_percentage_Config.png (169.59 KiB) Viewed 571 times

The box, marked "Reverse Position" has been ticked!

I created 2 "streams", as follows:

Screenshot_Shelly_flow_.png
Screenshot_Shelly_flow_.png (36.36 KiB) Viewed 571 times
You have to configure 2 nodes yourself

1. In the first stream, you have to configure the relationship between the Domoticz Switch index and the Shelly Client ID.
Open that "Change"node and edit the fields. a description is included in the "Comment" node, called "Configuration"
This has to done once for all "Blinds Percentage" Switches.


2. As always, you have to configure the "MQTT configuration" node, so that it matches with your MQTT broker.
Probably the same as your Domoticz IP address.

The second stream is only the communication from Domoticz to the Shelly.

If your configuration is correct, it should work.
Please operate your Domoticz Switch and test your Blinds with the Shelly.

Let me know.

Regards
Daro1003
Posts: 181
Joined: Monday 14 November 2022 12:46
Target OS: Raspberry Pi / ODroid
Domoticz version: 2023.1
Location: Poland
Contact:

Re: Is it possible to add Shelly 2PM GEN 3 to Domoticz?

Post by Daro1003 »

Delete.png
Delete.png (48.95 KiB) Viewed 565 times
Do I understand correctly that it is enough to remove the last part of this flow?

Is there anything else I need to configure? If so, can I ask you for the import code?
It is probably a good idea to upgrade from 2024.7 to 20025.1
Of course I will just make an SSD copy.
Was anything done about blinds in this update?
before you get issues with libssl 3
What problems can occur??
User avatar
FireWizard
Posts: 1887
Joined: Tuesday 25 December 2018 12:11
Target OS: Raspberry Pi / ODroid
Domoticz version: Beta
Location: Voorthuizen (NL)
Contact:

Re: Is it possible to add Shelly 2PM GEN 3 to Domoticz?

Post by FireWizard »

Hello @Daro1003,
Do I understand correctly that it is enough to remove the last part of this flow?
No, you can remove everything.

I created a complete new flow, but forgot to add it to my post. Sorry for that.
But here it is.

Code: Select all

[
    {
        "id": "589aa1f8113f3797",
        "type": "tab",
        "label": "Shelly 2PM Gen 3",
        "disabled": false,
        "info": "",
        "env": []
    },
    {
        "id": "f49c37551869bd17",
        "type": "change",
        "z": "589aa1f8113f3797",
        "name": "Set Domoticz IDX ",
        "rules": [
            {
                "t": "set",
                "p": "IDX12",
                "pt": "flow",
                "to": "shelly2pmg3-34cdb0774d4c",
                "tot": "str"
            }
        ],
        "action": "",
        "property": "",
        "from": "",
        "to": "",
        "reg": false,
        "x": 510,
        "y": 160,
        "wires": [
            []
        ]
    },
    {
        "id": "9bae703c8d2a21f6",
        "type": "inject",
        "z": "589aa1f8113f3797",
        "name": "Inject Domoticz IDX",
        "props": [],
        "repeat": "",
        "crontab": "",
        "once": true,
        "onceDelay": 0.1,
        "topic": "",
        "x": 260,
        "y": 160,
        "wires": [
            [
                "f49c37551869bd17"
            ]
        ]
    },
    {
        "id": "438945919eb0f319",
        "type": "comment",
        "z": "589aa1f8113f3797",
        "name": "Configuration",
        "info": "Insert the Domoticz Idx of the \nBlinds Percentage Switch in the field\nflow, starting with IDX.\n\nExample: The Domoticz Idx number = 12.\nFlow variable is IDX12.\n\nInsert the Shelly Client IDX\nas string after \"to the value\".\n\nExample: shelly2pmg3-34cdb0774d4c",
        "x": 490,
        "y": 100,
        "wires": []
    },
    {
        "id": "5f6a604495a17c3b",
        "type": "mqtt in",
        "z": "589aa1f8113f3797",
        "name": "Domoticz Out",
        "topic": "domoticz/out",
        "qos": "2",
        "datatype": "auto-detect",
        "broker": "38b35487299a036d",
        "nl": false,
        "rap": true,
        "rh": 0,
        "inputs": 0,
        "x": 210,
        "y": 380,
        "wires": [
            [
                "f066f8205567a5a7"
            ]
        ]
    },
    {
        "id": "f066f8205567a5a7",
        "type": "switch",
        "z": "589aa1f8113f3797",
        "name": "Filter Domoticz switchType",
        "property": "payload.switchType",
        "propertyType": "msg",
        "rules": [
            {
                "t": "eq",
                "v": "Blinds Percentage",
                "vt": "str"
            }
        ],
        "checkall": "true",
        "repair": false,
        "outputs": 1,
        "x": 460,
        "y": 380,
        "wires": [
            [
                "3940013d84a6f7bf",
                "b9a4f7de1b6e13a5"
            ]
        ]
    },
    {
        "id": "3940013d84a6f7bf",
        "type": "function",
        "z": "589aa1f8113f3797",
        "name": "Blinds + Percentage ",
        "func": "// Function Blinds and Percentage\n\nmsg.topic = flow.get (\"IDX\" + msg.payload.idx.toString()) + \"/command/cover:0\";\nmsg.idx = msg.payload.idx;\n\n//Closed\nif (msg.payload.nvalue === 0) { msg.payload = \"close\" };\n\n//Open\nif (msg.payload.nvalue === 1) { msg.payload = \"open\" };\n\n//Percentage\nif (msg.payload.nvalue === 2) { msg.payload = \"pos,\" + (100 - msg.payload.Level).toString() };\n\nreturn msg;",
        "outputs": 1,
        "timeout": 0,
        "noerr": 0,
        "initialize": "",
        "finalize": "",
        "libs": [],
        "x": 740,
        "y": 380,
        "wires": [
            [
                "1ada67753bbe5e55",
                "3fdc4c4fc5c91b17"
            ]
        ]
    },
    {
        "id": "1ada67753bbe5e55",
        "type": "debug",
        "z": "589aa1f8113f3797",
        "name": "debug 27",
        "active": true,
        "tosidebar": true,
        "console": false,
        "tostatus": false,
        "complete": "false",
        "statusVal": "",
        "statusType": "auto",
        "x": 960,
        "y": 340,
        "wires": []
    },
    {
        "id": "3fdc4c4fc5c91b17",
        "type": "mqtt out",
        "z": "589aa1f8113f3797",
        "name": "Shelly Cover Command Out",
        "topic": "",
        "qos": "1",
        "retain": "false",
        "respTopic": "",
        "contentType": "",
        "userProps": "",
        "correl": "",
        "expiry": "",
        "broker": "7aff5cd755ba2941",
        "x": 1020,
        "y": 380,
        "wires": []
    },
    {
        "id": "b9a4f7de1b6e13a5",
        "type": "debug",
        "z": "589aa1f8113f3797",
        "name": "debug 33",
        "active": true,
        "tosidebar": true,
        "console": false,
        "tostatus": false,
        "complete": "false",
        "statusVal": "",
        "statusType": "auto",
        "x": 700,
        "y": 340,
        "wires": []
    },
    {
        "id": "8cf928ab95a35b2e",
        "type": "comment",
        "z": "589aa1f8113f3797",
        "name": " Domotcz Switch ====> Shelly",
        "info": "",
        "x": 540,
        "y": 260,
        "wires": []
    },
    {
        "id": "38b35487299a036d",
        "type": "mqtt-broker",
        "name": "Raspberry Pi 1",
        "broker": "192.168.10.51",
        "port": "1883",
        "clientid": "",
        "autoConnect": true,
        "usetls": false,
        "protocolVersion": "4",
        "keepalive": "60",
        "cleansession": true,
        "autoUnsubscribe": true,
        "birthTopic": "",
        "birthQos": "0",
        "birthPayload": "",
        "birthMsg": {},
        "closeTopic": "",
        "closeQos": "0",
        "closePayload": "",
        "closeMsg": {},
        "willTopic": "",
        "willQos": "0",
        "willPayload": "",
        "willMsg": {},
        "userProps": "",
        "sessionExpiry": ""
    },
    {
        "id": "7aff5cd755ba2941",
        "type": "mqtt-broker",
        "name": "Jonas_MQTT_Server",
        "broker": "mqtt.jonasnet.nl",
        "port": "1883",
        "clientid": "",
        "autoConnect": true,
        "usetls": false,
        "protocolVersion": "4",
        "keepalive": "60",
        "cleansession": true,
        "autoUnsubscribe": true,
        "birthTopic": "",
        "birthQos": "0",
        "birthPayload": "",
        "birthMsg": {},
        "closeTopic": "",
        "closeQos": "0",
        "closePayload": "",
        "closeMsg": {},
        "willTopic": "",
        "willQos": "0",
        "willPayload": "",
        "willMsg": {},
        "userProps": "",
        "sessionExpiry": ""
    }
]
Is there anything else I need to configure? If so, can I ask you for the import code?
In this new flow their are only 2 things, you should configure.

1. The MQTT broker settings (IP address) in the MQTT Configuration node.
2. Relation between the IDX of the Domoticz Switch and the Shelly Client ID in the "Change" node, called "Set Domoticz IDX"
Was anything done about blinds in this update?
Not as far as I know.
What problems can occur??
See: viewtopic.php?f=3&t=43485

This is off-topic.
I do not know which version of Rasbian (Raspberry Pi OS) you run, but older versions, like Buster or Bullseye, use libssl 1.1, while Bookworm uses
libssl 3. As you can read, they are not compatible. This means that, as soon as a new release is out (e.g. 2025.2 or later), you have to upgrade to Bookworm.
From 14-05-2025, new beta's and so also newer stables will use libssl3 and so will run only on Bookworm. You are forced to upgrade!!.
If you do not want that (yet), upgrade now to the latest version, that uses libssl 1.1.

Regards
Daro1003
Posts: 181
Joined: Monday 14 November 2022 12:46
Target OS: Raspberry Pi / ODroid
Domoticz version: 2023.1
Location: Poland
Contact:

Re: Is it possible to add Shelly 2PM GEN 3 to Domoticz?

Post by Daro1003 »

Hello
We are getting close to getting it working correctly but some flow correction is still required.

The up button works correctly.
The down button works correctly.
OPEN-ok.png
OPEN-ok.png (11.14 KiB) Viewed 552 times
CLOSED-ok.png
CLOSED-ok.png (11.82 KiB) Viewed 552 times
The inscription indicating the closed shutter status is correct.
The slider indicating the open shutter status is correct.

1. The error is incorrect state in case of %% roller blind setting.
A roller blind set to 85% in Domoticz covers 15% of the window surface.
So it works the other way around:
Error incorrect status.png
Error incorrect status.png (12.24 KiB) Viewed 552 times
In the picture the strip is at 85% position and the blind covers the window by 15%.
Please fix this.

2. If I change the roller shutter position using the local buttons next to the window - the slider does not change - it does not update the roller shutter status.
User avatar
FireWizard
Posts: 1887
Joined: Tuesday 25 December 2018 12:11
Target OS: Raspberry Pi / ODroid
Domoticz version: Beta
Location: Voorthuizen (NL)
Contact:

Re: Is it possible to add Shelly 2PM GEN 3 to Domoticz?

Post by FireWizard »

Hello @Daro1003,
In the picture the strip is at 85% position and the blind covers the window by 15%.
Please fix this.
Could you remove the "Function" node, called "Blinds + Percentage" and replace it with this new "Function" node?

Code: Select all

[
    {
        "id": "3940013d84a6f7bf",
        "type": "function",
        "z": "589aa1f8113f3797",
        "name": "Blinds + Percentage ",
        "func": "// Function Blinds and Percentage\n\nmsg.topic = flow.get (\"IDX\" + msg.payload.idx.toString()) + \"/command/cover:0\";\nmsg.idx = msg.payload.idx;\n\n//Closed\nif (msg.payload.nvalue === 0) { msg.payload = \"close\" };\n\n//Open\nif (msg.payload.nvalue === 1) { msg.payload = \"open\" };\n\n//Percentage\nif (msg.payload.nvalue === 2) { msg.payload = \"pos,\" + msg.payload.Level.toString() };\n\nreturn msg;",
        "outputs": 1,
        "timeout": 0,
        "noerr": 0,
        "initialize": "",
        "finalize": "",
        "libs": [],
        "x": 740,
        "y": 380,
        "wires": [
            [
                "1ada67753bbe5e55",
                "3fdc4c4fc5c91b17"
            ]
        ]
    }
]
And test again and let me know.
2. If I change the roller shutter position using the local buttons next to the window - the slider does not change - it does not update the roller shutter status.
That has not been implemented, yet. I will do that, as soon as the Domoticz switch to the Shelly is implemented.

So, if this works, can you show me the debug output of the following flow, in all positions )Open. Close and a slider position)
Then I can implement that.

Code: Select all

[
    {
        "id": "6ff6a2f5bedf6c35",
        "type": "mqtt in",
        "z": "f55ebfe97fab5883",
        "name": "Cover Status Input",
        "topic": "shelly2pmg3-34cdb0774d4c/status/cover:0",
        "qos": "1",
        "datatype": "auto-detect",
        "broker": "7aff5cd755ba2941",
        "nl": false,
        "rap": true,
        "rh": 0,
        "inputs": 0,
        "x": 270,
        "y": 1460,
        "wires": [
            [
                "0598d34c5f7cd895"
            ]
        ]
    },
    {
        "id": "0598d34c5f7cd895",
        "type": "debug",
        "z": "f55ebfe97fab5883",
        "name": "debug 23",
        "active": true,
        "tosidebar": true,
        "console": false,
        "tostatus": false,
        "complete": "false",
        "statusVal": "",
        "statusType": "auto",
        "x": 520,
        "y": 1460,
        "wires": []
    },
    {
        "id": "7aff5cd755ba2941",
        "type": "mqtt-broker",
        "name": "Jonas_MQTT_Server",
        "broker": "mqtt.jonasnet.nl",
        "port": "1883",
        "clientid": "",
        "autoConnect": true,
        "usetls": false,
        "protocolVersion": "4",
        "keepalive": "60",
        "cleansession": true,
        "autoUnsubscribe": true,
        "birthTopic": "",
        "birthQos": "0",
        "birthPayload": "",
        "birthMsg": {},
        "closeTopic": "",
        "closeQos": "0",
        "closePayload": "",
        "closeMsg": {},
        "willTopic": "",
        "willQos": "0",
        "willPayload": "",
        "willMsg": {},
        "userProps": "",
        "sessionExpiry": ""
    }
]
Do not forget to configure your own MQTT broker,

Regards
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest