• 10 dec 2017: forum version update. In case of issues use this topic.
  • 30 nov 2017: pilight moved servers. In case of issues use this topic.
Hello There, Guest! Login Register


Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Help to manage push button
#1
Hello.
I want to manage 3 push button with pilight gui and event.

[Image: TelisButtons.png]

Can You help to create the confing file to manage this 3 commands:
* Push button 1 (connected to GPIO - for example 1) --> UP
* Push button 2 (connected to GPIO - for example 2)--> STOP
* Push button 3 (connected to GPIO - for example 3)--> DOWN

And also:
* Every day at 21:00 the button I neet to automatically push button 1
 
Reply
#2
You can do this with the gpio_switch protocol.
 
Reply
#3
(09-13-2016, 06:28 AM)curlymo Wrote: You can do this with the gpio_switch protocol.
But I need a push button and not a toggle button.  Is it possible? 
I found (in another thread)  the possibility to simulate a push button with protocol "program" but how can I generate the event based on time?  For example every day at 9pm I activate the program
 
Reply
#4
You can use a datetime device (using the datetime protocol) and a set of rules using Eventing. There are lots of examples on how to do this on the manual page about Eventing that I linked to, as well as throughout the forums.
 
Reply
#5
@omniteo790,

If you want to implement a protocol for the Telis-1, i assume that you want to operate a somfy device.

Instead of using the branch development, please use the branch s_mfy on github.com/pilight/pilight.git.

Steps for compiling that branch are the same as with the development branch, just use s_mfy instead of development ....
An example for config.json is found in the wiki.
As a result you will get the 3 button interface of your Telis-1.

@omniteo790,
Please note that you will get the 3-button interface only for the protocol somfy_rts, but it is a minor issue to remove this restriction, as it was introduced only to avoid user confusion with existing 2 button GUI interfaces.

To implement your rule for moving your shuuters up or down at a given time, it is best to use a pilight V7 release that supports the rule ISNOT, and than you can develop your own rules based on the examples below:

Code:
"RuleShutterRoom1_up_at_9_00_on_FR": {
            "rule": "IF (ShutterR1.state ISNOT up AND (time.weekday == 6)) AND (time.second == 0 AND time.minute == 00 AND time.hour == 9) THEN switch DEVICE ShutterR1 TO up",
            "active": 1
        },
        "RuleShutterRoom1_down_at_21_30": {
            "rule": "IF ShutterR1.state ISNOT down AND (time.second == 0 AND time.minute == 30 AND time.hour == 21) THEN switch DEVICE ShutterR1 TO down",
            "active": 1
        },
Please note that some somfy devices support two programmable positions using the MY button, those are supported, however the individual devices do require a lot of attention, as for example immediately after an UP or DOWN command, the MY button serves as a STOP command and not as a move to the favorite position.

@curlymo,
The s_mfy branch is not supporting the ISNOT operator.
I propose to integrate the s_mfy branch into development and not the vice versa approach of issueing another pull request for ISNOT.
 
Reply
  


Possibly Related Threads...
Thread Author Replies Views Last Post
  Light Switch with integrated ON/OFF Button ilir@ademi.org 4 3,271 01-04-2017, 09:22 PM
Last Post: ilir@ademi.org
  Homebridge Push Button jjj 7 5,555 12-12-2016, 07:22 PM
Last Post: svwb22
  switches with manual on/off button gneandr 1 1,915 11-15-2016, 04:38 PM
Last Post: koos147
  pilight-receive displays multiple protocols per push f0rd42 21 13,580 01-11-2015, 05:15 PM
Last Post: curlymo

Forum Jump:


Browsing: 1 Guest(s)