Git Product home page Git Product logo

venus-os_dbus-mqtt-battery's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

venus-os_dbus-mqtt-battery's Issues

Doesn't start (automatically) - but .py seems to work. Logs are empty?!

I've ran the install.sh - but the driver won't start.
When i run
root@einstein:~# svstat /service/dbus-mqtt-battery
then i get
/service/dbus-mqtt-battery: up (pid 2413) 1 seconds

Log is empty, even with INFO or DEBUG set

But when i run
python /data/etc/dbus-mqtt-battery/dbus-mqtt-battery.py
then it is starting and running.

Did i made something wrong?

Auto-Restart did not work

Here is the Logs i found.

If I understand right, the driver did not recive any MQTT Updates.
He tried to auto-restart at 09:14 which failed.
My manual restart at 09:53 succeded.

2023-03-29 09:10:32.975302500 ERROR:root:Driver stopped. Timeout of 60 seconds exceeded, since no new MQTT message was received in this time.
2023-03-29 09:10:33.085773500 *** starting dbus-mqtt-battery ***
2023-03-29 09:14:04.473393500 Traceback (most recent call last):
2023-03-29 09:14:04.473397500   File "/data/etc/dbus-mqtt-battery/dbus-mqtt-battery.py", line 381, in _update
2023-03-29 09:14:04.473401500     self._dbusservice[setting] = data['value']
2023-03-29 09:14:04.473404500   File "/data/etc/dbus-mqtt-battery/ext/velib_python/vedbus.py", line 157, in __setitem__
2023-03-29 09:14:04.473408500     self._dbusobjects[path].local_set_value(newvalue)
2023-03-29 09:14:04.473411500   File "/data/etc/dbus-mqtt-battery/ext/velib_python/vedbus.py", line 499, in local_set_value
2023-03-29 09:14:04.473488500     changes = self._local_set_value(newvalue)
2023-03-29 09:14:04.473492500   File "/data/etc/dbus-mqtt-battery/ext/velib_python/vedbus.py", line 510, in _local_set_value
2023-03-29 09:14:04.473496500     'Text': self.GetText()
2023-03-29 09:14:04.473498500   File "/data/etc/dbus-mqtt-battery/ext/velib_python/vedbus.py", line 589, in GetText
2023-03-29 09:14:04.473502500     return self._gettextcallback(self.__dbus_object_path__, self._value)
2023-03-29 09:14:04.473530500   File "/data/etc/dbus-mqtt-battery/dbus-mqtt-battery.py", line 64, in <lambda>
2023-03-29 09:14:04.473534500     _a = lambda p,  v: (str("%.2f" % v) + 'A')
2023-03-29 09:14:04.473537500 TypeError: must be real number, not dict
2023-03-29 09:53:46.758113500 *** starting dbus-mqtt-battery ***

Ability to set battery offline/online

Hi again :)
I thought it would be nice to be able to set the battery to offline mode when there are no messages to the mqtt broker or certain battery topic.
Online/offline management could be dealt with separately, e.g. via Nodered flow - no new messages for 1 minute - send offline flag.
I tested NrOfModulesOnline but it doesn't seem to work like that. On Devices page still is connected.

Data from enphase/battery are not used

Hi Manuel

It's me again. I managed to publish the necessary data via Node-Red to the topic: enphase/battery.

Screenshot (124)

The payload like this:

{ "Dc": { "Power": 1435.7, "Voltage": 53.77, "Current": 26.7, "Temperature": 25.6 }, "InstalledCapacity": 1400, "ConsumedAmphours": -116.9, "Capacity": 1283.1, "Soc": 95.9, "TimeToGo": 0, "Balancing": 0, "Info": { "MaxChargeVoltage": 55.3, "MaxChargeCurrent": 191.25, "MaxDischargeCurrent": 425 }, "History": { "ChargeCycles": 46, "MinimumVoltage": 34.43, "MaximumVoltage": 58.77, "TotalAhDrawn": -60169.2 }, "System": { "MinVoltageCellId": "P4_Z1", "MinCellVoltage": 3.358, "MaxVoltageCellId": "P1_Z10", "MaxCellVoltage": 3.362, "NrOfModulesOnline": 5, "NrOfModulesOffline": 0, "NrOfModulesBlockingCharge": 0, "NrOfModulesBlockingDischarge": 0 }, "Io": { "AllowToCharge": 1, "AllowToDischarge": 1, "AllowToBalance": 1 } }

I can see the topic and payload in the MQTT-Explorer.

Screenshot (123)

But it looks like that the driver is not taking the data.

2023-04-06 08:23:48.131732500 INFO:root:Waiting 5 seconds for receiving first data... 2023-04-06 08:23:53.137292500 INFO:root:Waiting 5 seconds for receiving first data... 2023-04-06 08:23:58.142865500 INFO:root:Waiting 5 seconds for receiving first data... 2023-04-06 08:24:03.148426500 INFO:root:Waiting 5 seconds for receiving first data... 2023-04-06 08:24:08.150479500 INFO:root:Waiting 5 seconds for receiving first data... 2023-04-06 08:24:13.156049500 INFO:root:Waiting 5 seconds for receiving first data... 2023-04-06 08:24:18.160483500 INFO:root:Waiting 5 seconds for receiving first data... 2023-04-06 08:24:23.166044500 INFO:root:Waiting 5 seconds for receiving first data... 2023-04-06 08:24:28.171617500 INFO:root:Waiting 5 seconds for receiving first data... 2023-04-06 08:24:33.177186500 INFO:root:Waiting 5 seconds for receiving first data... 2023-04-06 08:24:38.182762500 INFO:root:Waiting 5 seconds for receiving first data... 2023-04-06 08:24:43.188347500 WARNING:root:Waiting since 1380 seconds for receiving first data...
What can I do?

Best regards
Harald

Example in config.ini is lowercase, warning seems to be Case-sensitiv

The example in the config.ini is lowercase

{ "dc": { "power": 321.6, "voltage": 52.6 }, "soc": 63 }

The resulting warning is mixed-Case

{"Dc":{"Power":321.6,"Voltage":52.7},"Soc":63}

Sending the first JSON to the topic throws a warning (:Received JSON doesn't contain minimum required values), the second shows this in the logs

*** starting dbus-mqtt-battery ***

What am I doing wrong? Did I unserstand correctly that this driver needs one single topic with this JSON-Value?

I also tried seperate topics with this hirarchy, but did not work either.

Thank you a lot for this driver!

Victron MPPT does not get "BMS controlled, extend "minimal required JSON payload"

The "minimal required JSON payload"
is not enough to set an MPPT in "network/BMS controlled mode".

I suggest to add a line in the config for
"minimal required JSON payload to allow BMS controlled MPPT".

I currently did not figure out what I needed to add, but I will try to test and find out.
If someone or you (@mr-manuel ) know what is additionally necessary, I would help me a lot.

Feature request: round Amps to 1f

I have a lot of Devices, and Amps are formated to 1 for (almost) all devices.
This driver has 2, so reading and comparing several Devices in the HX-Console is a (little!) bit harder.

Can you format this with 1f or can this be part of the config.ini?

If you prefer, I can also change the code only in my installation, but this will brake default updates.

Request for all cells voltages displaying feature.

Hi mr-manuel.
First of all I'd like to send you very big thanks for this feature. This is what I looking for very long time!
I'd like to asking you about new feature such as displaying all cell voltages in details tab.
I've got my custom battery with custom BMS and I can send all cell voltages to MQTT broker. It will be very nice to see these all voltages in Victron. It would also be useful to display delta voltage value.
I can also confirm that it works correctly on CerboGX.

Charge Current Limit based on Time of Day + General Battery Monitor Question

Hi,
I found this repo through your link in a dbus-serial-battery issue and was wondering, if I could use them together.

Basically I want to limit the Charge/Discharge Current based on the time of day. My problem is the noise my three Multiplus 2s create when turning on the fans, and since my bedroom is located next to them, preventing the fans to turn on during my sleep would be nice.

However, (atm) I only want to change the Charge and Discharge Current through Node-Red and let the other logic reside in dbus-serial-battery. Is this possible?

This also leads to my next question: Currently I have the Multiplus as my Battery Monitor selected. However dbus-serial-battery still imposes its parameters. Who is actually in charge of the limits?

Thanks in advance, Jan

BIG Success, but few things to iron out issue #1

@mr-manuel after couple of long night (5am) I finally manage to get my batteries shown on venus OS!
Thank you for the great repository!
image
I double checked every cell data and all comes true!
On the way I experienced many problems with my implementation (it was me not you... LOL), but few issues were persistent and i could not resolve, thus the title.
Please help with these:
Issue 1:
When RPI is restarted, it losses the drivers and I have to manually run bash install.sh for each of the 4 drivers
Not sure what to do here... Any suggestions?

difference between "config.default.ini" and "config.sample.ini"

Can you please clarify, what the difference between
"config.default.ini" and "config.sample.ini" and "config.ini" is?

In the Releasenote you wrote "config.default.ini" (see footer ), but the file I find
"config.sample.ini.
As I understand is "config.ini" MY configfile where i can change defaults from "config.default.ini".

  • Is "config.sample.ini" never read?

Is "config.default.ini" still used as you wrote:

Copy or rename the config.sample.ini to config.ini in the dbus-mqtt-battery folder and change it as you need it.

Thank you!!


Footer

v0.1.0
Added: Set logging level in config.default.ini

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.