Devarim31:28

הַקְהִילוּ אֵלַי אֶת־כָּל־זִקְנֵי שִׁבְטֵיכֶם וְשֹׁטְרֵיכֶם וַאֲדַבְּרָה בְאָזְנֵיהֶם אֵת הַדְּבָרִים הָאֵלֶּה וְאָעִידָה בָּם אֶת־הַשָּׁמַיִם וְאֶת־הָאָרֶץ׃

Assemble to me all the elders of your tribes and your officers, and I will speak these words in their hearing and call the heavens and the earth to witness against them.

Devarim 31:28

הַקְהִילוּ אֵלַי אֶת־כָּל־זִקְנֵי

Devarim / Deuteronomy 31:28 · Sod

Devarim 31:28

הַקְהִילוּ אֵלַי אֶת־כָּל־זִקְנֵי שִׁבְטֵיכֶם וְשֹׁטְרֵיכֶם וַאֲדַבְּרָה בְאָזְנֵיהֶם אֵת הַדְּבָרִים הָאֵלֶּה וְאָעִידָה בָּם אֶת־הַשָּׁמַיִם וְאֶת־הָאָרֶץ׃

Assemble to me all the elders of your tribes and your officers, and I will speak these words in their hearing and call the heavens and the earth to witness against them.

Sod סוֹד

The heavens as witnesses

We usually think nature lives by its own laws and does not notice people. A Chasidic master reads "call the heavens and the earth to witness" as a promise: nature responds to how Israel live.

Sefat Emet: the heavens and the earth are witnesses because nature changes with the deeds of Israel: if they mend their deeds the earth gives its yield, if not the heavens are shut. This is a new level the people gained by the power of the Torah. For one who believes, nature changes by his faith. And even in exile Israel always have a share in the Torah and in the heavens.

How Sefat Emet explain it

Sefat Emet And call the heavens and the earth to witness against them

On the verse "and call the heavens to witness against them" and so on, my master, my father's father, of blessed memory, explained that through the children of Israel the glory of the Blessed One, which is hidden in the work of creation, is made clear, as it is written: "The heavens tell" and so on (Tehillim / Psalms 19:2), and everything depends on the children of Israel. And the plain meaning: the heavens and the earth became witnesses, as it is said: "The hand of the witnesses shall be first upon him" (Devarim / Deuteronomy 17:7). And it seems that it is all one: the testimony itself is that nature changes according to how the children of Israel stand. If they mend their deeds, "and the land shall yield its produce" (Vayikra / Leviticus 26:4), and if not, "and He will shut up the heavens" (Devarim / Deuteronomy 11:17). So the children of Israel make His kingship clear.

And the truth is that this is a new level the children of Israel merited: all of nature follows the service of those below. For before it was not so, since there is no reward and punishment in this world, and only the children of Israel drew this path by the power of the Torah. And indeed the wicked said: "The Eternal has forsaken the land" (Yechezkel / Ezekiel 9:9). But in truth the Creator's providence over the world is according to faith. The wicked who do not believe are handed over to nature alone, while for the children of Israel nature changes according to their faith, as it is said: "Israel has no fate (מַזָּל)" (Shabbat 156a). And since the children of Israel took upon themselves the blessings and the curses, they may trust that in the end they will mend their deeds. And this is what is said: "And it shall be, when all these things come upon you, the blessing" and so on, "and He will return" (Devarim / Deuteronomy 30:1–3). That is, because you took upon yourselves the blessings and the curses, you will see and understand of yourselves and say: "Is it not because my Almighty is not among me" and so on, and so you will return to Him.

And the children of Israel at all times have a bond with the Torah of the Eternal. And even in the last generations, when we have been driven from the table of our Father in heaven, we have a share in the Torah. For how many whole portions speak only of the days of exile and descent, as it is said: "This song shall testify" and so on: in these days too they have a share in the Torah. And it is written: "If your outcasts are at the end of the heavens" (Devarim / Deuteronomy 30:4), to say that the children of Israel always have a share in the Torah and in the heavens, much or little. As it is said: "it will not be forgotten from the mouths of its offspring", and Rashi explained: the Torah will not be wholly forgotten by their offspring. For they always have a hold on the Torah and on the heavens. [And as a play on words: the Torah is the heavens, and these last portions of the Torah, which speak of the last generations, are called "the end of the heavens", as said above.]

Takeaway

"My master, my father's father" is Rabbi Yitzchak Meir of Gur, author of the book Chiddushei HaRim, grandfather of the author of Sefat Emet.
"Israel has no fate" (Shabbat 156a): the stars do not decide for the people, its life depends on its deeds and prayer.
Onkelos renders "and call to witness" as "and I will testify" (וְאַסְהֵד). Sefat Emet sees in the heavens and earth not mute witnesses but a living reflection of how the people live.