ni-c/heimcontrol.js

TriState to Decimal 433mhz

Closed this issue · 22 comments

hi

is there anyway to send the decimal code from the 433mhz transmitter instead of tri-state codes

i have received the sending codes from my RC with the receiver but it says Tristate not applicable

or is there a way to edit the coding so it sends decimals instead of tristate

can anyone help

thanks

Yes, you could change the code, but it shouldn't be necessary, because there is probably an equivalent tri-state code to your binary code.

I can't confirm it right now, but I believe 01 (bin) is F and 00 is 0. E.g., FF0F is 01010001.

I'd use the rc-switch library's SendDemo Arduino sketch to make sure the codes are actually working with your sockets, then plug those into heimcontrol.

What kind of sockets are you using?

still cant work it out

this is my code for turning socket 1 on

decimal : 5522351 bin : 010101000100001110101111

can you help change the code so i can use it

i have tried again receiving the codes with a receiver but there is no tri-state code

Ok, I see why it’s not convertible, it’s composed of not just 00 and 01. Again, what’s model of socket are you using? Which manufacturer?

I’d try using the SendDemo.pde example sketch to send those exact codes to your sockets, e.g.,

  mySwitch.send("010101000100001110101111");

That will confirm that the rc-switch library is compatible with them. And if that’s the case, then it’ll be easy to adapt Heimcontrol. Please try this and tell us whether it worked.

hi thanks for coming back

the manufacturer is STATUS and model number is SREMSOC3PK3

i have used SendDemo.pde sketch to send the codes and both codes can turn the socket on

mySwitch.send("010101000100001110101111");
or
mySwitch.send("5522351");

so the rc-switch library is compatible

how can i adapt the heimcontrol which the above codes

thanks again

Ok, great, glad it’s compatible. Heimcontrol and duino can only handle tristate codes so far. So let’s change that! :) I’ll try to get this done in the next few days.

  • add non-tristate rc-switch handler to duino board code
  • add corresponding duino js function (both done with ni-c/duino#2)
  • allow binary (or decimal) codes in heimcontrol interface (work in progress at tjanson/heimcontrol.js@b939cd4)

thank you very much for helping with this.. this would be a great help

thank you again

I’ve got it working. :) I’ll need to clean up so the interface is usable, then I’ll publish it.

thank you very much, your are genius. cant wait till its published

Okay, so can you go ahead and try the version at tjanson/heimcontrol.js@fa25de6:

  • Install this version of HC by unpacking and running npm install in its directory
  • Replace the duino folder that's now at [heimcontrol]/node_modules/duino with this one (rename it duino).
  • Run npm install in the duino folder
  • Get the duino.ino file at duino/src (or download here and program your Arduino with it

That should be it, just use the "binary code" option in the web interface. Let me know whether it works.

hi thanks for that..

when i try and upload the code to the arduino i get the following error

'irsend' was not declared in this scope

There should be a menu option like "Add library", use that to add both the IRSend and RC-Switch libraries — they're under duino/src/libs or something like that.

PS. Be sure to use the ones from my version of duino, not the old one that npm installs.

done that and im still getting that error message

Is IRremote shown in the menu like this?
IRremote in Arduino library menu

no.. just duino

Use that menu ("Add Library") to select the folders IRremote and RCSwitch at src/libs of this duino version. It should look like the screenshot then.

uploaded it to arduino so just going to test it now

ok.. put the bin codes on.. but when i click on it crashes and puts the following errors

/root/heimcontrol.js/node_modules/mongodb/lib/mongodb/connection/base.js:242
throw message;
^
TypeError: Object [object Object] has no method 'decimal'
at /root/heimcontrol.js/plugins/arduino/index.js:86:40
at /root/heimcontrol.js/libs/PluginHelper.js:34:11
at /root/heimcontrol.js/node_modules/mongodb/lib/mongodb/cursor.js:162:16
at commandHandler (/root/heimcontrol.js/node_modules/mongodb/lib/mongodb/cursor.js:706:16)
at /root/heimcontrol.js/node_modules/mongodb/lib/mongodb/db.js:1806:9
at Server.Base._callHandler (/root/heimcontrol.js/node_modules/mongodb/lib/mongodb/connection/base.js:442:41)
at /root/heimcontrol.js/node_modules/mongodb/lib/mongodb/connection/server.js:485:18
at MongoReply.parseBody (/root/heimcontrol.js/node_modules/mongodb/lib/mongodb/responses/mongo_reply.js:68:5)
at null. (/root/heimcontrol.js/node_modules/mongodb/lib/mongodb/connection/server.js:443:20)
at EventEmitter.emit (events.js:95:17)

Have you replaced the heimcontrol.js/node_modules/duino with my version (again this link)?

yes yes yes, i got it working... wwwwwooooooohhhhh lol... well happy now..

thank you again for all of your help with the coding etc your a life saver :)

No problem, glad I could help! :)

thanks... :)