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:188.8.131.52011232145 (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.
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.
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)
- Initially the Modbus target filter is empty.
- ModbusBridge is activated
- MeterJanitzaUmg96rme object gets constructed
- The ModbusBridge reference is dependency injected into the meter object
- After all References are injected, the activate()-method is called.
- 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
- Because the configuration changed, the component gets destroyed: call deactivate() method - destroy object - create new object
- 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.