Skip to content

Latest commit

 

History

History
 
 

Bluemix

== UPDATE == 02/24/2016

This update only required if you have WInk API key/Secret. If not, this update today not required
Ability to provide your own Wink API key/secret pair. Since we have temp throttling by wink (several days to make sure everything works OK) I added ability to populate your own WINK key which you can request through wink support site
Wink Support

Navigate to tab ui/configuration page and enter Client ID and Secret provided by Wink.

Click Submit and then Refresh Wink Data. After this your node-red will use your own Key. Flow Editor:

02/23/2016

After an issue yesterday I had to request new api keys for node-red project as well as make some additional filtering to prevent wink server overflowing. Latest changes have been applied at 5:05 P.M on 02/23/2016:

Required changes or app will not function if you updated flows before 5:05 P.M on 02/23/2016 you need to re-deploy winkCore flow
Bluemix git console:

  • copy contents of package.json and update same file in your configuration with it contents.
  • add following line to the bluemix-settings.js inside functionGlobalContext section
  • re-deploy application in git

Flow Editor:

02/22/2016

We had an issue earlier today when because of some fault device one of node-red application overflooded wink servers with data so I added a throttling mechanism that will prevent excessive messages to wink servers to 1 per second otherwise they can temorarely suspend access.
please perform ASAP Flow Editor:

02/21/2016

Bug fixes (robots formatting issue, etc.) Please import first 3 flows even if you do not need blue Iris
Added support for Blue Iris
Please use instructions for Blue Iris on how to set up access from outside your home network. Once you set it up you need to know following:

  • HTTPS will not be supported unless you get proper signed certificate. Blue Mix does not like self signed ones
  • you need to turn off "secure only" option since it is not that secure anyway. Blue mix will not expose uid/pwd on the UI and will get image redirected through it servers and will deliver to user endpoint via HTTPS.

I recommend to get some dynamic dns name for this or you will have to change host name if your provide ip address will change. Once you configure Blue Iris, you need to:

Flow Editor:

Once you deployed and app reinitialized navigate to config tab of tablet ui and enter following info:

  • host name should be in a form of http://you blue iris ip or host name:port (no backslash at the end)
  • click on "refresh wink data" Once it is done - you should see your cameras in "cameras" tab.

You can also configure motion alerts to be routed to node-red and then being used in robots/notification/etc. In Blue Iris software - navigate to camera settings/alerts check "request from web service" and click configure.
On next screen you need to put following things:

  • url - should be your bluemixapp.winknodered.net/red/blueiris/alerts/Your camera Short Name from BlueIris
  • post text: {"motion":"true"}
  • Make same entries for "request again when trigger is reset" but in this case populate {"motion":"false"} in the post text.
    • I did not test that option so please let me know if it works or not. You should be all set.

02/20/2016

I noticed some updates in wink API which did not happen before. They are minor but mostly ui summary and controls page are affected in terms of status is not set properly all the time for lights and binary switches. Flow Editor:

02/19/2016

Added manual snaphsot button for each camera:

Added new global object sunTimes to use in schedules/robots/etc. it has following values:

  • sunrise - sunrise (top edge of the sun appears on the horizon)
  • sunriseEnd - sunrise ends (bottom edge of the sun touches the horizon)
  • goldenHourEnd - morning golden hour (soft light, best time for photography) ends
  • solarNoon - solar noon (sun is in the highest position)
  • goldenHour - evening golden hour starts
  • sunsetStart - sunset starts (bottom edge of the sun touches the horizon)
  • sunset - sunset (sun disappears below the horizon, evening civil twilight starts)
  • dusk - dusk (evening nautical twilight starts)
  • nauticalDusk - nautical dusk (evening astronomical twilight starts)
  • night - night starts (dark enough for astronomical observations)
  • nadir - nadir (darkest moment of the night, sun is in the lowest position)
  • nightEnd - night ends (morning astronomical twilight starts)
  • nauticalDawn - nautical dawn (morning nautical twilight starts)
  • dawn - dawn (morning nautical twilight ends, morning civil twilight starts)
  • sunset_m_1 - sunset minus one hour
    Each attribute has 2 values: hour and minute

so if you want to get values for dawn you need to address it as:

  • context.global.sunTimes.dawn.hour
  • context.global.sunTimes.dawn.minute

Required changes:
Bluemix git console:

  • copy contents of package.json and update same file in your configuration with it contents.
  • add following line to the bluemix-settings.js inside functionGlobalContext section
  • restart application

Flow Editor:

02/15/2016 part.2

Added garage doors to controls tab under Locks and Doors section
Flow Editor:

02/15/2016

Added separate "Robots" tab where you can check status and enable/disable them.

Garage doors should work now:

New Command types for IFTTT and internal use
Check HOWTO - IFTTT for instructions

Flow Editor:

02/14/2016 v2 11pm Eastern

Updated the "Standardize for robots" node on winkCore to allow for triggering Wink Node Red robots when a Wink app robot fires

Flow Editor:

02/14/2016

New icons for door/windows/cabinets and garage (not tested since I do not have this device)

Bluemix git console:

  • restart application

Flow Editor:

02/13/2016

Ring door bell notifications shown in the log and in dashboard

Flow Editor:

02/12/2016

New light effects for IFTTT/Tasker/etc HOWTO - IFTTT

new custom page tab - navigate to config and add Label and url:

refresh browser window

Flow Editor:

02/09/2016

Added forecast(just click on current conditions weather icon)
Added ability to call PRESENCE / NO PRESENCE shortcuts during day (before sunset) and
PRESENCE NIGHT / NO PRESENCE NIGHT after sunset and before sunrize
Flow Editor:

02/08/2016

Added ability to set/change global variable via ifttt
Added home occupancy icon based on Node-Red Presence

Bluemix git console:

  • restart application

Flow Editor:

Check HOWTO - IFTTT for instructions on how to set variable in node-red via IFTTT (last section of the document).

Check HOWTO - Presence for examples on how to set up Presence in Wink Node-Red
you can also use IFTTT wifi connected/disconnected in case of Android or IFTTT location instead of Life365 as THIS in recipe.
You can also use Tasker or similar software that can make an HTTPS POST call.

02/07/2016

Imrpoved wink data refresh functionality:
now, when you click on the "refresh" button, ui will wait for data refresh to happen and then autorefresh itself

Fixes and updates:
Removed non-user created or empty robots from dashboards.
Removed empty groups
Fixed multi-sensors on "old" freeboards
Flow Editor:

02/06/2016, v2

Added ability to refresh wink Devices via UI

Flow Editor:

02/06/2016

Added ability to save custom freeboards to your local computer so you can re-load them again:

Updated 'what changed' flow on winkCore to show occupancy and temp in *F
Removed 'second ws instance' trying to avoid ws duplicate errors
wink api should show 'retrieving' if it is not there yet.
Issue with deployment on bluemix
Added ability to show light status in the logs via config

Flow Editor:

Bluemix git console:

  • copy contents of package.json and update same file in your configuration with it contents.
  • restart application

02/05/2016

fixed - ifttt integration bug for shortcuts
removed canary from camera page
added canary status updates in event log
trying to solve dup websockets
wink api index added to summary page

NOTE: In this case, once you have imported all 3 tabs, make sure you do a FULL import

02/02/2016

Tablet UI summary updates: refuel icon, more dynamic changes(try to trigger tripper :) ), bug fixes

01/29/2016

Moved to node.js version 4.x since it is more stable and have better performance and memory management

  • update package.json via git console of bluemix using package.json
  • restart node-red app via blue-mix git

01/28/2016

Readme - how to use node-red and IFTT, how to config blue-iris to post to node-red
HOWTO - IFTTT
Added presence details to freeboards:
Added automatic selection of websockets or http(s) get in case websockets are not supported for any reason

01/25/2016

Readme - how to import/update flows to node-red Import/Update Flows

01/23/2016

Tablet UI config page, added clock format change:
Robots activity are now displayed in the activity log:
Robots status added to "detais" tab. If you have more than 10, robots will be splitted in the chunks of 10 to proper fill screen space:


Required changes:


For local setup, to change time display add following key to settings.js under functionGlobalContext section
,HoursFormat24:true (or false) based on your need.

11/14/2015

Tablet UI config page, first drop:
Required changes:

  • Import updated winkCore.json
  • import updated tabletUI.json
  • import updated winkIntegration.json
  • restart your app via git dashboard or cf push.
    This is for bliue-mix cloud instances only. If you are using local installation you will need to implement your own database connector.

11/14/2015

Found bug in tabletUI please import updated tabletUI.json

11/13/2015

Updated to Node-Red 0.12.X
Node red had new release couple of days back and now it is version 0.12.x. and it introduced some changes to http nodes
in order to make sure that latest version is used please

  • copy contents of package.json and update same file in your configuration with it contents.
  • restart wink app via cf push or git dashboard


After restart
* Import updated [winkCore.json](winkCore.json) * import updated [tabletUI.json](tabletUI.json) * import updated [winkIntegration.json](winkIntegration.json) * import updated [Freeboards](winkFreeboards.json)


Tablet UI summary page - small cosmetic fixes and battery notification if any batteries in your system is below 25%:

11/9/2015

Tablet UI summary page:
New summary page with "dashboard" style :)
Required changes:

10/30/2015

Tablet UI notifications:
Currently shows sensor info, battery info and more
3 level of messages:

  1. Alert - will stay until dismissed manually red box
  2. Warning will stay for 60 seconds yellow box
  3. Information will stau for 60 seconds blue box

    Required changes:

10/25/2015

Tablet UI updates:

  1. Shortcut buttons spinning wheel: Required changes:

10/23/2015

Tablet UI updates:

  1. Locks added to control tab:


2. data exchange moved to websockes to reduce network traffic. With this change server pushes updates for control tab vs continious http gets.

Required changes: * import updated [tabletUI.json](tabletUI.json) * Import updated [winkCore.json](winkCore.json) * restart your app via git dashboard or cf push.

10/18/2015

Tablet UI updates:

camera history shows in modal window and using carousel widget
required changes:

  • import updated tabletUI.json
  • restart your app via git dashboard or cf push.

10/12/2015

Tablet UI updates:

  • new app icon. Please remove existing from home screen and add again.

* new cameras page.


* import updated [tabletUI.json](tabletUI.json) * import updated [winkIntegration.json](winkIntegration.json) * restart your app via git dashboard or cf push.

10/12/2015

Tablet UI with new controls tab.

  • add "crypto" module to bluemix-setting.json. First you need to add following line to the top section of the file: var crp = require("crypto");

    So your first 3 lines in the file should look like this:
    var crp = require("crypto");
    var path = require("path");
    var when = require("when");

  • You also need to update functionGlobalContext section and add following lines
    ,CRYPTO: crp

  • do CF push and restart the app.

  • Import updated winkCore.json

  • Import updated winkFreeboards.json

  • Create new tab in flow editor and import new tabletUI.json

10/05/2015

Updated with LIFX bulb support.

Required changes:

,"LIFX_TOKEN":"your LIFX token"

10/05/2015

10/05/2015

New "tablet friendly" dashboard with configurable buttons (can be assigned to activate wink shortcut)

Required changes:

Add following to blumix-settings.js into functionGlobalContext section:

,"tab_ui_shortcuts":["wink shortcut name","wink shortcut name","wink shortcut name","wink shortcut name","wink shortcut name","wink shortcut name"]

replace wink shortcut name with actual shorcut names from wink app with same case. You can put 6 or less shorcuts. If you put less, then unused buttons will have "shorctut #" label without any action for now.
New tablet dashboard is accessible via:
your_app_name.mybluemix.net/freeboard/ui

9/23/2015

  1. Dlink MJPEG cameras support (no motion detection reporting to dashboard)
    Following models should work 'DCS-930L','DCS-930' , 'DCS-931L','DCS-931', 'DCS-932L','DCS-932', 'DCS-933L','DCS-933', 'DCS-5020L','DCS-934L'
    Please use camera documentation for steps, required to configure access to camera from internet.

Required changes:

  • For Dlink - add following to blumix-settings.js into functionGlobalContext section:
    ,DlinkCam: {
    "DCS934L" : {"hostname":"your ip:port","uid":"user id","pwd":"password","model":"DCS-934L"}
    }
    Add more cameras if you have them in similar way inside DlinkCam section
    Make sure model is set exactly as one from the list above
  • add new tab and import new DlinkCam.json

9/21/2015

  1. New cameras support - Dlink NIPCA series. Most should be able to report motion detection to dashboard and be used as triggers for IFTTT and snapshot recording
    Following models should work DCS-1100(L), DCS-1130(L), DCS-2102, DCS-2103, DCS-2121, DCS-2130, DCS-2132L , DCS-2136L, DCS-2210, DCS-2230, DCS-2310L, DCS-2332L, DCS-3010, DCS-3112, DCS-3410, DCS-3411, DCS-3430, DCS-3710, DCS-3710 B1, DCS-3715, DCS-3716, DCS-5211L, DCS-5222L, DCS-5230L, DCS-5605, DCS-5635, DCS-6010L, DCS-6112(V), DCS-6113(V), DCS-6210, DCS-6314, DCS-6410, DCS-6510, DCS-6511, DCS-6513, DCS-6616, DCS-681x B1, DCS-6915, DCS-7010L, DCS-7110, DCS-7410, DCS-7413, DCS-7510, DCS-7513, DVS-310-1, DVS-V310-4, DCS-940L, DCS-942L
    Please use camera documentation for steps, required to configure access to camera from internet.
  2. Bug fixes

Required changes:

  • For Dlink - add following to blumix-settings.js into functionGlobalContext section:
    ,DlinkCam: {
    "DCS942L" : {"hostname":"your ip:port","uid":"user id","pwd":"password","model":"DCS-942L"}
    }
    Add more cameras if you have them in similar way inside DlinkCam section
    Make sure model is set exactly as one from the list above
  • add new tab and import new DlinkCam.json

For bug fixes

Now each camera in dashboards will have link to history (currently only works in cloud mode)
Also dlink cameras that suport status update for motion sensors will have virtual motion sensor in the system. Sensor name will be same as camera name. Can be used to trigger snapshot capture for other cameras as well as itself.

Do not forget to re-start application.

9/18/2015

Added IFTTT support for new lutron zigbee remote, motion sensors, trippers.

Required changes:

How to use IFTTT:

for example I added new zigbee remote to my wink app and named it z Remote1.
in IFTTT create new recipe ,select Maker channel as this and choose "Receive web request".

Create name of the request using following logic:

  1. Name of your remote where all spaces are replaced by "_". in my case it will be z_Remote1
  2. add "_"
  3. add one of the following actions:
    • "button_on_pressed"
    • "button_off_pressed"
    • "button_up_pressed"
    • "button_down_pressed"

For example if I want to create IFTTT action when I press top (On) button I will put z_Remote1_button_on_pressed as event name.

Choose any channel and action for that.
Save your recipe

I also added same functionality for motion sensors and trippers:
same logic applies to sensor name (replace spaces with " _ ")
add "_" after name.
for motion sensor you can use following option:

  • motion_started
  • motion_ended

for trippers:

  • opened
  • closed

Examples

  • Motion_sensor_motion_started
  • Tripper_sensor_closed

9/15/2015

Added ability to save motion based snapshots to Cloudant DB.

Required changes:

  • Add following item to bluemix-settings.js into functionGlobalContext section:
    ,VCAP_SERVICES: JSON.parse(process.env.VCAP_SERVICES)
    ,camera_motion:{
    "wink motion sensor name" : ["camera1 name","camera2 name"]
    ,"another wink motion sensor name" : ["camera1 name",...]
    }
    then first id in quotes is motion sensor names as in WinkApp. In case of nest/drop cam camera it should be camera name as in Wink App. In my case it is "Nest Camera".
    then in square brakets put every camera name in quotes you want to have a screenshot from, when motion sensor detects motion. in case of multiple cameras put a colon as a delimiter

Letst take following example:
,camera_motion: {
"Nest Camera" : ["Nest Camera"]
,"Basement Sensor" : ["BasementCam"]
,"Living room sensor" : ["Nest Camera","FosCam1"]
,"foscam" : ["FosCam1"]
}
in this case first line - "Nest Camera" is a nestcam name from my Wink App, and obviously it will save images from itself when it will detect motion.
Second line: "Basement Sensor" is a motion sensor name from my Wink App. It will activate foscam camera BasementCam as I defined it in same bluemix-settings.js check these insructions.
third line: "Living room sensor" is motion sensor name from my Wink App. "Nest Camera" is my nestcam name from Wink App. FosCam1 is my foscam camera name as I defined it in bluemix-settings.js
and finally last line - if you have Foscam Fi89X camera models they also can report motion to node-red app as a motion sensor. Due to limitations they all report motion as one sensor which has name "foscam". In the last lane of the configuration I am defining that if motion comes from any Foscam F89X camera - save snapshot from camera "FosCam1"

9/11/2015

Added support for CloundantDB for bluemix based instances. Planning to store camera images, presence history in case of restarts. Required changes:

  • Update bluemix-settings.js and add following line to functionGlobalContext section:
    ,VCAP_SERVICES: JSON.parse(process.env.VCAP_SERVICES)
  • Import updated winkIntegration.json That is all

9/4/2015

Added support for Samsung Smart Cameras Tested on Samsung SNH-E6440BN.

Several changes required for this camera to work properly

  • we need to add "crypto" module to bluemix-setting.json. First you need to add following line to the top section of the file: var crp = require("crypto");

    So your first 3 lines in the file should look like this:
    var crp = require("crypto");
    var path = require("path");
    var when = require("when");

  • You also need to update functionGlobalContext section and add following lines
    ,SamsungCam: {
    "your cam name" : {"hostname":"your external ip:port","private_key":"your samsung cam private key"}
    }
    ,CRYPTO: crp

  • open flow editor, add a new tab and import smartCams.json

  • restart your app. You should be able to see your camera feed in all auto-generated dashboards

8/25/2015 (part 2)

Added support for Foscam FI98XXX cameras (tested on FI9821W V2.1) If you have Foscam FI98XX camera model Please add "model":"HD" to you camera definition in bluemix-settings.json For example first camera is FI98XX and second is FI89XX

, FosCam: {
"FI98XX Camera1 name": {"hostname":"external ip:port","uid":"admin","pwd":"your pwd","model":"HD"}
,"Camera2 name": {"hostname":"external ip:port","uid":"admin","pwd":"your pwd"}
}
import updated winkFreeboards.json and FosCam.json re-deploy application.

8/25/2015

Small bug fixes to reduce amount of messages sent to Initial State and IFTTT

== UPDATE == 8/21/2015

First drop for Foscam mjpeg ip cameras. (no need to update if you do not use FosCam cameras) Features:

  • Motion detection reporting
  • Live video feed in wink dashboards you need to re-import winkFreeboards.json and then create a new tab call it Foscam and import new FosCam.json you also need to edit bluemix-setting.js file and add following section to functionGlobalContext:


, FosCam: {
"Camera1 name": {"hostname":"external ip:port","uid":"admin","pwd":"your pwd"}
,"Camera2 name": {"hostname":"external ip:port","uid":"admin","pwd":"your pwd"}
}

I assume that your foscam camera(s) can be accessed outside your local network (they have documentation on how to do that)

hostname should not include http so it should look like: "mycamera.mydomain.com:2233"

Add as many cameras as you have. do cf push or redeploy via ibm github. Re-import winkCore.json and winkFreeboards.json, create new tab name it FosCam and import FosCam.json Please wait as this will take take to initialize (approx 1-2 minutes after start)

8/13/2015

Initial State integration. Sign in to initialstate.com and get your api key. update bluemix-settings.json and add following line to functionGlobalContext:
,InitialStateKey:"your initial state api key"

update winkCore flow from github. your activity should flow to initial State website

8/12/2015

Please note that Bluemix-Monitoring.json has been divided into 3 sections. Updates to that file are discontinued as of today.

3 new json files have been created representing different sections Please remove current flow from your instance and start by creating 3 tabs or "workspaces" in node-red (use + icon on the left side of the flow editor. Then use "3 bar" menu, select Workspaces - Rename and name each:

  1. wink Core
  2. Freeboards
  3. Integration

Import corresponding json from github into each tab and re-deploy your flows.

Briefly: these 3 flows are "fundamental" flows. they cache state of your wink devides, getting weather and provide you with auto dashboards for:

  • Lights

  • Switches

  • Locks

  • Motion Sensors

  • Trippers

  • Groups

  • Scenes

  • Thermostats

  • Eggtrays

  • Piggybanks

  • PropaneTanks

  • Everything else that you have in wink ecosphere...

  • Weather

See README-Bluemix.md for all the details.

-- updates: Added authorization bearer to the outbound web service. in order to retrieve proper data please make sure to pass http header in freeboard Authorization: "Bearer "+"value of FREEBOARD_TOKEN" (one that you set during bluemix configuration) outbound webservice is accessible via "your node red host"/red/getGlobalDataJson img src="../../images/Freeboard/Add%20authorization%20header.png">

-- updates after proper deployment system can generate sample dashboard automatically: navigate to "your_host"/freeboard/winkboard to check it.