Closed miliante closed 8 years ago
The problem with the Blynk's REST API is that it requires the Blynk app running and running in foreground.
@ilcato it is not anymore.
@ilcato https://github.com/ilcato , mine is working perfectly with these alterations, without the app running in the back.
From: Dmitriy Dumanskiy [mailto:notifications@github.com] Sent: mardi 2 août 2016 13:44 To: ilcato/homebridge-blynk homebridge-blynk@noreply.github.com Cc: miliante thiago@miliante.com; Author author@noreply.github.com Subject: Re: [ilcato/homebridge-blynk] Replaced "blank-app-client" with Blynk's REST API (#5)
@ilcato https://github.com/ilcato it is not anymore.
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/ilcato/homebridge-blynk/pull/5#issuecomment-236880062 , or mute the thread https://github.com/notifications/unsubscribe-auth/ARlsMmbnPxdibWa1MFRkDSZ75Luxaowwks5qby2HgaJpZM4I8MB8 . https://github.com/notifications/beacon/ARlsMmfVq_iA048SfXjQOmMJqNZ9-aeWks5qby2HgaJpZM4I8MB8.gif
Good! Merged and published on NPM
@miliante, what kind of devices are you controlling via Homekit?
Hi @doom369, I have some time available and I want to reengineering the plugin and correct all the issues in it. The refactoring of @miliante use the rest api and you say that it is no more true that with this API the Blynk app must be running. I just tested it and it seems to me that such a requirement is still present: if I read the status of some pin without the Blank app running it shows me the last values read when the app was running (e.g.: a pin with a switch connected is 0 even if the switched is turned on. As soon as I launch the app the same rest call show the correct value).
What did I do wrong?
@ilcato please provide me with steps. So I could get some context.
@doom369, I have a sensor connected to a pin, by using the rest api I'm able to read its value specifying the auth token and the pin id. This works only if the the Blank app is running with the project loaded and running and a reading widget that connect to the pin and makes the polling stuff. If the app is not running the rest api returns the last polled value by the widget and not the current one.
@ilcato I see. This is now available only for the local servers with:
#when true - allows reading worker to trigger hardware even app is offline
allow.reading.widget.without.active.app=true
In the server.properties
. Maybe soon we will enable this on Blynk Cloud too.
@doom369, ok will start with the local server then. Thank you.
@doom369, just publish the new version. Works like a charm. Please have a look.
Initial attempt to rewrite the routine with the REST API for Temperature and Humidity Sensors from Virtual Pins.