Error loading module: Invalid syntax in target property for dependency Modbus to

Hi All,

I’ve written a new module for the ADS-TEC StoraXe controller and I have an issue on loading the module.

I receive the following error. Has anyone seen this before? It’s happening before the constructor for the component is called, sometime during the module loading code.

2020-11-24 09:02:28,455 [b82c86f)] ERROR [c.storaxe.AdstecStoraxeEssImpl] bundle io.openems.edge.ess.adstec.storaxe: (158)[Adstec.StoraXe.Ess(15)] : Invalid syntax in target property for dependency Modbus to

The message stops at the “Modbus to”. I’m not sure if this is the end of the message or if it is cut off prematurely.

Anyway, if anyone’s seen this error before and could direct me where to look, I’d be appreciative.



Hi Les,

nice to see, that somebody is working on implementing ADS-TEC. If you are in touch with them, please remind them to also join the OpenEMS Association. :wink:

The error message is ok and comes from the way how the connection between your component with the correct ModbusBridge identified by its id is established. Activate works in that order: (at the example of a Janitza Meter)

  1. Initially the Modbus target filter is empty.
  2. ModbusBridge is activated
  3. MeterJanitzaUmg96rme object gets constructed
  4. The ModbusBridge reference is dependency injected into the meter object
  5. After all References are injected, the activate()-method is called.
  6. The activate() method sets a new “target filter” on the Modbus Reference, that requires to not get any ModbusBridge, but to get exactly the one with the configured Component-ID
  7. Because the configuration changed, the component gets destroyed: call deactivate() method - destroy object - create new object
  8. The ModbusBridge reference is again dependency injected into the meter object, but this time the “target filter” is applied, making sure that the correct ModbusBridge is taken.