pimatic / rfcontroljs

nodejs modul with protocol support for different 433mhz switches and weather stations for the RFControl Arduino library.
GNU General Public License v3.0
49 stars 54 forks source link

swich1 : Add multiple address to device #14

Closed koffienl closed 10 years ago

koffienl commented 10 years ago

KaKu /switch1 devices can react on 6 different addresses. It would be really great to add these adresse to the device config in pimatic. Currently, pimatic does not know it should update 'device A' then it receive a signal with other unit/ID then 'device A'. In pilight you can see one device can react on multiple addresses : http://wiki.pilight.org/doku.php/arctech_switch

Icesory commented 10 years ago

This is definitely possible. I am not the crack but I know it is possible xD. But it would change the config for the devices. At the moment the protocol name is a string an the protocol options are a object.

It must be changed, so every device had a protocol array in this stored protocol objects with the protocol name and options.

Icesory commented 10 years ago

At the Moment the config looks like this.

    {
      "id": "lamp",
      "name": "Lamp1",
      "class": "HomeduinoRFSwitch",
      "protocol": "switch1",
      "protocolOptions": {
        "id": 9509718,
        "unit": 2
      }
    }

It should be like this

    {
      "id": "lamp",
      "name": "Lamp1",
      "class": "HomeduinoRFSwitch",
      "protocols": [
      {
          "protocol": "switch1",
          "id": 9509718,
          "unit": 2,
          "receive": true,
          "send": true
      },
      {
          "protocol": "switch2",
          "id": 1234567,
          "unit": 0,
          "receive": true,
          "send": false
      }
    }

With this type of config a RFSwitch can react on different protocols.

Icesory commented 10 years ago

There it is.

https://github.com/pimatic/pimatic-homeduino/pull/3

Config example

    {
      "id": "extswitch",
      "name": "extSwitch",
      "class": "HomeduinoRFSwitchMP",
      "protocols": [
        {
          "protocol": "switch1",
          "protocolOptions": {
            "id": 9509718,
            "unit": 0
          },
          "send": true,
          "receive": true
        },
        {
          "protocol": "switch1",
          "protocolOptions": {
            "id": 9509718,
            "unit": 1
          },
          "send": false,
          "receive": true
        }
      ]
    },
koffienl commented 10 years ago

:+1: That's quick ;) Hope to do some testing tommorow

Icesory commented 10 years ago

But it is only in developing. Oliver must take a look on this. I have test it with some actuators at home and it was working. You test it on your own risk ;-)

Alternativ we make a new device "HomeduinoRFextendetSwitch". So all old Switches are still working.

Icesory commented 10 years ago

Ok it is now a new device. HomeduinoRFSwitchMP

Icesory commented 10 years ago

Ok it is now not a new device. Look at the PullRequest for more information and stay tuned or so

sweetpi commented 10 years ago

Released with pimatic-homeduino 0.8.25. Take a look at the README for the new examples. Big thanks to @Icesory for his great work.

koffienl commented 10 years ago

Confirmed working :+1: Thank you all