Open ctr49 opened 1 year ago
I tried to understand where one would catch that exception, but I don't. Apparently this exception is thrown in the smartmeter-obis code, not the node-red node. After the node-red node calls the init()
function of the smartmeter-obis module the serial port code is tied to the smartmeter-obis code as I understand it. So if something is emitted from the serial port it goes directly into the smartmeter-obis code and I don't know how to catch that from this project :thinking:
Thanks @ctr49 for publishing this issue for other users and thank you, @w4tsn, very much for trying to answer. It is right, that this seems to be a problem at the smartmeter-obis module. But I also don't know, why this is happening. I also have no experiance in using lxc with serial devices.
Thanks for the feedback. As mentioned, the problem reported here is really not the serial access, but how the module/flow responds to the exception: by bringing down and restarting node-red. I can see that the code triggering the exception is in smartmeter-obis, and this may not be unintentional after all. However, for this module you may want to wrap this into a try/catch statement or something similar.
I recently installed node-red-contrib-smartmeter on a system with: Node-RED version: v3.0.2 Node.js version: v18.12.1 Linux 5.15.74-1-pve x64 LE node-red-contrib-smartmeter: v0.6.3
Unfortunately there seems to be an issue with both of my smart meters (Hager eHZ and Iskra MT681) and/or the serial connection and/or permissions or lxc device pass-through. I still have to figure out what the actual problem is, but whatever it is, it brings down the entire module and node-red as result (resulting in a restart loop until I disconnect the device):
error messages from log:
At this point I'm not looking for help to troubleshoot the issue (I'm sure it's something I can easily find out), but want to report the issue that an error in processing a message / making a connection (this really only happens when a meter is connected on the serial port) may bring down the module, causing an availability issue.
Let me know if you need any additional information.