@mtomek Hi Michal,
I found the meaning of the errors directly in the REXduino_slave.ino code. The first number indicates the type of error and can have values:
49 - ERROR_COMMAND
50 - ERROR_PINMODE
51 - ERROR_SERIAL
52 - ERROR_ONEWIRE
53 - ERROR_I2C
The second number indicates error specification. For example for ERROR_ONEWIRE:
49 - ERROR_ONEWIRE_NOMOREDEVICES
50 - ERROR_ONEWIRE_BUSYBUS
51 - ERROR_ONEWIRE_BADCRC
52 - ERROR_ONEWIRE_DEPLETED
53 - ERROR_ONEWIRE_NOTEMPDEVICE
I agree that the errors could be mentioned more explicitly somewhere.
So in your case, the code 52 51 means bad crc error. So, for example, some noise may have appeared during data transmission.
I don't have any experience with the UniPi hub, because I'm using Monarco HAT. But as I understand to the UniPi 1-wire knowledge base, you should use the first hub port to connect the hub to your Raspberry Pi GPIO. Default GPIO pin for 1-Wire is GPIO 4. After connecting, you can read the data in REXYGEN using OwsDrv module. Please pay special attention to the note in the knowledge base:
Unfortunately, I have no idea if the UniPi hub provides ESD protection. You should check this directly from the manufacturer. If the hub doesn't have protection, I definitely wouldn't connect it directly to the Raspberry GPIO. The resistance of such a solution to the induction of unexpected voltages is negligible and it's possible that your Raspberry would get burned. In the absence of ESD protection, I would rather invest in Monarco HAT, where ESD protection is present and Monarco communicates 1-Wire over the I2C bus (documentation here), so 1-Wire is not connected directly to the processor.
@cechurat I am not 100% sure. I am not in control of the PC that is running this Keptware software.
I believe that it was originally set at 1Hz but I am not sure, but when it was set to 0,1Hz it was working fine.
For the moment it is still crashing the application because I believe it is set at a too high polling rate again. (I assume....I am not in control and do have no access on this PC, so it's hard to verify if this is the real problem.)
But if I change the port number of the OPC UA server to make sure nobody is polling the server then everything keeps running fine.
It would be good that only the communication would stop and not the entire rexcore.