forked from ekmmetering/ekmmeters
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
admin
committed
Sep 8, 2019
1 parent
f63c696
commit 0b12538
Showing
19 changed files
with
249 additions
and
124 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
""" Simple example set max demand interval | ||
(c) 2016 EKM Metering. | ||
""" | ||
from ekmmeters import * | ||
|
||
# port and meter to use | ||
my_port_name = "/dev/ttyO4" | ||
my_meter_address = "000300001463" | ||
#log to console | ||
ekm_set_log(ekm_print_log) | ||
|
||
|
||
port = SerialPort(my_port_name) | ||
if (port.initPort() == True): | ||
my_meter = V4Meter(my_meter_address) | ||
my_meter.attachPort(port) | ||
else: | ||
print("Cannot open port") | ||
exit() | ||
|
||
my_meter.setMaxDemandResetInterval(MaxDemandResetInterval.Daily) | ||
|
||
port.closePort() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
""" Simple example set max demand interval | ||
(c) 2016 EKM Metering. | ||
""" | ||
from ekmmeters import * | ||
|
||
# port and meter to use | ||
my_port_name = "/dev/ttyO4" | ||
my_meter_address = "000300001463" | ||
|
||
#log to console | ||
ekm_set_log(ekm_print_log) | ||
|
||
|
||
port = SerialPort(my_port_name) | ||
if (port.initPort() == True): | ||
my_meter = V4Meter(my_meter_address) | ||
my_meter.attachPort(port) | ||
else: | ||
print("Cannot open port") | ||
exit() | ||
|
||
|
||
my_meter.setMaxDemandResetNow() | ||
|
||
|
||
port.closePort() |
Oops, something went wrong.