Searching for information on using a flame sensor, I came across this "fire alarm." I like the idea: The writer used a flame sensor board on top a servo motors horns (arms). The sensor could detect a flame over a wider area.
Why the idea is appealing: A flame sensor board only detects a flame directly opposite the LED-looking sensor component. We could maybe expand it's "field of vision," using a servo motor to move the sensor back & forth. Fastened to a servo's arms, a flame sensor (with longish flexible cables) could detect a flame over a wider field. This approach might also be used for other sensors.
However, the above writer's provided code only demonstrated his servo approach, not his flame sensor approach. Also in a demo video, the servo was sweeping the sensor rapidly & with much noise. Again, I liked the idea, but wanted to try a different implementation which I will provide in posts below
From here, download the latest choose_nodes sketch (updated March 18, 2019) & follow the basic customization in that thread. That node sketch now includes an IR_FLAME_SENSOR_digital option. It immediately sends detection of a new flame, but does not clear that detection until no flames have been detected for one minute.
Near the sketch's end, see version updates & credits. See the links in this post for documentation on several kinds of nodes you can program with this sketch.
In addition to the above basic customization ...
// #define SERVOsense << UNcomment this line (delete //)
// #define IR_FLAME_SENSOR_digital << UNcomment this line (delete //)
#define NODEID 05 << change 05 to a unique number in your RFM69 network (For this node, I suggest you use NODEID 42 as I will below.)
Next, Aiming a Flame Sensor, Serial Monitor Results & openHAB configuration