question

georgelza avatar image
georgelza asked

MQTT topics to subscribe to

Hi all,

My system: Victron Multiplus II, 48/3000/32-35 Device id 261

2 x BlueSolar 150/35

#1 - 6 AmeriSolar 330W panels (3S2P) Device id 258

#2 - 3 AmeriSolar 330W panels (3S) Device id 260

1 VenusGX

1 Carlo Gavazzi Energy meter / ET112 Device id 30

2 x Pylontech US2000Plus Lithium Ion batteries Device id 512

Electrical Pre paid meter.

Lots of comm cables between all... ;)

Also have some SCT-013-0000 CT's around feeds, feeding into OpenEnergyMonitor

(For reference I consume these topics on the OEM using the NodeRed deployment, and then publish back to the OEM MQTT broker, which then allows me to graph the values).


Rail #1 Power Comes into Electrical Pre Paid meter, then to Master Isolator, Earth Leakage and then into a 2 source switch (switching between Grid Feed or Geni Feed), Feeds into Rail #2

Rail #2 (Non Essentials): Rail Isolator, Earth Leakage, 40 Amp Stove, 2 x 20Amp, Geyser 1 and 2, 20Amp Pool

Into Multiplus II / AC In

Out of Multiplus II AC Out 1 into -> Rail #3 at <Inverter input>

Rail #3 (Essentials): Rail Isolator, <Inverter input>, Isolator, Earth Leakage, 5 x 20Amp isolators (plugs), 3 x 10Amp isolators (lights)


Things I think want to monitor,

Main Grid (Eskom) input, thinking what ever the ET112 allows through.

Power, Voltage, Amperage Feed per Array 1 and Array 2, and then guess a total combined Input values (Power, Voltage and Amperage)

Power going from Inverter back to Rail #2

Power going from Inverter out to Rail #3

Think then... Total usage... and the composition, total usage = Grid + PV + Battery

G


Multiplus-IIVenus GX - VGXEnergy MeterBlueSolar PWM
2 comments
2 |3000

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

ben avatar image ben ♦ commented ·

What’s your question?

0 Likes 0 ·
georgelza avatar image georgelza ben ♦ commented ·

With what I want to monitor... what would be the best topics to subscribe to?

G

0 Likes 0 ·
8 Answers
georgelza avatar image
georgelza answered ·

so at the moment I have the following I've subscribed to... by just digging around and asking a bit, given suggestions by a friend.

Grid supply (assuming this is measure by ET112): N/xxxxx/system/0/Ac/Grid/L1/Power

Output to Rail #3 (Essentials:N/xxxxx/system/0/Ac/ConsumptionOnOutput/L1/Power

Array #1 Power output : N/xxxxx/solarcharger/258/Yield/Power

Array #1 Current output : N/xxxxx/solarcharger/258/Pv/I

Array #1 Voltage output : N/xxxxx/solarcharger/258/Pv/V

Array #2 Power output : N/xxxxx/solarcharger/260/Yield/Power

Array #2 Current output : N/xxxxx/solarcharger/260/Pv/I

Array #2 Voltage output : N/xxxxx/solarcharger/260/Pv/V

Array Total Power Output : N/xxxxx/system/0/Dc/Pv/Power

Array Total Current Output : N/xxxxx/system/0/Dc/Pv/Current

Array Total Voltage :

(The following come directly from the Pylontech via the onboard BMS interface I understand)

Pylontech Battery Array input/output Current : N/xxxxx/system/0/Dc/Battery/Current

Pylontech Battery Array input/output Power : N/xxxxx/system/0/Dc/Battery/Power

Pylontech Battery Array SoC : N/xxxxx/system/0/Dc/Battery/Soc

Pylontech Battery Array Voltage : N/xxxxx/system/0/Dc/Battery/Voltage


Looking for

How much the Inverter is pushing out onto Rail #2, this with what the ET112 is allowing in I would think should be my Rail #2 usage.

Total Usage I would guess is :

N/xxxxx/system/0/Ac/Grid/L1/Power + N/xxxxx/system/0/Ac/ConsumptionOnOutput/L1/Power + What ever is pushed out onto Rail #2.

Power coming directly from the PV Array I take as N/xxxxx/system/0/Dc/Pv/Power, then assume this plus N/xxxxx/system/0/Dc/Battery/Power is the combined inverted value, ie I'm pulling a bit from the battery, a little bit from PV and some from the grid...

G

2 |3000

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

hobohome avatar image
hobohome answered ·

There is a very nice open source PC tool called MQTT.fx that has the ability to show you all topics that are available from a broker (topic scan). This is great for finding useful topics.

2 |3000

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

gawan avatar image
gawan answered ·

Does that work for you ?


All I did was turning on the MQTT Service on my Venus.

Then I started my MQTT.fx and connected to the Venus MQTT Broker.

All I get is the system/0/serial message ...once - if I for example subscribe to "N/f6473bd7384a/solarcharger/258/Yield/Power " nothing happens ...


BR

Gawan

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.

larivee15 avatar image larivee15 commented ·

The MQTT Server goes to sleep mode after about 30 seconds hence only one message. To get a response for your topic, the N at the beginning needs to be changed to R and then published to the topic: "R/f6473bd7384a/solarcharger/258/Yield/Power"

0 Likes 0 ·
mikelle avatar image
mikelle answered ·

if the Multiplus gets too warm, it reduces its performance. Can I see via MQTT how much power it can currently deliver?

Michael

2 |3000

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

Felix avatar image
Felix answered ·

I have the same Problem, trying get data from the cerbo broker using a python program.Using node red there is no problem. Could somebody give me some help. The program and output is below
Your help is very much appreciated

import paho.mqtt.client as mqtt

import time

def on_message(client,userdata,message):

Topic=str(message.topic)

Nachricht=message.payload.decode("utf-8")

print (Topic,Nachricht)

def on_log(client,userdata,level,buf):

print("log:",level,buf)

def on_connect(client,userdata,flags,rc):

if rc==0: print("connected ok",rc)

else: print("Bad connection Return code=",rc)

client= mqtt.Client("laptop")

client.on_message=on_message

client.on_connect=on_connect

client.on_log=on_log

cerbo_broker="192.168.178.40"

client.connect(cerbo_broker)

client.subscribe("R/48a7da88e38b/system/0/Ac/Grid/L1/Power")

client.subscribe("R/48a7da88e38b/system/0/Dc/Battery/Voltage")

while True:

time.sleep(4)

client.loop_start()

The output is:

log: 16 Sending CONNECT (u0, p0, wr0, wq0, wf0, c1, k60) client_id=b'laptop'
log: 16 Sending SUBSCRIBE (d0, m1) [(b'R/48a7da88e38b/system/0/Ac/Grid/L1/Power', 0)]
log: 16 Sending SUBSCRIBE (d0, m2) [(b'R/48a7da88e38b/system/0/Dc/Battery/Voltage', 0)]
log: 16 Received CONNACK (0, 0)
connected ok 0



2 |3000

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

jonofe avatar image
jonofe answered ·

You should publish an empty message once in 30 seconds to R/##############/keepalive to get all topics provided by MQTT on a regular basis. If you need only specific sub-trees you can send them as payload to the same topic, e.g.:

Topic: R/##############/keepalive

Payload: ["vebus/#", "pvinverter/#","battery/#","grid/#", "solarcharger/#"]

2 |3000

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

Felix avatar image
Felix answered ·

thanks, however I still don't get data from the cerbo, although I have changed the while loop:

z=0

while True:

z+=1; print (z)

if z==5: client.loop_start();z=0; client.subscribe("R/xxxxxxx/keepalive")

else: time.sleep(4); client.loop_start()

console output:

log: 16 Sending CONNECT (u0, p0, wr0, wq0, wf0, c1, k60) client_id=b'laptop'
log: 16 Sending SUBSCRIBE (d0, m1) [(XXXXXXXXXXXX/system/0/Ac/Grid/L1/Power', 0)]
log: 16 Sending SUBSCRIBE (d0, m2) [(XXXXXXXXXX/system/0/Dc/Battery/Power', 0)]
1
2
log: 16 Received CONNACK (0, 0)
connected ok 0
log: 16 Received SUBACK
log: 16 Received SUBACK

....

5
log: 16 Sending SUBSCRIBE (d0, m4) [(b'R/XXXXXXXXX/keepalive', 0)]

2 |3000

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

jonofe avatar image
jonofe answered ·

You have to publish, not subscribe to R/###########/keepalive.


2 |3000

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