ilcato / homebridge-blynk

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

homebridge doesnt trigger anything #12

Closed jaminNZx closed 6 years ago

jaminNZx commented 7 years ago

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?

i3creations commented 7 years ago

I had the same issue. Turns out when you look at the index.js the BlynkPlatform.prototype.hardwareWrite method code is commented out. This means that in fact nothing will happen when you try to use this plugin. I hacked some code in there just to get things working end to end but it only works for a "switch": BlynkPlatform.prototype.hardwareWrite = function(pinString, value) { value = value ? 1:0; request('https://' + this.server + ':' + this.httpsPort + '/' + this.token + '/update/' + pinString + '?value=' + value, function (error, response, body) { if (response) { console.log('Status:', response.statusCode); console.log('Headers:', JSON.stringify(response.headers)); console.log('Response:', body); } else { console.log('Error during performing request : ', error); } } ) };

jaminNZx commented 7 years ago

Awesome I'll give this a go.

jaminNZx commented 7 years ago

hey i3creations.. is this working for you at all now? seems to just crash when I try and run the node

henriqcf commented 6 years ago

Hi. I have the same issue. Is there a solution already? Thank you.

andrey-goryunov commented 6 years ago

i3creations, you are ROCK! Your solution work for SWITCH mode great!