Skip to content

More convenient dockerfile#125

Merged
JsBergbau merged 1 commit intoJsBergbau:masterfrom
cangelis:update-dockerfile
Jun 23, 2022
Merged

More convenient dockerfile#125
JsBergbau merged 1 commit intoJsBergbau:masterfrom
cangelis:update-dockerfile

Conversation

@cangelis
Copy link
Contributor

@cangelis cangelis commented Jun 22, 2022

With this patch the dockerfile doesn't need to be updated according to the user's requirements. The script parameters can be provided to the command without requiring to update the dockerfile

dbus is also not necessary when --privileged is provided. --net=host is also required to be able to use bluetooth address family in sockets.

It doesn't work with Python 3.10 currently because pybluez has incompatible API.

With this patch the dockerfile doesn't need to be updated according to the user's requirements. The script parameters can be provided to the command without requiring to update the dockerfile
@JsBergbau JsBergbau merged commit 388d437 into JsBergbau:master Jun 23, 2022
@JsBergbau
Copy link
Owner

Hi cangelis,

thanks for making the docker file more convenient.

@Mufika
Copy link

Mufika commented Jul 17, 2022

I keep on getting the following error after deploying the container :

MiTemperature2 / ATC Thermometer version 5.0

Please read README.md in this folder. Latest version is available at https://github.com/JsBergbau/MiTemperature2#readme
This file explains very detailed about the usage and covers everything you need to know as user.

Script started in passive mode

In this mode all devices within reach are read out, unless a devicelistfile and --onlydevicelist is specified.
Also --name Argument is ignored, if you require names, please use --devicelistfile.
In this mode debouncing is not available. Rounding option will round humidity and temperature to one decimal place.
Passive mode usually requires root rights. If you want to use it with normal user rights,
please execute "sudo setcap cap_net_raw,cap_net_admin+eip $(eval readlink -f which python3)"
You have to redo this step if you upgrade your python version.

Traceback (most recent call last):
File "/app/LYWSD03MMC.py", line 600, in
toggle_device(dev_id, True)
File "/app/bluetooth_utils.py", line 113, in toggle_device
hci_sock = socket.socket(socket.AF_BLUETOOTH,
File "/usr/local/lib/python3.9/socket.py", line 232, in init
_socket.socket.init(self, family, type, proto, fileno)
OSError: [Errno 97] Address family not supported by protocol

@cangelis
Copy link
Contributor Author

@Mufika Make sure you use --net=host and --privileged together.

@Mufika
Copy link

Mufika commented Jul 18, 2022 via email

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

Successfully merging this pull request may close these issues.

3 participants