question

mike-r avatar image
mike-r asked

Shelly EM - How to Incorporate Channel 2

I have recently added a Shelly EM to my Victron setup. The EM comes with 2 channels which I thought would be ideal for my needs since I have 2 30 amp shore power inputs.


I used the mod by @Vincegod and got it working. But then I discovered that it only uses channel 1 of the EM. I have looked through the script along with the Shelly API and do not see what I could change/add to pull in channel 2 info. Has anyone does this? Or know what to change to pull in this additional data?


img-4935.jpeg


img-4936.jpeg

modificationsenphase
img-4935.jpeg (579.6 KiB)
img-4936.jpeg (355.0 KiB)
2 |3000

Up to 8 attachments (including images) can be used with a maximum of 190.8 MiB each and 286.6 MiB total.

1 Answer
gerard-van-seventer avatar image
gerard-van-seventer answered ·

In the script you see some lines like

self._dbusservice['/Ac/L1/Power'] = meter_data['emeters'][0]['power']

The [0] is the first channel. If you change that to [1] you get the second channel.

To get both you have to extend the script or use a second instance of the same script. Running a second instance isn't the nicest solution but it is the easiest.

I do (almost) the same with a Shelly 3EM having all 3 channels assinged to a different function being the first acts like a external meter (for L1) and the second channel is as a PV inverter for the ac coupled panels (Enphase).

--Gerard

1 comment
2 |3000

Up to 8 attachments (including images) can be used with a maximum of 190.8 MiB each and 286.6 MiB total.

jackj avatar image jackj commented ·
How does the second channel show up on the display?
0 Likes 0 ·

Related Resources

Experiments, Modifications and Adaptions. Mods (Modifications) can be made to Victron Software by the Community. Please use the modifications space for enthusiasts who want to push what is possible, without official Victron Support.

Additional resources still need to be added for this topic