iobroker-community-adapters / ioBroker.broadlink2

ioBroker adapter for broadlink devices like the RM remote or SP switches
MIT License
41 stars 14 forks source link

Get error when trying to set true #42

Closed xolom closed 5 years ago

xolom commented 5 years ago

Iam trying to use this adapter with javascript engine and i get the following error in my log

screen shot 2019-02-28 at 5 56 45 pm

I am using setState(..., true); in ma Javascript to trigger a learned state

Let me know if you need some further information

quax76 commented 5 years ago

I have exactly the same issue with a RM mini 3. I would be vey happy to get a solution for this...

xolom commented 5 years ago

For some reason i now get another error instead of the above one: Error in StateChange for broadlink2.0.RM:.L.Number_1 = TypeError: device.sendData is not a function at sendCode (/opt/iobroker/node_modules/iobroker.broadlink2/broadlink2.js:76:9) at obj.native.obj.native.code.setState.then (/opt/iobroker/node_modules/iobroker.broadlink2/broadlink2.js:219:44) at at process._tickCallback (internal/process/next_tick.js:189:7) I realized that, the button trigger works for some time and then stops working..

frankjoke commented 5 years ago

Ok, in both cases functions are not available at expected states. If sendCode is not available it means that the RM device was not found and is offline when it started or tried to restart! Can it be that that the RM gets offline from time to time?

I just work on a total different interface between the devices and the adapter and hope to have it running in a view weeks to be tested by interested people before I make it adapter version 2.0.0.

Especially the case when devices go offline and come back later need to be tested better!

quax76 commented 5 years ago

My device was reachable through ping all the time. And I tried so often so I do not think it has has to do with pure reachability. I also never hat a problem to configure the device through the app. I see anything else that I do wrong or that could have went wrong? Maybe there is a way to make sure the device is online/reachable except ping...

frankjoke commented 5 years ago

I cannot say anything more unless you send me a debug log of adapter set to debug and starting up and trying to access/switch some devices. The log shows what the adapter sees and what not.

frankjoke commented 5 years ago

Please try also V2Beta