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

High CPU usage when using serial adapter #1

Closed
j54n1n opened this issue Jul 15, 2021 · 2 comments
Closed

High CPU usage when using serial adapter #1

j54n1n opened this issue Jul 15, 2021 · 2 comments
Labels
bug Something isn't working
Milestone

Comments

@j54n1n
Copy link

j54n1n commented Jul 15, 2021

Hello @jkandasa,

As mentioned in the forum post https://forum.mycontroller.org/post/2990 I file here the bug about the high CPU usage when using 2mqtt as serial adapter.

I get something like this with htop:
MyController-2mqtt

My environment was on a Raspberry Pi with latest Raspberry Pi OS based on Debian Buster and using Mosquitto 1.5.7 from apt-get.

The config file was set like this, where /dev/serial0 is a symlink to the actual PL011 UART /dev/ttyAMA0 connected to the MySensors serial gateway node:

logger:
  mode: development
  encoding: console
  level: info

adapters:
  - name: adapter1
    enabled: true
    reconnect_delay: 20s
    provider: mysensors_v2
    source:
      type: serial
      port: /dev/serial0
      baud_rate: 115200
      transmit_pre_delay: 10ms
    mqtt:
      broker: tcp://127.0.0.1:1883
      insecure_skip_verify: false
      username:
      password:
      subscribe: mysensors-in/#
      publish: mysensors-out
      qos: 0
      transmit_pre_delay: 0s
      reconnect_delay: 5s

  - name: adapter2
    enabled: false
    reconnect_delay: 20s
    provider: mysensors_v2
    source:
      type: ethernet
      server: tcp://192.168.10.21:5003
      transmit_pre_delay: 10ms
    mqtt:
      broker: tcp://192.168.10.21:1883
      insecure_skip_verify: false
      username:
      password:
      subscribe: in_nrf24/#
      publish: out_nrf24
      qos: 0
      transmit_pre_delay: 0s
      reconnect_delay: 5s

  - name: adapter3
    enabled: false
    reconnect_delay: 20s
    provider: raw
    source:
      type: serial
      port: /dev/ttyUSB0
      baud_rate: 115200
      transmit_pre_delay: 10ms
      message_splitter: 10
    mqtt:
      broker: tcp://192.168.10.21:1883
      insecure_skip_verify: false
      username:
      password:
      subscribe: in/my_topic
      publish: out/my_topic
      qos: 0
      transmit_pre_delay: 0s
      reconnect_delay: 5s

Thanks in advance.

@jkandasa jkandasa added the bug Something isn't working label Jul 16, 2021
@jkandasa jkandasa added this to the v1.2 milestone Jul 16, 2021
@jkandasa
Copy link
Member

@j54n1n I have fixed the issue, can you please verify it in the master build?

@j54n1n
Copy link
Author

j54n1n commented Jul 17, 2021

Yes with the commit b0f46c1 it seems to be fixed. I get now low CPU usage.

Thanks again.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants