-
Notifications
You must be signed in to change notification settings - Fork 634
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Use a 24GHz mmWave Sensor - Human Static Presence Module as switch #2593
Comments
Only important thing is some action attached to event. MQTT publish never happens unless there is some action or espurna/code/espurna/button.cpp Lines 1105 to 1109 in 480c72d
Relay action would use relay ID, but it does not check whether it is a valid one or even exists
Have you tried digital sensor? State would be periodically published with the other sensor data. For sensor data we have an extra report condition when value changes by some absolute value. e.g. |
Thank you very much! This seems to be what I was missing. I am getting this correct, that it only triggers when i query the sensor (so I check for it every second) and that the "retransmit" on the MQTT side is meant to be solved with retained messages? All in all it works better that my solution at the top. |
Device
D1mini with soldered on bh1750 and the mmwave sensor
Version
Current dev branch (3a34f06)
Question
Hi all :)
My usage of espurna in this case is to detect if a room is occupied and get a normalized lux reading to then trigger lights. The espurna device is only reporting everything to MQTT, all the logic is done within node red.
I used almost the same setup for years with old PIR sensors, but the PIR sensors are triggering every ~30 seconds if movement is detected. The mmwave module on the other hand has complex outputs which can detect a lot of different things, but I am only interested in the simple output on pin S1: high level - occupied, low level - unoccupied.
It works like my following configuration somewhat, but I am sure the configuration can be done better. Only the bh1750 and the mmwave sensor are connected to the D1 mini. I started with the example on the buttons and switches page.
My questions are:
BUTTON_MQTT_SEND_ALL_EVENTS
to1
. I am pretty sure my switch config is not as it should be.Also I created a 3d printed case for this whole setup and I am gladly sharing everything, if somebody is interested. Once it works as expected I can make a PR with my settings here, or document it all on printables.com where I will upload the case.
code/espurna/config/hardware.h
code/platformio.ini
[env:wemos-d1mini-presence-bh1750] board = d1_mini build_flags = -DWEMOS_D1_MINI_PRESENCE_BH1750 -DDEBUG_FAUXMO=Serial -DNOWSAUTH -DBH1750_SUPPORT=1
connection table
The text was updated successfully, but these errors were encountered: