Thermostat controlled pellet stove relay.
Ultrasonic pellet fuel hopper level sensor.
Thought it would be nice to see if the Wood heat Pellet stove needed pellets at any time and be able to automate when low.
I already had a low volt relay connected to the stove for a thermostat control integrated with my Schedy heating schedule using input Boolean occupancy detection so I just needed to swap out the old relay with a D1 mini and a relay shield and just because I could I added a DS18B20 temperature shield. (but it is reading high because it located behind the pellet stove).
D1 mini 5$
D1 mini relay shield 2$
D1 mini DS18B20 temperature sensor shield 2.50$
Ultrasonic Module HC-SR04 Distance Sensor 2$
Temporary project box until I 3D print a new box to fit all the components.
ESPHOME
esphome:
name: pellet_controller
platform: ESP8266
board: d1_mini
wifi:
ssid: "smarthome1"
password: "wireless"
#IP Address: 192.168.2.105
# Enable fallback hotspot (captive portal) in case wifi connection fails
ap:
ssid: "Pellet Controller"
password: "1QTAReJlz3j5"
#Open web port for browser access
web_server:
port: 80
captive_portal:
# Enable logging
logger:
# Enable Home Assistant API
api:
ota:
sensor:
- platform: ultrasonic
trigger_pin: D4
echo_pin: D3
name: "pellet level in percent"
update_interval: 30s
# Optional variables:
icon: "mdi:sack-percent"
accuracy_decimals: 0
filters:
# Calculates in %
# Replace 0.46 by the height of hopper. From the sensor to the bottom.
# I used this website to know how I should multiply my values :https://www.skillsyouneed.com/num/percent-change.html
- lambda: return (0.46-x)*(100/0.46);
unit_of_measurement: "%"
#- platform: ultrasonic
# trigger_pin: D4
# echo_pin: D3
# update_interval: 30s
#Optional variables:
# icon: "mdi:sack-percent"
# filters:
#Replace the 0.46 by the height of hopper. From the sensor to the bottom.
# I multiplied by 100 in order to get CM since the sensor works in meters
# - lambda: return (0.46-x)*100;
# unit_of_measurement: "cm"
- platform: dallas
name: "pellet stove Temperature"
address: "0xB303139779A1FE28"
dallas:
- pin: D2
#update_interval: 30s
switch:
- platform: gpio
name: "pellet_stove_relay"
pin: D1
Node red flow for random alexa messages when level gets low.
[{"id":"5eec722a.87ac8c","type":"tab","label":"pellets","disabled":false,"info":""},{"id":"fd5738bb.a8f118","type":"api-call-service","z":"5eec722a.87ac8c","name":"turn off lights","server":"ceea5ac5.1b1658","version":1,"debugenabled":false,"service_domain":"switch","service":"turn_off","entityId":"switch.garage_light, switch.driveway_light","data":"","dataType":"json","mergecontext":"","output_location":"","output_location_type":"none","mustacheAltTags":false,"x":630,"y":80,"wires":[[]]},{"id":"81055a15.3fda38","type":"delay","z":"5eec722a.87ac8c","name":"","pauseType":"delay","timeout":"15","timeoutUnits":"minutes","rate":"1","nbRateUnits":"1","rateUnits":"second","randomFirst":"1","randomLast":"5","randomUnits":"seconds","drop":false,"x":470,"y":80,"wires":[["fd5738bb.a8f118"]]},{"id":"bd26d583.2beb68","type":"server-state-changed","z":"5eec722a.87ac8c","name":"pellet level","server":"ceea5ac5.1b1658","version":1,"exposeToHomeAssistant":false,"haConfig":[{"property":"name","value":""},{"property":"icon","value":""}],"entityidfilter":"sensor.pellet_level_in_percent","entityidfiltertype":"exact","outputinitially":true,"state_type":"num","haltifstate":"","halt_if_type":"str","halt_if_compare":"is","outputs":1,"output_only_on_state_change":false,"for":"","forType":"num","forUnits":"minutes","ignorePrevStateNull":false,"ignorePrevStateUnknown":false,"ignorePrevStateUnavailable":false,"ignoreCurrentStateUnknown":false,"ignoreCurrentStateUnavailable":false,"x":80,"y":100,"wires":[["195c90a5.5c30af"]]},{"id":"d0a5c7d9.3c0718","type":"api-call-service","z":"5eec722a.87ac8c","name":"alexa say ","server":"ceea5ac5.1b1658","version":1,"debugenabled":true,"service_domain":"notify","service":"alexa_media_moms_room_dot","entityId":"","data":"{\"message\":\"{{payload}}\",\"data\":{\"type\":\"tts\"}}","dataType":"json","mergecontext":"","output_location":"payload","output_location_type":"msg","mustacheAltTags":false,"x":680,"y":360,"wires":[[]]},{"id":"4354ce85.085d3","type":"api-call-service","z":"5eec722a.87ac8c","name":"alexa say ","server":"ceea5ac5.1b1658","version":1,"debugenabled":true,"service_domain":"notify","service":"alexa_media_kitchen_echo_dot","entityId":"","data":"{\"message\":\"{{payload}}\",\"data\":{\"type\":\"tts\"}}","dataType":"json","mergecontext":"","output_location":"payload","output_location_type":"msg","mustacheAltTags":false,"x":680,"y":320,"wires":[[]]},{"id":"11ae4a5a.95b376","type":"switch","z":"5eec722a.87ac8c","name":"","property":"payload","propertyType":"msg","rules":[{"t":"btwn","v":"10","vt":"num","v2":"28","v2t":"num"}],"checkall":"true","repair":false,"outputs":1,"x":370,"y":140,"wires":[["a0085c07.65023"]]},{"id":"195c90a5.5c30af","type":"range-for","z":"5eec722a.87ac8c","name":"","above":"","below":"28","for":"5","units":"min","continuous":false,"x":210,"y":160,"wires":[["11ae4a5a.95b376"],[]]},{"id":"7b2a5bfd.635a74","type":"inject","z":"5eec722a.87ac8c","name":"31","props":[{"p":"payload"},{"p":"topic","v":"","vt":"num"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"31","payloadType":"num","x":50,"y":280,"wires":[["195c90a5.5c30af"]]},{"id":"a0085c07.65023","type":"time-range-switch","z":"5eec722a.87ac8c","name":"","lat":"","lon":"","startTime":"07:00","endTime":"22:30","startOffset":0,"endOffset":0,"x":520,"y":200,"wires":[["c72d9bbc.14ee88"],[]]},{"id":"3d06733c.aa49dc","type":"api-call-service","z":"5eec722a.87ac8c","name":"turn off boolean","server":"ceea5ac5.1b1658","version":1,"debugenabled":false,"service_domain":"input_boolean","service":"turn_off","entityId":"input_boolean.pellets_low","data":"","dataType":"json","mergecontext":"","output_location":"","output_location_type":"none","mustacheAltTags":false,"x":420,"y":540,"wires":[[]]},{"id":"c72d9bbc.14ee88","type":"api-call-service","z":"5eec722a.87ac8c","name":"input need pellets on","server":"ceea5ac5.1b1658","version":1,"debugenabled":false,"service_domain":"input_boolean","service":"turn_on","entityId":"input_boolean.pellets_low","data":"","dataType":"jsonata","mergecontext":"","output_location":"","output_location_type":"none","mustacheAltTags":false,"x":620,"y":140,"wires":[[]]},{"id":"51945849.e946f8","type":"switch","z":"5eec722a.87ac8c","name":"","property":"payload","propertyType":"msg","rules":[{"t":"btwn","v":"30","vt":"num","v2":"95","v2t":"num"}],"checkall":"true","repair":false,"outputs":1,"x":310,"y":480,"wires":[["3d06733c.aa49dc"]]},{"id":"c8160e0f.f0ddd","type":"range-for","z":"5eec722a.87ac8c","name":"","above":"30","below":"","for":"5","units":"min","continuous":false,"x":150,"y":520,"wires":[["51945849.e946f8"],[]]},{"id":"cf2df0ad.95a2e","type":"server-state-changed","z":"5eec722a.87ac8c","name":"pellet level full turn off","server":"ceea5ac5.1b1658","version":1,"exposeToHomeAssistant":false,"haConfig":[{"property":"name","value":""},{"property":"icon","value":""}],"entityidfilter":"sensor.pellet_level_in_percent","entityidfiltertype":"exact","outputinitially":true,"state_type":"num","haltifstate":"","halt_if_type":"str","halt_if_compare":"is","outputs":1,"output_only_on_state_change":false,"for":"","forType":"num","forUnits":"minutes","ignorePrevStateNull":false,"ignorePrevStateUnknown":false,"ignorePrevStateUnavailable":false,"ignoreCurrentStateUnknown":false,"ignoreCurrentStateUnavailable":false,"x":100,"y":440,"wires":[["c8160e0f.f0ddd"]]},{"id":"82e4c7b9.879a68","type":"api-call-service","z":"5eec722a.87ac8c","name":"alexa say ","server":"ceea5ac5.1b1658","version":1,"debugenabled":true,"service_domain":"notify","service":"alexa_media_carlene_s_echo_dot","entityId":"","data":"{\"message\":\"{{payload}}\",\"data\":{\"type\":\"tts\"}}","dataType":"json","mergecontext":"","output_location":"payload","output_location_type":"msg","mustacheAltTags":false,"x":680,"y":400,"wires":[[]]},{"id":"169b3b7.23a99c5","type":"server-state-changed","z":"5eec722a.87ac8c","name":"need pellets message on","server":"ceea5ac5.1b1658","version":1,"exposeToHomeAssistant":false,"haConfig":[{"property":"name","value":""},{"property":"icon","value":""}],"entityidfilter":"input_boolean.pellets_low","entityidfiltertype":"exact","outputinitially":false,"state_type":"str","haltifstate":"30","halt_if_type":"str","halt_if_compare":"is","outputs":2,"output_only_on_state_change":true,"for":"1","forType":"num","forUnits":"minutes","ignorePrevStateNull":false,"ignorePrevStateUnknown":false,"ignorePrevStateUnavailable":false,"ignoreCurrentStateUnknown":false,"ignoreCurrentStateUnavailable":false,"x":180,"y":380,"wires":[["1a08494.f4d8bb7"],[]]},{"id":"1a08494.f4d8bb7","type":"function","z":"5eec722a.87ac8c","name":"random message","func":"var line1 = [\"Heya anyone there?, \", \"Yo People of the house, \", \"Hello You yes you, \", \"howdy-do house guest, \"]\nvar line2 = [\n \"The pellet stove \", \"the heater \", \"the thing that keep you toasty \", \"The furnace \", \"The pellet stove \"\n ]\nvar line3 = [\n \"wanted you to know \",\n \"Asked me to tell you \",\n \"Told me to pass along to you \",\n \"Ordered me to tell you \",\n \"Shared with me \"\n ]\nvar line4 = [\n \"its hopper hungry, \", \"Its time to fill with Pellets, \", \" it needs stove chow, \", \" the hopper is low , \"\n ]\nvar line5 = [\n \"pellets now or cold later.\", \"time for a 40 pound workout.\", \"dont go to bed cold.\", \"I know I am annoying you \"\n ]\nmsg.payload =\n\nline1[Math.floor(Math.random() * line1.length)]+\nline2[Math.floor(Math.random() * line2.length)]+\nline3[Math.floor(Math.random() * line3.length)]+\nline4[Math.floor(Math.random() * line4.length)]+\nline5[Math.floor(Math.random() * line4.length)]\n\nreturn msg","outputs":1,"noerr":0,"initialize":"","finalize":"","x":490,"y":400,"wires":[["4354ce85.085d3","d0a5c7d9.3c0718","82e4c7b9.879a68"]]},{"id":"ceea5ac5.1b1658","type":"server","name":"Home Assistant","legacy":false,"addon":true,"rejectUnauthorizedCerts":true,"ha_boolean":"y|yes|true|on|home|open","connectionDelay":true,"cacheJson":true}]
My background. I have been using sonoff devices and ewelink with IFTTT for about 3 years to automate my home and heating and evaporative cooler. I made the jump to HA and I have been playing with Home assistant since 2018. I’m enjoying playing with WLED I made a automatic fish feeder also.
Over 30 years I have been installing and servicing Hearth products specializing in Gas and wood pellet burning stoves.
Home automation is a hobby I needed.
my Facebook page diyredneck.thestovedoc.com