Accessing Hardware on a Pi server

I’m running a local server on a raspberry pi. Is it possible to make the server act as an IOT devise itself? It’s got the GPIO to do it. Has anybody tried or are there plans to do this?

You could probably do it. I could try it on my raspberry pi if you want. I have already set up the local Blynk server on my pi so I will get back to you as soon as I can.

I’ve tried it out. Whenever I run the node script I get this error message:
Connecting to: xx.x.x.xx 8441 SSL authorization... SSL not authorized

1 Like

hmm… what did you try? Were you trying to run the client software on the server machine? Not sure that is going to work. I think we would need to modify the server software itself. It would actually be great if the developers could add a combo box to the widgets that would allow us to select if we wanted to direct the server to interact with client nodes or server hardware.

That said, I’m not sure that they would be interested in directing effort that way. I don’t know what their goals are.

Yes, that was what I was trying. I don’t think it works because of the SSL authorization problem.

1 Like

So if it works we could just address the client. However, aren’t there going to be communication clashes being on the same devise?

I’m not trying to be accusatory or negative at all, I just don’t know how it works.

Yes, that is probably the issue.

@vshymanskyy

Not sure if you are the right guy to ask this, but I figured if it wasn’t you, then you could put me in contact with the right people.

I’d like to figure out how to run a blynk client on the same raspberry pi as the blynk server so I can adress hardware there.

@vshymanskyy

I read through pyblynk. I think I can get that running on the raspberry pi. I think I can get it to talk to the local server using “localhost”. I’m going to give it a try.

@vshymanskyy @ithinkso
it worked… just need to input ‘localhost’ to the TCP_Client constructor and it works beautifully! Now all I have to do is write event handlers to do what I want when it gets messages from my Blynk app. Very slick!

3 Likes

I am trying to run a DHT 22 Temp and humidity sensor with Blynk using Iphone, Raspberry Pi 2 (Wheezy 7) and Local server on Windows XP server.

The blynk-sensor-test.js script works ok when I use Blynk cloud however when I use local server I get:

pi@raspberrypi ~/wiringPi/blynk-library/linux $ sudo node blynk-sensor-test.js
Connecting to: xxx.xxx.x.xxx 8441
SSL authorization…
SSL not authorized
Temperature: 28.8C
Humidity: 37.1%
events.js:87

I am running server on server-0.18.1.jar

Other projects like simple button switches function OK with local server.
Any ideas how to solve?

Try disabling SSL and use a plain connection. It probably has to do with invalid certificates.

Pardon my lack of knowledge on Blynk since it is the first time I am using it, but how do you connect to the local server using a plain tcp connection rather than SSL?

Is this done at java server level, or at the js script on the Pi.

It has to be done from the .js script I’d reckon. That is where you can define connections to the server. The Java servers spawns a couple different servers, among which a plain connection on port 8442 (if I’m not mistaken) to take connections from non-SSL hardware.

Not shure if i can write here, but i have a problem that belongs directly to that.
I cant write the CPU temp-Script into the rc.local script, because the CPU-Script will start although the server hasnt started completely.

Both Scripts are working, even when i execute the rc.local script by hand after the server launched.
Can I use a delay or does the server-script return any value for if conditions?