mlfunston / node-red-contrib-broadlink-control

Set of node-red nodes to manage the Broadlink home automation device suite
MIT License
44 stars 24 forks source link

Send commands from second broadlink device fails #60

Open samuellazea opened 3 years ago

samuellazea commented 3 years ago

I have to broadlink devices home and set up. When I try to send commands from the first one it works without problems but when I try to send commands from the second device it does not work and fails with the next error.

10/29/2020, 6:05:07 PMnode: bucatarie msg : error "Error: ENOENT: no such file or directory, open '/mnt//jsonIrCode'" 10/29/2020, 6:05:07 PMnode: bucatarie msg : error "SyntaxError: Unexpected token u in JSON at position 0"

Capture9

The broadlink/newremote/SharedData/jsonDevice contains this ( I put xxx for confidential data but kept structure intact): [{"id":1,"mac":"xxxxx","type":10002,"name":"智能遥控","password":xxxxx,"lock":0,"new":0,"longitude":0,"latitude":0,"subDevice":0,"terminalId":1,"publicKey":[-xx,-xx,-55,7,-xx,-xx,-xx,7,xx,84,64,xx,92,-xx,-xx,xxx]}]

In e-Control I have 2 devices: Screenshot_20201029-181213_e-Control

Maybe it's related with single device being present in configuration. In nodered when I try to send a command from the first device to some appliance it works but not if I try to send from the other device.

Is there anything that I do wrong? Thanks in advance

mlfunston commented 3 years ago

Looks like you may have a path error to the catalog file? "Error: ENOENT: no such file or directory, open '/mnt//jsonIrCode'"

samuellazea commented 3 years ago

Yes. That is stated in the log I posted. But how can I fix this?

mlfunston commented 3 years ago

You need to put the correct path to the catalog file location (the jsonIrCode and other json files) in the configuration node of that RM unit. https://github.com/mlfunston/node-red-contrib-broadlink-control#configuring-node-red-nodes

samuellazea commented 3 years ago

Thanks lots. I will try it and let you know.