Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[modbus] Change some error / warn reporting #6113

Closed
Rossko57 opened this issue Sep 21, 2019 · 2 comments · Fixed by #8368
Closed

[modbus] Change some error / warn reporting #6113

Rossko57 opened this issue Sep 21, 2019 · 2 comments · Fixed by #8368
Assignees
Labels
enhancement An enhancement or new feature for an existing add-on

Comments

@Rossko57
Copy link
Contributor

Modbus binding v 2.4 stable

Noted, that if a data Thing is configured for writing but OFFLINE e.g. UNITIALIZED_HANDLER_MISSING_ERROR (when for example one if its parent Bridge Things are failed/offline) and an attempt is made to write to it by sending command to linked Item - there is no error report in openhab.log
I would like to see a WARN level message here.

Separately, if a data Thing is configured for read only (none of the writexxx parameters have been supplied), a WARN message is generated when command sent to linked Item.
2019-09-19 20:41:38.763 [WARN ] [ernal.handler.ModbusDataThingHandler] - Thing modbus:data:id2:poolpoll:bit_16_0 ‘Modbus data’: not processing command OFF since writeStart is missing and transformation output is not a JSON

A use-case for this kind of activity, a set of bit-mode read only data things may be configured from a bit-packed register. Individual Switches can be commanded from openHAB, and a rule can intercept the binary commands and combine to write a complete register.

In this particular case, where a dataThing has no write parameters e.g. it is intended as read-only, I would like to see the message at DEBUG level instead of appearing in "normal" openhab.log
This would effectively give an "ignore", a silent failure in everyday usage.

@wborn wborn added the bug An unexpected problem or unintended behavior of an add-on label Sep 24, 2019
@wborn wborn changed the title [modbus] change some error / warn reporting [modbus] Change some error / warn reporting Sep 24, 2019
@ssalonen ssalonen self-assigned this Oct 29, 2019
@ssalonen ssalonen added enhancement An enhancement or new feature for an existing add-on and removed bug An unexpected problem or unintended behavior of an add-on labels Nov 5, 2019
@ssalonen
Copy link
Contributor

I think your reasoning makes sense. While it is possible to write with a data thing that uses JSON as transformation output, it is much common to have the bit logic you described using rules.

People who use the json transformation are probably more advanced users and can find their way with troubleshooting.

Would you like introduce a PR for this?

@Rossko57
Copy link
Contributor Author

Alas, I am not a java programmer.

ssalonen added a commit to ssalonen/openhab2-addons that referenced this issue Aug 30, 2020
Resolves openhab#6113

Also adjusted some error level logging lower since the thing status
will be updated in any case, no need to repeat it in the logs.

Signed-off-by: Sami Salonen <ssalonen@gmail.com>
Hilbrand pushed a commit that referenced this issue Sep 3, 2020
Closes #6113

Also adjusted some error level logging lower since the thing status
will be updated in any case, no need to repeat it in the logs.

Signed-off-by: Sami Salonen <ssalonen@gmail.com>
CSchlipp pushed a commit to CSchlipp/openhab-addons that referenced this issue Sep 12, 2020
Closes openhab#6113

Also adjusted some error level logging lower since the thing status
will be updated in any case, no need to repeat it in the logs.

Signed-off-by: Sami Salonen <ssalonen@gmail.com>
markus7017 pushed a commit to markus7017/openhab-addons that referenced this issue Sep 19, 2020
Closes openhab#6113

Also adjusted some error level logging lower since the thing status
will be updated in any case, no need to repeat it in the logs.

Signed-off-by: Sami Salonen <ssalonen@gmail.com>
andrewfg pushed a commit to andrewfg/openhab-addons that referenced this issue Oct 8, 2020
Closes openhab#6113

Also adjusted some error level logging lower since the thing status
will be updated in any case, no need to repeat it in the logs.

Signed-off-by: Sami Salonen <ssalonen@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement An enhancement or new feature for an existing add-on
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants