@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.