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

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

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

Post by Daro1003 »

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

According to this manual it is not possible to add: https://www.youtube.com/watch?v=3PvYhFIsVN4
Does anyone know a way?

Or can someone suggest how to control the blinds using another controller so that it would control %% blinds in domoticz
Last edited by Daro1003 on Sunday 30 March 2025 12:29, edited 1 time in total.
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 2.5 GEN 3 to Domoticz?

Post by FireWizard »

Hi @Daro1003,
Is it possible to add Shelly 2.5 GEN 3 to Domoticz?
Does anyone know a way?

Or can someone suggest how to control the blinds using another controller so that it would control %% blinds in domoticz
Of course.

Shelly (any device) ==> MQTT ==> Node-Red ==> MQTT ==> Domoticz (or Node-Red ==> Http ==> 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 2.5 GEN 3 to Domoticz?

Post by Daro1003 »

Can you help build flows from shelly to NodeRed and to domoticz?
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 2.5 GEN 3 to Domoticz?

Post by FireWizard »

Sure, we can try.

Have you NR installed and working?
And the Mosquitto MQTT server?

If you can test the flow, I think I can build one

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 2.5 GEN 3 to Domoticz?

Post by Daro1003 »

NodeRed installed and working.

Mosquitto MQTT server is also working.

NodeRed to Domoticz flows from you are also working.
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 2.5 GEN 3 to Domoticz?

Post by FireWizard »

Hi @Daro1003,

Are you sure your product is a Shelly 2.5 Gen 3 and not a Shelly 2 Gen 3, as I cannot find the product in the Shelly list?

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 2.5 GEN 3 to Domoticz?

Post by Daro1003 »

You are right this product is shelly 2PM GEN 3.
I've already changed the description because I misspelled the designation.
Attachments
2GEN3.jpg
2GEN3.jpg (23.81 KiB) Viewed 2404 times
2GEN33.jpg
2GEN33.jpg (26.7 KiB) Viewed 2405 times
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 »

Ok Nice,

I will come back with a first flow, probably tomorrow.

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 »

great, I'm waiting.

I installed additional nodes related to shelly but GEN 3 is missing.

Is it possible to control the roller blinds by percentage in Domoticz?
Attachments
nodyShelly.png
nodyShelly.png (14.61 KiB) Viewed 2348 times
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 »

Hi @Daro1003,

You can use these nodes and Gen 3 exists as well.
What do you think of shelly gen 2+?
These nodes can be used or the default MQTT nodes.

What do you prefer?
Is it possible to control the roller blinds by percentage in Domoticz?
I think so. It is specific for roller blinds?

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 »

Where can I find a shelly GEN 3 node?

I don't have a shelly GEN 2, I bought a newer shelly GEN 3 model because I read online that the GEN 2 models also have a similar problem with temperature as the shelly 2.5.

I currently use percentage control of the blinds with the shelly 2.5 controller because the blinds are set at different times of the day in different positions.
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 did not say Gen 2, but I said Gen 2+.

This node is used for everything higher or equal than Gen 2.
Gen 3 and Gen 4 use the same protocol as Gen 2 and so the same node is used

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,

Currently I'm looking to a possible Node RED flow for your Shelly 2PM gen 3 device.

As I do not have such a device and you should maintain a possible flow in the future, you have to make a decision on how we make it.

1. As you said, that you want to control blinds, you need to use the device in "Cover" mode.
2. Do you want to use the default MQTT node or do you prefer one of the Node-RED contrib node.
If you prefer the contrib node can you configure shelly gen 2+ node and try, if you get a connection.
Double click on the node and insert the hostname or IP address of the Shelly device and select the correct Device Type.
Connect Insert node to the input and a Debug node to the output.

Screenshot_Shelly2PM-1.png
Screenshot_Shelly2PM-1.png (10.5 KiB) Viewed 2243 times

Check, that the Shelly node shows connected and check the debug node, if you push the Inject node.

If you prefer the default MQTT node, I like to know your MQTT configuration of the Shelly device (without credentials)

What type of switches you want to use in Domotiocz (Selector switch? Dimmer?)
And what type of sensor you like to show?

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 see, that you have installed several Shelly nodes.

If you decide not to use MQTT but the contrib Shelly node (https://flows.nodered.org/node/node-red-contrib-shelly), you can leave this node in your palette.

You have also installed https://flows.nodered.org/node/@zebraja ... shelly-3em.
I recommend to remove this one, as it may cause a conflict with the other one and the other one also supports the Shelly 3EM and you do not need support for it now.

You have also installed https://flows.nodered.org/node/node-red ... helly-mqtt. Also that one is not needed.
If you decide to go for MQTT, then we can use the default MQTT nodes. So remove it.

Also another Shelly Pro 3EM node has been installed. Remove that one as well. It is not needed, may cause conflicts and is already supported by the first one.

I looked a little bit to your device and its possibilities.
I found an example, which support the first set of nodes.

See:
https://raw.githubusercontent.com/windk ... rplus.json

Can you import this one and test with your device?

I like to know if this example works.

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 »

I have removed the nodes you indicated.
Which ones should I remove? The ones in the image remain.

How can I import this https://raw.githubusercontent.com/windk ... rplus.json
import it? How do I do that??
Attachments
Zrzut ekranu 2025-04-01 202458.png
Zrzut ekranu 2025-04-01 202458.png (7.67 KiB) Viewed 2113 times
Last edited by Daro1003 on Tuesday 01 April 2025 20:25, edited 1 time in total.
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 »

With the settings as in the attached image I managed to get a connection with my shelly.

As for the type of connection I have no idea which one to choose I rely on you.
Attachments
Zrzut ekranu 2025-04-01 202400.png
Zrzut ekranu 2025-04-01 202400.png (47.13 KiB) Viewed 2114 times
ustawienie ok1.png
ustawienie ok1.png (70.67 KiB) Viewed 2116 times
Zrzut ekranu 2025-04-01 201710.png
Zrzut ekranu 2025-04-01 201710.png (10.63 KiB) Viewed 2116 times
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 »

Good evening @Daro1003,
With the settings as in the attached image I managed to get a connection with my shelly.
Nice, that means everything is online.
As for the type of connection I have no idea which one to choose I rely on you.
Okay then we go for this node, configured as Shelly 2PM GEN3 (Relay S3SW-002P16EU), as we know that this node works.
I have removed the nodes you indicated.
Which ones should I remove? The ones in the image remain.
That is okay.
How can I import this https://raw.githubusercontent.com/windk ... rplus.json
import it? How do I do that??
1, Go to the link as indicated
2. Select everything (CTRL A).
3. Copy (CTRL C or right mouse button and "Copy") and the code is saved to the clipboard.
4. Go to the "Hamburger" menu in Node-RED and select "Import".
5. The window "Import nodes" will open.
6. Paste the contents of the clipboard (CTRL V or right mouse button and "Paste") and Import the flow.

Test it, if this works for you.

And
What type of switches you want to use in Domotiocz (Selector switch? Dimmer?)
And what type of sensor you like to show?
Can you also answer these questions?

Regards
kimot
Posts: 105
Joined: Saturday 25 November 2017 17:18
Target OS: Raspberry Pi / ODroid
Domoticz version: v3.8153
Location: Czech Rep.
Contact:

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

Post by kimot »

I think, this Shelly suports scripting.
So why all this mqtt and node red?
Switching on and off works by direct call from Domoticz like all older ones.
And Shelly can send measured values ​​directly to Domoticz using a script running on it.

For example here is a part of my code for sending amount of energy in the last minute on my PlusPlugS.

Code: Select all

Shelly.addStatusHandler(function (event, user_data) {
  print(JSON.stringify(event));
  
   if (typeof event.delta.aenergy !== "undefined") {
    if (startMonitor) {
      print(eAccumulator_prev);
      minute_energy = event.delta.aenergy.by_minute[0];
      eAccumulator = event.delta.aenergy.total;
      // power = event.delta.apower;
      total = event.energy
      power = event.apower;
      print(eAccumulator);
      eDiff = eAccumulator - eAccumulator_prev;
      print(eDiff);
      print(minute_energy);
      minute_energy = Math.round(minute_energy);
      print(minute_energy);
       url = "http://192.168.1.2:8080/json.htm?type=command&param=udevice&idx=152&nvalue=0&svalue="+minute_energy;
      print(url);
      print(eAccumulator);  
      Shelly.call(
  "HTTP.GET", {
    "url": url,
  },
RPi2 Domoticz v 4.10717
10 x Sonoff Basic - ESPeasy
1 x Wemos D1 - ESPeasy
1 x Shelly Plus Plug S
1 x Sonoff S26 - ESPeasy
1 x Shelly 1
1 x MySensors HC-SR04
1 x MySenosrs wifi gateway
1 x RFLink
4x Cam IPC-T240H
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 »

Hell #kimot,

You wrote:
I think, this Shelly supports scripting.
You are right. All Gen 2, Gen 3 and Gen 4 support scripting.
Shelly offers even a training course to learn the script language.

See: https://shelly.guide/scripting/ and https://github.com/ShellyUSA/Scripts
Course: https://shelly.academy/trainings/13/she ... pring-2025
So why all this mqtt and node red?
At the end it is all to the user to decide, which route he/she wish to follow in order to reach his/her goal

This user has already a MQTT broker and also Node-RED up and running.
I supported him in another project in the past with MQTT and Node-RED.

If you have it up and running and you are familiar with it, it is probably easier than scripting.
It is just JSON and that is also a scripting language.and the same as your script.
And Shelly can send measured values ​​directly to Domoticz using a script running on it.
For example here is a part of my code for sending amount of energy in the last minute on my PlusPlugS.
Thank you, although I probably will not use it, but others may benefit from it.

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 colleagues.

Due to work, I have little time to work at home, but we continue working.

I managed to import the code from the link and I got a working flow. If I click on open or close in NodeRed, it clicks the relay in shelly. So communication with NodeRed works with shelly. Now we need to pass it to Domoticz.

In Domoticz, I would like a switch type with a slider and a precent indicator as in the picture. I also use this type in Dashticz. It controls the blinds using the blinds setting in a given position thanks to the switch with %
Attachments
ClikClik.png
ClikClik.png (62.97 KiB) Viewed 1325 times
czujnik i Domoticz.png
czujnik i Domoticz.png (42.91 KiB) Viewed 1325 times
Zrzut ekranu 2025-04-07 073515.png
Zrzut ekranu 2025-04-07 073515.png (82.2 KiB) Viewed 1325 times
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest