Git Product home page Git Product logo

node-red-contrib-ip's Introduction

node-red-contrib-ip

This simple node returns the internal or public IP address of the Node-red host.

install

From your node-red directory:

$ npm install node-red-contrib-ip

or

in the Node-red, Manage palette, Install node-red-contrib-ip

Usage

Possible options:

Internal:

  • 'IPv4'
  • 'IPv6'

Public:

  • 'IPv4'
  • 'IPv6'
  • 'Https' - more secure but slower metod, which using the icanhazip.com service.
  • 'Timeout' - time in milliseconds until the request is considered to be exceeded.

Any positive msg. sent to the node input will generate msg.payload on the output. The msg.payload will contain only ip addresses set in the node configuration.

Example of output message (msg.payload):

  • 'internalIPv4' : 192.168.200.62
  • 'internalIPv6' : fe80::64ef:a771:73e4:d1e1%11
  • 'publicIPv4' : 216.58.216.164
  • 'publicIPv6' : 2607:f8b0:400a:807::2004

License

MIT License

node-red-contrib-ip's People

Contributors

codacy-badger avatar dependabot-preview[bot] avatar dependabot[bot] avatar okhiroyuki avatar wkatgithub avatar

Stargazers

 avatar

Watchers

 avatar  avatar  avatar

node-red-contrib-ip's Issues

Public IP address

My ISP regularly changes my public IP address, so I've written a flow that will update Cloudflare DNS settings with my current public IP address. Currently I use https://www.ipify.org/ to get my IP, but thought that this node would be a better solution.
However, reading the notes;

By default, for determining a public IP address, it queries the DNS records of OpenDNS

So does this node return the actual public address, or the public address as recorded by OpenDNS (which may be incorrect if my ISP has changed my IP)?

Data seems retained until flow deploy/restart

I installed this module yesterday in order to monitor when my public IP changes but I had little success.
No matter how many time I reconnect my router and change IP, the node keeps returning the old IP until I either restart o redeploy my flows.
Is this the intended behavior? Or am I missing something?

And yes, I am very positive my public IP actually changes every time.

SyntaxError: Unexpected token { (line:3)

Hi

Just installed this plugin on my node-red instance and can see the following error in the pallet view.

node-red-contrib-ip
1.0.0
SyntaxError: Unexpected token { (line:3)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.