Skip to content

AdamEdmonds/node-red-contrib-automation-hat

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

36 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Node-RED nodes for Pimoroni Automation HAT/pHAT

Pimoroni Automation HAT

Provides nodes

  • Automation HAT:
    • Output Node: Sinking Outputs, Relays, Lights
    • Input Node: Buffered Inputs (binary), 12-bit ADC @ 0-24V (±2% accuracy) Inputs (ADC1-3 only)

Unsupported features

  • ADC4: 12-bit ADC @ 0-3.3V
  • Other Pins exposed only break out section: SPI, TX (#14), RX (#15), #25 pins
  • Controlling individual indicator lights on each input/output beyond the auto_lights capability.

More Information

Check out my blog post for this new Node Package for some background and examples.

Where to buy

Installation

Dependency - Node and Node-Red

Details of how to install Node and Node-Red needed for this project on Raspberry Pi can be found here. The script at the top of the page ensures you have the latest supported versions ready for this project.

Dependency - Automation HAT Python Library

First you'll need the Python dependencies for Automation HAT, you can install these with our one-line installer, as per these instructions

curl https://get.pimoroni.com/automationhat | bash

Automation HAT Node-RED

Installation via NPM

npm install node-red-contrib-automation-hat

Installation from latest source on GitHub

To install this node you should:

  • Change to your users node-red nodes directory:

    cd ~/.node-red/node_modules

    Note: older node installation may use the location: ~/.node-red/nodes):

  • Clone this repository:

    git clone https://github.com/shortbloke/node-red-contrib-automation-hat
  • Start Node-Red and you should see the new Automation HAT nodes within the Raspberry Pi section.

To Do

In no particular order:

  • Consider splitting input and outputs types into separate node files
  • Add support for controlling light brightness via write command
  • Add support for controlling each individual indicator light for each input and output

References

This project is based on the ExplorerHAT node implementation published by Pimoroni

About

Node-RED nodes for Pimoroni Automation HAT/pHAT

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • HTML 40.2%
  • JavaScript 32.1%
  • Python 27.7%