# Telegram + 9x gpio-multi-function-lights + P.I.R + dash all working ;) but need help with a function

**URL:** <https://discourse.nodered.org/t/telegram-9x-gpio-multi-function-lights-p-i-r-dash-all-working-but-need-help-with-a-function/8314>\
**Category:** General\
**Created:** [24 February 2019 02:32 UTC](https://discourse.nodered.org/t/telegram-9x-gpio-multi-function-lights-p-i-r-dash-all-working-but-need-help-with-a-function/8314 "2019-02-24T02:32:13Z")\
**Posts on this page:** 1\
**Showing post:** 3

<div class="post-metadata">

**Author:** ![lost66](https://avatars.discourse-cdn.com/v4/letter/l/7993a0/32.png) [@lost66](https://discourse.nodered.org/u/lost66)\
**Post date:** [24 February 2019 13:36 UTC](https://discourse.nodered.org/t/telegram-9x-gpio-multi-function-lights-p-i-r-dash-all-working-but-need-help-with-a-function/8314/3 "2019-02-24T13:36:50Z")

</div>

thanx, i went back on the posts, and found nothing related to my problem although interesting  
if you think i have something to do with these posts, or doing a school project, then no.

[https://discourse.nodered.org/t/home-security-alarm/7936?u=lost66](https://discourse.nodered.org/t/home-security-alarm/7936?u=lost66)  
&&  
[https://discourse.nodered.org/t/security-alarm-turn-on-light-and-buzzer/8134?u=lost66](https://discourse.nodered.org/t/security-alarm-turn-on-light-and-buzzer/8134?u=lost66)

what i think i need, is a function node between the gpio node and smartswitch node, that will replace the three buttons, but must have a switch on the dash to disable

so if i am not mistaken,

when switched on and when p.i.r is triggered, the node must send:  
the topics: set = 1, timeout = 30 and state = 1. if enabled but, not time out if light is already on

thanx again

---

_[View the full topic](https://discourse.nodered.org/t/telegram-9x-gpio-multi-function-lights-p-i-r-dash-all-working-but-need-help-with-a-function/8314)._
