From Samuel Butler's "The Book of the Machines," written in the 1860s and later included in Erewhon. It was first published in New Zealand under the title "Darwin among the Machines." I came across this incidentally; it should be required reading for steampunk aficionados.
"But who can say that the vapour engine has not a kind of consciousness? Where does consciousness begin, and where end? Who can draw the line? Who can draw any line? Is not everything interwoven with everything? Is not machinery linked with animal life in an infinite variety of ways? The shell of a hen's egg is made of a delicate white ware and is a machine as much as an egg-cup is: the shell is a device for holding the egg, as much as the egg-cup for holding the shell: both are phases of the same function."
Machines and animals are the same. And then he goes further by suggesting that everything has a form of consciousness. The potato, for example. "Even a potato in a dark cellar has a certain low cunning about him which serves him in excellent stead. He knows perfectly well what he wants and how to get it. He sees the light coming from the cellar window and sends his shoots crawling straight thereto. . . . The potato says these things by doing them, which is the best of languages."
Butler is best known for his posthumous novel The Way of All Flesh.