npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

node-red-contrib-eaton-easye4

v1.0.6

Published

A simple node to get data from easyE4.

Downloads

46

Readme

node-red-contrib-eaton-easyE4

A Node-RED nodes to communicate with Eaton easyE4 PLC. Based on easyE4 JSON web api WebDoc.

Pre-requesites

To run these nodes, you need to have:

  • A Web server running on easyE4.
  • Api key or user authorization details.

Install

Run the following command in your Node-RED user directory - typically ~/.node-red on Linux or %HOMEPATH%\.nodered on Windows

    npm i node-red-contrib-eaton-easye4

Usage

Four node is used to made interaction with easyE4

easyE4 COM: The COM node stands for Connection node, which establishes a connection between the easyE4 webserver and Node-RED. To make the COM node do so, the following information is needed about the webserver:

  • Device ID – Unique ID specified for a particular device acting as a webserver. The same ID is to be used while using the IN, OUT, Operands for the purpose of identification.

  • Device IP – The IP address of the easyE4.

  • Protocol – The protocol with which the webserver is configured. E.g.: HTTP/HTTPs

  • Cycle Time – The time after which the Node-RED periodically makes a request to easyE4. This value is to be provided in milliseconds. The default cycle time is set to 500 milliseconds.

  • Auth Scheme – The authentication scheme which will be adopted by Node-RED for the header dedicated to user identification. The supported ones are the Basic and Bearer schemes.

  • API key/ user credentials – The credentials which are to be provided by the user for the purpose of authorization.

easyE4 IN: The IN node is used to retrieve data from the easyE4 acting webserver to the Node-RED. The node is categorized into three types - SYSINFO, OPERAND, and FB, based on what type of information it will be used to retrieve. The user needs to select the type as per need and provide additional information pertaining to the specific requirement i.e. index.

easyE4 OUT: The OUT node stands for Output node, which enables the user to write values or data to the easyE4 device using Node-RED. The access for writing to the device is dependent on the user and the permissions granted when the webserver was configured from Easysoft. A brief description of the ad hoc pertaining to the writing to the device is given below:

  • The admin is the super user, with all the available accesses granted that are related to writing.
  • The two users can be granted to access writing to markers, NET markers, set the current state, date and time, and write values to inputs of function blocks. The choice is selective and is decided when the server configuration is done using EasySoft.

easyE4 VAL: This node is used to represent the value returned by a single service. By single service, it can imply a single SYSINFO service such as Device state, a single OPERAND such as the value of 25th Marker word, and such like. This node operates on the IN node requesting the data from the device. Val node accept the following parameters –

  • Device ID – Unique Id used in COM node for connection
  • Operands – Type of operand i.e. I, O, M
  • Index – Index of Operand i.e. 2, 32
  • Sysinfo – Element from sysinfo I.e. Device Time, Location
  • FB - Accept function block pin details i.e. FB name, Instance, Operand Type and Offset

Examples and Demo Flow

There are several examples included when you install the node. Navigate to the menu - Import - Examples - node-red-contrib-eaton-easye4 The following example has shown the interaction of the UI dashboard element with easyE4 nodes. Note: After importing node, provide the IP address and login credentials in COM node. Deploy the flow and inject the COM node to start the requests. find the response in the debug window.

		[{"id":"1247b9f5.2c71b6","type":"easyE4 COM","z":"f4abcd70.f2a9d","name":"","deviceId":"","ip":"","baseAuthPass":"","authScheme":"Basic","protocol":"https","baseAuthUser":"","cycleTime":"500","x":430,"y":80,"wires":[["7e8fce6a.2c516"]]},{"id":"581d2240.5f4b7c","type":"inject","z":"f4abcd70.f2a9d","name":"","topic":"","payload":"","payloadType":"date","repeat":"","crontab":"","once":false,"onceDelay":0.1,"x":220,"y":80,"wires":[["1247b9f5.2c71b6"]]},{"id":"7e8fce6a.2c516","type":"debug","z":"f4abcd70.f2a9d","name":"","active":false,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","x":670,"y":80,"wires":[]},{"id":"3e448232.6eb5de","type":"easyE4 OUT","z":"f4abcd70.f2a9d","name":"","deviceId":"123","selectOpList":[{"type":"0","index":"1","value":"1"},{"type":"2","index":"8","value":"10"}],"FBOpList":[{"index":"FBC1(0;1)","value":"1"}],"state":"RUN","devname":"","ipset":"","date":"","time":"","addApi":"","delApi":"","indexRange":"","x":430,"y":260,"wires":[["eaee7d54.5f344"]]},{"id":"eaee7d54.5f344","type":"debug","z":"f4abcd70.f2a9d","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","targetType":"full","x":670,"y":260,"wires":[]},{"id":"ed9eb472.7aa438","type":"inject","z":"f4abcd70.f2a9d","name":"","topic":"","payload":"","payloadType":"str","repeat":"","crontab":"","once":false,"onceDelay":0.1,"x":210,"y":260,"wires":[["3e448232.6eb5de"]]},{"id":"b9df857d.a4c028","type":"easyE4 IN","z":"f4abcd70.f2a9d","name":"","deviceId":"123","selectOpList":[{"type":"5","index":"2"},{"type":"7","index":"8"},{"type":"9","index":"1","netId":"1"}],"sysinfo":["Device State"],"fb":"FBC1(0;1)","indexRange":"","x":430,"y":160,"wires":[["eae5c57d.5ed728"]]},{"id":"eae5c57d.5ed728","type":"debug","z":"f4abcd70.f2a9d","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","targetType":"full","x":690,"y":160,"wires":[]},{"id":"f60e294a.7273a8","type":"inject","z":"f4abcd70.f2a9d","name":"","topic":"","payload":"","payloadType":"date","repeat":"","crontab":"","once":false,"onceDelay":0.1,"x":220,"y":540,"wires":[["363acdaa.ff2bf2"]]},{"id":"152e2614.765aaa","type":"easyE4 VAL","z":"f4abcd70.f2a9d","name":"","opDeviceId":"123","selOperands":"MW","opIndex":"8","opeNetId":"","opSysinfo":"","fbPin":"","fbInstance":"","fbOpType":"","fbOffset":"","x":450,"y":460,"wires":[["f5abead3.3538c8"]]},{"id":"363acdaa.ff2bf2","type":"easyE4 VAL","z":"f4abcd70.f2a9d","name":"","opDeviceId":"123","selOperands":"","opIndex":"","opeNetId":"","opSysinfo":"Device State","fbPin":"C","fbInstance":"1","fbOpType":"0","fbOffset":"1","x":450,"y":540,"wires":[["2fccfae1.967c96"]]},{"id":"aa041b12.77be38","type":"inject","z":"f4abcd70.f2a9d","name":"","topic":"","payload":"","payloadType":"date","repeat":"","crontab":"","once":false,"onceDelay":0.1,"x":220,"y":460,"wires":[["152e2614.765aaa"]]},{"id":"f5abead3.3538c8","type":"debug","z":"f4abcd70.f2a9d","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","targetType":"full","x":670,"y":460,"wires":[]},{"id":"2fccfae1.967c96","type":"debug","z":"f4abcd70.f2a9d","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","targetType":"full","x":670,"y":540,"wires":[]}]

Bugs and enhancements

Please share your ideas and experiences on the Node-RED forum.

License

Copyright © 2020 by Eaton Industries GmbH, All Rights Reserved.