Skip to content

Commit

Permalink
Fix Pricing / Bump dependancies / Bump to Node 16
Browse files Browse the repository at this point in the history
  • Loading branch information
thevoltagesource committed Jun 5, 2021
1 parent 2d0e68d commit aa7933e
Show file tree
Hide file tree
Showing 5 changed files with 1,427 additions and 10 deletions.
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM node:12-alpine
FROM node:16-alpine

WORKDIR /app
COPY *.js* ./
Expand Down
5 changes: 3 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,13 +17,14 @@ Bridge status is tracked (```online``` and ```offline```) on topic```MQTT_TOPIC/

Current supported messages:<br>
* Instantanious Demand (in Watts): ```MQTT_TOPIC/meter/demand```
* DEPRECATED - Meter Reading (Same as Summation Delivered): ```MQTT_TOPIC/meter/reading```
* Summation Delivered (rounded to neaest kWh or Wh): ```MQTT_TOPIC/meter/delivered```
* Summation Received (rounded to nearest kWh or Wh): ```MQTT_TOPIC/meter/received```
* Price / kWh (set by utility or manually entered): ```MQTT_TOPIC/pricing/price```
* Price Tier : ```MQTT_TOPIC/pricing/tier```
* Zigbee Status: ```MQTT_TOPIC/zigbee/status```
* Zigbee Signal Strength: ```MQTT_TOPIC/zigbee/signal```
* Zigbee Channel: ```MQTT_TOPIC/zigbee/channel```

Please note the Meter Reading topic will dropped in a future version in favor of the Summation Delivered topic.
Please note the Meter Reading topic was dropped in favor of the Summation Delivered topic.

Details of most Eagle messages are in the code and can be used to enable additional published data.
6 changes: 5 additions & 1 deletion eagle-listener.js
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ const processMessage = function(msg) {
// digitsleft: [ '0x06' ],
// suppressleadingzero: [ 'Y' ],
// port: [ '/dev/ttySP0' ] }
var message = {'meter/reading': dvalue, 'meter/delivered': dvalue, 'meter/received': rvalue}
var message = {'meter/delivered': dvalue, 'meter/received': rvalue}
break
case 'networkinfo':
var node = msg.networkinfo[0]
Expand Down Expand Up @@ -120,6 +120,9 @@ const processMessage = function(msg) {
// port: [ '/dev/ttySP0', '/dev/ttySP0' ] }
break
case 'pricecluster':
var node = msg.pricecluster[0]
var price = parseInt(node.price[0], 16)
var tier = parseInt(node.tier[0], 16)
//{ devicemacid: [ '0xd8d5b90000003e58' ],
// metermacid: [ '0x00078100001d2c64' ],
// timestamp: [ '0xffffffff' ],
Expand All @@ -131,6 +134,7 @@ const processMessage = function(msg) {
// duration: [ '0xffff' ],
// ratelabel: [ 'Set by User' ],
// port: [ '/dev/ttySP0' ] }
var message = {'pricing/price': price, 'pricing/tier': tier}
break
case 'timecluster':
//{ devicemacid: [ '0xd8d5b90000003e58' ],
Expand Down
Loading

0 comments on commit aa7933e

Please sign in to comment.