pimatic / pimatic-homeduino

Pimatic plugin for using 433mhz devices and sensors with a connected Arduino with homeduino sketch
https://pimatic.org/
GNU General Public License v2.0
37 stars 29 forks source link

[pimatic-homeduino]: data: "ERR argument_error" #37

Closed spicchio72 closed 9 years ago

spicchio72 commented 9 years ago

I flashed homeduino on a nano V3 Clone with the IDE, using default trasmission and receive pins. Pimatic recognizes the board on USB and I can succesfully receive and check received commands from a remote for RF wall plugs.

This is the debug log of one of the keys related:

ON STATE:

debug [pimatic-homeduino]: received: [ 100, 209, 403, 1005, 4776 ] 2121212121212121212131313131312121212104 debug [pimatic-homeduino]: data: "RF receive 403 209 1005 100 4776 0 0 0 0101010101010101010121212121210101010134" debug [pimatic-homeduino]: received: [ 114, 194, 444, 704, 4768 ] 212121212121212121213202210221022102210221020204 debug [pimatic-homeduino]: data: "RF receive 444 194 704 114 4768 0 0 0 010101010101010101012030013001300130013001303034" debug [pimatic-homeduino]: switch8: { systemcode: 0, programcode: 'F16', state: false } debug [pimatic-homeduino]: switch6: { systemcode: 31, programcode: 1, state: true } debug [pimatic-homeduino]: received: [ 150, 459, 4728 ] 10101010101010101010010101100110011001100110010102 debug [pimatic-homeduino]: data: "RF receive 459 150 4728 0 0 0 0 0 01010101010101010101101010011001100110011001101012"

OFF STATE:

debug [pimatic-homeduino]: switch8: { systemcode: 0, programcode: 'F8', state: false } debug [pimatic-homeduino]: switch6: { systemcode: 31, programcode: 2, state: true } debug [pimatic-homeduino]: received: [ 150, 459, 4736 ] 10101010101010101010011001010110011001100110010102 debug [pimatic-homeduino]: data: "RF receive 459 150 4736 0 0 0 0 0 01010101010101010101100110101001100110011001101012" debug [pimatic-homeduino]: switch8: { systemcode: 0, programcode: 'F16', state: false } debug [pimatic-homeduino]: switch6: { systemcode: 31, programcode: 1, state: false } debug [pimatic-homeduino]: received: [ 113, 182, 447, 4768 ] 21212121212121212121020202211221122102210202022103 debug [pimatic-homeduino]: data: "RF receive 447 182 113 4768 0 0 0 0 01010101010101010101202020011001100120012020200123"

I supposed by looking at all the other debug logs of the other keys on the remote that switch6 should be the right one, so I added a device with it, but when I try to activate the switch I get the error:

debug [pimatic-homeduino]: Sending Pin:4 Repeats: 7 Protocol: switch6 debug [pimatic-homeduino]: data: "ERR argument_error"

I added it in json as follow:

{
  "id": "wallplug",
  "name": "Presa RF 3",
  "class": "HomeduinoRFSwitch",
  "protocols": [
    {
      "name": "switch6",
      "options": {
        "systemcode": 31,
        "programcode": 1
      }
    }
  ]
},

I also tried to add the sample code for switch1 for test and I get the same error. I have no other errors in pimatic messages' page or anything else that seems wrong.

Icesory commented 9 years ago

http://forum.pimatic.org/topic/276/solved-err-argument_error-sending-rf-commands/4