Virtual on-off switch not found in blockly devices/switches

Moderator: leecollings

Post Reply
gschmidt
Posts: 200
Joined: Thursday 20 December 2018 11:03
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Virtual on-off switch not found in blockly devices/switches

Post by gschmidt »

Hi,

running Domoticz beta version Version 4.10532 on an Rpi3b+

I want to create a blockly script for a virtual switch (lighting 1, X10 On/Off) I have created in domoticz, but it is not listed in blockly devices/switches.
This is strange because I have several of these virtual switches which are all listed in blockly devices/switches.

Somebody any idea why it is not listed?
Ricard1
Posts: 62
Joined: Saturday 07 November 2015 12:30
Target OS: Windows
Domoticz version: Beta
Location: Sweden
Contact:

Re: Virtual on-off switch not found in blockly devices/switches

Post by Ricard1 »

I had the same issue and if I remember right I switched to another browser or cleared browser cache, or maybe restarted Domoticz... :)
gschmidt
Posts: 200
Joined: Thursday 20 December 2018 11:03
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: Virtual on-off switch not found in blockly devices/switches

Post by gschmidt »

Ricard1 wrote: Sunday 03 March 2019 12:17 I had the same issue and if I remember right I switched to another browser or cleared browser cache, or maybe restarted Domoticz... :)
Clearing the browser cache did the trick! thx
ESFnl
Posts: 41
Joined: Saturday 26 December 2015 16:49
Target OS: Raspberry Pi / ODroid
Domoticz version: 2022.2
Location: The Netherlands
Contact:

Re: Virtual on-off switch not found in blockly devices/switches

Post by ESFnl »

One more thumbs up for Richard1! It was an old question and solution but helped me a lot!
lazaruss72
Posts: 17
Joined: Thursday 14 December 2017 23:13
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: Virtual on-off switch not found in blockly devices/switches

Post by lazaruss72 »

with some browsers it is also sufficient to press the Shift key and F5 (reload). Then the switches are displayed.
Dave21w
Posts: 360
Joined: Sunday 29 November 2015 21:55
Target OS: Raspberry Pi / ODroid
Domoticz version: Stable
Location: UK
Contact:

Re: Virtual on-off switch not found in blockly devices/switches

Post by Dave21w »

I had this issue too and found that going into the settings page and clicking Apply Settings even though you've changed nothing also made newly created devices appear.
DaaNMaGeDDoN
Posts: 55
Joined: Thursday 23 October 2014 19:01
Target OS: Linux
Domoticz version: beta
Location: Eindhoven, the Netherlands
Contact:

Re: Virtual on-off switch not found in blockly devices/switches

Post by DaaNMaGeDDoN »

Hey folks, i ran into the same issue, but things might be a bit different and possibly this is a bug:

Steps: went into Setup->Hardware and created a Dummy switch, gave it a name, pressed OK and the notification tells me it has been created.
(nb it says i should be looking for it in the devices, not switches) <-probably legacy code
At that moment the switch shows up in the Devices list (used, for some reason, maybe that's new) and like expected with a "used" switch it shows up at the bottom of the "Switches" page.
I went there, clicked Edit on the new switch and set the following:
Switch Type: Selector
Selector Style: Button set
gave it three level names: Off, Low, High and kept the default level values.
Pressed Save.

After that, whichever browser or device i use it doesn't show up at the bottom of the Switches page any longer.
Curious thing is i can still see it in Setup->Devices and if i exploit the "edit-url" like "https://mydomain.tld:9191/#/Devices/IDX/LightEdit", i can still edit it. Also the device DOES show up in the app on my phone in the switches section. There, if i set it as a favorite, it DOES show up in the browsers on the Dashboard, but still nothing in the Switches page.

None of the mentioned tricks work;

- restarting domoticz
- clearing browser caches
- trying different browsers
- changed the theme to default

As i was writing these steps down i figured the "trick" of making it a favorite via the app might work around this(and it did partially), so there is no immediate need to resolve this at this moment because i can work with that for now.
Going further, i noticed in the app on my phone it mentioned something (to late now to remember now) like it's state was undefined. Once (via the dashboard) i set the selector switch to "Off" it DOES appear in the switches page!

TLDR: i think the switches page does not show any (newly) created selector switches for which no initial state is defined. This might be a bug in the code that modifies the switch from a normal on/off into a selector switch. I guess that helps the devs ;-)

So actually i was able to resolve this myself, but who knows somebody else might run into this issue, the obvious trick is to set it as a fav in the app on your phone, select a state through the dashboard and your switch now appears like expected. I verified that you can remove it as a favorite after that and things behave as expected.
saarwh
Posts: 2
Joined: Saturday 18 March 2017 15:29
Target OS: Raspberry Pi / ODroid
Domoticz version: 2024.7
Location: Netherland
Contact:

Re: Virtual on-off switch not found in blockly devices/switches

Post by saarwh »

A small addition to the solution of clearing the browser cache with ctrl+F5; there was an update pending for Firefox due to which the cache couldn't be cleared. After updating Firefox the switch was visible!
Post Reply

Who is online

Users browsing this forum: No registered users and 0 guests