External community integration - http get/post/patch/put and Wake on lan

Hi Kenny,
I hd the chnce to play around again and get some error logs: 2024-10-19 09:20:52.597506 +00:00 core NOTICE Setting button backlight to: 0%2 - Pastebin.com

The starting sequence for the affected activity sends a IR Power Toggle to the VU+ Box to wake it from deep sleep. After this, a http get command will be send with a discrete power on command (if the box was in normal standby before activity start already the first IR command Toggle would have send it to standby).

If the box was in normal standby mode already and is reachable in the network everything works fine and the sequence works 'til the end as it should be. But if the box was in deep standby and is not reachable in the network (due to it’s longer booting time of 45 seconds) the http command gives a timeout error and the starting sequence aborts with error. I have to wait then til the box finished booting and start the start sequence from beginning again.

What I really don’t understand and what should be changes in future updates is the fact that the integration is waiting for network response from the box even if I turned on the “fire and forget” function. Other devices that are able to send http commands don’t show this behaviour.

Thank you very much in advance for your help.

Ok, now I can see what happened here. The internal server error is actually a request timeout (408) from the receiver.
Since your receiver didn’t responded within the set timeout of 10 seconds while booting a timeout error was sent to the remote. The Fire and Forget mode still needs to reach the device to fire the command. It just doesn’t wait for a response or ignores it. The mode is intended for devices that don’t send a response or terminate the connection after they received a command.
But I released a new version that includes timeouts in fire and forget mode and also should solve the websockets disconnects because of a failed websockets heartbeat.

Great! Works now without errors or problems. Thank you very much for the quick release of the adopted version!

The latest 0.6.0 release includes some breaking changes if you have added additional payload data before:

1 Like

I had time today to check “Text over TCP” and it worked on first try😁 I can control my old Epson TV7300 projector with this option. I added power on/off but I am sure that I could add all other commands if needed.
Here is the power on command if anyone else has an Epson projector “192.168.178.66:4352,”%1POWR 1\r"" 192.168.178.66 is the IP of my projector, 4352 is the default port and “%1POWR 1\r” is the command. As the Epson supports the PJLink protocol it should also work with several other brands.

perhaps it helps other people.

Ralf

1 Like

New release with support for custom entities. More details in the redme file. If you have configurations that could be integrated into a future version that adds profiles please send them to me

1 Like

Sorry to revive this old thread, but I’m having trouble configuring this integration (v0.8.7). I can’t complete any of the setup actions. No matter what option I select (Configure advanced settings, Configure custom entities, Finish setup), I get an error “Driver not connected. Failed to connect to host: Connection refused (os error 111)”. I’ve tried re-installing and rebooting with the same results.

I’m brand new to the UC system, trying to program the Remote 3 for the first time. Perhaps there is some dependency that I haven’t installed, but I don’t see anything like that in the instructions. Any ideas?

This error is caused by a previous setup attempt that has either been failed or manually aborted. After this the driver is not automatically restarted. As a workaround you need to deleted the integration (twice so it’s not shown anymore) and then re-upload.
This issue has been reported by other developers as well but so far there was no reaction from UC: [bug] Custom integration driver disconnects and unusable (even after reboot) if the setup flow fails ¡ Issue #448 ¡ unfoldedcircle/feature-and-bug-tracker ¡ GitHub

Thanks Kenny. I’ve deleted and reinstalled it, but get the same result. I’ve tried this a few times. I’m curious about the instruction to delete the integration twice. It disappears when I delete it once, so I’m not sure how to delete it twice. Is there some specific method for deleting it twice?

Deleting it twice is onyl needed if the integration has already been configured before. Have your tried to restart the remote?

Yes. I just did it again. Deleted the integration. Rebooted. Reinstalled. Then same result. There doesn’t seem to be much to troubleshoot with, but it might just be may lack of familiarity with the UC system. Is there a log somewhere?

Yes, you find it in settings/development/logs. Make sure to check both core service and the custom integration from the dropdown.

There is an entry about custom_entities.yaml not existing. Is there a step I missed to create this?

Which firmware have you installed? There was an issue with copying additional files from custom integrations that was solved with 2.6.9 so you need to be at least on this firmware as I removed the workaround in newer versions of the integration.

Looks like that was it! I was on 2.6.1, and the configurator said it was up to date. Once I checked “auto update”, it loaded 2.6.12. After a reboot, it looks like I’m in. Thanks for your help!

Hello together,

hopefully someone can give me some hints, how can i build custom entities with this http get integration V0.8.8 on remote 3, as i’m currently run ito problems. Installation of the integration was successful, and i build my first Entity1 to switch my Shelly’s in the network with this content:

Entity1:
Features:
‘Off’:
Type: get
Parameter: http://192.168.1.45/relay/0?turn=off
‘On’:
Type: get
Parameter: http://192.168.1.45/relay/0?turn=on

This works fine, until i build my second Entity with this content:

Entity2:
Features:
‘Off’:
Type: get
Parameter: http://192.168.1.121/relay/0?turn=off
‘On’:
Type: get
Parameter: http://192.168.1.121/relay/0?turn=on

Now Entity2 works great, but Entity1 is no longer reachable. The remote says “Ressource not found” and in the log you can read “WARNING Cannot execute command ‘on’ for ‘remote-custom-entity1’: no configured entity found”. When i now add a third Entity, then the third Entity works great, but Entity1+2 are no longer reachable and so on, means, only the last createt Entity works, all others are not reachable. If i reboot the remote, the icons of the Entities get a red backslash and are marked as “not reachable”. I’ve also deleted the integration twice and build everything new but without success.

The only difference i can see is, that the timestamp in the log is one our behind (summertime) my system time, even i have choosen the right time Zone in remote 3 setup. Any idea what i have missed ore make wrong?

I can’t reproduce this. Please post the complete log from starting the integration for the first time until you get the error. Also make sure that both enities are added to the configured entities list in the integration settings.

Timestamps in the log are always GMT so it might be diferent from you local timezone.

Thank you Kenny for your fast response and for looking at this behviour.

I’ve started today from scratch, so you see in the log file at first adding the integration, then configurating the integration (fire&forget) and then adding Entity1, switching Entity1 on/off (works), adding Entity2, switching Entity2 on/off (works), try to switch Entity1 again (won’t work anymore), adding Entity3, switching Entinity3 on/off (works), try to switch Entity2 again (won’t work anymore), try to switch Entity1 again (won’t work anymore). After restart of the remote Entity1,2 are not found, Entity3 works as befor as last added Entity. I use UC System Version 2.7.0.

configured entities:

After restart:

https://pastebin.com/PrhjbXg8

Thanks for the log. You are replacing the entity with the new entity instead of adding it to the config. That will remove the old entity and the old entity will be shown as unavailable after a restart (2025-11-10 22:02:13.844895 +00:00 custom-intg-requests INFO setup INFO One or more entities have been removed from the custom entities configuration. Removing them as available and configured entity)

Dear Kenny,

thank you for the hint. Now I understand that all HTTP commands must be entered together and not individually, as I had previously thought. Now it works perfectly. Thanks again for your support!