zachcheatham / rnet-pi

RNET RS232 controller for older Russound audio systems.
GNU General Public License v3.0
4 stars 2 forks source link

CAA66: TypeError: Cannot read property 'getName' of null #2

Open KumarMudedla opened 3 years ago

KumarMudedla commented 3 years ago

Thank you so much for this, I was using my CAA66 with SmartThings but that app has been shutdown when SmartThings moved to new version.

I do not have any wall keyboards I was just using CAA66 via SmartThings app, then I started looking at similar and found this.

Was able to setup and select the controller from the phone app and was able to add Zone and then below error displays, Any Idea?

if I start script again it will directly got below error

[22:15:55] [INFO] [TCP Server] listening on 0.0.0.0:3000 [22:15:55] [LOG] Connected to RNet! [22:15:55] [WARN] Received packet from RNet without start of new message. [22:15:55] [WARN] Received packet from RNet without start of new message. [22:15:56] [INFO] No updates are available. [22:16:02] [LOG] Client 192.168.0.169 connected. [22:16:06] [LOG] Client 192.168.0.169 disconnected. [22:16:07] [LOG] Client 192.168.0.169 connected. [22:16:24] [INFO] Controller #0 zone #5 (Living TV) created. [22:16:32] [INFO] Controller #0 zone #5 (Living TV) volume set to 94 [22:16:32] [INFO] Controller #0 Zone #5 (Living TV) parameter 4 (Turn on Volume) to 94 [22:17:06] [INFO] Controller #0 zone #5 (Living TV) power set to true /home/pi/rnet-pi/src/app.js:422 rNet.getSource(sourceID).getName() ^

TypeError: Cannot read property 'getName' of null at RNet.rNet.on.on.on.on.on.on.on.on.on.on.on.on.on.on (/home/pi/rnet-pi/src/app.js:422:33) at RNet.emit (events.js:198:13) at Zone.zone.on.on.on.on.on.on (/home/pi/rnet-pi/src/rnet/rnet.js:268:22) at Zone.emit (events.js:198:13) at Zone.setSourceID (/home/pi/rnet-pi/src/rnet/zone.js:187:22) at RNet._receivedRNetPacket (/home/pi/rnet-pi/src/rnet/rnet.js:696:82) at Immediate.setImmediate (/home/pi/rnet-pi/src/rnet/rnet.js:597:34) at runCallback (timers.js:705:18) at tryOnImmediate (timers.js:676:5) at processImmediate (timers.js:658:5)

KumarMudedla commented 3 years ago

Issue has been resolved by adding the Source's first and then Zones

zachcheatham commented 3 years ago

Reopening issue to fix this bug.