question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Status change not recognized by status node

See original GitHub issue

I’m submitting a … (check one with “x”)

Problem

  • (x) bug report => please search github for a similar issue or PR and test Modbus problems with the modbus-serial package before submitting
  • ( ) unexpected behavior => please visit the Wiki before

Current behavior

I’ve got an application with a Modbus Flex Gettern node. From time to time reading fails with an error like Client Not Ready To Read At State init. My problem is that the node status seems to stay “active” all the time, even while I get such error messages. I.e. the small square tile below the node stays filled green, text says “active” and a status node observing this Modbus node does not recognize any status change.

Expected behavior

During read error like Client Not Ready To Read At State init the modbus node status should be shown as “init” and a status node should throw a status change event with status “init”.

Minimal reproduction of the problem with instructions

  1. Create flow with a Modbus node and an inject node attached to its input.
  2. Add a status node observing the Modbus node’s status and a debug node attached to the status node’s output.
  3. Create new Modbus connection (MODBUS_RTU) and link it to a non-existing device, like /dev/nonexistingtty.
  4. Deploy.
  5. Modbus node shows “active”, even though it cannot be connected, since the device doesn’t even exist.
  6. The status doesn’t output anything, even though I’d expect something like “init”, “connecting”, “reconnecting”, “broken” etc.

Your Environment

  • Node-RED v2.1.3 (Docker image)

    • (x) I have installed modbus-serial as a global package (using npm i -g)

    • Device :

      • Raspbian: 9 (stretch)
  • node-red-contrib-modbus version: vX.X.X (don’t know how to determine inside a Docker container, package.json says version latest)
  • Node: (v14.x) node --version = v14.18.1

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:5 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
biancodecommented, Feb 12, 2022

@awoSYS In your reproducible description it is the serial interface with the OS and the way of “all is a file” - if the operating system opens up the dev with no error, then it is “active” and this is more in the serial lib as in the Node-RED contrib-package. It could be possible to open a none existing dev in the OS, but if you try to do some operations, then it will raise errors. I’ll have a look for that in the next version if we can find a better solution for that case.

0reactions
github-actions[bot]commented, Oct 1, 2022

This issue is stale because it has been open 60 days with no activity. It will be closed in 30 days, but can be saved by removing the stale label or commenting.

Read more comments on GitHub >

github_iconTop Results From Across the Web

response status change not working on connect for nodejs
I found the answer it should be like res.setHeader('Content-Type', 'application/json'); res.statusCode = 400; res.end(JSON.stringify("not ...
Read more >
Status of Nodes not changed or update with delay after ...
After upgrading Solar NPM to the 2021 version, my node status doesn't change or change with delay. Also, my reset Alert is not...
Read more >
Change the status of nodes from NotReady or Unknown to ...
My Amazon Elastic Kubernetes Service (Amazon EKS) worker nodes are in NotReady or Unknown status. I want to get my worker nodes back...
Read more >
status node not working · Issue #892 - GitHub
Here, your status node is set to target all nodes - that means it will get triggered by the MQTT nodes as they...
Read more >
Unable to update the status using api node js
I am trying to update the status of the bug using api node js but it is not getting updated. var bodyData =...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found