Blynk and you'll miss it.

Discussion in 'Other Electronic Interfaces' started by Colin_W, Mar 1, 2019.

  1. Colin_W

    Colin_W Full Member

    Messages:
    177
    Likes Received:
    50
    Joined:
    Nov 19, 2016
    During my vigil in the shed waiting for snow so I could use my season ski pass I came across an app which allowed you to make connections through the cloud and control wireless modules on your local network. It's called 'Blynk'.
    Now I'm not a fan of opening ports on my router for any reason but this intrigued me so I had a dip into the darker side of the Dark Side (so to speak ). I downloaded the app onto my phone and logged onto the Blynk server and was able to operate 4 relays via my phone. When you 'make a project' the app allows you to drag and drop buttons etc onto your phone ( or tablet ) screen to build an interface, during this operation you select which wireless module you wish to use ( a 'nodemcu' in my case(the same module that appears in Garrys thread about RFID)) and which pins you wish to use for the output.
    P1040608.JPG

    The programming for the nodemcu is done via the arduino IDE. Libraries for the Blynk system are available and for the esp8266 wireless systems.
    Even better, Blynk have a local sever package which can be downloaded and I now have this running on my Pi 3. NO CLOUD! more of a local mist. Even better still!! I have set up the Pi as a local router so no other network needed, it's running headless and when I need to log in to it I use VNC from my laptop.
    It's deep and it's very very dark. Anyone for a journey to Mordor?

    Col
     
  2. Timbersurf

    Timbersurf

    Messages:
    720
    Likes Received:
    436
    Joined:
    Jun 20, 2018
    That is the tip of the iceberg!
    It is not hard to interface DCC using a Raspberry pi to wifi and on to the net, deploy a webcam and you can get feedback of what you are doing. Same can be done with an RC car with webcam on board.
    I think there is a club that runs PC's in a different room with DCC and a train cam in each loco for all the drivers (they can see the signals and drive accordingly) and a VPN will allow drivers to take part from home! (Skype or similar games coms allow "radio" talk to dispatcher)
    If you have cab control on your smart phone, it would not be difficult to route your network through a DMZ and have the phone work anywhere on the net!
     
    Colin_W likes this.
  3. Colin_W

    Colin_W Full Member

    Messages:
    177
    Likes Received:
    50
    Joined:
    Nov 19, 2016
    Lol, and I thought I was getting darker :giggle:
     
  4. paul_l

    paul_l Staff Member Administrator

    Messages:
    7,243
    Likes Received:
    2,721
    Joined:
    Dec 5, 2015
    I saw one of the large American layouts where the dispatcher is working away from home, so on running nights, he controls the layout and operators from hundreds of miles away. Skype (or equivalent for radio coms) and JMRI for the control system.

    Paul
     
    Andy_Sollis likes this.
  5. paul_l

    paul_l Staff Member Administrator

    Messages:
    7,243
    Likes Received:
    2,721
    Joined:
    Dec 5, 2015
    P.S.

    Not an issue with Another Bridge, if by the time the train covers the 9ft, Toto has not noticed it arriving, we can shout at him - normally with words that could even be printed :avatar:

    Paul
     
    Andy_Sollis likes this.
  6. Colin_W

    Colin_W Full Member

    Messages:
    177
    Likes Received:
    50
    Joined:
    Nov 19, 2016
    The thing about this though is that it runs locally. The network is provided by the Pi, not the web or the home network and you don't need a separate router. The phone or tab or pc log onto the Pi.
    I'll see if I can knock up a demo soon.
    Col
     
  7. Timbersurf

    Timbersurf

    Messages:
    720
    Likes Received:
    436
    Joined:
    Jun 20, 2018
    The problem I foresee, is that it is similar to other WiFi enabled devices, like camera's, you need a separate app to control it and have to swap networks every time you want to change from your home network to this device and again back to your home WiFi. Just saying, not a show stopper but annoying.
     
  8. Colin_W

    Colin_W Full Member

    Messages:
    177
    Likes Received:
    50
    Joined:
    Nov 19, 2016
    To see the Blynk app work check out this Guy on Youtube Steps 1 to 3 of his video.
    You may have to listen carefully as he has an accent but it's not to bad.
    Col
     
  9. Colin_W

    Colin_W Full Member

    Messages:
    177
    Likes Received:
    50
    Joined:
    Nov 19, 2016
    Sorry TimberSurf just saw your reply. I think as you dig deeper into these things then more surfaces, for instance I believe that you can use more nodemcu's as clients like linking arduino's but wirelessly. As you said earlier 'tip of the iceberg' and it could well sink like the Titanic but I find these things fascinating so I'll sail along with it for a while. Switching networks is a pain which is why I have set the raspberry Pi up as a router. When you program the Nodemcu you put the ssid of the network, the wireless password, an identity authorisation code and the ip address of the blynk server (Pi) into the Sketch. Blynk1.JPG

    The ssid, password and ip address are on the pi network only and there is no access from the Net. This is all the code needed at the moment to run relays or something like my traverser as I can link the digital output pins selected to the arduino mega to replace the push buttons which pull the mega pins low. Lots of info and tutorials online.
    Col
     
  10. Colin_W

    Colin_W Full Member

    Messages:
    177
    Likes Received:
    50
    Joined:
    Nov 19, 2016
    and here is the link to You Tube I missed out of my earlier post.


    :facepalm: Col
     

Share This Page