fbacker / broadlink-mqtt-bridge

Bridge Broadlink RM Devices with MQTT and API for e.g. OpenHAB
41 stars 14 forks source link

Cannot read property 'enterRFSweep' of undefined #25

Closed mountain-pitt closed 4 years ago

mountain-pitt commented 4 years ago

Have upgraded to latest version of broadllink-mqtt-bridge. After upgrade can not control Broadlink RM pro. Can Access Web GUI on 3000 . Device Scan finds the device

Attempted to re record a RF function and seems stuck in recording mode, but no light on Broadlink to show recording like in previous version

2019-11-28 20:06:37 [info]: Starting Broadlink MQTT NodeJS Application 2019-11-28 20:06:37 [info]: Device found model: Broadlink RM2 Pro Plus v2, id: 34ea348efa7a, ip: 192.168.0.49 2019-11-28 20:07:02 [info]: Broadlink Discovery completed. Found 1 devices. 2019-11-28 20:07:33 [info]: Prepare topic: broadlink/blinds/lounge/up, message: on 2019-11-28 20:07:33 [error]: Error TypeError: Cannot read property 'enterRFSweep' of undefined 2019-11-28 20:07:33 [info]: Prepare topic: broadlink/blinds/lounge/up, message: on 2019-11-29 06:03:34 [error]: Already recording.

I started from scratch again. new SD card new raspberry buster install, new install of openhab etc. and new install of mosquitto etc. Clean install. Still getting same error after installing Broadlink-mqtt-bridge.

Did note on install the following

Installing dependencies ... npm WARN npm npm does not support Node.js v10.15.2 npm WARN npm You should probably upgrade to a newer version of node as we npm WARN npm can't make any promises that npm will work with this version. npm WARN npm Supported releases of Node.js are the latest release of 4, 6, 7, 8, 9. npm WARN npm You can find the latest version at https://nodejs.org/ npm WARN broadlink-mqtt-bridge@1.0.0 No repository field.

[17:16:19] pi@openhabTEST:~$ npm -version 5.8.0 Installed Node version: v10.15.2

mountain-pitt commented 4 years ago

I can play via the WEB GUI already recorded functions. but can not record new ones. If i attempt to record application remains in already recording state...can not break out of state unless I restart the service.

I have checked a post that is closed on recording . wanting to go back to V1. I followed this link and could not find on the bottom to reinstall V1

check https://github.com/fbacker/broadlink-mqtt-bridge and the bottom. Should get you back to v1.

fbacker commented 4 years ago

@mountain-pitt sorry about that. I messed up when adding the feature to select what broadlink device to play messages with. I've pushed some code that should fix this.

To revert back to old version, checkout and revert back in git. https://github.com/fbacker/broadlink-mqtt-bridge#use-old-system

mountain-pitt commented 4 years ago

Have renamed the original install, broadlink-mqtt-bridge to broadlink-mqtt-bridge-old and allowed new install of software, then copy config and command directory back into broadlink-mqtt-bridge. restart system and accessed web GUI, all commands now work and I can now record new commands.

Thankyou for resolving this issue. I am running the latest version of your software not V1. All seem ok

during install warnings were given about npm, npm does not support Node.js v10.15.2 needing upgrading. and only version up to 9 are supported. Node.js v10.15.2 in the new buster install and openhab setup, thought this might of been problem too, warnings are still given in the status of the service. but program appears to be running.

fbacker commented 4 years ago

Glad it worked. Warnings we can live with as long it works :) Please let me know if node is causing issues.

ArJay60 commented 4 years ago

I am reopening this. Same problem with RF recording. Followed steps as by mountain-pitt but didn't solve the problem. Still error: 2019-12-11 16:11:23 [error]: Error TypeError: data.deviceModules[0].enterRFSweep is not a function Please some assistance to solve this. Running on a PI with broadlink RM2.