Sends Current Cost EnviR power usage to the NinjaBlocks cloud
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Type Name Latest commit message Commit time
Failed to load latest commit information.

Current Cost EnviR Power Meter


This Ninja Block driver is installed on your ninja block ( It will read the serial commands from your Current Cost EnviR power meter's serial port ( You can use the EnviR's serial cable or use the on-board beagle serial pins. It will upload your current usage every 6 seconds when the unit sends data. This will then show in your Ninja Block dashboard and you will be able to make rules based upon your household power usage You also have the option to send the data to Cosm (replicating the bridge device)


Log into the Ninjablock via SSH

  $ cd /opt/ninja/drivers/
  $ rm -rf ninja-envir
  $ git clone ninja-envir
  $ sudo service ninjablock restart

You will then be able to edit any settings via the drivers configuration on the Ninja Dashboard. (Any changes require a restart)

Ninjablock Dashboard


Serial Communications

By default the driver will expect the USB cable that came with the EnviR (ttyUSB0) You have the option to use the serial pins on the board.

On the beagle bone ( You can use serial port name 'ttyO5' which is on-board Serial 5 (

NOTE: You need to put these lines in /etc/rc.local

  echo 4 > /sys/kernel/debug/omap_mux/lcd_data8
  echo 24 > /sys/kernel/debug/omap_mux/lcd_data9

Then use this pin diagram to wire directly to the EnviR

   CC128		Beagle Bone			Cat5 Wire Colour	Notes
 	Pin 1		Pin P9-01 or 02  	Blue				Gnd
 	Pin 4		Pin P9-03 or 04 	Green Stripe		3.3v
 	Pin 7		Pin P8-37			Brown Stripe		Serial Data (Optional)
 	Pin 8		Pin P8-38			Brown				Serial Data