I have a Tank 140 with connected 4-20mA water level sensor. I'm receiving data for the sensor but I'm struggling to find the readings in the MQTT server. Anyone have any pointers?
In fact, in more general terms, is there any documentation on how the MQTT server is structured?
0 Answers
Hi,
in the next days I am going to setup Node Red with MQTT and my ESS.
The first tests are successful. But I only want to use it on local network for a display showing live data.
As I know, as soon, as I use MQTT in the venus gx, the data is also sent to mqtt.victronenetgy.com.
I see this in a light upload traffic. Well, I do not really need the online feature. So is it possible to disable it, while keeping the local function?
Can you make a switch in config menu?
Steffen
4 Answers
Hi,
My Cerbo happily sent via MQTT for many months - and stopped updating some days ago.
I am using MQTT Explorer as a separate app on my laptop and inside Home Assistant. I see the same (outdated; "retained") values from Cerbo in both MQTT Explorer instances.
Other MQTT sources (e.g. Home Assistant SambaNAS keep updating.)
I switched "MQTT on LAN" in Cerbo off to make it disappear in MQTT Explorer. To my surprise, venus-home still shows the (not updating) Cerbo. Should this not disappear?
I switched back from Cerbo firmware 2.94 (12 April 2023) to 2.93. Did not help.
Any suggestions?
Best,
Armin
3 Answers
I have a simple home solar PV system - 2 panels, MPPT 100/20 charger, AGM batteries & Phoenix 24/800 inverter. It's up and running and I've added a Raspberry Pi 3 running Venus OS, connected to the two Victron devices with VE.Direct USB cables. I can connect to the Venus system with a browser and can see the devices data fine. I can connect using the VRM portal and can also see the devices data fine.
I've enabled the Venus MQTT broker for SSL and PlainText and can connect to it from MQTT Explorer but all I see is the following :
[image]
I know there is a 'keepalive' requirement I've seen discussed in the forums, but as I understand it the Venus MQTT broker is enabled when accessed from the VRM portal and should be accessible from the LAN when that happens.
My problem at present is I cannot see any data from the two victron devices in MQTT Explorer. I assume I've missed something, but trawled the forums for a while and cannot see what it is ??
My aim is to bridge the central MQTT broker in my existing home automation system to the Venus MQTT broker so I can add the Victron data into my home automation database (InfluxDB) and display it, along with other data, using Grafana.
I've spent hours reading forums posts etc. but cannot see where I've gone wrong. It would be much appreciated if someone could give some guidance as to how I can achieve my aim of adding the Venus MQTT data into my existing home automation system, with the 'keepalive' function and without using the VRM portal. I have no need to se the VRM portal as I have already have VPN access to my existing system, so will be able to see the PV data when added into the system.
Regards
PaulM
2 Answers
A little tutorial on how to connect and receive data from the cloud MQTT server into node-red.
This involves 2 steps:
Subscribe to a topic
1. Use the "mqtt in" node and double click to configure.
[image]
2. Configure the topic you want to subscribe to. The example above will subscribe to the power out status. (other example topic: N/<yourVRMportalD>/system/0/Dc/Battery/Soc for battery status.)
Your VRM portal ID can be found on either:
3. Configure the output to be a string
4. Give the node a name
5.Configure the server: choose "Add new mqtt-broker" from the server drop down.
[image]
6. Click the pencil to edit.
[image]
7. Fill in your mqtt server address. You need to calculate this address from your Victron installation ID. Yours will probably be different from the screenshot below.
(more details on how you calculate the address can be found here: https://community.victronenergy.com/questions/155407/mqtt-local-via-mqtt-broker.html under the section "Cloud MQTT broker")
[image]
8. Click on the pencil next to "TLS configuration"
9. Upload the "venus-ca.crt" file which you can find on github: https://github.com/victronenergy/dbus-mqtt
[image]
Send a "keepalive" message to receive data
This is important to keep receiving data. Without this step your value's won't keep receiving!
1. Use an inject-node and schedule it to run every 50 second.
[image]
2. Fill in the topic with "R/<yourVRMportalID>/keepalive" and leave the msg.payload blank.3. Use a "mqtt out" node like this:
[image]
You should now start receiving messages:
[image]
2 Answers
Hi,
I'd like to know which MQTT topics are the correct ones to get the power to/from the multiplus II. I've go a setup like that (the picture is just missing the cerbo gx):
[image]
I'm considering victron/N/myID/vebus/276/Ac/ActiveIn/L1/P or .../S. What is the difference P vs. S? And are these measured or calculated values?
If the battery is discharged, the values are negative else positive and they seem to be "W". But the values doesen't fit to the one shown in the dashboard:
[image]
Is the value shown in the dashboard power in/out at the battery and the difference the loss?
Thanks a lot,
Markus
1 Answer
Can someone point me towards documentation about setting the Minimum SOC % remotely via either Modbus, MQTT, RPC(?) or even local ssh / shell commands if doable.
I'll take whatever messaging flavour Victron wants!
I skim read the ESS Manual and apart from Schedule Charging (not quite what I need) I saw nothing about remotely controlling Minimum SOC%. Hopefully this is achievable as I wish to adjust SOC% based on environmental, time and demand conditions.
Many thanks, Dan
5 Answers
I have a strange problem that I couldn't get a firm hold on yet...
I'm using dbus-serialbattery for a JK BMS and I'm reading values from Victron via MQTT into HomeAssistant (my main mosquitto is bridged to the venus one).
Every day, around the same time e.g. the StateOfCharge is not updated anymore. After 5-60 minutes it's working again. Other values for the battery are still published/updated via MQTT.
Also it's strange that e.g. the SoC is suddenly increasing or dropping (e.g. from 30% to 42%). This is only for the MQTT value. I'm reading from the JK BMS also directly via BLE and I don't see that spike. Also in VRM it's not visible. And the console seems to show the correct value.
Using dbus-spy I see that the values are correct in DBUS. I've also check if the bridge between the mosquittos might be a problem, but connecting directly to the venus one, it has the same issue.
My hunch is that the problem might be a part of dbus-mqtt. But I'm not sure how to debug this.
Did anyone else have a similar experience? Or tips on how to debug this?
0 Answers
Hi,
is it possible to get the "total yield sent to the grid" via API / MQTT ?
There is a nice graph showing the "sent to grid" values (in red):
[image]
But can I get this value using API or MQTT ?
I am able to read the total pv yield from my MPPTs, but thats not as interesting as the value that was sent to the grid for me.
BR
Gawan
3 Answers
Hi
I am trying to get MQTT within node red from my Multiplus II GX working.
I have followed all the instruction the following post but it just says connecting. I have gone through the instructions a few times to be sure I have not made a mistake. https://community.victronenergy.com/questions/174616/connect-to-cloud-vrm-mqtt-with-node-red.html
I have the port set @ 8883
I have the URL set at mqtt87.victronenergy.com
as per https://community.victronenergy.com/questions/155407/mqtt-local-via-mqtt-broker.html
One thing I noticed is that within the instructions I have not set anything under security.
I am sorry for the lack of detail in my question, but if anyone can point me in the right direction to work out why, I would be very grateful.
Thanks
Tom
2 Answers
Bonjour,
En me conectant au cerbo gx avec mqtt explorer il n'affiche que son ID
SSH sur Lan et SSH à distance activé
merci pour votre aide
3 Answers
Hello guys,
I wanted to have some battery statistics also in my home assistant (Energy from battery / Energy into battery).
I tried it with the following MQTT topics and expected a kWh Counter, but those values are quite too high.
N/XXXX/battery/512/History/ChargedEnergy
N/XXXX/battery/512/History/DischargedEnergy
Can anyone help me and explain what is the unit behind those topics?
Is there any documentation on this?
Thank you, best Regards, Dominik
4 Answers
Bonjour,
Merci pour ce retour d'informations
Cela fonctionne
Mais, après un certain temps, tout s'efface et il n'y a plus d'informations.
il faut tout retaper, existe-t'il un moyen pour que le système soit connecté en permanence ?
cdl
0 Answers
I am trying to use MQTT data via home LAN on my Arduino Uno device.
Sometimes the client connects on the first try, sometimes it doesn't even connect after an hour. It's completely unpredictable.
Nothing helps: Opening the web site at https://vrm.victronenergy.com/ (the data is updated), via the mobile app; turning off and then on Modbus TCP via remote console doesn't help either.
Neither MQTT-Explorer nor my .NET application will connect.
What could it be?
Next day, the same code works like a charm... :-(
#include <UIPEthernet.h> #include <PubSubClient.h> #include <ArduinoJson.h> // nastavení MAC adresy byte mac[] = { 0x11, 0x12, 0x13, 0x14, 0x15, 0x16 }; IPAddress localIP(192, 168, 1, 110); IPAddress mqttIPAddress(192, 168, 1, 111); EthernetClient ethernetClient; PubSubClient mqttClient(ethernetClient); long nextKeepAlive = char* topics = "#"; float batterySOC = 0; float fvePower[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9 }; void setup() { Serial.begin(9600); Ethernet.begin(mac, localIP); Serial.println("Starting... ----------------------------"); Serial.println(Ethernet.localIP()); Serial.println(Ethernet.gatewayIP()); Serial.println(Ethernet.dnsServerIP()); Serial.println(""); mqttClient.setServer(mqttIPAddress, 1883); mqttClient.setCallback(ReceiveMQTT); connectToMQTT(); } void loop() { if (millis() >= nextKeepAlive) { sendKeepAlive(); } mqttClient.loop(); } void connectToMQTT() { Serial.println("Connecting to MQTT broker..."); while (!mqttClient.connect("victronMQTT")) { Serial.println("Connecting to MQTT broker..."); delay(1000); } Serial.println("Connected to MQTT broker."); mqttClient.subscribe(topics); Serial.print("Subscribed to topic: "); Serial.println(topics); nextKeepAlive = millis() + 50000; } void sendKeepAlive() { if (mqttClient.state() == 0) { Serial.println("Sending keepAlive..."); mqttClient.publish("R/d<secretID>/keepalive", ""); nextKeepAlive = millis() + 10000; } else { connectToMQTT(); } } void ReceiveMQTT(char* topic, byte* bytePayload, unsigned int length) { Serial.print("Message arrived ["); Serial.print(topic); Serial.print("] "); String payload = ""; for (int i = 0; i < length; i++) { payload.concat((char)bytePayload[i]); } Serial.println(payload); ProcessMessage(topic, payload); } void ProcessMessage(String topic, String payload) { if (topic == "N/<secretID>/system/0/Dc/Pv/Power") { float value = readJsonValue(payload); int index = (int)((millis() / 60000) % 10); Serial.print("Updating FVE power. Index = "); Serial.print(index); Serial.print("; value = "); Serial.println(value); fvePower[index] = value; } if (topic == "N/<secretID>/battery/512/Soc") { batterySOC = readJsonValue(payload); } } float readJsonValue(String payload) { DynamicJsonDocument doc(1024); deserializeJson(doc, payload); return doc["value"]; }
5 Answers
Hello,
where can i find the Energy in and out counter for the Battery.
(mean's from Battery in kWh and to Battery in kWh)
I can see them on VRM Portal :
[image]
[image]
but they are not on MQTT Tree ...
i need them to determine some forecastcalulation ....
4 Answers