toggledbits / Reactor

Reactor (for Vera and openLuup) is a Vera Home Automation plugin that provides advanced programmable logic.
17 stars 0 forks source link

Activities / Device Action / Choose action, interface issue #22

Closed Tarkus-NJ closed 5 years ago

Tarkus-NJ commented 5 years ago

Intermittently, the choose action input parameter will be truncated and the pop up menu will not open. The work around is to the delete action and try again. Some times it will take a few tries. Browser is Chrome.

choose actions

Tarkus-NJ commented 5 years ago

This may be a condition that happen when working remotely or the version of chrome on my work computer. It has not happened when working locally. Will monitor further.

toggledbits commented 5 years ago

If you can reproduce it, it may also be a sequence of events. It would be useful to know when/how... e.g., is it this way on a brand new condition immediately after selecting device, etc.

FYI, there is reliance on a Luup request to populate that menu, so it's ~possible~likely something is happening when it's a remote request vs done locally. It may be that the request just takes longer to complete, or something more nefarious is happening in the background. Opening up the developer console may show an exception or diagnostics logged.

Tarkus-NJ commented 5 years ago

Yes, on a brand new condition. It also happens intermittently using Firefox remotely. I will take a look at the chrome developer console the when I get a chance.

toggledbits commented 5 years ago

Did a walk-through that area of the code, and absolutely most likely is that a remote request is failing intermittently. This may simply be a hazard of configuration when using remote access. But, I can increase the request timeout, which currently stands at only 5s, and the error handling doesn't always emit a visible message to the user (although it does send quite a bit to the console, so that's still something we want to try to capture next time this happens)--I will certainly address that.

If there's anything I can do to make this more reliable, I will, but there will always be a reliance on Vera's infrastructure for remote access here, as the only way to get the data I need about the device is a special Luup request. The data is not available in user_data or via another structure that the JS API has loaded and ready to hand off.

Working locally, this can also occur, if you happen to set/change the device dropdown right at the moment your Vera is rebooting/reloading.

Tarkus-NJ commented 5 years ago

Just to follow up on this. Working remotely it seems that the choose action box no longer gets truncated and locked up, however I do get the following message pop up when entering the activities tab. It will usually open a few times after closing it by pressing ok. It only shows up when in activities from what I can see.

Screen Shot 2019-03-28 at 6 55 41 PM

toggledbits commented 5 years ago

Beta 19093 (releasing this evening 3-Apr after 1900 EDT) will contain additional effort to retry on communication failures in this area--I can't make Vera's remote connections more reliable or faster, but I can hammer on them to produce results if they are going to produce any at all.

Tarkus-NJ commented 5 years ago

Yeah, this really feels like it is a day by day issue and how networks are behaving at any given time. I have been in and out of activities all morning remotely and not one problem so far.

toggledbits commented 5 years ago

Closing. Let's see how my timeout tuning and retry code work out. We can reopen if there are still issues.

Tarkus-NJ commented 5 years ago

I had been working locally yesterday and over the weekend and activities were taking a long time to load with the blue spinning circle. I don't recall it being an issue working locally with the previous reactor beta. Also may be a result of upgrade to new Vera beta firmware.

Tarkus-NJ commented 5 years ago

This may be an issue with my computer at home. I am not experiencing the same lag in loading activities working remotely.

toggledbits commented 5 years ago

Yeah, I don't put up any progress or busy indicators. All I do is put "Loading" as the only item in the menu. You might check that you've got any ad blockers and other extensions turned off when accessing your Vera locally (or have the Vera's local IP whitelisted, as the case may be).

Tarkus-NJ commented 5 years ago

This seems ok now. I think the whole issue with the delay in loading activities with the blue spinning circle possibly can be attributed to my network, browser,or computer having issues.