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

Homeduino rolling1 value wrong. #78

Open WimUtTwente opened 7 years ago

WimUtTwente commented 7 years ago

After filling in the data #edit-device-page

rolling1
codeOn 100101111011010000010010,100111001110101110010010,100101100000111110100010,100100110011000000100010
codeOff 100110000010101000110010,100110101101010101000010,100100101001001001110010,100111101000000110110010

Value wrong:

    {
      "class": "HomeduinoRFSwitch",
      "protocols": [
        {
          "name": "rolling1",
          "options": {
            "codeOn": "100101111011010000010010,100111001110101110010010,100101100000111110100010,100100110011000000100010",
            "codeOff": "100110000010101000110010,100110101101010101000010,100100101001001001110010,100111101000000110110010"
          }
        }
      ],
      "id": "quigg3-4",
      "name": "quigg3-4"
    }

Must be:

    {
      "class": "HomeduinoRFSwitch",
      "protocols": [
        {
          "name": "rolling1",
          "options": {
            "codeOn": [
              "100101111011010000010010",
              "100111001110101110010010",
              "100101100000111110100010",
              "100100110011000000100010"
            ],
            "codeOff": [
              "100110000010101000110010",
              "100110101101010101000010",
              "100100101001001001110010",
              "100111101000000110110010"
            ]
          }
        }
      ],
      "id": "quigg3-4",
      "name": "Camara noord"
    }

Already thanks for the adjustment. Wim.

mwittig commented 7 years ago

I think this is an issue with protocolInfo as part of the rolling1 protocol. See https://github.com/pimatic/rfcontroljs/blob/master/src/protocols/rolling1.coffee which defines codeOn and codeOff as string. @Icesory has implemented this, but he hasn't been around for a long time. I can perhaps look into this in about two weeks from now.

Icesory commented 7 years ago

I think @mwittig is right. I was not involved in the Development of the Device editing system. So there can be some more failures across the protocols. For validation checks a string was also a array of strings. I don´t know the new systems at all, because a haven´t run a pimatic instance since a year or so.