I don’t have the contact sensor yet (coming). I think you mentioned in a post that with the contact sensor it is always scanning (blue led is always lit).
I am monitoring mqtt explorer and I notice if the status is scanning, the pir sensor will trigger. Though when there is an action performing, the status changes to idle and the pir does not trigger.
it is working for me, so not sure. if motion or contact sensor are included the esp32 will be idle for only a few milliseconds. it will return to scanning right away after control is done
you will need to wait for control/set to be done to see the open or motion. u may see a delay but there is no way to avoid a delay while controlling
the esp32 will be idle for only a few milliseconds. it will return to scanning right away after control is done
Yes, it will return to idle a few moments after. The only issue I see is if the device is kinda far from the esp32, it will stay at idle for some time until it finds it and preform the action then it will return to scanning.
ya. I will add a ‘controlling’ status. after every retry the status goes to idle, so that is probably confusing you. It isnt actually idle and that is a minor mistake. Shouldnt affect the functionality though
but eitherway. once the action is complete you should get a motion update
WoW" Sorry for I missed to enter the entity , ha… I see the slide now
hope the TLS supported version will be soon released
And Thanks again, it’s help me to solve the BLE problem on Synology “no USB support anymore”
Now I can use ESP32 with your Smartbot project to control the Curtain from MQTT
Is it possible to change the state Open/Close → Locked Unlocked?
I noticed contact state changes to TIMEOUT a few minutes after. (device to esp32 distanct issue? RSISI is -80). Answer is here.
I am still confuse on how to use the button. I see from mqtt the button and it changes from idle to pushed. Do I need to create mqtt template sensor to have it show in HA?
I think I just used wemos d1 mini setting. Sorry can’t remember atm.
What I did have to do was find the appropriate serial to usb driver for the ch340c chip that the quindor esp32 uses. I can find that later if you dont have it. The usb serial chip is different between wemos d1 mini and quindors
I probably won’t put that in the native code, but there are only a couple spots in the code it would take you to change. I can send those edits if u want them
There are already 2 button entities created.
button and buttonCount
button is a binary sensor that changes from “idle” to “pushed”. it will only go “pushed” for a few milliseconds
buttonCount is the value that comes from the contact device. In the esp32 code I look for a change in the buttoncount value and if it changes I send a “pushed” message and immediately send an “idle” message after
button is a binary sensor that changes from “idle” to “pushed”. it will only go “pushed” for a few milliseconds
I got confused when you mentioned idle / pushed, but the binary_sensor.genkan_doorlock_button entity has states of on / off. I figured it out. This is the code I used and it seems to work.
- alias: 'Lights out Before leaving'
trigger:
- entity_id: binary_sensor.genkan_doorlock_button
platform: state
to: 'on'
action:
- service: script.lights_out
if (!contactA && !contactB) {
contact = "LOCKED";
}
else if (!contactA && contactB) {
contact = "UNLOCKED";
lastContacts[aDevice] = millis();
}
else if (contactA && !contactB) {
contact = "LEFT UNLOCKED"; // I discovered after getting a contact sensor that from the documentation "TIMEOUT" = "LEFT OPEN", so you can put "LEFT UNLOCKED" or just "UNLOCKED" here
}