Skip to content
This repository has been archived by the owner on May 17, 2021. It is now read-only.

[serial] Enable configuration of databits, stopbits and parity #5071

Open
peti69 opened this issue Feb 6, 2017 · 2 comments
Open

[serial] Enable configuration of databits, stopbits and parity #5071

peti69 opened this issue Feb 6, 2017 · 2 comments

Comments

@peti69
Copy link

peti69 commented Feb 6, 2017

Currently only the baud rate can be configured. The number of databits and stopbits is hard-coded. Moreover the parity is hard-coded to none.

My smartmeter device requires settings which deviate from the hard-coded ones, Therefore the bindung should support the configuration of these values.

An approach could be an item configuration like here:
Number Strom_Zaehlerstand "Zählerstand [%.0f kWh]" { serial="port=/dev/smartmeter,baud=9600,databits=7,stopbits=1,parity=even,regex=.*1-0:1\\.8\\.0\\*255\\(([0-9]{8}\\.[0-9]{7}).*" }

@9037568
Copy link
Contributor

9037568 commented Feb 10, 2017

You should probably start a discussion in the user forum to see what other interest there is in this.

I certainly think we should support configurable databits (etc.) values. But I wonder if a small redesign might not also be advantageous (eg. to move these settings from the item binding string into a serial.cfg file).

@peti69
Copy link
Author

peti69 commented Feb 19, 2017

Your are right. Port parameters should be moved to serial.cfg.

I have started a discussion in the forum: https://community.openhab.org/t/serial-binding-improvements/23350

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants