Giter Site home page Giter Site logo

mlfunston / node-red-contrib-broadlink-control Goto Github PK

View Code? Open in Web Editor NEW

This project forked from vladimirsfilippov/node-red-contrib-broadlink

44.0 44.0 24.0 712 KB

Set of node-red nodes to manage the Broadlink home automation device suite

License: MIT License

JavaScript 61.05% HTML 38.95%
broadlink broadlink-rm home-automation node-red

node-red-contrib-broadlink-control's People

Contributors

deadly667 avatar karmaprod avatar mlfunston avatar neroxps avatar peyanski avatar timmersthomas avatar visirt avatar vladimirsfilippov avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

node-red-contrib-broadlink-control's Issues

ENHANCEMENT: Add capability to use Broadlink IHC app data files

Is this designed to work with the Broadlink e-control app or the Broadlink IHC (Intelligent Home Center) app? The e-control app no longer allows me to log in, so I'm hoping this is designed for IHC. Regardless, when I setup a custom remote and learn the buttons, I'm able to use my RMmini3 withe the IHC app and successfully control my TV. When I sync up to my android and locate the SharedData folder, it is basically empty. It has several folders and 2 .jpg files, but I would expect there to be some more information in there pertaining to the learned IR codes. Perhaps the documentation needs to be updated or clarified?

Noob question: Can someone help me get started?

I have been trying to get this to work for quite some time now, and I am struggling. I am new to NodeRed so I am still learning. Can someone please help me understand how to use this? I am using the RM mini 3. I have successfully used the learn command and the discover node. Getting the buttons from the app on my phone didn't work, so I am trying to do it programmatically. I can get the array from the learn node, but I don't know how to use it. I have the device configured right in the RM node (Mac address, and IP are correct).

What I have been doing:
I have an inject node going into a function node which goes into the RM node. The function node contains the following code:
msg.action = 'send'; msg.data = [38,0,236,0,152,148,17,17,15,18,15,18,15,18,15,51,12,54,21,13,14,19,14,51,15,51,16,50,16,50,16,18,15,18,14,19,15,15,18,149,16,17,15,19,14,19,15,18,14,19,15,18,15,18,15,50,16,50,16,50,16,48,18,18,15,50,16,50,17,49,16,18,15,18,15,18,16,17,20,45,16,0,7,32,148,149,15,19,15,14,19,16,17,18,15,50,14,52,17,17,15,18,15,50,16,50,17,49,17,49,16,18,15,18,22,11,15,17,17,148,17,17,16,17,15,18,15,18,15,18,16,17,20,13,15,51,15,50,15,50,18,49,16,18,15,51,15,51,16,50,15,18,16,17,23,8,25,9,16,51,16,0,7,32,148,149,21,12,49,15,18,18,16,49,16,50,16,17,16,18,15,50,17,49,16,51,16,49,17,17,21,11,16,15,18,18,17,147,17,16,17,17,15,18,15,18,21,12,22,10,17,15,17,50,16,50,16,51,16,50,16,17,15,51,15,51,16,50,15,19,17,16,22,9,50,50,17,0,13,5,0,0,0,0,0,0,0,0,0,0,0,0]; return msg;
I have also tried sending the array as msg.payload, but both ways I haven't had any success. Can someone please help me understand how to use these node? I tried following the examples, but this is all very new to me and it was confusing; I didn't understand how to implement it.

IR code format

I need to manually add an IR code into one of my nodes (force power off on a Samsung TV). I've found a place online that provides this code in hex format but am not sure how to translate into the format used by the RM Mini. Are you able to assist? The specific code I'm looking to adapt is...

discreet off 0x00 0x00 0x00 0x01

I'm assuming it's not as simple as 0,0,0,1

Broadlink Timeout Received

Hello!

I have an RM3 Mini (firmware: v44057) connected to my local network. When I use the Discover node I get this:

{
  "mac": "24dfa77a4ff9",
  "ip": "192.168.0.101",
  "typeid": "5f36",
  "type": "RM Mini 3 newer",
}

I imported the "learn and send data" example and configured the device parameter with the MAC and IP address received. When I run the learn flow it send the message: Broadlink Timeout Received - Closing Device Connection after a few seconds. Doesn't matter if I send the IR stream with a remote or not, the output remains the same.

Can be a firmware problem?

The device works with the IHC app, read the same remote control button that I'm trying to learn in the node so I discard a decode or hardware problem. Maybe the API used to communicate to the device is dead?

Thanks!

RMdevice node, catalog field should not be required.

When leaving the catalog field empty in the RMdevice node the whole config is marked red. Seems the field is required.
The RM node also functions without a catalog so maybe this field should not be set to required.

TC2 dont work

"Remote" Broadlink RM Pro (RM2 - "old" black version)
platform OpenHabian Pine64 with NodeRed plugin

Almost everything works (IR blaster, RF remote for STBox)
But i cant get working original Broadlink TC2 light switches..

When set "Inject" >> "RM node" >> "Debug"

I get in debug window

{"remote":"10","button":"55","status":"OK","code":[-23,0,70,0,-33,9,9,22,9,22,22,9,22,9,9,22,9,22,22,9,22,9,9,22,22,9,9,22,22,9,22,9,22,9,9,22,9,22,22,9,9,22,9,22,22,9,9,22,9,22,9,22,22,9,22,9,22,9,22,9,22,9,9,22,9,22,9,22,22,9,9,0,1,72],"_code":[-23,0,70,0,-33,9,9,22,9,22,22,9,22,9,9,22,9,22,22,9,22,9,9,22,22,9,9,22,22,9,22,9,22,9,9,22,9,22,22,9,9,22,9,22,22,9,9,22,9,22,9,22,22,9,22,9,22,9,22,9,22,9,9,22,9,22,9,22,22,9,9,0,1,72],"f":1}

this is basicaly the same as any other working output. Only with this difference this dont send signal to RM2 - didn't light the LED signal like the official (android) app do..

Learning dont work either..

Beginner question

Hi, I recently started using the Broadlink RM4 Pro, and was able to discover it via the discover node, however it had an error message in the payload.
image
I added the device to the RM node from the learning example
image
However when i ran the payload and kept pressing my remote button aiming at the RM4 Pro nothing was outputted to the payload.

May I know what I am doing wrong? or is the RM4 Pro not compatible with the node?

*Note the RM4 Pro is already configured via the Broadlink Application

Thank you for taking your time to read this.

Broadlink RMPro+ 'learn' RF not working

When learning, the orange light is on. Long press the remote control and then single-click, but the orange light just flashes for a while, or the orange light remains on all the time,. and the "Broadlink Timeout Received-Closing Device Connection" is displayed repeatedly in the debug field.

4 Apr 16:38:07 - [info] Node-RED version: v0.20.8
4 Apr 16:38:07 - [info] Node.js version: v10.16.3
4 Apr 16:38:07 - [info] Linux 4.19.97+ arm LE
4 Apr 16:38:12 - [info] Loading palette nodes
4 Apr 16:38:48 - [info] Dashboard version 2.19.4 started at /ui
.........
4 Apr 17:18:46 - [warn] [RM:RM3p] Please keep long press on the remote button until scan finishes.
4 Apr 17:18:51 - [warn] [RM:RM3p] Please tap the remote button.
4 Apr 17:19:15 - [warn] [RM:RM3p] Broadlink Timeout Received - Closing Device Connection
4 Apr 17:19:16 - [warn] [RM:RM3p] Broadlink Timeout Received - Closing Device Connection
4 Apr 17:19:16 - [warn] [RM:RM3p] Broadlink Timeout Received - Closing Device Connection
4 Apr 17:19:17 - [warn] [RM:RM3p] Broadlink Timeout Received - Closing Device Connection
......

Discover :
typeid: "279d"
type: "RM2 Pro Plus3"

Thank You !

Can not get it to work

Hello,

i successfully discovered my device with the discovery node and put the data into the configuration of the RM node. Then i chose "Learn" as Action, but there is no reaction after an injection. The only thing that appears after some time in the node-red console log is "[RM:RM Mini 3 newer] Broadlink: Closing Device Connection". I also tried to send some dummy remote command data to see if the RM3 shows a reaction like a blinking light, but nothing.
Is there any way to get it to work?

Edit: Device type is: 5f36

Starting

Starting node-RED gives the following issue:

7 Mar 10:32:21 - TypeError: Cannot read property 'code' of undefined
at /home/pi/.node-red/node_modules/node-red-contrib-broadlink-control/nodes/RMNode.js:92:143
nodered.service: Main process exited, code=exited, status=1/FAILURE
nodered.service: Unit entered failed state.
nodered.service: Failed with result 'exit-code'.

v2.0.0 new field in the device configuration

v2.0.0 (latest)
Note - This version introduces a new field in the device configuration which will require a manual change to each device configuration.

what does this mean?
I have a RM3 mini. What do i have to insert?

broadlink control crashes with SP3 devices

Hi!

I have several SP3 devices that worked properly. After long time I decided to update boradlink-control and as result node-red periodically (2-3 time a day) crashes with following log:
9 Aug 14:47:04 - [red] Uncaught Exception:
9 Aug 14:47:04 - Error: error:0606508A:digital envelope routines:EVP_DecryptFinal_ex:data not multiple of block length
at Decipheriv.final (internal/crypto/cipher.js:164:28)
at Socket.Device.cs.on (c:\Users\vladtsit.node-red\node_modules\node-red-contrib-broadlink-control\nodes\Device.js:33:31)
at Socket.emit (events.js:198:13)
at Socket.EventEmitter.emit (domain.js:448:20)
at UDP.onMessage [as onmessage] (dgram.js:628:8)

How I can correct it?
regards,
Vladimir

RM4 pro and RM4c mini

Hi,
I have problem with adding these devices to Node-Red. Discover shows me :

RM4 Pro
Discover:
typeid: "6026"
type "RM4 Pro"

RM4C mini
Discover:
typeid: "62be"
type "RM4c"

I use example learn/send data for learning IR codes. In both cases when I try to learn IR codes I received debug message :
"Broadlink Timeout Received - Closing Device Connection"

RM4 Pro node config :
rmpro1
rmpro2

My config :
Node-RED v. 1.0.4
node-red-contrib-broadlink-control v. 2.0.0

New type for RM4 Pro

I tried to use the discover node and the debug messaged showed up with:
typeid: "61a2"
type: "Broadlink: Unconfigured Device Type: Log an issue with the device details and typeid returned as this may be a new device type"

Learn/Send command doesn't do anything when i tried to use it.

compatibility with econtrol app rm4 pro

hi, i am a bit of a newby on nodered and on programming in general so i would like to ask for a bit of help since i got a broadlink rm4 pro ( this model https://www.ibroadlink.com/products/ir+rf) and it is not working with the econtrol app ( i managed to connect it to the app but is shown as some chinese characters and it says not recognized ) so i tried using the discover node but couldnt get it to discover the device even inserting by hand the MAC and the ip address of the rm4pro. i have 2 fields that remain empty namely the type and shared folder. What should i put in those field? and how would i then start gathering the inputs from the ir/rf dvices?

ps: i cant put any images right now since i am at work, will do as soon as i get home if needed

There is a very big issue related to UDP ports handling

Every message sent through given broadlink node creates new UDP listener and this listener stays forever.
In result after 64k (max) messages the host system is overloaded with opened UDP ports, NR throws error and restarts itself.
To check the growing number of opened ports use this shell command: "netstat -na |grep udp"

Simple solution: As example here is a modified part of SP2Node.js:

...

this.on('input', function (msg) {
var conf = RED.nodes.getNode(config.device);
var _device;
if (conf != null && conf != undefined && conf != "") {
var _device = new SP2({ address: conf.host, port: 80 }, conf.mac);
}
else {
var _device = new SP2({ address: msg.payload.host.trim(), port: 80 }, new Buffer(msg.payload.mac.replace(':', '').replace('-', '').match(/[0-9A-Fa-f]{2}/g).map(function (num) { return parseInt(num, 16); })));
}
// ----------- modification start
// IVO:
setTimeout( function() {
if (typeof (msg.payload) != "object") { msg.payload = {}; }
_device.cs.close();
_device = null;
}, 3000); // 3 seconds waiting for respond !
// ----------- modification end

_device.auth();

Best regards,
Ivo

RM.. - Code fix paramaeter

I can'r find what doing this parameter. If I change from 1 to any other the send RF command not work. But what exactly happen I don't now. Please help me, thank.

Broadlink RM 'learn' RF not working on recent RMPro+

Unable to learn RF codes in Node-Red, using a recently bought RMPro+. I get "Please keep long press on the remote button until scan finishes." followed after some seconds by "Please tap the remote button." but even when I tap or hold the button nothing more happens, no message with the received codes or any other indication what is wrong. I can learn the codes for my two remotes ok with the Broadlink IHC app and successfully use the app to operate my blinds, so it appears to be a problem with the NR Learn routine.

Does RM4pro not really end after sending?

My RF data is a remote control for learning motorized curtain RF from RM2PRO.

Sending using RM4PRO(6026) is normal, but the original RF remote control cannot be used.
RM4pro continues to send the RF signal after the LED is turned off(5~15 seconds later), causing the interference to the all 433 RF remote control to be unusable.
The RM4 power supply is removed, and the remote control can be used normally.
Does RM4 not really end after sending?

I have installed RaspAP,
The result of the test is that RaspAP is installed.

After testing, it is determined that it is the problem of RASPAP
Sorry, please close this topic, thank you.

Broadlink Timeout Received

Hi there,

I had posted the text below in issue #25 but as it is closed I'm not sure if it gets seen. So I'm opening a new issue with the same title.

Thanks,
Tales

======================

Hello all,

I was very happy to have found these nodes, so thanks a lot to the developer and to everyone else helping with the development.

I have three RM Mini 3 units, the older one is firmware v57 and the two newer are firmware v44057. They all get discovered as type 2737:

0: object
   mac: "c8f742174b74"
   ip: "192.168.200.131"
   typeid: "2737"
   type: "RM Mini"
1: object
   mac: "24dfa736c1cc"
   ip: "192.168.200.133"
   typeid: "2737"
   type: "RM Mini"
2: object
   mac: "24dfa73658b8"
   ip: "192.168.200.132"
   typeid: "2737"
   type: "RM Mini"

When I run the Learn and Send learned code flows from the examples I also get the Broadlink Timeout Received - Closing Device Connection message after a few seconds. Do we need to add new headers for this type too?

Thanks,
Tales

node-network breaks when looking for new devices

Hello:

this is the error:
`
6 Feb 09:45:55 - [red] Uncaught Exception:

6 Feb 09:45:55 - ReferenceError: _device is not defined

at Timeout._onTimeout (/home/jairo/.node-red/node_modules/node-red-contrib-broadlink-control/nodes/DiscoverNode.js:56:17)

at ontimeout (timers.js:482:11)

at tryOnTimeout (timers.js:317:5)

at Timer.listOnTimeout (timers.js:277:5)
`
node-network crashes completely and closes.

node-red-contrib-broadlink-control version: 1.0.4

Broadlink as an IR reciever?

Hi,

I wonder if it's possible to setup Broadlink as an IR receiver. What I would like to do is to use my universal traditional IR remote, and use it to control light. I can already control light through node-red. More or less like this:

REGULAR IR REMOTE -> BROADLINK -> NODE RED -> LIGHT

Technically Broadlink has IR reciever because it can learn from other remotes, but can it be used permanently through node-red?

JsonIrCode file modification

Hello,

This is super control. Everything works fine, but I have a little a problem.
I would like to switch off my Samsung TV, controlled by node-red.
Unfortunately the Ir remote control of TV consist of one power button, so the node-red doesn't know that it switches off or on the tv.
There are several Ir code pages on the internet (for example samsung tv codes ), but I don't know how I can convert these hex codes to JsonIrCode file.
Could you help me?
Thank you: John.

node-red-contrib-broadlink-control with HASSIO

Hello.
I am very interested in your work 'node-red-contrib-broadlink-control' but I can't get them to work properly.
My Node-Red is in a Docker container with Home Assistant.
I use the 'RM' node for my RM3-Mini type 272a but I cannot fill in the 'Catalog' field of 'Edit rmdevice node'.
So the learned codes do not register ...
My problem comes from the connection between Home assistant and Node-Red.
With other nodes, I use 'node-red-contrib-home-assistant-websocket' to communicate with Home Assistant.
Can I imagine that this is possible in this case?
Thank you

RM4 Pro learn still not working

Hi,

Previous request Was in issue #30 (comment). Currently situation looks much better

image

After pressing inject node RM4 Pro LED even lights up in red, but I still not receive any code in debug node after pressing button on IR blaster.

Broadlink timeout received still.

Very well, new issue then.

I have an RM Mini 3 (firmware: v44057) connected to my local network. When I use the Discover node I get this:
{
"mac": "24dfa77a4ff9",
"ip": "192.168.0.101",
"typeid": "5f36",
"type": "RM Mini 3 newer",
}

I am running version 2.0 but started receiving 'Broadlink Timeout Received' errors after initially being able to learn and send. Restarting the RM mini 3 does not help.

MP1 How to turn on/off only 1 socket at time

Hello,
Im trying to create a flow on node-red to turn on/off only 1 socket at time.
For example, turn on/off only s1 but when I config like this node-red crash

{
"action": "setState",
"state": true,
"s1": true,
}

1 Nov 18:08:33 - SyntaxError: Unexpected token u in JSON at position 0
at JSON.parse ()
at MP1._device.on (/root/.node-red/node_modules/node-red-contrib-broadlink-control/nodes/MP1Node.js:56:84)
at MP1.emit (events.js:198:13)
at Socket.Device.cs.on (/root/.node-red/node_modules/node-red-contrib-broadlink-control/nodes/Device.js:50:22)
at Socket.emit (events.js:198:13)
at UDP.onMessage [as onmessage] (dgram.js:628:8)

Perhaps im doing something wrong, can you help me?
Thanks in advance.

New type for RM4 Mini

I tried to use the discover node and the debug messaged showed up with:
typeid: "648d"
type: "Broadlink: Unconfigured Device Type: Log an issue with the device details and typeid returned as this may be a new device type"

Learn/Send command doesn't do anything when i tried to use it.

Broadlink MP1 Validation

Hello,
Broadlink MP1 (4 Outlet Power Strip) device seems to be working. Just saying as README declare it was not tested.

Get, Set actions

Get & Get actions are both working.

Small issue: One Set might be missed when changing 2+ sockets state 'at the same time' (like in screenshot below).

However, there are no issues when setting 2+ sockets state using one single Set block.

'Set from msg.payload' action

I could not make Set from msg.payload to work.
I tried to inject those 2 json payloads with no success.

{"state":{"s1":true}}
{"s1":true}

Question about passing data

I'm using the Broadlink nodes to turn off and on my ACs, and I found some code here and there to get me what I need:

//Insert learning code here
var data = [1,2,3,...];
msg.payload={
//"mac":"MAC address of your broadlink rm",
//"host":"IP address of your broadlink rm",
"action":"send",
"data":data,
"repeat":2
};

return msg;

My question is, what's the significance of the 'repeat' value? What affect does it have?

TIA

time out

Notice that, during learn, you have only 3 sec for send the beam ,or you'll get a uncaught exception.

4 Jan 19:16:47 - [warn] [RM:broadRM] Please tap the remote button. 4 Jan 19:16:50 - [red] Uncaught Exception: 4 Jan 19:16:50 - TypeError: Cannot read property 'checkData' of null at Timeout._onTimeout (/home/pi/.node-red/node_modules/node-red-contrib-broadlink-control/nodes/RMNode.js:76:75) at ontimeout (timers.js:436:11) nodered.service: Main process exited, code=exited, status=1/FAILURE nodered.service: Unit entered failed state. nodered.service: Failed with result 'exit-code'. nodered.service: Service hold-off time over, scheduling restart. Stopped Node-RED graphical event wiring tool. Started Node-RED graphical event wiring tool.

Exception when learning rf

When using learn with rf-sweep the following exception is thrown:

12 May 15:59:29 - [warn] [RM:Broadlink rff] Please tap the remote button.
12 May 15:59:54 - [red] Uncaught Exception:
12 May 15:59:54 - TypeError: Cannot read property 'checkRFData2' of null
    at Timeout._onTimeout (/config/node-red/node_modules/node-red-contrib-broadlink-control/nodes/RMNode.js:58:63)
    at ontimeout (timers.js:436:11)
    at tryOnTimeout (timers.js:300:5)
    at listOnTimeout (timers.js:263:5)
    at Timer.processTimers (timers.js:223:10)```

Error Dashboard

After installation and configuration of the component it worked normally.
But I've noticed that the Dashboard has been bugged since:
image

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.