can't import json profile - Printable Version +- Logic Machine Forum (https://forum.logicmachine.net) +-- Forum: LogicMachine eco-system (https://forum.logicmachine.net/forumdisplay.php?fid=1) +--- Forum: General (https://forum.logicmachine.net/forumdisplay.php?fid=2) +--- Thread: can't import json profile (/showthread.php?tid=4221) |
can't import json profile - AlexLV - 06.09.2022 Hi, I just started creation new profile for Ouman H23 device. I tried to import it but I see invalid profile. What is wrong, or where I can see rules for creation?
OumanH23.json (Size: 529 bytes / Downloads: 4)
Alex RE: can't import json profile - AlexLV - 07.09.2022 Hi, I used profile generator. Now it possible to import. What is correct datatype and bus type for first two registers (from attached file) from description? Temperatures I see not 10.0 but 100. My variant: { "manufacturer": "Ouman", "description": "H23 V1", "mapping": [ { "name": "Outdoor temp.", "address": 201, "bus_datatype": "temperature", "datatype": "uint16", "type": "register", "units": "\u00B0C" }, { "name": "H1 supply water temp.", "address": 203, "bus_datatype": "temperature", "datatype": "uint16", "type": "register", "units": "\u00B0C" } ] }
H23_ModbusInterface_v2.0.2_EN.pdf (Size: 122.36 KB / Downloads: 9)
RE: can't import json profile - admin - 07.09.2022 S32 is a signed 32-bit integer so datatype must be set to int32. Add "value_multiplier": 0.1 to divide the resulting value by 10. RE: can't import json profile - AlexLV - 07.09.2022 Hi, not working, temp. read the same 670760.96 °C { "manufacturer": "Ouman", "description": "H23 V1", "mapping": [ { "name": "Outdoor temp.", "address": 201, "bus_datatype": "temperature", "datatype": "int32", "type": "register", "units": "\u00B0C", "value_multiplier": "0.1" }, { "name": "H1 supply water temp.", "address": 203, "bus_datatype": "temperature", "datatype": "int32", "type": "register", "units": "\u00B0C", "value_multiplier": "0.1" } ] } RE: can't import json profile - admin - 07.09.2022 You might also need to set a different read_swap value (probably "n"). Use Read test to find the correct settings then implement them a profile. RE: can't import json profile - AlexLV - 07.09.2022 Test working OK. Read swap is CDAB by default. Is it = n ? Temp readed 158 so should be divided by 10 RE: can't import json profile - admin - 07.09.2022 Default swap is "w" (word, CDAB). You need to add "read_swap": "n" to the profile. "value_multiplier": 0.1 will handle the conversion (divide by 10). RE: can't import json profile - AlexLV - 07.09.2022 But this is without datatype set. If I set int32 I receive 1035488 with CDAB. When I set to none all is Ok. So now all is clear with this, thank you! RE: can't import json profile - AlexLV - 11.12.2022 Hi, another little problem is found now. Positive temperature reading is OK, but when temperature is negative - I see reading 6548.48. What can be corrected in my case: "mapping": [ { "name": "Outdoor temp.", "address": 201, "bus_datatype": "temperature", "datatype": "int32", "type": "register", "units": "\u00B0C", "value_multiplier": "0.1" }, Alex RE: can't import json profile - admin - 12.12.2022 What values do you get when doing read test with these settings? Function: holding register Address: 201 Data type: - Read length: 2 Also perform the same read test with address set to 200. RE: can't import json profile - rw_echo - 11.07.2023 Admin, Can I still use the "read_swap": "n" instruction to read the same object that is not a continuous data address? If not, what should I do? eg: Power_ H register: 0x60 Power_ L register: 0x70 RE: can't import json profile - Daniel - 11.07.2023 Nothing has changed in the documentation. https://openrb.com/docs/modbus.htm Use read test to find out correct configuration. RE: can't import json profile - admin - 11.07.2023 You will need a script if the value is split across several registers that are not consecutive. Register values can be read via profile but the final value conversion will be done by a script. |