I have D1 mini, running esp easy and a relay which drivers a 12V fan with mqtt commands. Everything was working fine, untill I added sharp dust sensor.
I have problems now, with the relay triggering automaticly on after 30 seconds - after the off command was send.
I cant detect what is triggering the relay in espeasy log file, because only off command is written there.
The same is in Nodered where i set debug nodes in places where the command could be triggered.
Any ideas?
I think you'll need to post your NR flow and 'Rules' (if you are using rules in ESP Easy) as otherwise it's difficult to suggest things to check.
I assume you have the output of the dust sensor connected to A0 (analog pin) on the D1 ?
Is the reading from the dust sensor being received by Node-RED via MQTT ?
Yeah its connected do A0 and working via mqtt.
I power the fan with 12V power supply and use voltage regulator to adjust the voltage for D1 mini. Also as the Sharp dust sensor is 3v3, Im using D1 mini native Ground and 3V power.
Could this be grounding issue, because it seems that relay turn on around 30seconds, which is also sensor reading interval?
The rules section is not enabled in espeasy, here is a nodered flow
[{"id":"2f836a93.b62c5e","type":"ui_switch","z":"484741e0.657758","name":"","label":"Ventilator","tooltip":"","group":"bb9a06d2.832cf","order":1,"width":0,"height":0,"passthru":true,"decouple":"false","topic":"","style":"","onvalue":"1","onvalueType":"num","onicon":"","oncolor":"","offvalue":"0","offvalueType":"num","officon":"","offcolor":"","x":660,"y":520,"wires":[["5cf3e1b1.fcb798","c49abcb3.7aeb"]]},{"id":"5cf3e1b1.fcb798","type":"mqtt out","z":"484741e0.657758","name":"","topic":"relay/gpio/5","qos":"1","retain":"","broker":"b8f9d118.d09b98","x":850,"y":540,"wires":[]},{"id":"bd470d4d.01ab1","type":"bigtimer","z":"484741e0.657758","outtopic":"","outpayload1":"1","outpayload2":"0","name":"Big Timer Vent","comment":"","lat":"51","lon":"-1,4","starttime":"480","endtime":"1320","starttime2":0,"endtime2":0,"startoff":"0","endoff":"0","startoff2":"","endoff2":"","offs":0,"outtext1":"1","outtext2":"0","timeout":1440,"sun":true,"mon":true,"tue":true,"wed":true,"thu":true,"fri":true,"sat":true,"jan":true,"feb":true,"mar":true,"apr":true,"may":true,"jun":true,"jul":true,"aug":true,"sep":true,"oct":true,"nov":true,"dec":true,"day1":0,"month1":0,"day2":0,"month2":0,"day3":0,"month3":0,"day4":0,"month4":0,"day5":0,"month5":0,"day6":0,"month6":0,"day7":"","month7":"","day8":"","month8":"","day9":"","month9":"","day10":"","month10":"","day11":"","month11":"","day12":"","month12":"","d1":0,"w1":0,"d2":0,"w2":0,"d3":0,"w3":0,"d4":0,"w4":0,"d5":0,"w5":0,"d6":0,"w6":0,"xday1":0,"xmonth1":0,"xday2":0,"xmonth2":0,"xday3":0,"xmonth3":0,"xday4":0,"xmonth4":0,"xday5":0,"xmonth5":0,"xday6":0,"xmonth6":0,"xd1":0,"xw1":0,"xd2":0,"xw2":0,"xd3":0,"xw3":0,"xd4":0,"xw4":0,"xd5":0,"xw5":0,"xd6":0,"xw6":0,"suspend":false,"random":false,"repeat":false,"atstart":false,"odd":false,"even":false,"x":280,"y":520,"wires":[["fa9651f3.321c18"],[],[]]},{"id":"fa9651f3.321c18","type":"function","z":"484741e0.657758","name":"String to number","func":"msg.payload = Number(msg.payload); return msg;","outputs":1,"noerr":0,"x":490,"y":520,"wires":[["2f836a93.b62c5e","605c046.0b0637c"]]},{"id":"605c046.0b0637c","type":"debug","z":"484741e0.657758","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","x":670,"y":580,"wires":[]},{"id":"c49abcb3.7aeb","type":"debug","z":"484741e0.657758","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","x":950,"y":460,"wires":[]},{"id":"bb9a06d2.832cf","type":"ui_group","z":"","name":"Kontrole","tab":"ea7741cd.cde638","order":5,"disp":true,"width":"6","collapse":false},{"id":"b8f9d118.d09b98","type":"mqtt-broker","z":"","name":"","broker":"192.168.1.105","port":"1883","clientid":"","usetls":false,"compatmode":true,"keepalive":"0","cleansession":true,"birthTopic":"","birthQos":"0","birthPayload":"","closeTopic":"","closeQos":"0","closePayload":"","willTopic":"","willQos":"0","willPayload":""},{"id":"ea7741cd.cde638","type":"ui_tab","z":"","name":"Raspberry + vent","icon":"dashboard","order":6,"disabled":false,"hidden":false}]
Found the problem. I used same gpio pin for led and relay pin.
Please mark as solved and close
Hi,
Glad you managed to get it to work.
I think YOU have to mark the thread as solved.
Thanks!
I used relay module with D1 mini so relay was already hardwired to that pin, and I didnt noticed it at first.
If I would make the connection im sure i would remember it..but then I saw which pin I was actually triggering in mqtt=)
This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.