Custom Component: LiteTouch

the update broke it, all light now can be turned on, but the state returns to off and i cant turn them on

All of your lights or the ones that are non numeric?

Can you add this to your configuration:

logger:
  default: info
  logs:
    custom_components.litetouch: debug
    pylitetouch: debug

After adding this, wait for everything to finish loading. Then please turn a light on via Home Assistant, but then also turn a light on and off via a keypad.

FYI
I tried the update and everything was working the same for me with a new clock update :smiley:
Thanks much!

Pretty sure it is my litetouch’s PRG is the issue as it pertains to not being able to dim load on and load off (CINLL, CLOF CLON). When I use LoadGroup ID’s as a command the CCU doesn’t tell the keypads to turn some of the most important LED’s on. Only TGSW works consistently, but then CINLL or CLOF or CLON turns off the scenes LED. The workaround I’ve been using is to use another LED address of a keypad button that is associated within the LoadGroup that seems to work consistently.

Send me a screenshot of one of your load groups in your prg file please

I installed the older version I downloaded with this:

async def async_added_to_hass(self):
        """Call when entity is added to hass."""
        signal = f"litetouch_entity_{self._addr}"
        async_dispatcher_connect(self.hass, signal, self._update_callback)
        #self._controller.get_led_states(self._addr)

This one works with numerical keypads, not the hex ones

Might be this:

Log Details (WARNING)

Logger: homeassistant.helpers.service
Source: helpers/service.py:211
First occurred: 4:17:02 PM (2 occurrences)
Last logged: 4:17:03 PM

Unable to find services.yaml for the litetouch integration

I did notice the services warning, but it doesn’t impact the use of the service or the lights.

Basically it’s saying that I need to create a services.yaml file so I’ll figure out how to do that.

added services.yaml to github, that will resolve the warning.

@patmann03
I decided to take the plunge and write over the prg file in liteware. Just pushed update. After about 10 min of anxiousness and 900 packets later. I changed my patio scene 2 button from “scene” to “dimmer”… Drum roll. It worked and I can use CINLL and TGSW perfectly. I think tried it without the Toggle: True command to see if CLON and CLON worked. They also work, the caveat in using this is it doesn’t go to the liteware preset values, it just goes to 100% on that loadgroup ID.

So before I go start hacking up my lw4 and upload a new PRG with a bunch more switches changed to just “dimmer” I have a question for you.
In Liteware 6, I had an option to choose “Scene Dimmer (dimmer)” or “Scene Dimmer (Scene)” or “Dimmer” or a bunch of others. Is one better than the other? I just choose plain “Dimmer” and it seems to work, but I want to make sure preset scenes in the house don’t get effected by all this overwriting of the switch types (Event scenes, goodbye, good night, vacation, etc.)

Recommendations?
Below are the screenshots of the one I changed to Dimmer that seems to work.



I don’t know the difference really between the different settings other than toggle vs. dimmer.

Perhaps try scene dimmer and keep the toggle to true. The reason being is the way its coded, when a light is turned on (in the custom component I built) it actually uses CINLL and sets the load to 100%, to turn it off it uses CINLL and sets it to 0. I think I can change it to CLON now that I have a bit of a better understanding of how HA sends information.

I think the important thing is, when you look at the module function under loads that each of the loads in the load group are also dimmers otherwise it may not function properly. Hopefully the module function means that its assigned correctly and corresponds to how the wire is physically connected to the litetouch module itself (dimmervs. high voltage relay).

I’ve had no problems changing the prg file. My ONLY suggestion is that you make sure no one touches any buttons and that you disable HA when doing the upload. My old setup I would poll every 30 seconds for each of the loads and that would cause hiccups when loading the prg file. It’s probably less of an issue now that HA gets the light update directly from the controller.

I changed an outlet a blew one of the high relay switching loads (forgot to trim the outlet as it had one switched and one hot). I ended up rewiring it and having to re-code the load. After I did that I bought a replacement dimmer and high voltage relay off of ebay for around $40 each (most go between 70-100).

Quick question, the lights that are connected to high power switching, where should they be configured in the custom component? dimmer or switch?

They should be configured as a switch.

That is probably my problem. I had them all configured as dimmers, I’ll fix the yaml and test tomorrow.

Haha. I had a guy change to white decora and he didn’t snip the bridge on a switchable outlet and it cost me a quad dimmer. Ironically it sent me to offer up and I found a sparky that sold me a cache of them and 8 ways for $20 ea and also an Ethernet based 5000lc and new modem. My old 5000lc had no Ethernet and also wouldn’t read and write properly through com port. I was at a stand still til I found your github

Also @xtian47
All my entities went bye bye on the upgrade. I commented out the config yaml file reinstalled the master github of patmanns rebooted. Put config back to normal and it worked again. Don’t know if that would help or not.

So lights and switches seem to be working now turning lights on and off.
I was having an issue with lights added as switches not updating their icon when they were turned on, i fixed it by adding " state_color: ‘true’ " on the LOVELACE CARD.

Also, I know that the component doesn’t pull the current state at the start and only updates afterwards,is there a way to call to update?
If I restart Home assistant at night when lights are on, they show up as off. force updating the entities does not retrieve status

@xtian47 are you using the latest files from my repository? I haven’t updated the release yet, but the files themselves have been updated.

Also, above I had mentioned commenting some data out, but that’s no longer necessary with the newest data. When restarting it should attempt to get the light status. However, it isn’t perfect. LiteTouch does not return keypad in the response for the LED status so sometimes the requests get processed out of order and they don’t work. But the status of the lights will correct themselves upon usage. I’m looking to see what I can do to fix the initial status request but as of now it works most of the time.

I believe so, hacs is set to master, and it shows it is the latest version.
The issue you describe is exactly what is happening

OK, I’ll update HACS, that version is currently out of date.

updated HACS

@xtian47 and @PaulyBoy888 - just checking in to see how everything has been working. Haven’t hear anything in awhile so I’m assuming all is going well? Hopefully you’re both healthy and safe.

Just FYI, in the near future I do plan on re-working the configuration to be in line with the changes occurring in Home Assistant with YAML. I need to do a bit more research, but most likely the connection to the controller will be moved to a config flow vs setup in yaml. I’ll then move the lighting under lights as a separate protocol. It won’t change the functionality, but will in case they remove the ability to use yaml for configurations down the line it will ensure our integration will continue to work.

Hey @patmann03
Been working pretty good. Kinda stepped away from programming after changing some scenes to dimmers on PRG. All is well though. After integrating HomeKit haven’t really wanted to use Litetouch for anything else. Just installed a AD2pi and going to try and use an automation to turn on Honeywell alarm, close garage doors, arm cameras and shut off lights by integrating with blank buttons and some good night and goodbye scene buttons.

Look forward to the updates and I’ll gladly be a Guinea pig if you need one.