Closed javier-alvarez-ctic closed 7 months ago
Hi @javier-alvarez-ctic.
Thank you for your interest in ThingsBoard IoT Gateway.
Your issue was registered, please wait for response from engineer.
IOTGW-116
Additionally, I have another small question. I'm looking to enable hot reload in this deployment. To accomplish this, I've added the following line within the tb-gateway service in the Docker Compose configuration:
command: ["/bin/sh", "-c", "pip3 install -r requirements.txt && pip3 install pyserial-asyncio && python3 thingsboard_gateway/tb_gateway.py $TB_HOT_RELOAD"]
The value of TB_HOT_RELOAD is set to True. Could someone please confirm if this approach is correct?
Thank you!"
Hi again.
I tried to downgrade Thingsboard and tb-gateway versions and now its working:
version: '3.0'
services:
thingsboard:
restart: always
image: "thingsboard/tb-postgres:3.4.1
...
tb-gateway:
restart: always
image: "thingsboard/tb-gateway:3.2"
command: ["/bin/sh", "-c", "pip3 install -r requirements.txt && pip3 install pyserial-asyncio && pip install 'pymodbus<3.4.0' - -force-reinstall && python3 thingsboard_gateway/tb_gateway.py $TB_HOT_RELOAD"]
...
(But I need to fix the pymodbus version as I have seen in this source)
Thanks!
Hi @javier-alvarez-ctic,
Thank you for your interest in ThingsBoard IoT gateway, could you try to use a version from the master branch, it contains some changes in module that imports connectors and may help.
Hi, I've had the same problem with the python 3 deb package, I downgraded to version 3.4.2 and worked for me.
Hi!
Yes, If i downgrade the gateway services or the pyrhon package its works. It seems to be a bug in the most recent(3.4.4) version of the docker image.
I am using an older version while it is fixed.
Thanks!!
Hi @javier-alvarez-ctic, thanks for your interest in ThingsBoard IoT Gateway! In the latest version of the gateway, we abandoned mounts and instead used docker volumes, so you have two options to solve the problem:
Also, I attach you sample docker-compose file:
version: '3.4'
services:
# ThingsBoard IoT Gateway Service Configuration
tb-gateway:
image: thingsboard/tb-gateway
container_name: tb-gateway
restart: always
# Ports bindings - required by some connectors
ports:
- "5000:5000" # Comment if you don't use REST connector and change if you use another port
# Uncomment and modify the following ports based on connector usage:
# - "1052:1052" # BACnet connector
# - "5026:5026" # Modbus TCP connector (Modbus Slave)
# - "50000:50000/tcp" # Socket connector with type TCP
# - "50000:50000/udp" # Socket connector with type UDP
# Environment variables
environment:
- host=mqtt.thingsboard.cloud
- port=1883
- accessToken=YOUR_ACCESS_TOKEN
# Volumes bind
volumes:
- tb-gw-config:/thingsboard_gateway/config
- tb-gw-logs:/thingsboard_gateway/logs
- tb-gw-extensions:/thingsboard_gateway/extensions
# Volumes declaration for configurations, extensions and configuration
volumes:
tb-gw-config:
name: tb-gw-config
tb-gw-logs:
name: tb-gw-logs
tb-gw-extensions:
name: tb-gw-extensions
Hi @javier-alvarez-ctic, any updates?
Hi!!
Apologies for the delay in getting back to you; I had to jump to other projects. I am glad to inform you that with the proposed changes, everything is working correctly. I really appreciate all the help and effort on the Thingsboard project.
Thank you very much for everything!
Describe the issue I'm currently working on deploying a plug & play instance of Thingsboard along with a Gateway and a client that will add the Gateway to the list of devices on Thingsboard. As of now, I have four custom Modbus connectors for the devices within my organization. However, I'm encountering errors during this process.
Configuration (Attach your configuration file) I am trying to deploy all of these services with this docker-compose.yml file:
My folders are the following (I added the
chown -R 799:799
permissons):An my tb_gateway.json file is the following:
The gateway is added to my Thingsboard instance successfully and I saw its Active status in the device list. If I connect to the "tb-gateway" container and go to the "/thingsboard_gateway/config" directory I see the files correctly.
Connector name (If you need help with some connector/converter): I have problems with custom ModbusTCP connector, I have three like the following one (I can access to its IPs addresses):
I copy my modbus connectors JSON files inside the folder
tb-gateway:/thingsboard_gateway/config
(inside the docker container).Error traceback (If it was raised):
Versions (please complete the following information):
Thank all!