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

Socat unable to create Serial Device in /dev #535

Closed
HarrisonPace opened this issue Feb 10, 2021 · 4 comments
Closed

Socat unable to create Serial Device in /dev #535

HarrisonPace opened this issue Feb 10, 2021 · 4 comments

Comments

@HarrisonPace
Copy link

HarrisonPace commented Feb 10, 2021

zigbee2mqtt add-on version (if edge, please report commit hash):

1.17.1

Operating environment (HassOS, Virtual Machine, Device/platform running Home Assistant):

HassOS

Description of problem:

As of 1.17, Socat is unable to create serial devices in /dev i.e. /dev/ttyZ2M:

Extract from the log: /share/zigbee2mqtt/socat.log

2021/02/10 22:06:54 socat[257] N PTY is /dev/pts/0
2021/02/10 22:06:54 socat[257] E unlink("/dev/ttyZ2M"): Read-only file system
2021/02/10 22:06:54 socat[257] N exit(1)

Creating the device in /tmp works. But the default configuration uses /dev.

Your entire configuration from the frontend (with sensitive fields redacted):

data_path: /share/zigbee2mqtt
external_converters: []
devices: devices.yaml
groups: groups.yaml
homeassistant: true
permit_join: false
mqtt:
  base_topic: zigbee2mqtt
  server:  [REDACTED]
  user:  [REDACTED]
  password:  [REDACTED]
serial:
  port: /dev/ttyZ2M
advanced:
  log_level: info
  pan_id: [REDACTED]
  channel: 11
  network_key:
     [REDACTED]
  availability_blocklist: []
  availability_passlist: []
  rtscts: false
device_options: {}
blocklist: []
passlist: []
queue: {}
frontend:
  port: 8099
experimental:
  new_api: true
socat:
  enabled: true
  master: 'pty,raw,echo=0,link=/dev/ttyZ2M,mode=777'
  slave: 'tcp4:[REDACTED]:8485,ignoreeof'
  restartdelay: 1
  initialdelay: 1
  options: '-d -d'
  log: true

Your logs from Home Assistant

N/A

(Note: I tested the zigbee2mqtt/hassio-zigbee2mqtt addon, the issue is present in both addons. )

@ciotlosm
Copy link
Collaborator

Can you try https://github.com/zigbee2mqtt/hassio-zigbee2mqtt and see how it behaves?

@HarrisonPace
Copy link
Author

Can you try https://github.com/zigbee2mqtt/hassio-zigbee2mqtt and see how it behaves?

It behaves the same as this addon i.e. /dev is read-only and socat fails to create a serial tty device in /dev.

@ciotlosm
Copy link
Collaborator

@thehaxxa You can try the solution suggested here: zigbee2mqtt/hassio-zigbee2mqtt#24 until we patch the defaults to change the location for the mapping.

@ciotlosm
Copy link
Collaborator

Closing this as it's covered under zigbee2mqtt/hassio-zigbee2mqtt#24

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

No branches or pull requests

2 participants