logo elektroda
logo elektroda
X
logo elektroda

LED strip control with D1 Wemos + IR TSOP1736 by Domoticz

maystero 7251 43
ADVERTISEMENT
Treść została przetłumaczona polish » english Zobacz oryginalną wersję tematu
  • #31 17852405
    Slawek K.
    Level 35  
    maystero wrote:
    Hello

    Late at night, I also noticed it was missing:
    Code: Bash
    Log in, to see the code
    .

    I have added it to the RULES:
    Code: Bash
    Log in, to see the code
    .

    It works as I described in the post above.
    Quote:
    It only goes off when I press another button on the remote....


    And LOG
    Code: Bash
    Log in, to see the code


    You can see that it didn't change the state to the opposite....
    as if it did not change the Switch_1 value

    Added after 12 [hours] 30 [minutes]:

    I don't know what's going on anymore myself.
    I have assembled a second circuit.
    I am using the TSOP1736 for testing.
    The ESP in the DEVICES list has a TSOP4838.
    Could this have an effect on this strange circuit behaviour?
    .
    Aprpos of the lack of state change, I had a similar problem and figured out that there must be a space between the IF and the condition, unfortunately this "compiler" is quite flawed. In my case it worked after such a change.
    Code: C / C++
    Log in, to see the code
    .
    Please test.

    And as for the problem with reading from the TSOP, connect as written @khoam .

    Greetings
  • ADVERTISEMENT
  • #32 17854239
    maystero
    Level 24  
    khoam wrote:
    Maybe connect the power supply to the TSOP as DS recommends to start with:

    LED strip control with D1 Wemos + IR TSOP1736 by Domoticz
    .

    Thanks!
    It helped, although, I remember running a similar circuit once and there everything worked without the 4.7uF capacitor....

    I will now check this RULES and let you know.

    Added after 6 [minutes]:

    Slawek K. wrote:
    .
    Aprpos of not changing the condition, I had a similar problem and figured out that there must be a space between the IF and the condition, unfortunately this "compiler" is quite flawed. In my case it worked after such a change.
    Code: C / C++
    Log in, to see the code
    .
    Please test.

    And as for the problem with reading from the TSOP, connect as written @khoam .

    Greetings
    .

    Adding a space helped!
    Thanks.
    I've already used up the "helped" pool so I'm sending you some points.
  • ADVERTISEMENT
  • #33 17854289
    khoam
    Level 42  
    maystero wrote:
    It helped, although, I remember running a similar circuit once and there everything worked without the 4.7uF capacitor....
    .
    It all depends on what voltage source (how stable) the TSOP was powered from, hence the DS manufacturer's "just in case" recommendation.
  • #34 18166311
    demsy
    Level 22  
    Hello
    I didn't want to open a new topic because I have a similar problem with the control of LED's
    Namely the command than works
    Code: VB.net
    Log in, to see the code
    .
    but still
    Code: VB.net
    Log in, to see the code
    .
    immediately turns off my LEDs
    the firmware in the ESP I have
    Code: VB.net
    Log in, to see the code
    .
  • ADVERTISEMENT
  • #36 18166393
    demsy
    Level 22  
    with this syntax, the LEDs only light up for a moment and then go out
    Code: VB.net
    Log in, to see the code
    .
    Code: VB.net
    Log in, to see the code
    .
  • #38 18166400
    demsy
    Level 22  
    Code: VB.net
    Log in, to see the code
    .
  • #39 18166401
    Slawek K.
    Level 35  
    Give a screenshot of the Devices tab.

    Greetings
  • ADVERTISEMENT
  • #40 18166407
    demsy
    Level 22  
    LED strip control with D1 Wemos + IR TSOP1736 by Domoticz .

    Added after 10 [minutes]:

    I read on the forum that
    pwm,12,1024,1000,4000
    <pwm><GPIO><fill><time><frequency>
    and when switched on it brightens the LED strip, but at fill "0" it goes out immediately(no smooth dimming effect)
  • #41 18166463
    Slawek K.
    Level 35  
    If the fill is 0 then there is no control voltage for the mosfet gate, so the effect you are after is missing.

    Greetings
  • #42 18166548
    khoam
    Level 42  
    demsy wrote:
    but at filling "0" it goes out immediately(no smooth dimming effect)
    .
    According to the documentation: https://www.letscontrolit.com/wiki/index.php/GPIO

    If you have set a certain GPIO to a PWM level and want to use it as a regular HIGH/LOW pin you need to reset it by setting the PWM level to 0.

    Added after 31 [seconds]:

    demsy wrote:
    I read on the forum that the
    pwm,12,1024,1000,4000
    <pwm><GPIO><fill><time><frequency>
    .
    The padding must not be equal to 1024.
  • #43 18166746
    demsy
    Level 22  
    my settings in domoticz
    LED strip control with D1 Wemos + IR TSOP1736 by Domoticz .

    the action that turns the LEDs on works correctly

    Added after 19 [minutes]:

    https://espeasy.readthedocs.io/en/latest/Plugin/P000.html?highlight=pwm

    Added after 4 [minutes]:
    LED strip control with D1 Wemos + IR TSOP1736 by Domoticz
    problem solved
    firmware upload helped
    ESP_Easy_mega-20190903_normal_core_241_ESP8266_4M1M.bin

    Added after 9 [hours] 3 [minutes]: .

    khoam wrote:
    .
    The fill cannot be 1024.

    and the padding is 1023
  • #44 18719232
    uzi18
    Level 24  
    the current documentation is on readthedocs as a colleague wrote above, the old wiki should be considered as a supplement.

    For some time now, espeasy also accepts a condition without a space after the IF, for syntactic cleanliness it used to be required, but it has been noted that some examples without spaces could be found on the wiki

Topic summary

The discussion addresses controlling an LED strip using a D1 Wemos module integrated with Domoticz, focusing on on/off switching and brightness adjustment via PWM. The user aims to add IR remote control functionality using a TSOP1736 or TSOP4838 IR receiver connected to GPIO pins (e.g., D3). ESP Easy firmware is used for device control, with PWM commands issued through HTTP URLs. PWM control is confirmed feasible via ESP Easy, but Domoticz lacks native PWM support. IR command handling requires enabling the Rules feature in ESP Easy and uploading a firmware version with IR support (e.g., ESP_Easy_mega-20181208_normal_IR_ESP8266_4096.bin or R147). Users report issues with IR decoding, firmware bugs, and syntax errors in Rules scripts, such as missing spaces after IF statements and incorrect bracket usage. Solutions include using Dummy Devices to store toggle states, consolidating IF conditions within a single ON event, and ensuring proper wiring and power supply to the TSOP IR receiver, including adding a 4.7µF capacitor for stability. The IR remote codes are captured as events, and Rules scripts toggle GPIO outputs accordingly. Firmware version compatibility is critical, with older versions sometimes more stable for IR functions. PWM commands follow the syntax http:///control?cmd=PWM,,,,, with fill values from 0 to 1023; a fill of 0 immediately turns off LEDs without smooth dimming. Firmware updates (e.g., ESP_Easy_mega-20190903_normal_core_241_ESP8266_4M1M.bin) resolve some PWM issues. The discussion includes practical examples of Rules scripting for IR command handling and PWM control, emphasizing careful syntax and device configuration.
Summary generated by the language model.
ADVERTISEMENT