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

Log is flooded by serialcommhub_x in case Modbus slave is not available #523

Closed
lategoodbye opened this issue Feb 1, 2024 · 1 comment
Closed
Assignees

Comments

@lategoodbye
Copy link

Hi,
we have tested the lastest everest-core 2024.01 and accidentially configured a meter on our Tarragon platform, which is not available via Modbus. After the start of EVerest the whole log is flooded (multiple times per second) by error messages from serialcommhub_x, which cause eMMC wearout:

Feb 01 13:53:51 tarragon manager[539]: 2024-02-01 13:53:51.074076 [ERRO] serialcommhub_x std::vector<short unsigned int> tiny_modbus::decode_reply(const uint8_t*, int, uint8_t, tiny_modbus::FunctionCode) :: Packet too small: 3 bytes.
Feb 01 13:53:51 tarragon manager[539]: 2024-02-01 13:53:51.293540 [ERRO] serialcommhub_x std::vector<short unsigned int> tiny_modbus::decode_reply(const uint8_t*, int, uint8_t, tiny_modbus::FunctionCode) :: Packet too small: 3 bytes.
Feb 01 13:53:51 tarragon manager[539]: 2024-02-01 13:53:51.423442 [ERRO] serialcommhub_x std::vector<short unsigned int> tiny_modbus::decode_reply(const uint8_t*, int, uint8_t, tiny_modbus::FunctionCode) :: Packet too small: 3 bytes.
Feb 01 13:53:51 tarragon manager[539]: 2024-02-01 13:53:51.553456 [ERRO] serialcommhub_x std::vector<short unsigned int> tiny_modbus::decode_reply(const uint8_t*, int, uint8_t, tiny_modbus::FunctionCode) :: Packet too small: 3 bytes.
Feb 01 13:53:52 tarragon manager[539]: 2024-02-01 13:53:52.733426 [ERRO] serialcommhub_x std::vector<short unsigned int> tiny_modbus::decode_reply(const uint8_t*, int, uint8_t, tiny_modbus::FunctionCode) :: Packet too small: 3 bytes.
Feb 01 13:53:52 tarragon manager[539]: 2024-02-01 13:53:52.863485 [ERRO] serialcommhub_x std::vector<short unsigned int> tiny_modbus::decode_reply(const uint8_t*, int, uint8_t, tiny_modbus::FunctionCode) :: Packet too small: 3 bytes.
Feb 01 13:53:52 tarragon manager[539]: 2024-02-01 13:53:52.993451 [ERRO] serialcommhub_x std::vector<short unsigned int> tiny_modbus::decode_reply(const uint8_t*, int, uint8_t, tiny_modbus::FunctionCode) :: Packet too small: 3 bytes.
Feb 01 13:53:53 tarragon manager[539]: 2024-02-01 13:53:53.203441 [ERRO] serialcommhub_x std::vector<short unsigned int> tiny_modbus::decode_reply(const uint8_t*, int, uint8_t, tiny_modbus::FunctionCode) :: Packet too small: 3 bytes.
Feb 01 13:53:53 tarragon manager[539]: 2024-02-01 13:53:53.333437 [ERRO] serialcommhub_x std::vector<short unsigned int> tiny_modbus::decode_reply(const uint8_t*, int, uint8_t, tiny_modbus::FunctionCode) :: Packet too small: 3 bytes.
Feb 01 13:53:53 tarragon manager[539]: 2024-02-01 13:53:53.463633 [ERRO] serialcommhub_x std::vector<short unsigned int> tiny_modbus::decode_reply(const uint8_t*, int, uint8_t, tiny_modbus::FunctionCode) :: Packet too small: 3 bytes.
Feb 01 13:53:53 tarragon manager[539]: 2024-02-01 13:53:53.673413 [ERRO] serialcommhub_x std::vector<short unsigned int> tiny_modbus::decode_reply(const uint8_t*, int, uint8_t, tiny_modbus::FunctionCode) :: Packet too small: 3 bytes.
Feb 01 13:53:53 tarragon manager[539]: 2024-02-01 13:53:53.803650 [ERRO] serialcommhub_x std::vector<short unsigned int> tiny_modbus::decode_reply(const uint8_t*, int, uint8_t, tiny_modbus::FunctionCode) :: Packet too small: 3 bytes.
Feb 01 13:53:53 tarragon manager[539]: 2024-02-01 13:53:53.933530 [ERRO] serialcommhub_x std::vector<short unsigned int> tiny_modbus::decode_reply(const uint8_t*, int, uint8_t, tiny_modbus::FunctionCode) :: Packet too small: 3 bytes.

Expected behavior:
Such communication issues shouldn't be handled by the modbus library. It would be better to let upper layer handle the issue.

Example:
EVerest Modbus module detects that connection to Modbus slave has been lost. Module logs the event of disconnect and a possible reason. In case the connection to the Modbus slave has been re-established again the EVerest Modbus module the re-connect should be logged.

active_modules:
  api:
    module: API
    connections:
      evse_manager:
      - module_id: connector
        implementation_id: evse
  tarragon_bsp:
    module: CbTarragonDriver
    config_module:
      contactor_1_feedback_type: nc
      relay_2_name: none
  tarragon_pluglock:
    module: CbTarragonPlugLock
  serialcommhub_x7:
    module: SerialCommHub
    config_implementation:
      main:
        serial_port: /dev/ttymxc0
        ignore_echo: true
  powermeter:
    module: GenericPowermeter
    config_implementation:
      main:
        model: Eastron_SDM72DM-V2
        powermeter_device_id: 1
    connections:
      serial_comm_hub:
        - module_id: serialcommhub_x7
          implementation_id: main
  serialcommhub_x8:
    module: SerialCommHub
    config_implementation:
      main:
        serial_port: /dev/ttymxc4
        ignore_echo: true
  connector:
    module: EvseManager
    config_module:
      connector_id: 1
      has_ventilation: false
      disable_authentication: true
    connections:
      bsp:
        - module_id: tarragon_bsp
          implementation_id: evse_board_support
      connector_lock:
        - module_id: tarragon_pluglock
          implementation_id: connector_lock
      powermeter_grid_side:
        - module_id: powermeter
          implementation_id: main
  energy_manager:
    module: EnergyManager
    connections:
      energy_trunk:
      - module_id: grid_connection_point
        implementation_id: energy_grid
  grid_connection_point:
    module: EnergyNode
    config_module:
      fuse_limit_A: 16
      phase_count: 3
    connections:
      energy_consumer:
      - implementation_id: energy_grid
        module_id: connector
@mhei
Copy link
Contributor

mhei commented Jul 10, 2024

We consider the issue as fixed with upcomming 2024.6.0 since both related PRs are merged into main branch. So I'll close this.

@mhei mhei closed this as completed Jul 10, 2024
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