tzapu / node-red-contrib-blynk

Blynk app integration with Node Red
MIT License
17 stars 5 forks source link

Wrong credentials #8

Closed scargill closed 8 years ago

scargill commented 8 years ago

I'm looking for ideas as I don't really know where the problem is.

I installed BLYNK on my Raspberry Pi 2. I have blynk and node-red talking no problem using your excellent nodes... however.... so I started up my local BLYNK server - changed the settings in the APP and registered. Local Blynk accepted that. I made a new app - no problem - with a simple flashing LED - similar to what I have as a test on the real BLYNK server. I put in the new KEY - my local PI address and port 8442. No matter how many times I try this - for the local version, I get the red polo indicator in Node-Red and if I'm running Node-red locally as against a service, so I'm watching it's output - it says "Could not login: INVALID TOKEN". I've checked the key over and over and it's the one I'm being given by the local BLYNK server. Any thoughts?

tzapu commented 8 years ago

could you try this: -configure blynk server config node for your local blynk server -deploy flow -kill node red server -start node red and see if it connects at startup?

/first thought would be that maybe i m not cleaning old values up and when you change the token it is still using the old one. this should also be reflected, if it s the case, in the node red log

tzapu commented 8 years ago

did the above work? still having issues with it?

scargill commented 8 years ago

Right now I can't connect to the REAL Blynk server... when I sort that I'll try again - thanks for the reply... I'll come back to you as I really would like to get the local server running to avoid issues as I'm having now ... it has to be their server as everything else on Node-Red is working.

tzapu commented 8 years ago

similar to this? https://github.com/tzapu/node-red-contrib-blynk/issues/5

scargill commented 8 years ago

Ok..

This is what I've done...

I've installed the server-0.10.2.jar and admin-0.10.2.jar files in /var/blynk for want of a better place - with full directory rights (I know, security).

I've made 2 files... mail.properties and server.properties. In the latter I have...

app.ssl.port=8443 hardware.default.port=8442

I made an APP - pointing to my local 192.168.1.19 where the Raspberry Pi 2 is and where I have node-red and this code...

The App can sign up to the local Blynk - it can send me an email with the KEY in it. I put that in Node-Red - along with 127.0.0.1 and port 8442 (I also tried 8443) and the best I can get is "no connected" in red. The APP says "Your Generic Board is not in the network".

As you don't know my setup from Adam - it's a Raspberry Pi 2 running Debian. I have Java 8 on there - I'm running:

root@OtherPi:/var/blynk# java -jar server-0.10.2.jar -dataFolder /var/blynk

and it comes up sand says Blynk Server successfully started.... and sits there working in the terminal.

I have no idea why I can connect to Blynk's server - and not to the local one - any ideas?

tzapu commented 8 years ago

hi, thanks for the detailed explanation.

do you have any devices that can connect to your local server with the key that was sent to you by it?

cheers

scargill commented 8 years ago

No - I just have my Node-Red installation - bearing in mind that another connection to the Blynk server has buttons, graphs, LEDs and other stuff working a treat. I just can't seem to connect to the local server (the APP does, the Node-Red node doesn't even though it is on the same machine).. Am I using the right port (I've no SSL setup and I've accordingly not ticked the SSL option).

tzapu commented 8 years ago

think i found it

bare with me ;)

scargill commented 8 years ago

ok

tzapu commented 8 years ago

had to install a local blynk myself, quite seamless, great job they did.

found and fixed i hope, pushed version 0.0.11

scargill commented 8 years ago

You are my hero.

tzapu commented 8 years ago

:+1: :relieved: version 0.0.12 up with some more cleanup and the blynk guys also released a new version to complement some error handling

scargill commented 8 years ago

Well done - installed and working.