heimcontrol.js
heimcontrol.js copied to clipboard
ELRO AB440S/3C not working although Arduino should handle it.
I was a bit confused how to set up the RC-Sockets with the gui, because there were 10 switches but only 8 possible characters. Although I thought 1 means switched on, 0 switched off.
I figured out that A code like "0F00FFFFFFF0" is the actual code which is "switched" on the Remote socket. Then I saw that to the 8 digits is something added in: ~/heimcontrol.js/plugins/arduino/index.js like
if (item.value) { return that.pins[item.pin].triState(item.code + "0FFF");}
I saw that the ELRO needs "Code" + FF for switch off and +F0 for switch on. I changed the code to triState(item.code + "FFFF")/triState(item.code + "FFF0") and also testet it directly with the arduinofunction called mySwitch.sendTriState("0F00FFFFFFF0"); and it worked. But back in the GUI I entered just the first 8 DIGITS of the whole code and it refused to work.
Any Idea why? Is there a guide on how to set this up?
I have the same problem. Use Mumbi RC Sockets that are the same as ELRO.
I have my dips set up to Socket A: ON ON ON ON ON ON OFF OFF OFF OFF (11111 10000) Socket B: 11111 01000 Socket C: 11111 00100 I can't figure out what tristate code I have to use. Where do you put that? "also testet it directly with the arduinofunction called mySwitch.sendTriState("0F00FFFFFFF0"); and it worked."
When I test my setup just with Arduino it works with this sketch uploaded to the arduino:
#include <RCSwitch.h> RCSwitch mySwitch = RCSwitch(); void setup() { mySwitch.enableTransmit(10); } void loop() { mySwitch.switchOn("11111", "10000"); delay(3000); mySwitch.switchOff("11111", "10000"); delay(3000); mySwitch.switchOn("11111", "01000"); delay(3000); mySwitch.switchOff("11111", "01000"); delay(3000); mySwitch.switchOn("11111", "00100"); delay(3000); mySwitch.switchOff("11111", "00100"); delay(3000); }
Hi, I had to edit the following:
nano ~/heimcontrol.js/plugins/arduino/index.js
to something like this:
// Send RC code
if (item.value) {
return that.pins[item.pin].triState(item.code + "FFFF");
} else {
return that.pins[item.pin].triState(item.code + "FFF0");
}
You can just enter 8 digits of the tristate code, but you have 10 to set up. Last 2 Digits are for on/off signal. So do the following:
Take your socket and put all the micro-switches on Off and set up heimcontrol to FFFFFFFF (8x). Then open index.js and edit the Tristatecode as mentioned above. It should work. F means off and 0 means on - pretty wiered? :D..Anyway. You don't need to handle the groups or housecodes. So you can just vary the first 8 digits and get your 2^8 Sockets working. Good luck
thanks alot!! thats it! I changed that code in arduino/index.js before, but the tristate to put in the homecontrol GUI was the problem. Set Socket 1 all OFF and FFFFFFFF in homecontrol Set Socket 2 all OFF exept the A ON, FFFFF0FF in homecontrol Socket 3 all OFF B ON, FFFFFF0F in homecontrol Works perfect!
First I tried on Socket 2 all OFF, 2 ON, F0FFFFFF in homecontrol but that didn't work. so can I only vary the last 5 digits?
Just for the record: Heimcontrol accepts 8 digits and has 4 hardcoded as quoted above (here’s the source). That’s a little unfortunate, because ELRO uses 10 digits, 5 “house code” + 5 “device code”, plus 2 for on/off. So here’s what you need to do if you have this system:
- adjust the last two hardcoded digits as described above
- make sure the last two DIP switches of your outlets match the first two hardcoded digits (
F
isOff
,0
isOn
) - set up the first eight switches in whichever way you like — if you want to use the original remotes, follow the original instructions: choose a “house code” for the first 5 and use the
ABC
device identifiers (notDE
as those are the hardcoded 9th and 10th digits!) - use that 8 digit code in Heimcontrol’s web interface — it should be working now
This bug is ~~still open imho~~ done:
- [X] Heimcontrol uses 8 adjustable + 4 hardcoded digits, but ELRO uses 10+2 — the latter would work for everyone
- [X] Heimcontrol hardcodes the on/off-suffixes — they should be exposed as options
Edit: Well, I went ahead and did it. Let me know if this makes it easier, or if there’s still any problems.