-
Notifications
You must be signed in to change notification settings - Fork 45
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
New klikaanklikuit devices #88
Comments
That doesn't seem right! according to the documentation I have, the ID for a KlikAanKilkUit can be in the range 0x0000 0001 to 0x03FF FFFF, so the original remote ID of 0xF09A C8AA is out of range and should give an error! It looks like the README.md file still contains an example dating from before the implementation of range checking, which just happened to work with the current RFXtrx firmware version at that time. It looks like this masks out the bottom 2 bits of the MSB of the ID, ignoring the rest. StringToBytes always interprets the ID as a hexadecimal string, whether or not it starts with the If you listen to the lighting2 event, what are the actual values of |
If i use the windows version of rfxcom manager I see that the id of the remote control is 1xE9EDCA. Being a hobby programmer and far from a professional I started to find a way to use this ID. As I saw that it was rejected in the rfxcom.js file because it started with 1x, I luckily found a way to pass by this error-check and use my rfxcom. If it comes to use of hexadecimal numbers i'm an absolute noob. So I think it is interesting for the more "scripted" ones among us to see what the real problem is and how to repair it. |
To answer your question, somehow I found out to do an event listener on the rfxcom by nodejs instead of the rfxcom manager. The output of the complete event object is: { subtype: 0, So the ID is 8 digits instead of 6 digits. And I think that 8 digits was rejected by the rfxcom.js, but I'm not certain. If so, this is a bug in the code. |
The ID value of Have you come across NodeRED? It is a flow-based, graphical programming environment for NodeJS. A lot of people are using it to implement home automation/domotics systems. I also maintain a package |
Example code fixed in #90 (version 2.1.0) |
Hello everyone,
I just found out that new klikaanklikuit wall outlet switches use a different ID than the old ones. First of all, to use a klikaanklikuit device you should use lightning2 and AC (at least in the Netherlands). Do not forget to call for the initialise function as not mentioned in the readme.md. This example does work:
This will work nicely with the older remote controls that all have an id constructed as 0x******. But the new remote controls have an id constructed as 1x******. However if you use '1xF09AC8AA/1' for example, the result will be unpredictable ranging from no action to turning of every klikaanklikuit device in your house. It all has to do with the rfxcom.js script in the lib directory. A function called stringToBytes can handle 0x****** but not 1x******. The solution however is extremely simple:
rewrite 1xF09AC8AA/1 to 1F09AC8AA/1, so you get:
The text was updated successfully, but these errors were encountered: