# Get data from Shelly EM Array

**URL:** <https://discourse.nodered.org/t/get-data-from-shelly-em-array/77394>\
**Category:** General\
**Tags:** node-red-dashboard\
**Created:** [9 April 2023 20:56 UTC](https://discourse.nodered.org/t/get-data-from-shelly-em-array/77394 "2023-04-09T20:56:17Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![n1k0nx](https://avatars.discourse-cdn.com/v4/letter/n/439d5e/32.png) [@n1k0nx](https://discourse.nodered.org/u/n1k0nx)\
**Post date:** [9 April 2023 20:56 UTC](https://discourse.nodered.org/t/get-data-from-shelly-em-array/77394/1 "2023-04-09T20:56:17Z")

</div>

Dears, Im in trubble with a simple thing.. I need to extract one value from Shelly EM array. I get this values and I need only one for process into a Nodered and manage a PV inverter

![Immagine 2023-04-09 225428](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/1/6/1642fca918725b7b86033f9679e7846e4f858212.jpeg)

the value I need is: payload.emeters[0].power

I need to substract with another value and give commands to the battery MPPT charger  
Thank you in advance  
luca

---

<div class="post-metadata">

**Author:** ![TotallyInformation](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/totallyinformation/32/31_2.png) [@TotallyInformation](https://discourse.nodered.org/u/TotallyInformation)\
**Post date:** [9 April 2023 20:57 UTC](https://discourse.nodered.org/t/get-data-from-shelly-em-array/77394/2 "2023-04-09T20:57:05Z")

</div>

Changed category as you are not creating new custom nodes.

---

<div class="post-metadata">

**Author:** ![Colin](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/colin/32/17040_2.png) [@Colin](https://discourse.nodered.org/u/Colin)\
**Post date:** [10 April 2023 08:15 UTC](https://discourse.nodered.org/t/get-data-from-shelly-em-array/77394/3 "2023-04-10T08:15:42Z")

</div>

> [@n1k0nx](#):
>
> the value I need is: payload.emeters[0].power

That looks correct though the full address is msg.payload.emeters[0].power. What isn't working for you?

---

<div class="post-metadata">

**Author:** ![n1k0nx](https://avatars.discourse-cdn.com/v4/letter/n/439d5e/32.png) [@n1k0nx](https://discourse.nodered.org/u/n1k0nx)\
**Post date:** [10 April 2023 09:51 UTC](https://discourse.nodered.org/t/get-data-from-shelly-em-array/77394/4 "2023-04-10T09:51:06Z")

</div>

Hi Colin  
Thank you for your reply! Yes is correct but i can’t take the single value to do a sum math. I would use the value for give commads to my mppt controller..  
Thankyou and happy Easter to you and every one!!  
luca

---

<div class="post-metadata">

**Author:** ![Colin](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/colin/32/17040_2.png) [@Colin](https://discourse.nodered.org/u/Colin)\
**Post date:** [10 April 2023 10:16 UTC](https://discourse.nodered.org/t/get-data-from-shelly-em-array/77394/5 "2023-04-10T10:16:14Z")

</div>

You can do the maths in a function node. Show us what you have tried. We only need to see the function node.

---

<div class="post-metadata">

**Author:** ![n1k0nx](https://avatars.discourse-cdn.com/v4/letter/n/439d5e/32.png) [@n1k0nx](https://discourse.nodered.org/u/n1k0nx)\
**Post date:** [10 April 2023 18:48 UTC](https://discourse.nodered.org/t/get-data-from-shelly-em-array/77394/6 "2023-04-10T18:48:30Z")

</div>

Hello,  
I try to copy here the clip  
[flows.json](https://discourse.nodered.org/uploads/short-url/3Y1QMCkvsfP2g4fLC3WG2FRUxRI.json) (5.2 KB)

Sorry I'm totally noob

 ![Immagine 2023-04-10 204608](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/4/d/4d5e36fd02031cd49c8fc389084d85d81f3d0055.jpeg)

---

<div class="post-metadata">

**Author:** ![Colin](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/colin/32/17040_2.png) [@Colin](https://discourse.nodered.org/u/Colin)\
**Post date:** [10 April 2023 20:28 UTC](https://discourse.nodered.org/t/get-data-from-shelly-em-array/77394/7 "2023-04-10T20:28:21Z")

</div>

OK, your question was about how to extract the data from the array, but in fact it seems that it is about combining data from two separate messages coming from different sources. The first thing you need to do is to combine the two messages together so that you can access data from both of them. See [this article in the cookbook](https://cookbook.nodered.org/basic/join-streams) for an example of how to join messages into one object.

---

<div class="post-metadata">

**Author:** ![n1k0nx](https://avatars.discourse-cdn.com/v4/letter/n/439d5e/32.png) [@n1k0nx](https://discourse.nodered.org/u/n1k0nx)\
**Post date:** [10 April 2023 22:32 UTC](https://discourse.nodered.org/t/get-data-from-shelly-em-array/77394/8 "2023-04-10T22:32:12Z")

</div>

Colin,  
seems I found with this way. with join I get all data, not only the total load and total p.v. watts 🙂 I start... what do you suggest to give a logic like read one calculated value and follow modbus commands for modify the outgoing load current?  
thank's a lot!  
regards  
luca

 ![Immagine 2023-04-11 002816](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/3/d/3dc8a441a6a2cbf98de5b791d5a3a35d7fcc4579.jpeg)

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/1X/d073cd938eafa2e558d7c2cd59003b3ef4963033.png) [@system](https://discourse.nodered.org/u/system)\
**Post date:** [9 June 2023 22:33 UTC](https://discourse.nodered.org/t/get-data-from-shelly-em-array/77394/9 "2023-06-09T22:33:11Z")

</div>

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.
