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

With this integration you can send http get/post/patch/put and wake on lan magic packets. It exposes a media player entity for each supported command. These entities only support the source feature. Just enter the desired url or mac address in the source field when you configure your activity/macro sequences or activity ui.

3 Likes

WOW! This is great! Thank you so much! :pray:
Now, I just have to wait that external integrations become down loadable to the R2.

I just released a version that includes an archive file that can be uploaded to the remote: Release v0.3.0 · kennymc-c/ucr2-integration-requests · GitHub

Hi, I’ve tried the integration now and encountered a problem with the hard buttons.

I changed my VU+ activity from IR control to IP control with http get commands. The commands work without problems on the touch screen. But the hard buttons stop working although they’ve successfully worked after creating them with the remote two toolkit. Rebooting the remote doesn’t help.

Is this a known problem and is there a way to solve this?

solved, after several reboots the hard buttons are working again…

If this happens again you can inspect the custom integration logs. You should see a response message sent from your receiver if the command has been executed. Otherwise it’s a bug on the remote.
I also heard from similar non integration releated issues where commands are not triggered in certain situations. For example only in activities with some hard (long press) buttons and it works again if you exit the activity ui and open it again.

I’ve changed all my activities from IR to Ip control now with albaintor’s LG integration and the http request integration to control my LG TV and my VU+duo 4k SE set-top box.

There’s only one serious problem with activity start/stop sequence commands. When the VU+ is in deep sleep state, it can’t wake up via lan http request. I’ve created a turnaround with IR command to Power Toggle (which wakes the box from deep sleep and turns it on) and then another http request to power on (in case the box was already on and the IR command Power Toggle would have send it to standby).

The problem is, that the start sequence will stop regularly at the http request to power on if the box was in deep sleep before and can’t receive http requests because 45 second booting hasn’t finished. In integration settings I’ve activated the “Fire and forget” feature, so it makes me wonder that either R2 or the integration react on the availability and state of the box. From my point of view the requests should be send without any error in start or stop sequences.

The same behaviour happens in the LG TV activity if I want to exit the activity and the TV is turned off already for some reason. The exit sequence will be interrupted then with error when it comes to turn off the TV.

Are there any suggestions to solve this?

Regarding Requests: If the target device/server doesn’t respond within the set timeout a timeout error is sent to the remote. If you know that the device takes longer to respond you could either extend the global timeout or, as you already did, activate the fire and forget mode to ignore responses completely and always sent a OK message to the remote if there was no response at all.

LG TV: I have the same problem when the TV turns off after reaching the sleep timeout. I asked the developer about this but there seems to be no way for the integration to know when the TV turns off by itself. When the integration wants to send a command and the TV is turned of it tries to reconnect first but if it fails a Not-OK message is sent to the remote.

Most (all?) VU 4K boxes sopport WOWL (wake on wlan) and Request integration also supports WOL which might power on your VU. If you discard the answer you do not need IR anymore.

Ralf

Unfortunately that’s not true. Most of VU+ 4K Boxes neither support WOL nor WOWL. The only way to wake them up from Deep Standby is by pressing the Physical Power Button or to send IR Power Toggle signal (or with record-timer).

Regarding integration behaviour, I don’t understand why the remote reacts to the different state of the box although I’ve turned on “fire and forget”. It should ignore the status and just send the request without waiting for response.

Unfortunately you are right :rofl: I though because my Ultimo 4K has WOWL they made it standard but I was wrong. The Ultimo 4K is the only with WOWL and the DUO2 the only with WOL. I was angry with VU when they changed it.

What about CEC? IR has the problem that an IR transmitter must be around. A real IP integration would be nice.

Ralf

Can you post the logs when this happens?

I’ve installed the WOL integration and it works great to wake up my MadVR Envy processor! Thanks for making that integration. It’s a step further making my Remote 2 useful in my Home Theatre.

Hi Kenny, I’m still facing problems when I use http commands in activity turn-on or turn-off sequences. Dependent on the current status of the device (e.g. VU+ Set-Top Box) it gives me an “internal server error” and stops execution of the sequence. If I press it in the error drop down menu again, it works most of the time and the sequenze finishes. This happens very often if the device status doesn’t match with the command (e.g. if I want to turn on or off a device that is already on or off) or if everything is turned off and offline. I don’t get this strange behaviour if i send the http requests by a smartphone app or by light manager air. From There it’s simply real fire and forget, independent from the devices response.

Can you please attach the debug level custom integration and core logs? The error messages on the remote are quite basic and doesn’t give me much information what really happened internally.

how can I attach a txt.file?..

You included the logs of the lg integration logs instead of the requests integration. You can also use paste.bin to upload your logs (you don’t need an account, just click on the green + at the top left)

The logs are again just including the lg integration. Make sure to check the matching custom integrations when you export the log:

Sorry, the link was pastebin.com where you can share you logs

Your logs don’t include any errors. Have you downloaded the logs right after the error occurred? Otherwise extend number of lines to be downloaded. Also make sure to also include the core logs.

How to paste logs to forum:

  1. Go to https://pastebin.com/
  2. Copy paste the logs to the “New paste”-box
  3. Choose “Create New Paste”-button, it’s all the way down.
  4. Copy the address from browsers address-bar here.

This way we don’t have thousands of log-lines in forum-threads, just clutters the thread and makes logs harder to read.

Here is an example. Two foxesjumped on ice - Pastebin.com