Batrium Watchmon4 in Node Red

Announcement - Help us fight the BOTS! Please report all spam including stuff in your inbox!

Cell-King

Member
Joined
Sep 23, 2019
Messages
58
It turns out there was one other ui_chart in one of the flows but I removed it and the bar chart still doesn't show! I've tried a lot of things but no luck!
 

Wolf

Active member
Joined
Sep 25, 2018
Messages
1,580
Cell-King said:
It turns out there was one other ui_chart in one of the flows but I removed it and the bar chart still doesn't show! I've tried a lot of things but no luck!
Linux or windows?

If windows just uninstall and remove all .node-red folders also in the users\%username%\appdata\Roaming folders.

reinstall and make sure you only add the node-red dashboard palette.That's all I can think of.

Best of luck
Wolf
 

Wolf

Active member
Joined
Sep 25, 2018
Messages
1,580
Cell-King,

Did you ever get your bar chart working?

I tried your code and this is what I came up with.

It seems to work OK on my system. The arrays and everything is working.


image_gagxaf.jpg


Wolf
 

Cell-King

Member
Joined
Sep 23, 2019
Messages
58
Hi Wolf, Sorry, I'm only seeing this post now! I wasn't able to graph the bar but I made another dashboard instead which sort of shows the same info. Not as pretty, but it works!

image_jpdizn.jpg


If anyone was able to fix the

"TypeError: TextDecoder is not a constructor"

please let me know as I still seem to have that project and google doesn't seem to have any further info. I thought I fixed it by adding the Binary Parser but it seems not!
 

Wolf

Active member
Joined
Sep 25, 2018
Messages
1,580
Cell-King said:
Hi Wolf, Sorry, I'm only seeing this post now! I wasn't able to graph the bar but I made another dashboard instead which sort of shows the same info. Not as pretty, but it works!

If anyone was able to fix the
"TypeError: TextDecoder is not a constructor"

please let me know as I still seem to have that project and google doesn't seem to have any further info. I thought I fixed it by adding the Binary Parser but it seems not!
Cell-King

Have you tried turning off all the debuggers in the wholeflow?
There are a bunch of functions that you don't need and Ijust disabled them as they were giving me errors. Lots of setup metrics and interface stuff.
Most of them are not needed for the info anyway.
Then I would turn each debugger on and offand see what you get.
Also If you have influx and grafana you can create a nice dashboard with all the data thats pertinent.
Wolf

image_pirgau.jpg
 

Cell-King

Member
Joined
Sep 23, 2019
Messages
58
Yes, I have done that, one metric that I can't seem to find due to the errors is if there has been a critical fault event and the "sense" wire on my Watchmon is on. Nice graphs!
 

Wolf

Active member
Joined
Sep 25, 2018
Messages
1,580
Cell-King said:
........... one metric that I can't seem to find due to the errors is if there has been a critical fault event..............
Is this what you are looking for?
Wolf

image_vtddjv.jpg
 

Cell-King

Member
Joined
Sep 23, 2019
Messages
58
Thanks Wolf, I will have a look at that setting when im back at the system. One night the low voltage state was reached and the Batrium tripped the breaker, but the dashboard still said the shunt state was "Idle". I would like to report on that too so I'll do some playing around with that setting when I can.
 

Wolf

Active member
Joined
Sep 25, 2018
Messages
1,580
Cell-King said:
................................ One night the low voltage state was reached and the Batrium tripped the breaker, but the dashboard still said the shunt state was "Idle". I would like to report on that too so I'll do some playing around with that setting when I can.
Cell-King
Maybe we need to take this to another thread but for now.....................
So I took a look at my C/D/C cycles of my cells after you mentioned your tripped breaker and I found another issue that perplexes me.
As you can see I trace all my 14 pack voltages in my battery and after doing a 7 day examination I found this.
The yellow circle clearly shows an excessive Vdrop. The green trace(Red Arrow) happens anytime I make an adjustment to the Batrium software so I'm not sure what that is but it is reproducible.

image_xexmot.jpg

So I investigated the yellow circle timeframe and found this.
A definitereport on voltage drop. I wonder if that caused your trip?

image_aulynq.jpg

A little closer look.
For about 6min I had no data from the Batrium. Reboot??

image_cybmoi.jpg

I had no other glitches with any other readings from my multitude of sensors at that time. So no Wifi dropout or anything. Also my Batrium is connected to a laptop with USB.
Time range of No Data.

image_mxuxyj.jpg

But when the data came back I wonder if the Batrium interpreted the "low V" as a critical event?

image_mjpouz.jpg

Hmm interesting.
Also here is the Snapshot report from 06/22/2020 at 11:55 PM
Code:
System  8093 - Wolf's
     Wolf's PowIRwall
TimeStamp 6/22/2020 11:55:04 PM 
----------------------------------------------------------------------------------------
System status information
Device Time       Startup         Ambient Supply
 6/22/2020 11:55:22 PM  5/31/2020 4:39:19 PM   30C 53.02v

Versions Hardware   Firmware   Software    SerialNo
     4.3     4.10     2.0.12     324644513

OpStatus         AuthMode         CMU Mode 
Discharging       Default         Normal 

SysFaults: Nil
----------------------------------------------------------------------------------------
Live status information
         Min @ ID   Max @ ID   Avg  Repeat
CellVolt    3.71v @ 14  3.75v @ 4  3.73v   6700
CellTemp     23C@ 13   24C@ 1   23C
BypassAmp    0.00A @ 0  0.00A @ 0
BypassTemp    22C@ 14   24C@ 2
BypSession   0.0mAh@ 0  0.4mAh@ 4

        Total Overdue +Final +Initial InBypass
NumOfCells    14   0   0    0    0

        SoC%  Temp  Volt   Amp
Shunt     40.5%  43C  52.39v -10.26A

         ToEmpty  ToFull
Nom Capacity   57.361  82.639
Est Duration    05:43   45.5d
Recent Consume  10.028   0.000
----------------------------------------------------------------------------------------
Expansion board 
Input Run/Idle   = off
Input Charge/Normal = off
----------------------------------------------------------------------------------------
Critical logic
control BattOK state
status OK
----------------------------------------------------------------------------------------
Charging logic
control ON state
Idle Bypass: off 
status OK
----------------------------------------------------------------------------------------
Discharging logic
control ON state
status OK
----------------------------------------------------------------------------------------
Thermal Heating Logic
control OFF state
status OK
----------------------------------------------------------------------------------------
Thermal Cooling Logic
control OFF state
status OK
----------------------------------------------------------------------------------------
Remote Logic
    ActV  ActA  TgtV  TgtA state
Charge 0.00v 0.00A 58.10v 148.00A ON state 
Dischg 0.00v 0.00A 47.60v 222.00A ON state 
----------------------------------------------------------------------------------------
Daily Session information 
         Min   Max
CellVolt     3.44   4.06
Thermal      19    29
ShuntSoc     1.0  101.5
ShuntVolt    48.76  57.02
SupplyVolt   49.24  57.48
Critical Events   0

        Charge  Dischg
ShuntPeak    38.15  30.50
Cumulative  151.460 136.578

Banding(hr) A  B  C  D  E  F  G  H
SoC%    4.0 1.6 1.3 2.4 3.0 2.3 2.1 7.2
Thermal  0.0 0.0 0.0 0.0 23.9 0.0 0.0 0.0
----------------------------------------------------------------------------------------
 Cell Node information
 ID Bypass Initial      Session  Amp  MinV  MaxV  MaxT BypT HiT HiBypT LoV  HiV  BypV  BypA DatEr Reset CalV RepCV Serial  HwVers
 1 6/19/2020 4:49:31 PM   0.1 mAh 0.00A 3.72v 3.72v 24C 23C 55C 65C 3.00v 4.15v 4.08v 0.84A  16  2  0 250 316184432 HW6.2 FW2.2 BL2.0 
 2 6/22/2020 1:44:26 PM   0.0 mAh 0.00A 3.72v 3.72v 24C 24C 55C 65C 3.00v 4.15v 4.08v 0.84A  0  3  1 250 316176447 HW6.2 FW2.2 BL2.0 
 3 6/22/2020 5:05:26 PM   0.1 mAh 0.00A 3.73v 3.73v 24C 24C 55C 65C 3.00v 4.15v 4.08v 0.84A  10  4  1 250 316111230 HW6.2 FW2.2 BL2.0 
 4 6/22/2020 5:30:37 PM   0.4 mAh 0.00A 3.74v 3.75v 24C 24C 55C 65C 3.00v 4.15v 4.08v 0.84A  3  5  0 250 316100340 HW6.2 FW2.2 BL2.0 
 5 6/22/2020 5:20:39 PM   0.1 mAh 0.00A 3.72v 3.73v 24C 24C 55C 65C 3.00v 4.15v 4.08v 0.84A  0  6 130 250 316114799 HW6.2 FW2.2 BL2.0 
 6 6/22/2020 1:31:40 PM   0.0 mAh 0.00A 3.73v 3.73v 24C 23C 55C 65C 3.00v 4.15v 4.08v 0.84A  0  7  0 250 316186980 HW6.2 FW2.2 BL2.0 
 7 6/19/2020 2:53:25 PM   17.0 mAh 0.00A 3.72v 3.73v 24C 23C 55C 65C 3.00v 4.15v 4.08v 0.84A  70  8 130 250 316102151 HW6.2 FW2.2 BL2.0 
 8 6/19/2020 12:25:50 PM   0.3 mAh 0.00A 3.73v 3.73v 24C 23C 55C 65C 3.00v 4.15v 4.08v 0.84A  1  9 129 250 316099104 HW6.2 FW2.2 BL2.0 
 9 6/22/2020 3:05:19 PM   0.3 mAh 0.00A 3.72v 3.72v 24C 23C 55C 65C 3.00v 4.15v 4.08v 0.84A 128  10 131 250 316114066 HW6.2 FW2.2 BL2.0 
 10 6/22/2020 3:44:34 PM   0.2 mAh 0.00A 3.73v 3.73v 24C 23C 55C 65C 3.00v 4.15v 4.08v 0.84A  8  11  0 250 316177575 HW6.2 FW2.2 BL2.0 
 11 6/21/2020 2:57:45 PM   0.1 mAh 0.00A 3.72v 3.73v 24C 23C 55C 65C 3.00v 4.15v 4.08v 0.84A 128  12 130 250 316187654 HW6.2 FW2.2 BL2.0 
 12 6/18/2020 12:48:09 PM  261.4 mAh 0.00A 3.73v 3.73v 24C 23C 55C 65C 3.00v 4.15v 4.08v 0.84A  0  13  7 250 316189745 HW6.2 FW2.2 BL2.0 
 13 6/22/2020 3:56:50 PM   0.1 mAh 0.00A 3.72v 3.73v 23C 23C 55C 65C 3.00v 4.15v 4.08v 0.84A  5  14  0 250 316114117 HW6.2 FW2.2 BL2.0 
 14 6/22/2020 5:26:19 PM   0.2 mAh 0.00A 3.71v 3.71v 23C 22C 55C 65C 3.00v 4.15v 4.08v 0.84A 128  15  3 250 316105276 HW6.2 FW2.2 BL2.0 
----------------------------------------------------------------------------------------

This weekend I will be wiring my shunt trip breaker and see if I experience the same at some point.

Wolf
 

Cell-King

Member
Joined
Sep 23, 2019
Messages
58
Interesting. If it happens when you are syncing the longmons (the "Device Sync" button), the page states that there is no monitoring during that step so maybe the UDP listener is seeing no value or NaN and sending that to Influx?
 

Wolf

Active member
Joined
Sep 25, 2018
Messages
1,580
Cell-King said:
Interesting. If it happens when you are syncing the longmons (the "Device Sync" button), the page states that there is no monitoring during that step so maybe the UDP listener is seeing no value or NaN and sending that to Influx?
That's a possibility but I was not doing a sync at 10PM at night. Unless the Batrium in its infinite wisdomdid it.

I just initiated a sync and that's the trace Pack 1 drops to 0V for 1 sec and pack 2 to ~3.7V all others stay the same.

image_mjwisu.jpg


Nothing like the 6 minutes of no data as in the other charts.

Wolf
 

Dee Bee

New member
Joined
Sep 13, 2018
Messages
23
Hey Guys, thanks to @Wolf and this post I put together a bit of a walk-through. Let me know your thoughts. Hopefully it helps any newcomers.
It covers off on the following:

Grafana Install
Influx Install
Node-Red Install
- binary-parser
- influx
- dashboard-ui
Configure all elements
Home Assistant Embed of Grafana

https://dirtyoptics.com/batrium-integration-with-home-assistant/
 

Solardad

Member
Joined
Oct 27, 2018
Messages
76
Just a quick note that this thread helped me get up and running on my Synology NAS

Batrium Watchmon 4 > NODE RED > influxdb > grafana

now that I am hooked i want more...!
going to start with bringing in my iotawatt sense data next into influxdb then into grafana

from there i am thinking about weather data / sensors. anyone bringing in this type of data for analysis?
my thought is to leverage for instance a 'solar irradiance' value to control a pool pump ex. high irradiance then increase the rpms.

has anyone looked into the difference of node-red vs maybe home assistant for that scenario?

Thanks
 

Wolf

Active member
Joined
Sep 25, 2018
Messages
1,580
Solardad said:
................going to start with bringing in my iotawatt sense data next into influxdb then into grafana

from there i am thinking about weather data / sensors. anyone bringing in this type of data for analysis?
my thought is to leverage for instance a 'solar irradiance' value to control a pool pump ex. high irradiance then increase the rpms.

has anyone looked into the difference of node-red vs maybe home assistant for that scenario?

Thanks
Congratulations on getting your watchman 4 data to influx and grafana.

IoTaWatt is easy as it supports influx natively as you already know.

ForOpen weather in node red all you need to do is set up ahttp request node with your access string once you sign up for a free API key. After that a little code and you can push that info to influx.

image_zipnos.jpg


Local specific data can be done with an ESP32 or equivalent with a BME280 (temp/humidity/baro) and aTSL2561 (lux) sensors.
Arduino code can push this info to an influx database also.


Wolf
 

daromer

Moderator
Joined
Oct 8, 2016
Messages
5,659
Just use the built in open weather map palette and direct to influx output. No need to complicate it ;)
 

Wolf

Active member
Joined
Sep 25, 2018
Messages
1,580
daromer said:
Just use the built in open weather map palette and direct to influx output. No need to complicate it ;)
True but how else are you going to learn node red. :pBesides what's the difference whethera http request oran open weathernode-red pallet.
You still have to run the JSON data through a function node to get it palatable for influx.
So as far as the flow is concerned I could just plug the open weather node into my flow and it would work the same.
The only difference is 1 node all the rest stays the same . :D
Oh and for us imperialists' if you use the open Weather node you need to convert C to F and metric to imperialin a function node which if you do a http request you don't need to as its in the format of the request. I like to keep things uncomplicated. :p
https://api.openweathermap.org/data/2.5/onecall?lat="YOUR LAT HERE"&lon="YOUR LONG HERE"&units=imperial&appid="YOUR API KEY HERE"
All done
Wolf


image_rdgxwv.jpg
 

daromer

Moderator
Joined
Oct 8, 2016
Messages
5,659
To many People install node red and starts to write functions. Actually, most functions exist as palettes IF done correctly.
:)
 

Wolf

Active member
Joined
Sep 25, 2018
Messages
1,580
daromer said:
To many People install node red and starts to write functions. Actually, most functions exist as palettes IF done correctly.
:)
So what are you saying? Is there apalette to custom tune Openweather to my liking? I haven't found one. I also haven't found a custom palette for Watchmon 4. But thanks to all your initial hard work and Tim aka"Bloater" we have a working flow. :)That flow did a lot of heavy lifting but it still didn't post to an influx db. I haven't found a node that compiled all the data anddid that.
So yes there are generic plugin palets and nodes for a lot of stuff but when you want to step out of the box and break free from the shackles of confinementyou need to write some functions, or createyour own node pallet.
Now mind you this is coming from a guy that didnt know what node-red was 2 years ago so what do I know.............. I just go with the flow.

Wolf
 

daromer

Moderator
Joined
Oct 8, 2016
Messages
5,659
Im not saying you guys dont use the palettes but its unfortunately very common that people write nodejs code to change data or how things should be processed and in many times those functions exist. With that said its sometimes alot easier to wrote some code than using 10 palettes after each other :)

What I try to do is to simplify it. For instance i try to have 1 function to write to influx only per flow and not multiple. this since every palette creates a function/connection. Not always possible but for influx its often doable since influx itself if data is sent properly will interpretate it by itself :D
In some cases you can only do palette -> json -> influx :D

To your questions: You can finetune the data from openweathermap with palettes after yes like converting temperature ;) Though this seem to be cumbersome and the http request is as good to be used :) The example was perhaps not the best from my side.. You could argue that the palette for openweathermap is for sure not the best :D

Batrium does not have any because i never created one. I demed the listener software to do a better work than Nodered due to the fact on handling the amount of data and then utilizing Mqtt directly including influx connection :)

And as you say the writing is needed as soon as you want something more complex... You should see some of my flows :D THey containt 1000 lines of code easily but they are also doing heavy lifting. Doing with palettes would have been doable to big extent but then you would have a HUGE flow instead of the lines of code :D

I always start by looking at a palette though. I started coding myself in beginning untill i realised all work to convert or direct stuff exist :D
 

Wolf

Active member
Joined
Sep 25, 2018
Messages
1,580
Daromer,

Good answer and I'm glad we are on the same page. :D
Believe me I look for nodes athttps://flows.nodered.org/ and other places before I dive into writing code.
I am working on a flow now with victron and venus OS with MQTT.
I do know that Victron has custom nodes already built and I am investigating them. But for now...................
The amount of data that the Venus OS andthe SmartSolar MPPTcharger produces is phenomenal and some of it not really useful so it needs to be split otherwise all the dbusdata with 1 influx node would just be way to confusing when adding the measurements to grafana. The field selection actually overwhelms grafana as there is a limit of what can be displayed at one time. Even the Victron guys found that out with their readymade influx/grafanadocker.So I am splitting the measurements by topic and that works very well.I'msure there is a better way to send the data to influx on one measurement node but I haven't figured it out yet. Plus it makes debugging a bit easier as you are onlydealing with 1 topic. I mean History up to30 days is available. Each one has its own topic.History/Daily/0/... History/Daily/1/... and so on. So as soon as I get a day to be able to install my Victron Smart Solar charger I will be ready for all the measurement to be recorded.
Here is the rudimentary dashboard to be prettied up later.

Wolf

image_fbyjbv.jpg
 
Top