RPi is working fine with 10 1-wire temperature sensors, but I need to connect 20.
Two simple terms describe measurements that are critical to 1-Wire network performance: radius and weight.
The radius of a network is the wire distance from the master end to the most distant slave. It is measured in meters.
The weight of a network is the total amount of connected wire in the network. It is also measured in meters.
For example, a star network configuration with three branches of 10m, 20m, and 30m would have a radius of 30m (i.e., the distance from 1-Wire master to the furthest slave) and a weight of 60m (i.e., the total length of wire in the network, 10m + 20m + 30m).
In general, the weight of the network limits the rise time on the cable, while the radius establishes the timing of the slowest signal reflections.
Testing has shown that unswitched star-type network topologies (i.e., those with several branches diverging at the master) are the most difficult to make reliable.
I would suggest using a i2c 8 channel 1-wire rpi hat.
It performs tons quicker then the bitbangging way the pi does it. I would also recommend using owfs (One Wire File System). Which essentially does the same thing as what Raspbian has done in creating a directory where your 1-wire devices are. http://owfs.sourceforge.net/index_old.html
there is a limit on w1 wire module to 10 sensors.
I find this information but i don't test it for the moment
If you or anyone else are still wondering how to attach more than 10 devices, just load the module with the following argument:
modprobe wire max_slave_count=15
or in /etc/modules with simply