Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Thanks & how hard would it be to make your driver more flexible? #50

Closed
stundenblume opened this issue Mar 20, 2023 · 7 comments
Closed

Comments

@stundenblume
Copy link

stundenblume commented Mar 20, 2023

Hello Henne,
Thank you very much for this extremely useful and simple driver! It was possible to integrate Ahoiy without any problems.

So far I have used dbus-mqtt for my application. A very flexible driver that can register all kinds of devices on the DBus.
The big advantage is that you can store the definitions of the possible DBus devices in a .yml file.
The disadvantage is that the MQTT broker of venusOS is not accessible via WIFI and not all devices can be configured to send the appropriate start message.

My application would be the following:
Ahoy, RasPi with venusOS (via WIFI) and a Tasmota device on the Smartmeter (small 600W installation for my father).

With your driver I already have Ahoy in the system.

How much effort would it take to integrate this driver with devices other than "pvinverter"? Specifically "Gridmeter" and "Temperature" (I use the temperature to display a solar forecast in the VRM Dashboard).

Many thanks
Sebastian

@henne49
Copy link
Owner

henne49 commented Mar 20, 2023

Can you share the yml file you use for mqtt, I would want to understand, what it takes to implement.

Thank you!

@stundenblume
Copy link
Author

This one:
https://github.com/freakent/dbus-mqtt-devices/blob/main/services.yml

I think it's just a code readable version of victron dbus services.

Thanks for having a look.

@henne49
Copy link
Owner

henne49 commented Mar 20, 2023

I had a look, it is not hard, but work :-)

Why should we implement this in this driver, if it works using mqtt? What is the value? I think this is use case, but rather a small subset of users, who would use it.

If you want to add it, feel free to create the code and submit a PR and we can work together.

@stundenblume
Copy link
Author

dbus-mqtt
Advantages:

  • any dbus service can be registered, very flexible
    Disadvantages:
  • Registration sequence is relatively cumbersome
  • The device must write to the appropriate topics

dbus-opendtu
Advantages:

  • Flexibly fetches data on its own from any structure. The source device can be very dumb.
    Disadvantages:
  • only inverters as dbus service are possible at the moment.

I see two main areas of application:

  1. almost everyone who wants to run a Victron ESS and already has a smartmeter installed by their grid operator could save an additional gridmeter. (I know installations with Smartmeter, Fronius Gridmeter and Victron EM24, all three do the same thing).
  2. people who will install a 600W mini PV and get a smartmeter installed, together with a RasPi with venusOS can use an excellent portal without having to buy an expensive gridmeter (EM24).

I think this great driver would greatly enhance the flexibility of more than just "inverter".

I have a basic understanding of programming, but am only a mechanical engineer. At the same time, I'm happy to do work. I will have a look if I understand what happens in your code.

Here are two concrete examples of what I have in mind:
dbus Gridmeter, source: Tasmota Smartmeter

{
  "StatusSNS": {
    "Time": "2023-03-20T22:43:44",
    "SML": {
      "Total_in": 1584.735,
      "Total_out": 449.21,
      "Power_curr": 14,
      "Volt_p1": 234.2,
      "Volt_p2": 233.6,
      "Volt_p3": 233.1,
      "Amperage_p1": 1.1,
      "Amperage_p2": 0.3,
      "Amperage_p3": 0.6,
      "Power_curr_p1": -42,
      "Power_curr_p2": 17,
      "Power_curr_p3": 39,
      "frequency": 50
    }
  }
}

dbus Temperatur, source: Solarprognose.de

{
  "preferredNextApiRequestAt": {
    "secondOfHour": 3558,
    "epochTimeUtc": 1679284758
  },
  "status": 0,
  "iLastPredictionGenerationEpochTime": 1679283198,
  "weather_source_text": "<a target=\"_blank\" href=\"https://www.dwd.de/DE/service/copyright/copyright_node.html\"><img src=\"https://www.solarprognose.de/web/img/dwd_logo_258x69.png\"></a>",
  "datalinename": "Germany > Niedersachsen",
  "data": {
    "20230320": 8.837,
    "20230321": 5.587
  }
}

@henne49
Copy link
Owner

henne49 commented Mar 21, 2023

Tasmota devices should work already. The only thing is to create different gridmeter or.

In Template devices the intelligence to use also a URL out of the internet should also work.

A lot is already there, but it would need a rework for sure.

My constraint is the time to do it at the moment

@henne49
Copy link
Owner

henne49 commented Mar 22, 2023

we are working on it for
grid
pvinverter
acload/genmeter

temp or solarmeter, would be later

@stundenblume
Copy link
Author

Hello Henne,
thank you for considering supporting these services.
I checked your code but I'm not very good in understanding code from someone else. :-/
I have realized my requirements with tools I can handle. In this case node-RED and the dbus-mqtt driver.

But I will try your code on a test system and will give feedback.

Sebastian

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants