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

Error on startup "Cannot assign requested address" #27

Open
snhnry opened this issue Aug 16, 2019 · 0 comments
Open

Error on startup "Cannot assign requested address" #27

snhnry opened this issue Aug 16, 2019 · 0 comments

Comments

@snhnry
Copy link

snhnry commented Aug 16, 2019

I'm trying to install the bridge on a raspberry pi 3 B+. I've tried it on Hassbian and Raspbian Buster with no luck. Currently trying to run it in a docker container (but have tried without docker) and I always get this message on startup:

Initialising CEC...
Initialising MQTT...
Traceback (most recent call last):
  File "bridge.py", line 360, in <module>
    mqtt_client.connect(config['mqtt']['broker'], int(config['mqtt']['port']), 60)
  File "/usr/local/lib/python3.6/site-packages/paho/mqtt/client.py", line 760, in connect
    return self.reconnect()
  File "/usr/local/lib/python3.6/site-packages/paho/mqtt/client.py", line 887, in reconnect
    sock = socket.create_connection((self._host, self._port), source_address=(self._bind_address, 0))
  File "/usr/local/lib/python3.6/socket.py", line 722, in create_connection
    raise err
  File "/usr/local/lib/python3.6/socket.py", line 713, in create_connection
    sock.connect(sa)
OSError: [Errno 99] Cannot assign requested address

The docker command is docker run -d --device=/dev/vcsm --device=/dev/vchiq --restart unless-stopped cec-mqtt-bridge

My config is:

; MQTT broker configuration
;
[mqtt]
; Hostname of mqtt broker (required)
broker=192.168.1.34

; Name of your device (default=cec-ir-mqtt)
devicename=cec-ir-mqtt 

; Port to connect to (default=1883)
port=1883

; Use tls
;tls=0

; Username and password
user=*****
password=*****

; MQTT prefix to use
prefix=apartment/tv

;
; HDMI-CEC configuration
;
[cec]
; Enable CEC
enabled=1

; ID of CEC controller
id=1

; Port where the CEC-device is connected
port=RPI

; Devices to query (comma seperated, defaults to all devices)
;devices=0,2,3,4,5

;
; LIRC configuration
;
[ir]
; Enable LIRC
enabled=0

Other info: Running Mosquitto 1.5.7 successfully with various other clients connected

Very rarely I have received an error similar to "Cannot connect to CEC adapter", but 90% of the time it is the above traceback. Any help would be hugely appreciated, thanks.

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

1 participant