(08.01.2018, 07:52)admin Wrote: RTU read test value are decimal. To read 7 registers starting from 0 use mb:readregisters(0, 7).
You can also create a profile for this device (save as .json file and upload into Profiles in Modbus tab):
Code:{
"manufacturer": "RS",
"description": "GZWS-N01",
"mapping": [
{
"name": "Temperature",
"bus_datatype": "float16",
"datatype": "int16",
"type": "register",
"address": 0,
"value_multiplier": 0.1
},
{
"name": "Humidity",
"bus_datatype": "float16",
"datatype": "uint16",
"type": "register",
"address": 1,
"value_multiplier": 0.1
},
{
"name": "Illumination",
"bus_datatype": "uint16",
"datatype": "uint16",
"type": "register",
"address": 6
}
]
}
Managed to create a profile, and have added a device with the name of multi. Found by accident the objects from the profile in the mapping section for the modbus device. Linked those to virtual KNX objects, but not sure if this is necessary. Maybe it is possible to access thos mapping objects directly from a script?
Anyway, made a simple script that read a value from the virtual objectand turned on and off some lights just to test. Worked like a charm