Unable to edit switches

Please use template to report bugs and problems. Post here your questions when not sure where else to post
Only for bugs in the Domoticz application! other problems go in different subforums!
Forum rules
Before posting here, make sure you are on the latest Beta or Stable version.
If you have problems related to the web gui, clear your browser cache + appcache first.

Use the following template when posting here:

Version: xxxx
Platform: xxxx
Plugin/Hardware: xxxx
Description:
.....

If you are having problems with scripts/blockly, always post the script (in a spoiler or code tag) or screenshots of your blockly

If you are replying, please do not quote images/code from the first post

Please mark your topic as Solved when the problem is solved.
Post Reply
User avatar
thorbj
Posts: 198
Joined: Thursday 20 November 2014 23:11
Target OS: Raspberry Pi
Domoticz version: beta
Location: Norway
Contact:

Unable to edit switches

Post by thorbj » Wednesday 23 August 2017 14:12

Version: 3.8356 (beta)
Platform: Raspberry/Debian
Plugin/Hardware: zWave, Netatmo, Philips Hue, pytradfri


Hi, I have made two dummy AC On/Off switches that I changed to dimmer switches. I use these switches to control IKEA Trådfri bulbs.
Now I want to add a ne bulb, and wanted to see the configuration of the switches by editing them. But I am unable to edit them. When I click the Edit buttin, nothing happens in Domoticz. All other dummy switches work great, except these two.

The Chrome error console gives me this error when I press the edit button:

Code: Select all

:8080/app/LightsController.js:1539 Uncaught TypeError: Cannot read property 'split' of undefined
    at EditLightDevice (:8080/app/LightsController.js:1539)
    at HTMLAnchorElement.onclick (:8080/#/LightSwitches:1)
EditLightDevice	@	:8080/app/LightsController.js:1539
onclick	@	:8080/#/LightSwitches:1
Any clues?

Thanks!
2xRaspberry Pi Model 2 w/RaZberry z-wave chip (master/slave)|Fibaro Wall Plug|Fibaro Universal Dimmer 500W|Aeon Labs Multisensor|RFXtrx433E|Nexa WMR-1000|Nexa Pe-3|Nexa Remote|Nexa LGDR3500|Lightify Gateway|Lightify RGBW bulb

User avatar
gizmocuz
Posts: 8673
Joined: Thursday 11 July 2013 18:59
Target OS: Raspberry Pi
Domoticz version: beta
Location: Top of the world
Contact:

Re: Unable to edit switches

Post by gizmocuz » Wednesday 23 August 2017 15:39

Could you tell me your exact steps 'how' you created the switch ?
Quality outlives Quantity!

User avatar
thorbj
Posts: 198
Joined: Thursday 20 November 2014 23:11
Target OS: Raspberry Pi
Domoticz version: beta
Location: Norway
Contact:

Re: Unable to edit switches

Post by thorbj » Thursday 24 August 2017 11:18

I'm not sure about the exact translation, but:

In the switches pane --> Add switch
Switchtype Dummy - AC, then I gave it a name and ID.
Pressed Add, and then edited the switch to call the IKEA plugin urls.
2xRaspberry Pi Model 2 w/RaZberry z-wave chip (master/slave)|Fibaro Wall Plug|Fibaro Universal Dimmer 500W|Aeon Labs Multisensor|RFXtrx433E|Nexa WMR-1000|Nexa Pe-3|Nexa Remote|Nexa LGDR3500|Lightify Gateway|Lightify RGBW bulb

User avatar
gizmocuz
Posts: 8673
Joined: Thursday 11 July 2013 18:59
Target OS: Raspberry Pi
Domoticz version: beta
Location: Top of the world
Contact:

Re: Unable to edit switches

Post by gizmocuz » Thursday 24 August 2017 12:52

you mean you added a script to the switch ? and this does not work ?
What is your script line ?
Please post a screenshot
Quality outlives Quantity!

User avatar
thorbj
Posts: 198
Joined: Thursday 20 November 2014 23:11
Target OS: Raspberry Pi
Domoticz version: beta
Location: Norway
Contact:

Re: Unable to edit switches

Post by thorbj » Thursday 24 August 2017 14:48

The script works, the switch works. But when I want to enter "edit mode" for the switch, to copy the scrip url to another switch, I can't. When pressing edit nothing happens except for the error in chrome error console.
2xRaspberry Pi Model 2 w/RaZberry z-wave chip (master/slave)|Fibaro Wall Plug|Fibaro Universal Dimmer 500W|Aeon Labs Multisensor|RFXtrx433E|Nexa WMR-1000|Nexa Pe-3|Nexa Remote|Nexa LGDR3500|Lightify Gateway|Lightify RGBW bulb

User avatar
gizmocuz
Posts: 8673
Joined: Thursday 11 July 2013 18:59
Target OS: Raspberry Pi
Domoticz version: beta
Location: Top of the world
Contact:

Re: Unable to edit switches

Post by gizmocuz » Saturday 26 August 2017 7:55

I need your script line to replicate this
Quality outlives Quantity!

User avatar
thorbj
Posts: 198
Joined: Thursday 20 November 2014 23:11
Target OS: Raspberry Pi
Domoticz version: beta
Location: Norway
Contact:

Re: Unable to edit switches

Post by thorbj » Tuesday 05 September 2017 14:42

Sorry for the late reply. Unfortunately I can't get you the script line as I am unable to edit the switch that uses the script line.
2xRaspberry Pi Model 2 w/RaZberry z-wave chip (master/slave)|Fibaro Wall Plug|Fibaro Universal Dimmer 500W|Aeon Labs Multisensor|RFXtrx433E|Nexa WMR-1000|Nexa Pe-3|Nexa Remote|Nexa LGDR3500|Lightify Gateway|Lightify RGBW bulb

morilm
Posts: 32
Joined: Friday 27 January 2017 13:57
Target OS: OS X
Domoticz version:
Contact:

Re: Unable to edit switches

Post by morilm » Sunday 08 October 2017 11:57

I can confirm the issue on my Domoticz as well.

Seems to be an issue with virtual dimmer switches.

To create it I have used the manual switch as "selector switch". Once you change the settings to "dimmer" you can never edit it again. Swith/dimmer works fine, but can't be edit.

It's not an issue of corrupt switch as it happens all the times.

regards,
Miguel

fantom
Posts: 324
Joined: Thursday 26 March 2015 11:40
Target OS: Raspberry Pi
Domoticz version:
Location: Poland
Contact:

Re: Unable to edit switches

Post by fantom » Sunday 15 October 2017 18:07

Hi.
I found this same problem today:
https://github.com/domoticz/domoticz/issues/1872

Fantom

etamminga
Posts: 12
Joined: Sunday 17 January 2016 13:36
Target OS: Raspberry Pi
Domoticz version: Beta
Contact:

Re: Unable to edit switches

Post by etamminga » Sunday 03 December 2017 16:53

Same here. Created a dummy switch from the HW page. Edit it to be of type selector with a different Icon (in my case the Speaker icon).
Click Save and return to the Switches page. Click Edit again of the switch and then the UI is incomplete/incorrect/etc.

From the Chrome Developer Tools:

LightsController.js:1750 Uncaught TypeError: Cannot read property 'join' of undefined
at EditLightDevice (LightsController.js:1750)
at HTMLAnchorElement.onclick (VM810 LightSwitches:1)
LightsController.js:1750 Uncaught TypeError: Cannot read property 'join' of undefined
at EditLightDevice (LightsController.js:1750)
at HTMLAnchorElement.onclick (VM810 LightSwitches:1)

Regards,
Erik

syrhus
Posts: 31
Joined: Tuesday 12 December 2017 15:10
Target OS: Raspberry Pi
Domoticz version: 3.8153
Location: Paris
Contact:

Re: Unable to edit switches

Post by syrhus » Wednesday 13 December 2017 15:24

version: 3.8153
Platform: raspberry pi 3

Hi

I had the same issue.
There is a bug in the LightsController.js file

I've fixed it with this code:

EditLightDevice = function (idx, name, description, stype, switchtype, addjvalue, addjvalue2, isslave, customimage, devsubtype, strParam1, strParam2, bIsProtected, strUnit) {
if (typeof $scope.mytimer != 'undefined') {
$interval.cancel($scope.mytimer);
$scope.mytimer = undefined;
}
$.devIdx = idx;
$.isslave = isslave;
$.stype = stype;
$.strUnit = strUnit;
$.bIsSelectorSwitch = (devsubtype === "Selector Switch" && switchtype!==7); //7= dimmer

If you need help on github, let me know, it would be a pleasure to contribute.
Regards

fantom
Posts: 324
Joined: Thursday 26 March 2015 11:40
Target OS: Raspberry Pi
Domoticz version:
Location: Poland
Contact:

Re: Unable to edit switches

Post by fantom » Wednesday 13 December 2017 15:31

Please create pull request on github

Fantom

Post Reply

Who is online

Users browsing this forum: No registered users and 3 guests