anmolagrwl / pubnub-eon-iot

1 stars 4 forks source link

Is this up to date? #1

Open calugo opened 7 years ago

calugo commented 7 years ago

Hello! I have tried your code but it just does not work, so I was wondering if the following pieces of information are somewhat missing:

Is this strictly dependent of a particular version of eon-charts and pubnub?

When you load the index.html in you video, It is necessary to start a server?

some of the syntax is not ok, like:

var pubnub = require("pubnub")({
    ssl           : true,  // <- enable TLS Tunneling over TCP
    publish_key   : "demo",
    subscribe_key : "demo",
    no_wait_for_pending : true
});

As the function and class cannot be declared with the same name I think, anyway, I have tried to get this running with zero rate of success, so maybe if some of the points I mentioned are perhaps relevant then maybe this code could work. Thanks,

Carlos.

anmolagrwl commented 7 years ago

What's the error that you are getting?

  1. This was done 2 years back, so this is written with PubNub v3 on mind. You might be using PubNub v4 and there are differences in APIs of both the version. So you will have to change the code accordingly.
  2. You can start the server before or after index.html is loaded.
  3. Do note that you have to install couple of node packages for this to work. 'npm install pubnub johnny-five -g'. Or you can create the package.json in the project folder and add the required packages using 'npm install pubnub johnny-five --save' OR 'npm install pubnub@3.16.5 johnny-five --save'