Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TX - ULTIMATE - T5-3C-120 LED BEHAVIOUR [SOLVED] #45

Open
Zagor4 opened this issue Jul 3, 2024 · 26 comments
Open

TX - ULTIMATE - T5-3C-120 LED BEHAVIOUR [SOLVED] #45

Zagor4 opened this issue Jul 3, 2024 · 26 comments

Comments

@Zagor4
Copy link

Zagor4 commented Jul 3, 2024

Good morning everyone,

I tried to adapt the code for the model in question as follows:

When the right, center, and left buttons are pressed, 2 LEDs above and 2 LEDs below each button light up.
The LED effects related to Swipe Left, Swipe Right, Multitouch, and Long Press are executed randomly around the entire perimeter of the device.
The NightLight should light up around the entire perimeter (excluding the LEDs reserved for the buttons), but here is the problem I would like to discuss with you.
Furthermore, the NightLight is no longer managed by the internal script of the Firmware but is exposed on HA only as a switch for automations directly manageable by HA with possible presence, brightness sensors, etc.

The problem is that some LEDs, besides those reserved for the buttons, do not light up for the NightLight, leaving an incomplete illuminated perimeter.
Could someone help me out?
I am attaching my code and an image of the problem with the NightLight.

Thanks in advance.
Sonoff - TX 120 - GitHub.txt
IMG_20240623_223923

@Zagor4 Zagor4 changed the title TX - ULTIMATE - T5-3C-120 LED BEHAVIOUR [NEED HELP] TX - ULTIMATE - T5-3C-120 LED BEHAVIOUR [SOLVED] Jul 6, 2024
@Zagor4
Copy link
Author

Zagor4 commented Jul 6, 2024

The code that i'm using...
Sonoff - TX 120 - GitHub_2.txt

@MantasGSXR
Copy link

The code that i'm using... Sonoff - TX 120 - GitHub_2.txt

Bro! Thank you so much for this! I have been struggling for hours to make those damned LEDs work properly! You are the man!

@Zagor4
Copy link
Author

Zagor4 commented Jul 21, 2024

Hello! I'm happy that the code helps you.

I also added a new feuture that permit to change nightlight color. (is possible to change the color pressing a zigbee botton or an other home assistant entity).
If you are interested i can post the new code. 👍

@MantasGSXR
Copy link

That sounds like a much needed feature! Please do share your code. I really appreciate it.

@Zagor4
Copy link
Author

Zagor4 commented Jul 28, 2024

Read the TXT ! :)
ChangeColour.txt

@MantasGSXR
Copy link

Read the TXT ! :) ChangeColour.txt

Hey! This is really awesome! I love it! Thank you very much for sharing and great job!

@mon3y78
Copy link

mon3y78 commented Aug 15, 2024

@Zagor4 Can you help me fix my version for the 4 gang? I find your version very nice, functional, and it meets my needs. I don't understand the part of the code between lines 595 and 640. With the changes I made, the LED management works partially when I turn on the buttons.
https://github.com/mon3y78/4gangus/blob/main/4gangus.yaml

@Zagor4
Copy link
Author

Zagor4 commented Aug 15, 2024 via email

@fjordaan00711
Copy link

@Zagor4 the code work like a charm :-)

Thanks

@Zagor4
Copy link
Author

Zagor4 commented Sep 1, 2024

@Zagor4 Can you help me fix my version for the 4 gang? I find your version very nice, functional, and it meets my needs. I don't understand the part of the code between lines 595 and 640. With the changes I made, the LED management works partially when I turn on the buttons. https://github.com/mon3y78/4gangus/blob/main/4gangus.yaml

Good Evening,
Could you post a board photo or image where is possible to see the LEDS numbers ?
If you will post the photo, i will try to adapt my code for the 4 gangs version !

Thanks
Have a nice evening.
Z.

@Zagor4
Copy link
Author

Zagor4 commented Sep 1, 2024

@Zagor4 the code work like a charm :-)

Thanks

I'm realy happy about this ! :)
Thanks
Z.

@mon3y78
Copy link

mon3y78 commented Sep 2, 2024

Hi, welcome back from vacation! During this time, I tried working with the code. I managed to make some progress! Now the button lighting is improving, as you can see in the photos. I still don’t understand how to solve the neopixel lighting issue, but I think that might be a problem with the base code of SmartHome yourself. The left side doesn’t light up.

My code: https://github.com/mon3y78/4gangus/blob/5df818099256984fbab48adae76c6c9ac3c03a49/4gangus.yaml

image
image
image
image
image
image

@Zagor4
Copy link
Author

Zagor4 commented Sep 2, 2024

Hi, welcome back from vacation! During this time, I tried working with the code. I managed to make some progress! Now the button lighting is improving, as you can see in the photos. I still don’t understand how to solve the neopixel lighting issue, but I think that might be a problem with the base code of SmartHome yourself. The left side doesn’t light up.

My code: https://github.com/mon3y78/4gangus/blob/5df818099256984fbab48adae76c6c9ac3c03a49/4gangus.yaml

Good Evening,

I try to explain the LED partitions behaviour:
You have:

Led partition for L1
Led partition for L2
Led partition for L3
Led partition for L4
Led Top Partition (all led without L1, L2, L3, L4 partitions - This is important you can't have same LEDS in LED top and L1, or L2, L3, L4).

When you switch on Nightlight or you active a gesture (Swipe, Long Press, Multi touch) you switch on Led Top Partition.
If you switch on L1 (or L2,L3,L4), you switch on LED Partition L1 (or L2, L3, L4) with generic button colour and light intensity, if you switch off L1 (or L2, L3, L4) and Nightlight is ON, the routine change colour and light intensity of L1 (or L2, L3, L4) with colour and light intensity of Nightlight.
If you switch off L1 (or L2, L3, L4) and Nightlight is OFF, the routine switch off L1 (or L2, L3, L4).

Could you try this code ?
Please let me know if it works correctly or if you have same unexpected behaviour.

Have a nice evening.
TX_Ultimate_4Gang.txt

Z.

@fjordaan00711
Copy link

fjordaan00711 commented Sep 3, 2024 via email

@mon3y78
Copy link

mon3y78 commented Sep 3, 2024

@Zagor4 now the led of l1 and l4 don't work
image

@mon3y78
Copy link

mon3y78 commented Sep 3, 2024

@fjordaan00711 Can you explain better? Where was it forgotten?

@Zagor4
Copy link
Author

Zagor4 commented Sep 3, 2024

@Zagor4 now the led of l1 and l4 don't work !

Colud you try this new code ?
TX_Ultimate_4Gang_V2.txt

@mon3y78
Copy link

mon3y78 commented Sep 3, 2024

Now, as you can see, the LED partitioning for the buttons is working correctly! Thank you very much! However, whether I press L4 or activate 'TX Ultimate Cartongesso L4,' the 'LEDs Button L4' does not automatically activate. If I activate 'LEDs Button L4,' it lights up white, but I think it should be blue.
IMG_1425

Screenshot 2024-09-03 alle 19 46 50

@Zagor4
Copy link
Author

Zagor4 commented Sep 3, 2024

Good Evening @mon3y78 ,
Try this new code and please let me know.
Please try also to switch on NightLight and after switch on and switch off L1, L2, L3 and L4 and verify if the behaviour will be correct. (nightlight, not NeoPixel Light)

Thanks
Have a nice evening
Z.

TX_Ultimate_4Gang_V3.txt

@mon3y78
Copy link

mon3y78 commented Sep 3, 2024

Everything seems to be working correctly. Do I need to change any of my settings to synchronize the buttons and devices. In some automations, I was using 'LEDs Button L1' instead of 'TX Ultimate Cartongesso L1' because it gave me the ability to synchronize the color or light intensity. Additionally, in Nightlight mode, the left side does not light up.
IMG_1426

@Zagor4
Copy link
Author

Zagor4 commented Sep 3, 2024

@mon3y78 try this code for the NightLight problem... (I only change the order of the LED segments) but i don't understand why the left side don't switch on ! (Did you restart the TX Ultimate, after the firmware installation ? )

Could you please paste an example of automation ? I've linked, in my automations, the lights with TX Ultimate switches entities...

TX_Ultimate_4Gang_V4.txt

@mon3y78
Copy link

mon3y78 commented Sep 4, 2024

I tried the new code. The only new anomaly I noticed is that when I press L1 to turn it on, I don’t get a brief movement of the LEDs like I do with the other buttons.
I use ‘https://github.com/alexdelprete/ha-blueprints’ for the synchronization of the tx buttons and devices. I find it very convenient, fast and functional.
Thank you! Wishing you a great day as well!

@mon3y78
Copy link

mon3y78 commented Sep 5, 2024

@Zagor4

I discovered that the issue with the LEDs when I press the button is related to the left part of the TX. In fact, when it doesn’t happen there, everything works! Have you had any ideas on how to solve this or what might be causing the problem? Did you try the blueprint? What do you think?

@Zagor4
Copy link
Author

Zagor4 commented Sep 16, 2024

@mon3y78 I'm sorry, but at the moment I have a lot of work and don't have much time to analyze the code.
Currently, I have no idea why the left side of the LEDs isn't turning on in the nightlight configuration.
It's difficult to understand the behavior because I don't have a 4-gang device on hand.

I used the blueprint but a had some syncronisation problem so i wrote my automation:

  • id: "11122222"
    alias: Lampada_Deviatore
    description: Accende o spegne la lampada quando si attiva il deviatore
    trigger:
    platform: state
    entity_id:
    - light.interruttore_1
    - light.interruttore_2
    to:
    - "on"
    - "off"
    action:
    service: "light.turn_{{ trigger.to_state.state }}"
    entity_id: light.lampada # Inserire il gruppo che contiene light.interruttore_1 e light_interruttore_2 (light.interruttore_1 e light.interruttore_2 son 2 tasti situati rispettivamente su 2 differenti Sonoff TX Ultimate.)
    mode: single
    max_exceeded: silent

@mon3y78
Copy link

mon3y78 commented Sep 16, 2024

I’m happy to hear from you! I was starting to worry! As soon as I can, I’ll try your automation. When you have time, I recommend this discussion:
https://community.home-assistant.io/t/sonoff-tx-ultimate-and-voice-assistant/682214?u=ipilla.
Hope to hear from you soon!

@Zagor4
Copy link
Author

Zagor4 commented Sep 17, 2024

I’m happy to hear from you! I was starting to worry! As soon as I can, I’ll try your automation. When you have time, I recommend this discussion: https://community.home-assistant.io/t/sonoff-tx-ultimate-and-voice-assistant/682214?u=ipilla. Hope to hear from you soon!

I've read the code of the discussion you linked... It's impressive! I don't have the expertise to understand the configurations, scripts, and automations without studying.
He used a completely different approach to address the LEDs and also to manage the touch!
It's a realy cool project !

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants