Hello
I'm new in Domoticz. The most things I have done before worked fine. But there is one thing, that I'm not able to create. I guess it should be very easy, but I don't find a way that is working.
The scenario is very simple: A cheap chinese Pushbutton (connected via RFXcom) should trigger a wireless socket switching on or off: First push on, second push off and so on. For programming the toggle functionality I use a blockly script (right?).
I'm able to generate a script for switching the socket on. But when I try to expand the scipt for toggeling, nothing happens or the socket switches on/off peremanently.
Perhaps somebody can advice me?
Greetings
Stefan
Chinese push button as a toggeling swich Solved! Topic is solved
Moderator: leecollings
-
- Posts: 16
- Joined: Tuesday 27 August 2019 15:18
- Target OS: Raspberry Pi / ODroid
- Domoticz version: 41017
- Contact:
Chinese push button as a toggeling swich Solved!
Last edited by fotomann100 on Thursday 29 August 2019 16:20, edited 1 time in total.
Devices in use:
several RFXtrx433XL
Sonoff Basic, Sonoff POW R2 / Tasmota
D1 mini / espeasy
switches and sensors from several china suppliers
Pollin wireless sockets
Renkforce smoke detectors
- waaren
- Posts: 6028
- Joined: Tuesday 03 January 2017 14:18
- Target OS: Linux
- Domoticz version: Beta
- Location: Netherlands
- Contact:
Re: Chinese push button as a toggeling swich - advice for the script needed
Maybe if you could show what you already have (including names and how the on/off actions looks like) I can come up with something in dzVents.fotomann100 wrote: ↑Tuesday 27 August 2019 15:48 A cheap chinese Pushbutton (connected via RFXcom) should trigger a wireless socket switching on or off: First push on, second push off and so on.
I'm able to generate a script for switching the socket on. But when I try to expand the scipt for toggeling, nothing happens or the socket switches on/off permanently.
Debian buster, bullseye on RPI-4, Intel NUC.
dz Beta, Z-Wave, RFLink, RFXtrx433e, P1, Youless, Hue, Yeelight, Xiaomi, MQTT
==>> dzVents wiki
dz Beta, Z-Wave, RFLink, RFXtrx433e, P1, Youless, Hue, Yeelight, Xiaomi, MQTT
==>> dzVents wiki
-
- Posts: 16
- Joined: Tuesday 27 August 2019 15:18
- Target OS: Raspberry Pi / ODroid
- Domoticz version: 41017
- Contact:
Re: Chinese push button as a toggeling swich Solved!
Problem solved!
The solution is very simple and you Waaren brought me on the right way: "Maybe if you could show what you already have" was your advice. I realized that there is a log file
Even a short single push sends the code three or four times out. In conjunction with the other parts of the blockly program this results in a endless loop.
The remedy: Instead of reading out the socket status (on/off) directly, I defined a user variable for that. Normally the value is "0" (= switch off). The details you can see in the attached screen shot:

Legend:
Schlafzimmer Taster = Push button 433 Mhz
Schlafzimmer Schaltzustand = User variable 0 = off 1 = on
Schlafzimmer Bett = Wireless socket (433 Mhz RFXcom)
The solution is very simple and you Waaren brought me on the right way: "Maybe if you could show what you already have" was your advice. I realized that there is a log file

Even a short single push sends the code three or four times out. In conjunction with the other parts of the blockly program this results in a endless loop.
The remedy: Instead of reading out the socket status (on/off) directly, I defined a user variable for that. Normally the value is "0" (= switch off). The details you can see in the attached screen shot:

Legend:
Schlafzimmer Taster = Push button 433 Mhz
Schlafzimmer Schaltzustand = User variable 0 = off 1 = on
Schlafzimmer Bett = Wireless socket (433 Mhz RFXcom)
Devices in use:
several RFXtrx433XL
Sonoff Basic, Sonoff POW R2 / Tasmota
D1 mini / espeasy
switches and sensors from several china suppliers
Pollin wireless sockets
Renkforce smoke detectors
-
- Posts: 10
- Joined: Saturday 22 February 2014 9:16
- Target OS: Raspberry Pi / ODroid
- Domoticz version:
- Contact:
Re: Chinese push button as a toggeling swich Solved!
Can you share what pushbuttons you are using?
-
- Posts: 16
- Joined: Tuesday 27 August 2019 15:18
- Target OS: Raspberry Pi / ODroid
- Domoticz version: 41017
- Contact:
Re: Chinese push button as a toggeling swich Solved!
Devices in use:
several RFXtrx433XL
Sonoff Basic, Sonoff POW R2 / Tasmota
D1 mini / espeasy
switches and sensors from several china suppliers
Pollin wireless sockets
Renkforce smoke detectors
Who is online
Users browsing this forum: No registered users and 1 guest