Because this DIY Home Automation project can be challenging, I encourage you to begin with a basic RFM69 network of Gateway & first node. See this thread for help.
This thread assumes you have built & programmed a RFM69 Gateway that is compatible with the end node you are creating. See this thread for help on this.
This thread also assumes you have built an RFM69 end node with the wiring to support the functions you are programming on it.
At the end of the sketch below is a version history & some documentation.
This post usually has the latest node choices sketch in the next line.
choose_nodes_MhF9r1_pub.ino (139.19 KB) << Updated, March 24 & 30 & April 5, 2019 (Piezo Alarm, Automatic Transmission Control, MQ Gas Sensor Node code). Forum members (free registration) can download this Node Choices sketch that I & others expanded from computourist's original DHT End Node sketch.
See the links in this post for documentation on several kinds of nodes you can program with this sketch.
Before uploading this sketch, customization is usually needed. See the next post ...
In the Arduino IDE, open the sketch from above & customize it. As an early sketch line says, "Customize your node starting at line XXX." Go to line XXX & see near there the line number where the customizing section will end.
Important changes follow: The following assumes you are programming Node 05 02 , set by the line NODEID05 (your choice, 05 thru 255, as long as you are consistent & you avoid 01, 02, 03, & 04 250, & 251 reserved for Gateways). (If & when you build more end nodes, be sure you give each node a unique NODEID.) Make sure the line with DEBUG is uncommented (NO "//" at the start).
Find 3 lines that say FREQUENCY & UNcomment only the frequency of your RFM69 radios. Find #define IS_RFM69HW & leave it uncommented ONLY if your RFM69 radio transceivers have "H" in their part number.
Note: If you UNcomment #define DEBUG, the Arduino serial monitor can use 115200 baud to display node debugging output.
Most users: UNcomment #define NetworkOne. Also find ENCRYPTKEY & replace the "xxxxxxxxxxxxxxxx" with the same 16 character key that you created & put into the GatewayOne section of the Gateway Node sketch above. To have more than one gateway & RFM69 network: GatewayTwo sections needs the same ENCRYPTKEY in the Gateway & Node Choices sketch. Do the same for the Gateway Three sections. For the Gateway AND Node Choices sketches, you UNcomment only the #define Gateway??? line of the gateway/network you want to use.
Before uploading programming to the node, do the added customization the node needs which is found in its documenting thread.
Often just return to the thread & post that sent you to this thread for the Latest Initial Node Choices Sketch & Customization.
Or again, Go to this post & see links to nodes one can program with this sketch.