ccatobs/MODBUS

Invalid features in mb_client_config_hlx.json

Closed this issue · 7 comments

When trying to run RestAPISync with commit f36264a and device config file mb_client_config_hlx.json, the API logs

mb_restapi  | 2023-08-11 10:50:43.650 :: INFO: mb_client_aux_sync.py - 57 - _client_config()	Config File: /MODBUS/modbusClientSync/src/../configFiles/mb_client_config_hlx.json
mb_restapi  | 2023-08-11 10:50:43.651 :: ERROR: mb_client_aux_sync.py - 37 - _throw_error()	Feature 'min' in register '30005' is not numerical
mb_restapi  | INFO:     172.17.0.1:43818 - "GET /modbus/read/10.10.1.30 HTTP/1.1" 422 Unprocessable Entity

Trying to resolve this by removing the quotes around the number in the corresponding entry in mb_client_config_hlx.json leads to other similar problems.

The config file worked with commit 00dbff2.

MIN and MAX need to be numerical, not string, since these features are utilized when writing to registers.
What are the other problems, I cannot simulate with HLX. Hence I need to see the error msg at which parameter it occurred.

The integrity checking on the config files became tighter over the last revisions

You can always test the HLX over tailscale, this is what I do. IP 10.10.1.30, port 502.

I changed the strings for min and max in the config file to numbers, then I got another message regarding a defaultvalue (if I remember correctly). One problem is that you only get a message for the first problem which the code hits; you can fix this, re-run, get the next message etc. Better would be that the API would report all problems in the first run.

defaultvalue -> defaultValue

Better would be that the API would report all problems in the first run.

This required a major redesign. The integrity checks were merely meant for unrevealing typos, etc. Supposedly, this is to be taken care of when Excels are converted to JSON

Ok, I adjusted the HLX config file, runs fine via tailscale: consumes 7 sec in async mode

Gosh, I modified the Async coding and I retrieved it in 0.6 sec, 10 times faster. I'll resume after vacation