You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: usermods/PIR_sensor_switch/readme.md
+7-39
Original file line number
Diff line number
Diff line change
@@ -23,44 +23,7 @@ You can also use usermod's off timer instead of sensor's. In such case rotate th
23
23
24
24
## Usermod installation
25
25
26
-
1. Copy the file `usermod_PIR_sensor_switch.h` to the `wled00` directory.
27
-
2. Register the usermod by adding `#include "usermod_PIR_sensor_switch.h"` in the top and `registerUsermod(new PIRsensorSwitch());` in the bottom of `usermods_list.cpp`.
28
-
29
-
Example **usermods_list.cpp**:
30
-
31
-
```cpp
32
-
#include"wled.h"
33
-
/*
34
-
* Register your v2 usermods here!
35
-
* (for v1 usermods using just usermod.cpp, you can ignore this file)
36
-
*/
37
-
38
-
/*
39
-
* Add/uncomment your usermod filename here (and once more below)
40
-
* || || ||
41
-
* \/ \/ \/
42
-
*/
43
-
//#include "usermod_v2_example.h"
44
-
//#include "usermod_temperature.h"
45
-
//#include "usermod_v2_empty.h"
46
-
#include"usermod_PIR_sensor_switch.h"
47
-
48
-
voidregisterUsermods()
49
-
{
50
-
/*
51
-
* Add your usermod class name here
52
-
*||||||
53
-
*\/\/\/
54
-
*/
55
-
//usermods.add(new MyExampleUsermod());
56
-
//usermods.add(new UsermodTemperature());
57
-
//usermods.add(new UsermodRenameMe());
58
-
usermods.add(new PIRsensorSwitch());
59
-
60
-
}
61
-
```
62
-
63
-
**NOTE:** Usermod has been included in master branch of WLED so it can be compiled in directly just by defining `-D USERMOD_PIRSWITCH` and optionaly `-D PIR_SENSOR_PIN=16` to override default pin.
26
+
**NOTE:** Usermod has been included in master branch of WLED so it can be compiled in directly just by defining `-D USERMOD_PIRSWITCH` and optionaly `-D PIR_SENSOR_PIN=16` to override default pin. You can also change the default off tim by adding `-D PIR_SENSOR_OFF_SEC=30`.
64
27
65
28
## API to enable/disable the PIR sensor from outside. For example from another usermod.
66
29
@@ -121,4 +84,9 @@ Have fun - @gegu & @blazoncek
121
84
122
85
2021-11
123
86
* Added information about dynamic configuration options
124
-
* Added option to temporary enable/disble usermod from WLED UI (Info dialog)
87
+
* Added option to temporary enable/disble usermod from WLED UI (Info dialog)
88
+
89
+
2022-11
90
+
* Added compile time option for off timer.
91
+
* Added Home Assistant autodiscovery MQTT broadcast.
0 commit comments