Skip to content

Group is not working after you remove a device (switch) that is (was) part of the group #14

@elwin1234

Description

@elwin1234

Suppose I have a group with following ids:

[
   "elro6",
   "action2",
   "elro2",
   "elro4",
   "elro5",
   "test"
]

When I remove switch "test", this group is broken (id of removed device remains in group) and non-functional.
Related nodejs server Error:

/switchit/server.js:88
  switch(oSwitch.brand){
                ^
TypeError: Cannot read property 'brand' of null
    at sControlSwitch (/home/pi/switchit/server.js:88:17)
    at IncomingMessage.<anonymous> (/home/pi/switchit/server.js:66:29)
    at IncomingMessage.emit (events.js:88:20)
    at HTTPParser.parserOnMessageComplete [as onMessageComplete] (http.js:130:23)
    at Socket.socketOnData [as ondata] (http.js:1288:20)
    at TCP.onread (net.js:374:27)

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions