mdopp / simple-sonoff-server

Emulates the original sonoff-cloud-servers within your local network.
BSD 2-Clause "Simplified" License
144 stars 47 forks source link

Sonoff Dual #32

Open AidenPearce02 opened 6 years ago

AidenPearce02 commented 6 years ago

I have a problem. How can i use it with Sonoff Dual?

liketaurus commented 6 years ago

In other words - how to switch on or off device with two or four outlets? Device shown in array of devices, but status request doesn't work (device not found)...

ricardojlrufino commented 6 years ago

I had same problem, response from Dual

{
  "userAgent": "device",
  "apikey": "111111111-1111-1111-1111-11111111111",
  "deviceid": "XXXXXXX",
  "action": "update",
  "params": {
    "switches": [
      {
        "switch": "on",
        "outlet": 0
      },
      {
        "switch": "on",
        "outlet": 1
      },
      {
        "switch": "off",
        "outlet": 2
      },
      {
        "switch": "off",
        "outlet": 3
      }
    ],
    "configure": [
      {
        "startup": "on",
        "outlet": 0
      },
      {
        "startup": "on",
        "outlet": 1
      },
      {
        "startup": "off",
        "outlet": 2
      },
      {
        "startup": "off",
        "outlet": 3
      }
    ],
    "fwVersion": "1.3.0",
    "rssi": -36
  }
}
AidenPearce02 commented 6 years ago

My thanks to you. And last question. Can you update sonoff.server.js with those changes?(Sorry for bad English)

mdopp commented 6 years ago

I Had a look at the proposed changes. They would break all other devices. Hence i can not merge them yet.

ricardojlrufino commented 6 years ago

Sorry but a dont have time to do some refractoring... =/