[APP][Pro] Spacey Plan - Interactive Floor Plan Widget for Homey Dashboard

Works!
Thanks @Asterix and @Ludvig !

@Asterix @Ludvig Hi!

Since the update 4 days ago, I am once again experiencing an issue where a device opens twice when clicked on the floor plan.

This had been resolved in a previous update, but it has returned following the update from 4 days ago.

Hello Rembo038

Can you share a little more information about when and this happens? Because I’ve never had this mistake before and I can’t do it.

  • Homey Firmware?
  • Spacey Plan version?
  • Is it always with the same device or with different ones?
  • What type of device?
  • What kind of device (Apple / Android)?
  • Smartphone / Tablet?

It only happens when I press and hold a device. In that case, it opens the window twice. This only occurs with devices; it does not happen with sensors. Normally, you click once on, for example, a light to turn it on or off; sometimes I press and hold the light to check whether it is on or off, but then it opens the window twice.

  • Homey Firmware: 13.5.2
  • Spacey Plan version: 0.3.0
  • Is it always with the same device or with different ones: Always with devices you can switch on and of, but not with sensors.
  • What type of device: Lights, virtual switches
  • What kind of device (Apple / Android): Android
  • Smartphone / Tablet: Smartphone and tablet

Diagnostic code: 7bc4ecf4-d8ae-40d8-ac56-e613639004d4

Hi Rembo038, thanks a lot for the detailed info!

I looked through the code and found a likely cause. For lights and switches, a long press can trigger the details window twice if the device reports both touch and mouse events. Sensors use different code, which would match what you see. A short tap is not affected because it has a built-in double-click guard.

I don’t have any Android devices, so I can’t reproduce or test this myself. My plan is to submit the fix to Ludvig as a pull request (it just prevents a second window from opening while one is already open). Once he has published the update, could you check whether the problem is gone?

To confirm my theory, two quick questions:

  1. In the Homey app on Android, are you using the normal mobile view, or is “Desktop site” enabled for the dashboard?
  2. Is a mouse or trackpad connected to your tablet?

Also, I don’t have access to the diagnostic report you sent. @Ludvig, maybe you could take a look at it, there might be something in there that helps.

Thanks for your help!

Hi Asterix,

I will test the new update as soon as Ludvig has rolled it out.

  1. In the Homey app on Android, are you using the normal mobile view, or is “Desktop site” enabled for the dashboard?

I just use the standard Homey app for my dashboards. As far as I’m aware, dashboards are only available on mobile devices and not yet for desktops/browsers.

Is this what you mean, or are you referring to portrait or landscape mode? I use the dashboard in both portrait and landscape; in either case, when I long-press a device on the floor plan, it opens twice.

  1. Is a mouse or trackpad connected to your tablet?

No, there is no mouse or trackpad connected to the tablet; I only use the touchscreen.


Oh, that’s strange—should I create a new diagnostic report?

Hi Rembo038, thanks for the quick answer! Standard Homey app, touchscreen only is exactly what I needed to know (I meant the browser-style “Desktop site” option, which doesn’t apply to you).

To narrow it down a bit more, could you check these two things?

  1. When you long-press a light, do both windows appear immediately on top of each other (so you have to close it twice), or does the window open again only after you close the first one?
  2. Does the light switch on/off during the long press?

No new diagnostic report is needed for now. Thanks again for your help!

Hi Asterix, Thanks for the quick response!

Oh, you meant setting up the floor plan? No, I set that up using the app.

1. When you long-press a light, do both windows appear immediately on top of each other (so you have to close it twice), or does the window open again only after you close the first one?

Yes, when I long-press a light, the windows appear immediately on top of each other. If I close the first one, it disappears, and then I have to close the second one. I just tested this by closing the first window and waiting 30 seconds before closing the second one; the window did not reopen. So, after closing it twice, the window is gone completely.

2. Does the light switch on/off during the long press?

No, the light does nothing—it doesn’t turn on or off. It just opens the window twice.

@Rembo038 @Ludvig I found the cause of the window opening twice on long press and opened a pull request: Fix details window opening twice on long press of lights/switches with a rule icon by Asterix-m91 · Pull Request #10 · ludvigaldrin/com.svipler.app.spaceyplan · GitHub

For lights and switches with a rule icon (“All - Icon Select”) and no device photo, the touch handlers were attached twice to the same icon, so each long press started two timers and opened two windows. A short tap was not affected because it has a 300 ms double-click guard. The fix attaches the handlers only once per icon (2 files, 14 lines, no version bump).

I tested it on my Homey Pro: tap switches once, long press opens a single window. I can’t test on Android myself, so @Rembo038, could you check once Ludvig has published the update whether it’s gone?

@Ludvig, one more thing: the 0.3.0 changelog entry only mentions the lawn mower part. The other changes from PR #9 (thermostat up to 40 °C, inverter values, default Flow Trigger rule, separate temperature/humidity entries) are missing, maybe worth adding for the next release notes. Also, the lawn mower status labels are currently German. Do you prefer English, or should I make them language-dependent?

Thanks!