Coder Social home page Coder Social logo

homebridge-blynk's People

Contributors

blynkkk avatar doom369 avatar ilcato avatar miliante avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

homebridge-blynk's Issues

Switch accessory not working

My setup is as follows:
Rpi3 running a local Blynk server and homebridge
ESP8266-12E connecting to Blynk local server and providing data from DHT-11 and controlling 5 RF outlets via RF-TX chip (each RF outlet is actuated via a command from a virtual pin in the Blynk app)
iOS 10 iPhone with Blynk app and homeKit.

I have followed the steps for homebrige-blynk and am able to see all of the defined accessories from the config file. The temperature and humidity readings are properly displayed in homeKit and on the Blynk app (although it appears that homebridge-blynk automatically converts the data to *F)

The problem i am having is with the 5 virtual switches. While they do appear in my apple homeKit, I cannot control them from homeKit. Also, the states do not update when the switches are toggled in the iOS Blynk app.

I have full control of all of my RF outlets through the Blynk app which is connected to the local Blynk server.

homebridge doesnt trigger anything

I have installed and setup the config etc... and I can connect vai the iphone to the homebridge and it is recieving commands fine.
but no action is made to Blynk.

Can you confirm this is still actively working?

fahrenheit support for temperature sensor

Could you allow for the conversion of Fahrenheit values from devices to Celsius through your plug-in, please? HAP requires Celsius feeds and Apple assumes USA locale users want to see Fahrenheit.

Perhaps "unit":"F" in device config could trigger your plug-in to convert its values before sending through.

Thanks!

Homekit Auto Refresh of Blynk Data

@blynkkk @ilcato @doom369 Hi All, first of all I've been experimenting with ESP8266 + Blynk + Homebridge, thank you for putting all of this together! The only issue that I am running into is that when I run homekit, the values of the temperature, humidity, etc are not refreshed unless I open / close the app or ask Siri for the status. In other words, I have to manually poll the homebridge server for data. Is there a way to set refresh rates for all of the sensors that would make Homekit perform like the Blynk app in terms of near real-time data updates? I would like to be able to set up automation routines through Homekit, which is currently impractical due to manual polling. Thanks!

multiple blynk devices

Is it possible to add multiple Blynk devices into homebridge?
for example I have a device with a temperature sensor and another device with a switch, how can I use both of them with homebridge?

error :Requested pin doesn't exist in the app

Evrething is setpu as indicated, but I always get an error about PIN does't not exist, I tested D1 to D6on switch mode nothing works.
here the the message error

Status: 400
Headers: {"content-type":"text/plain;charset=utf-8","access-control-allow-origin":"","content-length":"39","connection":"close"}
Response: Requested pin doesn't exist in the app.
Status: 400
Headers: {"content-type":"text/plain;charset=utf-8","access-control-allow-origin":"
","content-length":"39","connection":"close"}
Response: Requested pin doesn't exist in the app.
undefined:1
Requested pin doesn't exist in the app.
^

SyntaxError: Unexpected token R in JSON at position 0
at Object.parse (native)
at Request._callback (/opt/node/lib/node_modules/homebridge-blynk/index.js:248:43)
at Request.self.callback (/opt/node/lib/node_modules/homebridge-blynk/node_modules/request/request.js:186:22)
at emitTwo (events.js:106:13)
at Request.emit (events.js:191:7)
at Request. (/opt/node/lib/node_modules/homebridge-blynk/node_modules/request/request.js:1163:10)
at emitOne (events.js:96:13)
at Request.emit (events.js:188:7)
at IncomingMessage. (/opt/node/lib/node_modules/homebridge-blynk/node_modules/request/request.js:1085:12)
at IncomingMessage.g (events.js:292:16)

Can't disable poller

If I put "pollerperiod": "0" in the config, plugin will poll every second โ€“ seems to fallback to a default value

broken on homebridge 1.0+

Hi, i've been using the plugin for some time, but when homebridge 1.0 was released the plugin is broken after updating

homebridge doesnt trigger anything

Hi,

I have exactly same issue as with previous release, described here:
#12

I was able to solve this problem with the help of i3creations of above issue link.
I tried to update to latest version but with complete rewrite this code cannot be ported anymore. Could you maybe take a look?

I use local Blynk server with a switch on virtual port 0.
When I try to switch on/off i see following output into homebridge log:
[9/21/2018, 6:58:30 PM] [Blynk] Updating value for device: Switch parameter: On, value: false
[9/21/2018, 6:58:31 PM] [Blynk] Setting value to device: Switch, parameter: On, value: true
[9/21/2018, 6:58:31 PM] [Blynk] Updating value for device: Switch parameter: On, value: false
[9/21/2018, 6:58:32 PM] [Blynk] Updating value for device: Switch parameter: On, value: false

Thanks!

Noob troubleshooting

Hey ilcato, thanks for your work!

I followed the setup-guides but can't seem to get Blynk to work with HomeKit, so I would like to ask for further advice:

In order to make it work, a local Blynk server should be set up. Check.
Local Blynk server is accessible through the Blynk App (iOS) and switches Buttons. Check.
'homebridge-blynk' plugin needs to be installed. Check.
Homebridges' config.json should be edited as advised. Check.
In iOS10 within 'Home-App' Homebridge (running on a Raspberry) is available and already switches Hue Lights with the dedicated hue-plugin installed. Check.

Now when I add the Blynk platform to Homebridges' config.json, 'Home-App' shows all my added Blynk-buttons but keeps searching for all the devices as if none of them would answer. Double checked the config.json for valid quotes.

I presume the Homebridge's IP will do for the Blynks' "server" entry?

Has the local Blynk server got to be ssl secured with own certificates in order to talk to HomeKit?

My Blynk server is installed on the same Raspberry that runs Homebridge, connected to my local network. I still use the provided build-in SSL certificates because when asking 'certbot' for own certificates, I have no clue what to put in for the 'YOUR_HOST' value and it doesn't accept plain IP-addresses:

./certbot-auto certonly --agree-tos --email YOUR_EMAIL --standalone -d YOUR_HOST

Do you see something obvious that I am still missing or doing entirely wrong here?

RGB Light support

Just finished adding my temperature and humidity sensors
Everything works great so far Thanks for the plugin!!

I also have some RGB strips that i wish to control with siri

What about rgb light support ๐Ÿ˜„

Error when adding an accessory

Hi,

I obtain an error when I add an accessory to the config.json.

[7/5/2020, 15:03:53] Loading 4 platforms...
[7/5/2020, 15:03:53] [Config] Initializing config platform...
[7/5/2020, 15:03:53] [Config] Running in Service Mode
[7/5/2020, 15:03:53] [Domoticz] Initializing eDomoticz platform...
[7/5/2020, 15:03:53] [Google Smart Home] Initializing google-smarthome platform...
[7/5/2020, 15:03:53] [Blynk] Initializing Blynk platform...
[7/5/2020, 15:03:53] [Domoticz] synchronizeAccessories in progress...
[7/5/2020, 15:03:53] [Blynk] didFinishLaunching. 
[7/5/2020, 15:03:53] [Blynk] Loading accessories 
[7/5/2020, 15:03:55] TypeError: Cannot read property 'getCharacteristic' of undefined
    at /usr/lib/node_modules/homebridge/src/server.ts:512:32
    at Array.map (<anonymous>)
    at Server.handleRegisterPlatformAccessories (/usr/lib/node_modules/homebridge/src/server.ts:506:40)
    at HomebridgeAPI.emit (events.js:315:20)
    at HomebridgeAPI.registerPlatformAccessories (/usr/lib/node_modules/homebridge/src/api.ts:316:10)
    at BlynkAccessory.registerUpdateAccessory (/usr/lib/node_modules/homebridge-blynk/src/blynkaccessory.ts:100:8)
    at Blynk.addAccessory (/usr/lib/node_modules/homebridge-blynk/src/index.ts:178:18)
    at /usr/lib/node_modules/homebridge-blynk/src/index.ts:142:9
    at Array.map (<anonymous>)
    at Blynk.LoadAccessories (/usr/lib/node_modules/homebridge-blynk/src/index.ts:141:15)

My config file:

{
    "bridge": {
        "name": "Homebridge 3911",
        "username": "XXXXXX",
        "port": XXXXX,
        "pin": "XXXXXXX"
    },
    "accessories": [],
    "platforms": [
        {
            "name": "Config",
            "port": XXXX,
            "auth": "form",
            "theme": "dark-mode",
            "tempUnits": "c",
            "lang": "auto",
            "platform": "config"
        },
        {
            "name": "Domoticz",
            "server": "XXXXXXXX",
            "port": "XXXXX",
            "roomid": 2,
            "mqtt": true,
            "ssl": false,
            "dimFix": 0,
            "platform": "eDomoticz"
        },
        {
            "name": "Google Smart Home",
            "token": "XXXXXXXXXXXXXXXXXXXXXXXXXXXxx",
            "notice": "Keep your token a secret!",
            "platform": "google-smarthome"
        },
        {
            "platform": "Blynk",
            "name": "Blynk",
            "serverurl": "XXXXXXXXXXXX",
            "token": "XXXXXXXXXXXXXXXXXX",
            "pollerperiod": "1",
            "accessories": [
                {
                    "name": "Distributeur",
                    "widget": "Switch",
                    "mode": "PUSH",
                    "caption": "Distribuer",
                    "pin": "V1"
                }
            ]
        }
    ]
}

Without this part:

            "accessories": [
                {
                    "name": "Distributeur",
                    "widget": "Switch",
                    "mode": "PUSH",
                    "caption": "Distribuer",
                    "pin": "V1"
                }
            ]

homebridge can start without any problem.

Thanks

Thanks for the initiative!

Just came across your work in progress. Let us know if we can help with something.

Looking forward to starting using this plugin and spreading the word about it

Switch State keeps updating to false

Hello all,
I am new to this home bridge and pluins.
Recently , I've installed Relay switches with nodemcu and I would like to control it from my iPhone.
Followed all the instructions and installed home bridge and this plugin .
As my relay was on NO connection the code was working opposite. I changed the code little bit here and there and the switch is working but the state of the switches is not proper.
When I turn on, it activates the relay and then it updates the switch status to false.
The POLLERUPDATE file keeps updating my switches to false state.
I am not sure what and how to change it, I would like some help from the experts.

Device pin not being triggered (Wemos D1 mini)

@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

TemperatureSensor max/min values are overly restrictive

Currently, TemperatureSensor limits values beyond certain devices' capabilities. For example, if I want to track a kiln temperature then I'd need values beyond 100C and outside air temps can drop below 0C.

Should we either widen the range or allow the limits to be defined by developers?

characteristic.props.minValue and maxValue are your hooks for that...

Thanks!

Homebridge crash

After some time (1-3minutes) a homebridge crash with error output:

/usr/local/lib/node_modules/homebridge-blynk/index.js:227                                                                                           
          console.log('Status:', response.statusCode);                                                                                              
                                         ^                                                                                                          
                                                                                                                                                    
TypeError: Cannot read property 'statusCode' of undefined                                                                                           
    at Request._callback (/usr/local/lib/node_modules/homebridge-blynk/index.js:227:35)                                                             
    at self.callback (/usr/local/lib/node_modules/homebridge-blynk/node_modules/request/request.js:186:22)                                          
    at emitOne (events.js:96:13)                                                                                                                    
    at Request.emit (events.js:188:7)                                                                                                               
    at Request.onRequestError (/usr/local/lib/node_modules/homebridge-blynk/node_modules/request/request.js:845:8)                                  
    at emitOne (events.js:96:13)                                                                                                                    
    at ClientRequest.emit (events.js:188:7)                                                                                                         
    at TLSSocket.socketOnEnd (_http_client.js:345:9)                                                                                                
    at emitNone (events.js:91:20)                                                                                                                   
    at TLSSocket.emit (events.js:185:7)

I have local blynk server running - temperatures are reported by script and read in mobile app.
I have configuration in config.json:

{                                                                                                                                                   
        "bridge": {                                                                                                                                 
                "name": "Homebridge",                                                                                                               
                "username": "USER_NAME(MAC)",                                                                                                    
                "port": 51826,                                                                                                                      
                "pin": "131-35-174" },                                                                                                              

        "description": "This is an example configuration file. You can use this as a template for creating your own configuration file.",           

        "platforms": [                                                                                                                              
               {       "platform": "Blynk",                                                                                                        
                       "name": "Blynk",                                                                                                            
                       "server": "127.0.0.1",                                                                                                      
                       "httpsPort": "8443",                                                                                                        
                       "token": "MY_TOKEN",                                                                                
                       "dashboardName": "Temps",                                                                                                   
                       "accessories": [                                                                                                            
                               { "name": "t_out", "widget": "TemperatureSensor", "caption": "Temperature outside", "pin": "V0" },                  
                               { "name": "t_in", "widget": "TemperatureSensor", "caption": "Temperature inside", "pin": "V1" },                    
                               { "name": "t_up", "widget": "TemperatureSensor", "caption": "Temperature incoming", "pin": "V2" },                  
                               { "name": "t_down", "widget": "TemperatureSensor", "caption": "Temperature heater", "pin": "V3" }                   
                       ]                                                                                                                           
               }                                                                                                                                   
        ],                                                                                                                                          
        "accessories": [                                                                                                                            
        ]                                                                                                                                           
} 

Raspberry Pi B; Raspbian Jessie; Node v7.2.1, homebridge 0.4.10; homebridge-blynk 0.3.0

homebrige value

Hello, when I open the homebridge, it shows me that the light is open, but it's closed.and when I open it shows it is closed.how can change the value from json

ERROR LOADING PLUGIN homebridge-blynk

Hi, could you please help with solving this issue?

Mac OS, npm v 3.8.5

after installing with

$ sudo npm install -g homebridge-blynk
/usr/local/lib
โ””โ”€โ”€ [email protected] 

and running homebridge

getting this:

[4/6/2016, 12:39:58 PM] ====================
[4/6/2016, 12:39:58 PM] ERROR LOADING PLUGIN homebridge-blynk:
[4/6/2016, 12:39:58 PM] Error: Cannot find module 'blynk-app-client'
    at Function.Module._resolveFilename (module.js:325:15)
    at Function.Module._load (module.js:276:25)
    at Module.require (module.js:353:17)
    at require (internal/module.js:12:17)
    at Object.<anonymous> (/usr/local/lib/node_modules/homebridge-blynk/index.js:47:13)
    at Module._compile (module.js:397:26)
    at Object.Module._extensions..js (module.js:404:10)
    at Module.load (module.js:343:32)
    at Function.Module._load (module.js:300:12)
    at Module.require (module.js:353:17)
    at require (internal/module.js:12:17)
[4/6/2016, 12:39:58 PM] ====================

when starting homebridge with your ifttt plugin - it works ok

Bad pin triggered

Hi,
When the accessorie's pin is triggered it is always the D3 pin even if in the conf.json i set up another pin like D0, anyone is having this problem ?
Here is my conf.json:

{
"bridge": {
"name": "Homebridge",
"username": "B8:27:EB:07:90:8P",
"port": 51826,
"pin": "090-**-268"
},

"description": "Descritpion",

"platforms": [
        {
        "platform": "Blynk",
        "name": "Blynk",
        "serverurl": "http://192.168.**.**:8080",
        "pollerperiod": "0",
        "token" : "7*****************************e97",
        "dashboardName": "Blynk app",
        "accessories": [
            {
                "name":             "Portail",
                "widget":           "Switch",
                "mode":             "PUSH",
                "caption":          "Portail",
                "pin":              "D0"
            }
        ]
    }
],
"accessories":[
]

}

State button on PUSH mode

Hi, I set the bridge and everything works perfectly except the PUSH method, after having activated it goes Off and then returns to On. Tested different configurations and also increased the time from 100ms to 3000ms in index.js, but keep giving me the same error.

Here the config.json

"platform": "Blynk",
"name": "Blynk",
"serverurl": "xxxxxxxxxxx",
"token": "xxxxxxxxxxxxxxxxxxxxxx",
"pollerperiod": "1",
"accessories": [{
"name": "Cancello Pedonale",
"widget": "Switch",
"mode": "PUSH",
"caption": "Cancello Pedonale",
"pin": "D13"
},
{
"name": "Cancello Auto",
"widget": "Switch",
"mode": "PUSH",
"caption": "Cancello",
"pin": "D4"
}]

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.