ilcato / homebridge-blynk

Homebridge plugin for the Blynk platform
MIT License
20 stars 30 forks source link

Device pin not being triggered (Wemos D1 mini) #26

Open 877dev opened 5 years ago

877dev commented 5 years ago

@ilcato firstly thank you for the plugin! Great work and I really appreciate the effort you must have taken.

A few questions, I am currently having trouble getting pin D4 to toggle my LED (Blynk app works fine).

Info: Wemos D1 mini with LED on pin D4. Blynk iOS app Blynk local server on Pi3 ("allow.reading.widget.without.active.app=true" in server.properties) Homebridge running on Pi3 (same device as Blynk local server)

Here is my config.json:

{
    "bridge": {
        "name": "Homebridge Pi",
        "username": "CC:22:3D:E3:CE:30",
        "port": 51826,
        "pin": "031-45-154"
    },

    "description": "This is an example configuration file.",

    "platforms": [
      {
        "platform": "TplinkSmarthome",
        "name": "TplinkSmarthome"
    },

      {
      "platform": "Blynk",
      "name": "Blynk",
      "serverurl": "http://192.168.1.xx:xxxx",
      "token" : "xxxxxxxxxxxxxxxxxxxxxxxxxxx",
      "pollerperiod": "1",
      "dashboardName": "Blynk app",
      "accessories": [
        {
        "name":         "Garage alarm",
        "widget":       "Switch",
        "mode":         "PUSH",
        "caption":  "Toggle garage alarm",
        "pin":          "D4"
        }

                ]
            }
        ],

    "accessories": []
}

When I press the button on Home app, here is the output from Putty (I'm using Raspberry Pi and SSH into it from Windows):

[2019-4-13 19:50:02] [Blynk] Updating value for device:  Garage alarm  parameter: On, value: false
[2019-4-13 19:50:03] [Blynk] Setting value to device:  Garage alarm, parameter: On, value: true
[2019-4-13 19:50:03] [Blynk] Updating value for device:  Garage alarm  parameter: On, value: true
[2019-4-13 19:50:05] [Blynk] Updating value for device:  Garage alarm  parameter: On, value: true
[2019-4-13 19:50:05] [Blynk] Setting value to device:  Garage alarm, parameter: On, value: false
[2019-4-13 19:50:06] [Blynk] Updating value for device:  Garage alarm  parameter: On, value: false

So it seems the pin is being toggled, but nothing is happening.

Thoughts: 1) Is it the pin number attached to the Blynk project which should be used? Or the GPIO pin https://wiki.wemos.cc/products:d1:d1_mini 2) Can virtual pins be used e.g. V3 ? I tried with no success, it would be much better to call virtual pin for me. 3) Is there a full list of Widgets and Modes anywhere?

Many thanks 877