question

houser avatar image
houser asked

Node Red - "current active alarms" via API?

Looking for "current active alarms" if that data is in there?

Is it in the VRM API node : Installations / Get alarms?

I am getting a "0" as payload now. Will it give me a number of active alarms when they are active? Many thanks

VRMNode-REDapidashboard
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.

Fideri avatar image Fideri commented ·

Also interested in your question. Using grafana, I couldn't find all the system alarms. I have to specify a particular alarm.

F.

0 Likes 0 ·
houser avatar image houser Fideri commented ·

Ok, thanks for that also. I assume one might be able to build something in node red that does this. I want basically something similar to what VRM does when it says " 2 active alarms" but in Node Red.

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

I use diagnostic data from the API. Because the "positions" of the data changes randomly, I use certain phrases (those have never changed) to filter the data. If you need that, let me know. I have to clean up the script first as it's written specifically for my install.

F.

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.

houser avatar image houser commented ·

Hey @Fideri After having looked at this a bit, I now totally get what you are saying about the data changing randomly and hence the need for your search script. A bit confusing. Also the dedicated nodes with hard paths to set from a popup menu do not have all the same data. Yet?Will have to think about this, if this is the way this is set up long term. Again, would appreciate an example heads up if you figure this out. Many thanks.

0 Likes 0 ·
houser avatar image
houser answered ·

Thanks @Fideri

I would be interested in your script if it is not too much work, as I don't know what it does..

I ended up creating a dashboard with a number of text fields to get started and get a grasp.

2 |3000

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

Fideri avatar image
Fideri answered ·

@houser

Not sure what happened there. I was responding to a totally different question which has now disappeared! Anyhow, I will just share the script.

F.

2 |3000

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

houser avatar image
houser answered ·

Thanks again @Fideri

I figured out my other question so was trying to be quick and clever and deleted it, as there was no answer yet. Sorry about that, Appreciate you sharing your script!

2 |3000

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

Fideri avatar image
Fideri answered ·

@houser

No worries. Here's the script. I think the comments are self-explanatory but I am happy to clarify.

Apart from the VRM API (not included) and the function nodes, everything else is not needed. It's contained in the screenshot only to show what is possible.

If you would prefer to copy and paste the script rather than importing the function node, I have included both files.

One thing I forgot to mention in the comments in the script is that it will stop once a match is found. So use unique keywords. Personally, I use the Victron descriptions.

F.

screenshot-2024-07-27-at-13-48-14-node-red.png

1722107593129_2024 - node red Victron search.txt

node red api.json.zip


2 |3000

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

houser avatar image
houser answered ·

Thanks! I will have a look and see if I can make use of it..Appreciated!

2 |3000

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

mvader (Victron Energy) avatar image
mvader (Victron Energy) answered ·

Hey all, to get this on the GX device itself, so to not have to rely on VRM and this an internet connection, use the notifications database provided on com.victronenergy.platform.

Documented here: https://github.com/victronenergy/venus/wiki/dbus#platform


Its relatively new, available since v3.30 or v3.40.

12 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.

Fideri avatar image Fideri commented ·

@mvader (Victron Energy)

This is very useful. I can see the relevant paths in grafana. But for "Notifications/NumberOfNotifications" I always get "No Data". I don't have any notification at the moment but I was expecting "0" or a historical figure.

F.

1 Like 1 ·
houser avatar image houser Fideri commented ·

Hey @Fideri

Are you using that path via d-bus > mqtt?

"Notifications/NumberOfNotifications"


If so, when you have a moment, would you mind sharing the path that works for you and what mqtt reader-node?
If you are on Venus OS 3.20 or higher, are you using the standard NR MQTT node?

0 Likes 0 ·
Fideri avatar image Fideri houser commented ·

@houser

That's the path, but I have the same issue as you in Node Red. The path "Notifications/NumberOfActiveNotifications" doesn't show on the custom node. I'm using Venus 3.40.

Grafana is a different platform. I suspect it uses MQTT under the hood. In my case, it just says "no data". I don't know if that is by design.

Curiously, using MQTT Explorer, I can see the path in MQTT with the value "null".

F.

1 Like 1 ·
nickdb avatar image nickdb ♦♦ houser commented ·

With nodered there really isn't much need to use MQTT to talk to the GX, as all these paths are available via the custom node, which is just simpler to use and has less overhead.

0 Likes 0 ·
houser avatar image houser nickdb ♦♦ commented ·

I might be missing something obvious, ( I often do ;) but which one is

"the custom node" you refer to? If you mean "victron-input-custom" I do not see the active alarms there? Many thanks.

0 Likes 0 ·
nickdb avatar image nickdb ♦♦ houser commented ·

The bottom two.

screenshot-2024-07-29-at-144332.png

0 Likes 0 ·
houser avatar image houser nickdb ♦♦ commented ·

Yes, I have looked thru the list in there and do not see the active alarms AFAIK. The paths that mvader referenced earlier in the thread is what I am looking for and specifically this one:
Notifications/NumberOfActiveNotifications" or something like the ""current active alarms" I started this thread about. Are you saying that is in there? Many thanks.

0 Likes 0 ·
nickdb avatar image nickdb ♦♦ houser commented ·

Under Venus

screenshot-2024-07-29-at-151105.png

1 Like 1 ·
houser avatar image houser nickdb ♦♦ commented ·

Thanks. It seems I do not have that in my list. Odd.
This is on a Venus GX running 3.40
I see "Notifications/AcknowledgeAll" but nothing else with notifications.

0 Likes 0 ·
nickdb avatar image nickdb ♦♦ houser commented ·

I am on 3.50 beta, so maybe do a test install of that, it's easy to rollback to the prod version from the backup firmware option.

1 Like 1 ·
houser avatar image houser nickdb ♦♦ commented ·

Tried the 3.50 beta, but still no sight of that path. Ah well.

0 Likes 0 ·
houser avatar image houser commented ·

deleted

0 Likes 0 ·
houser avatar image
houser answered ·

100% agreed. I will post back here if I find or come up with a solution. Please feel free to do so also?

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.

nickdb avatar image nickdb ♦♦ commented ·

@houser rather post back on the new modifications site, as this one is likely to be read-only by then.

https://victron.discourse.group/c/modifications/5

1 Like 1 ·