This work proposes a K-means clustering process for node density based on the scheduling function notably in optimizing time slot allocation in 6TiSCH which is the result of standardizing the IPv6 protocol stack over IEEE802.15.4e time-slotted channel hopping mode in wireless sensor networks. A fundamental bottleneck in 6TiSCH network management is effectively distributing cells based on node density, due to cell allocation having significant impacts on network power utilization and service quality. Here, the K-means is to determine the central node that will be used as a parent node, such as a cluster head which is used to connect it with other nodes with the closest center as communication coordination between clusters to reduce packet movement between cells, both reducing latency and overhead without having to iterate which repeats itself based on each package delivery. The negotiated cell transaction for each packet delivery is based on communication by considering the results of node clustering by the K-means algorithm and determining the timeslot requirements obtained. This method might influence the overall frame slot structure to optimize cell usage and reduce packet overhead in the network. Apart from that, to influence routing paths and network organization, Routing Protocol for Low-Power and Lossy Networks (RPL) in 6TiSCH networks is also used which also uses Minimum Rank with Hysteresis x-objective Function to consider metrics such as rank, which reflects link quality, as well as hysteresis for avoid excessive path changes that can affect latency and overhead. Thus, the results of this study are expected to serve as a foundation for creating more flexible and effective cell allocation protocols for low-power 6TiSCH networks.