Closed dirkjanfaber closed 2 years ago
Added a console.log(entry)
before the error and checked the messages:
[
'/History/Daily/0/MaxBatteryVoltage',
[ [ 'Value', [Array] ], [ 'Text', [Array] ] ]
]
[ '/Ac/L1/Current', [ [ 'Value', [Array] ] ] ]
16 Dec 11:56:53 - [red] Uncaught Exception:
The /Ac/L1/Current
does not seem to have a 'Text' entry.
And another one:
[ '/Pv/V', [ [ 'Value', [Array] ], [ 'Text', [Array] ] ] ]
[ '/Pv/V', [] ]
16 Dec 11:59:41 - [red] Uncaught Exception:
Though I can filter out the values without Text or Value, I had not expected to see them in the first place. Looking at the system with dbus-monitor --system path=/,member=ItemsChanged
reveals that they are like that on the dbus.
signal time=1639653187.875452 sender=:1.63 -> destination=(null destination) serial=12581 path=/; interface=com.victronenergy.BusItem; member=ItemsChanged
array [
dict entry(
string "/Yield/Power"
array [
dict entry(
string "Value"
variant double 1368
)
dict entry(
string "Text"
variant string "1368W"
)
]
)
dict entry(
string "/Pv/V"
array [
dict entry(
string "Value"
variant double 93.28
)
dict entry(
string "Text"
variant string "93.28V"
)
]
)
dict entry(
string "/Pv/V"
array [
]
)
]
So besides filtering out these messages I need to verify if this is indeed expected normal behavior.
Checked and it turns out that both cases are "invalid", meaning that we can ignore this kind of messages. Instead of throwing away wrong ones, this is better implemented by only allowing right ones.
On an ESS system Node-RED would not start with the following error in
/var/log/node-red/current
: