Getting Started with XSLTC
- Introduction
- Setting the system classpath for XSLTC
- Compiling translets from the command line
- Running translets from the command line
- Calling XSLTC with the JAXP API
- Smart Transformer Switch
- Calling XSLTC with the native API
- Usage constraints
- Sample translets
- Extensions for XSLTC
See also: XSLTC Design
| Unless otherwise specified, the usage discussed in this section refers to the Xalan-Java Compiling processor, XSLTC. See Basic Usage Patterns for information on using the Xalan-Java Interpretive processor. |
Introduction
XSLTC provides a compiler and a runtime processor. Use the compiler to compile an XSL stylesheet into a translet (i.e., a set of Java classes). Use the runtime processor to apply the translet to an XML document and perform a transformation.
Setting the system classpath for XSLTC
The xalan.jar file contains support for both Xalan-Java processors. You
can use the JAXP javax.xml.transform.TransformerFactory
property
(see "Calling XSLTC with the JAXP API" below) to
select which processor to use: the Interpretive or the Compiling processor.
To use XSLTC, simply put xalan.jar, serializer.jar, xml-apis.jar, and xercesImpl.jar on the system classpath.
| To compile and run translets, you must use JDK (or JRE) 1.8 or higher. |
| Although the XSLTC developers make every effort to avoid changes that affect binary compatibility, we cannot guarantee that a translet will work with any version of the run-time processor other than the one that corresponds to the version of the XSLTC compiler that was used to create the translet. |
Bundled System Classpath
To use this approach, simply put xalan.jar, serializer.jar, xml-apis.jar and xercesImpl.jar on your system classpath.
| In order to compile and run translets you must have a JAXP 1.3 compliant XML parser installed. Our distribution includes Xerces-Java 2.12.2. Include xercesImpl.jar and xml-apis.jar on your system classpath. |
Unbundled System Classpath
The binary distribution contains XSLTC and all its support classes bundled into xalan.jar. To use the unbundled approach, rebuild the xsltc.jar file using the xsltc.unbundledjar target. The support jars that you'll need to add to your classpath are available in the Xalan Java lib and tools directories.
To compile translets, run translets, and use the XSLTC API, using the unbundled jar approach, put the following on the system classpath:
| Classes or JAR | To compile a translet | To run a translet |
|---|---|---|
| the translet | required | |
| xsltc.jar | required | required |
| runtime.jar | required | |
| bcel-6.7.0.jar | required |
The translet is the set of class files or the JAR file that you generate with the compiler; see Compiling translets.
Compiling translets from the command line
The XSLT Compiler is a Java-based tool for compiling XSLT stylesheets into lightweight and portable Java byte codes called translets.
To run the compiler from the command line or from a script,
set the classpath and
run the class org.apache.xalan.xsltc.cmdline.Compile
. The
synopsis of the options and arguments accepted by this class is shown below.
| You can also use the Xalan-Java command-line utility, to compile or run XSLTC translets. |
Synopsis
java org.apache.xalan.xsltc.cmdline.Compile
[-o <output>] [-d <directory>] [-j <jarfile>]
[-p <package name>] [-n] [-x] [-v] [-u] [-h]
{<stylesheet> | -i }
Flags and arguments
The following flags and arguments are supported:
-o <output> Specifies the name of the generated translet class. If you omit this argument, the translet class is named <stylesheet>. Translets are written as .class files. -d <directory> Specifies the destination directory. If you omit this argument, the translet class files are placed in the current working directory. -j <jarfile> Outputs the generated translet class files into a jar file named <jarfile>.jar. When this option is used, only the jar file is output. -p <package name> Specifies a package name for the generated translet classes. -n Enables template inlining (default behavior better on average). -x Turns on additional debugging messages. -s Disables calling System.exit -u <stylesheet> Specifies the stylesheet with a URI such as 'http://myserver/stylesheet1.xsl'. <stylesheet> (No flag) The pathname of the stylesheet file. -i Force stylesheet to be read from stdin -v Prints version of compiler -h Prints usage statement
The translet name is the same as the name of the Java class that
implements the translet. If the name specified by the -o option
or derived from the URL for the stylesheet contains characters that are not
permitted in a Java class name, any such character will be replaced with an
underscore. For example, if the translet name specified by the -o
option is my-stylesheet , or if the URL of the stylesheet is
http://example.org/my-stylesheet.xsl , the translet will actually
be named my_stylesheet .
|
Examples
The following examples assume that you have already set the classpath to include the translet and the required JAR files (see setting the system classpath).
Example 1: Creating a translet from the hamlet.xsl stylesheet.
java org.apache.xalan.xsltc.cmdline.Compile
hamlet.xsl
Example 1 produces a set of class files such as hamlet.class, hamlet$0.class, hamlet$1.class.
Example 2: Outputting to a JAR file.
java org.apache.xalan.xsltc.cmdline.Compile
-j hamlet.jar hamlet.xsl
Example 2 produces hamlet.jar, which contains the translet class files.
Example 3: Specifying the translet class name.
java org.apache.xalan.xsltc.cmdline.Compile
-o newhamlet hamlet.xsl
Example 3 produces a set of class files such as newhamlet.class, newhamlet$0.class, etc., rather than hamlet.class, hamlet$0.class, etc.
Example 4: Compiling multiple stylesheets.
java org.apache.xalan.xsltc.cmdline.Compile
hamlet1.xsl hamlet2.xsl hamlet3.xsl
Example 4 produces three translets and set of class files derived from the three stylesheets.
Example 5: Package Specification.
java org.apache.xalan.xsltc.cmdline.Compile
-p com.mycompany.translets hamlet.xsl
Example 5 produces a set of class files such as com/mycompany/translets/hamlet.class, com/mycompany/translets/hamlet$0.class', etc.
Running translets from the command line
The XSLTC runtime processor is a Java-based tool for transforming XML document files using a translet (compiled stylesheet).
The XSLTC processor can be run on any platform including UNIX, Windows, NT, Mac that supports Java, including a Palm Pilot with J2ME CLDC (Java 2 Micro Edition, Connected Limited Device Configuration).
To run a translet from the command line or a script, set the classpath (be sure to include the translet) and run the translet with the appropriate flags and arguments (described below).
| You can also use the Xalan-Java Command-line Utility, to compile or run XSLTC translets. |
Synopsis
java org.apache.xalan.xsltc.cmdline.Transform
[-j <jarfile>] [-x] {-u <document_url> | <document>} <class>
[<name1>=<value1> ...]
Flags and arguments
The following flags and arguments are supported:
-j Specifies <jarfile> from which to load translet. -x Turns on debugging messages. -s Disables calling System.exit -u Specifies the XML input <document> with a URI, such as 'http://myserver/hamlet.xml'. Arguments without flags: <document> Filename of the XML input document. <document_url> URI of the XML input document (see the -u flag above). <class> The translet that performs the transformation. The translet may take a set of stylesheet parameters specified as name-value pairs. The format for a name-value pair is <name>=<value>.
Examples
The following examples assume that you have already set the classpath to include the translet and the required JAR files (see setting the system classpath).
A possible variation: You have set the classpath to include the required JAR files, but when you run the translet, you use the java -cp flag to add the current working directory (containing the translet class files you have just generated) to the classpath.
Windows:
java -cp .;%CLASSPATH% ...
UNIX:
java -cp .:$CLASSPATH ...
Example 1: Processing an XML document.
java org.apache.xalan.xsltc.cmdline.Transform
hamlet.xml hamlet
Example 1 uses the specified translet (hamlet) to transform the specified XML input document (hamlet.xml). The XML input document is in the current working directory. The translet was created by using org.apache.xalan.xslt.cmdline.Compile to compile an XSL stylesheet (hamlet.xsl).
Example 2: Passing stylesheet parameters to the translet.
java org.apache.xalan.xsltc.cmdline.Transform
hamlet.xml hamlet
speaker=HAMLET 'scene=SCENE IV'
Example 2 passes "HAMLET" to the stylesheet for the stylesheet parameter named speaker, and "SCENE IV" for the stylesheet parameter named scene. The second name-value pair was placed in single quotes to specify a value containing a space.
Example 3: Processing an XML input document specified with a URI.
java org.apache.xalan.xsltc.cmdline.Transform
-u http://zarya.east/test.xml hamlet
Example 3 applies the translet (hamlet) to the XML input document (http://zarya.east/test.xml hamlet). Inclusion of the flag (-u) is optional.
Calling XSLTC with the JAXP API
XSLTC translets are integrated with the JAXP 1.3 API. Accordingly, it is now possible to set a system property and use a TransformerFactory to generate a Transformer that performs a transformation by compiling and running a translet.
When you use the JAXP 1.3 API to run Xalan-Java, the
javax.xml.transform.TransformerFactory
system property is set to
org.apache.xalan.processor.TransformerFactoryImpl
. As it currently
stands, this Xalan-Java implementation of TransformerFactory always uses the Xalan-Java
Interpretive processor to perform transformations. To use translets to perform
transformations, set this system property to
org.apache.xalan.xsltc.trax.TransformerFactoryImpl
. For
information on setting this and related system properties designating XML
parsers and XSL transformers, see
Plugging in a Transformer and XML
parser.
To use the JAXP 1.3 API to perform transformations with translets do the following:
- Set the
javax.xml.transform.TransformerFactory
system property as indicated above.
- Instantiate a
TransformerFactory
.
- Instantiate a
Transformer
object either directly from theTransformerFactory
or through aTemplates
object. ATransformer
is a processed instance of a stylesheet (a translet) that can be used to perform a transformation. See below for more information on when you should use aTemplates
object.
- Perform the transformation, using a StreamSource object for the XML input and a StreamResult object to hold the transformation output.
Both a Templates
object and a Tranformer
object are
processed representations of a stylesheet, but you cannot use a
Templates
object to perform transformations. Instead,
you can use a Templates
object to create new
Transformer
instances, without having to reprocess the
stylesheet each time. You can use a TransformerFactory
to
generate a Templates
object or a Transformer
object directly. You can use a Transformer
more than once,
but you cannot use it concurrently on more than one thread. If you need
to use the same stylesheet to perform transformations on more than one
thread at the same time, use a Templates
object and create
as many Transformer
objects as you require.
XSLTC also defines a set of attributes that you can set on the
TransformerFactory
in order to save and subsequently use those
translets by way of the JAXP Transform API - without having to recompile the
stylesheet each time.
XSLTC TransformerFactory attributes
The JAXP Transform API defines a
TransformerFactory.setAttribute
method that you can use to set implementation-defined attributes.
| Attribute | Purpose | Type of value | Default value |
|---|---|---|---|
| translet-name | Specifies the name of the translet | String | "GregorSamsa" |
| destination-directory | Specifies where to save translet class files | String | null |
| package-name | Specifies which package translet class files will be in | String | null |
| jar-name | Specifies the name of a jar file in which translets should be saved | String | null |
| generate-translet | Specifies whether translet class files should be generated | Boolean | Boolean.FALSE |
| auto-translet | Specifies that time-stamp of translet file, if any, should be compared with that of stylesheet to decide whether to recompile the stylesheet | Boolean | Boolean.FALSE |
| use-classpath | Specifies that precompiled translet classes should be looked up from the classpath when a new transformer or templates is created | Boolean | Boolean.FALSE |
| enable-inlining | Specifies whether methods that represent templates should be inlined. See Usage constraints | Boolean | Boolean.FALSE |
| debug | Enables debugging messages | Boolean | Boolean.FALSE |
The translet-name
, destination-directory
,
package-name
and jar-name
attributes are transient.
They only apply to the next invocation of either the newTemplates
or the newTransformer
method on that
TransformerFactory
.
The translet name is the same as the name of the Java class that
implements the translet. If the value specified for the
translet-name attribute contains characters that are not
permitted in a Java class name, any such character will be replaced with an
underscore. For example, if the translet name specified was
my-stylesheet , the translet will actually be named
my_stylesheet . |
Examples
Example 1: Using a translet/Templates object for multiple concurrent transformations
import java.util.Properties; import javax.xml.transform.Transformer; import java.io.FileOutputStream; import javax.xml.transform.TransformerFactory; import javax.xml.transform.Templates; import javax.xml.transform.stream.StreamSource; import javax.xml.transform.stream.StreamResult; ... // Set the TransformerFactory system property. // Note: For more flexibility, load properties from a properties file. String key = "javax.xml.transform.TransformerFactory"; String value = "org.apache.xalan.xsltc.trax.TransformerFactoryImpl"; Properties props = System.getProperties(); props.put(key, value); System.setProperties(props); ... String xslInURI; // Instantiate the TransformerFactory, and use it with a StreamSource // XSL stylesheet to create a translet as a Templates object. TransformerFactory tFactory = TransformerFactory.newInstance(); Templates translet = tFactory.newTemplates(new StreamSource(xslInURI)); ... String xmlInURI; String htmlOutURI; String xmlInURI2; String htmlOutURI2; ... // For each thread, instantiate a new Transformer, and perform the // transformations on that thread from a StreamSource to a StreamResult; Transformer transformer = translet.newTransformer(); transformer.transform(new StreamSource(xmlInURI), new StreamResult(new FileOutputStream(htmlOutURI))); transformer.transform(new StreamSource(xmlInURI2), new StreamResult(new FileOutputStream(htmlOutURI2))); ...
For a working sample that illustrates this usage pattern, see JAXPTransletOneTransformation.
Example 2: Compiling a translet/Templates object for a single transformation
import java.util.Properties; import javax.xml.transform.TransformerFactory; import java.io.FileOutputStream; import javax.xml.transform.Transformer; import javax.xml.transform.stream.StreamSource; import javax.xml.transform.stream.StreamResult; ... // Set the TransformerFactory system property. // Note: For more flexibility, load properties from a properties file. String key = "javax.xml.transform.TransformerFactory"; String value = "org.apache.xalan.xsltc.trax.TransformerFactoryImpl"; Properties props = System.getProperties(); props.put(key, value); System.setProperties(props); ...  TransformerFactory tFactory = TransformerFactory.newInstance(); Transformer transformer = tFactory.newTransformer(new StreamSource(xslInURI)); // Perform the transformation from a StreamSource to a StreamResult; transformer.transform(new StreamSource(xmlInURI), new StreamResult(new FileOutputStream(htmlOutURI))); // Re-use the same transformer for a second transformation transformer.transform(new StreamSource(xmlInURI2), new StreamResult(new FileOutputStream(htmlOutURI2)));
For a working sample that illustrates this usage pattern, see JAXPTransletMultipleTransformations.
Smart Transformer Switch
As part of the JAXP API, a "Smart Transformer Switch" enables automatic switching
between Xalan-Java Interpretive and XSLTC processors within your application. It uses Xalan-Java Interpretive
processor to create your Transformer
objects, and uses XSLTC to create your
Templates
objects.
To use the switch, you set the JAXP system property,
javax.xml.transform.TransformerFactory
, to
org.apache.xalan.xsltc.trax.SmartTransformerFactoryImpl
.
For one-time transformations or transformations that require extensions
supported by Xalan-Java Interpretive, and not XSLTC, you would use the
SmartTransformerFactoryImpl
to create Transformer
objects. For a repeated transformation where performance is critical, you would
create a Templates
object from which you would create your
Transformer
objects.
Calling XSLTC with the native API
The XSLTC native API is no longer supported. Instead, you should always use XSLTC with the JAXP Transform API.
Usage constraints
- The default for template inlining has been changed. Previously,
by default, inlining (putting all the templates into one big method) was on and
the
"-n"
option to the compile command line disabled inlining. With inlining on, XSLTC can generate methods that are too long (> 64K length) to run, or contain jump offsets that are too large for the JVM to handle. Now the default is not to inline templates. Instead, compilation creates separate methods for each template. Inlining was thought to improve performance, but with the hotspot technology within Java VMs, performance is better with inlining off. From the command line, you would use"-n"
to turn on inlining, or with JAXP set the "enable-inlining" attribute to the TransformerFactory. For example,TransformerFactory tfac = new TransformerFactory(); tfac.setAttribute("enable-inlining", Boolean.TRUE);
- XSLTC tries to determine the order in which global variables are initialized
by tracking the dependencies between them. In some cases, the value of a variable
may depend on a template, e.g., if
xsl:call-template
is used to initialized a variable whose type is RTF. If this happens, aNullPointerException
may be thrown at run-time when the translet attempts to access a variable that has not been properly initialized. In most cases, this problem can be avoided by reordering the variable declarations.
To check on the open bugs in the current Apache xalan-java repository, follow the instructions below:
- Go to http://issues.apache.org/jira.
- Select project XalanJ2.
- Select XSLTC from the Components list.


© 2019
| petasitis petasites | hat like | |||
| petasus | petas | noun/m | πετασοϛ a broad brimmed cap | |
| itis | it | noun/m | ites -ιταϛ ? substantive suffix for nouns: connection to a noun | |
| Senecio petasitis (Sims) DC. | ||||
| petiolaris petiolaris petiolare | with petioles (leaf stalks) | |||
| petiolus | petiol | noun/m | pes foot; claw | |
| olus substantive suffix for 1st & 2nd declention nouns: diminutive | ||||
| aris | ar | adj | alis adjective suffix for nouns: of or pertaining to | |
| Erysimum petiolare (Gray) Kuntze Aklema petiolaris (Sims) Millsp. | ||||
| petiolatus petiolata petiolatum | with petioles (leaf stalks) | |||
| petiolus | petiol | noun/m | pes foot; claw | |
| olus substantive suffix for 1st & 2nd declention nouns: diminutive | ||||
| atus | at | adj | adjectival suffix for nouns: possessive of or likeness of something (with, shaped, made)/ for verb participles: a completed action, -ed | |
| Alliaria petiolata (Bieb.) Cavara & Grande Eryngium petiolatum Hook. Penstemon petiolatus Brandeg. | ||||
| petraeus petraea petraeum | growing with rocks | |||
| petra | petr | noun/f | πετρα a rock, stone | |
| aeus | ae | adj | -αεοϛ adjective suffix for nouns: belonging to, from, of | |
| Arabis petraea (L.) Lam. Alyssum petraeum Ard. Cymopterus petraeus M.E. Jones | ||||
| petrophilus petrophila petrophilum | rock loving | |||
| petra | petr | noun/f | πετρα a rock, stone | |
| o | o | cnct | connective vowel in botanical Latin, usually for Greek words but in some cases, such as color tingeing, for Latin words | |
| philus | phil | adj | philos φιλοσ, ε, ον loved; loving, friendly, fond | |
| us Latinizing suffix | ||||
| Campanula petrophila Rupr. Brachythecium petrophilum Williams | ||||
| petrosus petrosa petrosum | growing in very rocky conditions | |||
| petra | petr | noun/f | πετρα a rock, stone | |
| osus | os | adj | adjective suffix for nouns: plenitude or notable development | |
| phaeacanthus phaeacantha phaeacanthum | gray thorns | |||
| phaeos | phae | adj | phaios φαιοϛ dusky, gray | |
| acantha | acanth | noun/f | ακανϑα thorn, thistle | |
| us | adj | Latinizing suffix | ||
| Opuntia phaeacantha Engelm. | ||||
| phaeus phaea phaeum | dusky | |||
| phaeos | phae | adj | phaios φαιοϛ dusky, gray | |
| us | adj | Latinizing suffix | ||
| Gyrophora phaea (Tuck.) Nyl. Geranium phaeum L. | ||||
| phalacrocarpus phalacrocarpa phalacrocarpum | hairless seed | |||
| phalacros | phalacr | adj | φαλακροϛ bald headed | |
| o | o | cnct | connective vowel in botanical Latin, usually for Greek words but in some cases, such as color tingeing, for Latin words | |
| carpos | carp | noun/m | καρποϛ fruit | |
| us | adj | Latinizing suffix | ||
| Viola phalacrocarpa Maxim. | ||||
| phalaenopsis phalaenopses | moth like | |||
| phalaena | phalaen | noun/f | phalaina φαλαινα a whale; a moth | |
| opsis | ops | noun/f | οψιϛ an appearance; a seeing | |
| philocremnus philocremna philocremnum | crag loving | |||
| philocremnos | philocremn | adj | φιλοκρημνοϛ loving steep rocks (of goats) | |
| us | adj | Latinizing suffix | ||
| phlebophyllus phlebophylla phlebophyllum | veined leaves | |||
| phleps | phleb | noun/f | φλεψ a vein; channel | |
| o | o | cnct | connective vowel in botanical Latin, usually for Greek words but in some cases, such as color tingeing, for Latin words | |
| phyllon | phyll | noun/n | φυλλον leaf; foliage | |
| us | adj | Latinizing suffix | ||
| Salix phlebophylla Anderss. | ||||
| phlogifolius phlogifolia phlogifolium | flame or phlox like leaf | |||
| phlox | phlog | noun/f | φλοξ a flame, blaze | |
| i | i | cnct | connective vowel used by botanical Latin | |
| folius | foli | adj | folium leaf | |
| Gentiana phlogifolia Schott & Kotschy Symphyotrichum phlogifolium (Muhl. ex Willd.) Nesom | ||||
| phoeniceus phoenicea phoeniceum | purple-red | |||
| phoeniceus | phoenice | adj | φοινικεοϛ purple-red after the dye that came from Phoenicia | |
| Pentapetes phoenicea L. Verbascum phoeniceum L. Callistemon phoeniceus Lindley | ||||
| phoenicolasius phoenicolasia phoenicolasium | purple hairs | |||
| phoenix | phoenic | adj | φοινιξ, ικοϛ purple, crimson | |
| o | o | cnct | connective vowel in botanical Latin, usually for Greek words but in some cases, such as color tingeing, for Latin words | |
| lasios | lasi | adj | λαιοϛ shaggy, wooly, hairy | |
| us | adj | Latinizing suffix | ||
| Rubus phoenicolasius Maxim. | ||||
| phryganodes phryganoda | like rods or straws | |||
| phryganon | phrygan | noun/n | φρυγανον a rod or straw; dried sticks | |
| odes | od | adj | oides -οειδεϛ adjective suffix for nouns: like, resemble | |
| Phippsia phryganodes (Trin.) A.& D. Love |


Abstract:
We examine data continuity between the Gravity Recovery and Climate
Experiment (GRACE) and GRACE Follow‐On (FO) missions over Greenland
and Antarctica using independent data from the mass budget method,
which calculates the difference between ice sheet surface mass balance
and ice discharge at the periphery. For both ice sheets, we find
consistent GRACE/GRACE‐FO time series across the data gap, at the
continental and regional scales, and the data gap is confidently
filled with mass budget method data. In Greenland, the GRACE‐FO data
reveal an exceptional summer loss of 600 Gt in 2019 following two
cold summers. In Antarctica, ongoing high mass losses in the Amundsen
Sea Embayment of West Antarctica, the Antarctic Peninsula, and Wilkes
Land in East Antarctica cumulate to 2130, 560, and 370 Gt,
respectively, since 2002. A cumulative mass gain of 980 Gt in Queen
Maud Land since 2009, however, led to a pause in the acceleration in
mass loss from Antarctica after 2016.


Group Project Team Dynamics
Observations As a Team Lead (and Member)
6/19/15
As team lead for our DBC final projects, I’ve been paying particular attention to how best to set up a good team dynamic to ensure the best work and most positive experience possible. Being aware of and hyper-senstive to potential issues down the road and addressing defense plans in advance has been extremely beneficial. This can start with establishing such seemingly basic things as the team mission statement, project description, and team values. Already we have revisited these statements multiple times as a way to re-calibrate during fast-paced workdays. Also, by agreeing to be flexible, these statements and guidelines exist without the threat of failing to meet them as individuals, but in a more pleasant way to provide a good standard of accountability for ourselves and often they serve as more of a tool of comfort than an assignment.


Decode amr file and play
Play
test-1.amr
Play
sample_6600.amr
Play
sample_8850.amr
Play
sample_12650.amr
Play
sample_14250.amr
Play
sample_15850.amr
Play
sample_19850.amr
Play
sample_23050.amr
Play
sample_23850.amr
Play
ff-16b-1c-8000hz.amr
Play
gs-16b-1c-8000hz.amr
Play
test.amr
Play
test-1.amr


I am a Data Scientist / Machine Learning Engineer, Pursuing PhD in Data Science from Indiana University. I also finished a semester abroad at the Norwegian University of Science and Technology in Norway during the spring of 2018. I am passionate about generating insights from data and is skilled in Machine learning and Deep learning Algorithms.
Software:Python(Pytorch, keras)
Working to build a model to classify content from various ecommerce sites to track and contain illegal wildlife commerce. Web-scraped, gathered data and preprocessed from 34 ecommerce sites. Building a binary classifier using a Recurrent neural network(RNN).
Software: PHP, Codeigniter(MVC Framework), SQL
AI(Agile Implementation): Built a Web Application with version control across various hierarchies of medical consultants to recommend changes to increase performance for the clients.
MIPS(Medical Incentive payment system): Built a web application for Regenstrief institute, Inc to calculate and analyze performance of clinicians and health care providers. Application trouble shooting Database (MySQL) backup and recovery operations. Designed an RDBMS for the application.
Software: MySQL workbench, XML-Oxygen, Python
Teaching Assistant: Class - Information representation (INFO-I308-Spring&Summer2017)- Teaching and grading assignments in Python and SQL. Troubleshooting and installing SQL servers to local databases for the class.
Research Assistant: Worked with Dr. Lynn Dombrowski to analyze and understand how farmers use technology. Responsibilities include recruiting farmers, interviewing, transcribing and analyzing. Maintain documentation and standards.
Software: R, Python, Tableau
Maintained databases analyzing inventory usage reports.Data preparation for model building and deployed statistical models in R.
GPA: 4.0
GPA: 4.0
GPA: A grade(4.0)
GPA: 3.6
This is a longer card with supporting text below as a natural lead-in to additional content. This content is a little bit longer.
This is a longer card with supporting text below as a natural lead-in to additional content. This content is a little bit longer.
This is a longer card with supporting text below as a natural lead-in to additional content. This content is a little bit longer.
This is a longer card with supporting text below as a natural lead-in to additional content. This content is a little bit longer.
This is a longer card with supporting text below as a natural lead-in to additional content. This content is a little bit longer.
This is a longer card with supporting text below as a natural lead-in to additional content. This content is a little bit longer.


{{define "view"}} {{template "breadcrumb" .}}
Browse through our code snapshot analysis
Projects Users


{% extends 'header.html' %} {% block body%} {#
We would like to greet you on our movie streaming site - Moviewatcher! Here you will be able to watch all movies and TV series online absolutely for free without signing up. Moviewatcher updates its database daily and you will be able to stream videos only in best HD quality: 720p or 1080p. You can also download the movies to your PC and watch them without a need to stream.
For those of us looking to discover something different, Films has over 2,000 movies, TV show episodes, eye-opening documentaries and exclusive original comedy shorts. There is something to watch for everyone!.
If you’re a kind of person who loves to watch TV shows and series on the go, then this article is for you. You may know about some of the online TV streaming services but who knows if they are the best or still you’re missing something which you must know. An Online TV Streaming website not just allows you to watch episodes of your favorite serials at your leisure, it also saves you from missing episodes. You can watch any of your favorite TV show sitting anywhere without having to pay a penny for that. The streaming is made easy with the introduction of some cool website where you get this service for free. You get the freedom to stream and watch your favorite TV programs on their schedule.


--- layout: post permalink: lightingcatalog.html Tags: Array NameOfCoupon: Lighting Catalog Cash Back Summary: See our Lighting Catalog Coupon Code, Lighting Catalog Rebate, Lighting Catalog Promo Code, Lighting Catalog Discount, Lighting Catalog Coupon Cash Back Rebate here. MetaKeywords: Lighting Catalog Coupon Code, Lighting Catalog Rebate, Lighting Catalog Promo Code, Lighting Catalog Cash Back Rebate, Lighting Catalog Discount, Lighting Catalog Coupon Image: images/18655.com/images/ LinkURL: http://www.shareasale.com/r.cfm?b=136718&u=412002&m=18655 affiliate_url_link: http://www.icouponblog.com/jane.php?id=1577 thesis_readmore: See the Lighting Catalog Coupon thesis_thumb: http://www.icouponblog.com/tn.php?merchantURL=lightingcatalog.com Title: Save 5% - Lighting Catalog Coupon Code for lightingcatalog.com. Lighting Catalog Rebate & Discount thesis_description: Our Lighting Catalog Discount Coupon Code for lightingcatalog.com. We have the best Lighting Catalog Rebate anywhere. thesis_keywords: Lighting Catalog, Lighting Catalog Coupon Code, Lighting Catalog Discount, Lighting Catalog Rebate product_name: Lighting Catalog hop_url: http://www.icouponblog.com/hop.php?id=1577 ---
If you are building a home or just bought one, brighten it, beautify it and make it practical, fun and relaxing. Get the best light fixtures for every room of the house. Visit www.lightingcatalog.com and check out beautiful, artistic, creative, chandeliers, lamps, wall lighting and so much more. Save money and time, shop for your home from your home online. Use our discount coupons to save money.
Buy from the online leader in home lighting and home fixtures. Brighten every room in your home with beautiful indoor and outdoor lighting, bathroom lights, kitchen lights. Let there be light everywhere. Check it out online for the most beautiful, stunning lights and fixtures; buy online from the best place ever www.lightingcatalog.com. They carry only quality and quantity at low prices.
Get the best lighting system for indoors and outdoors. Visit www.lightingcatalog.com and start shopping. You can also get beautiful ceiling fans which is a great treat in the summer. Shop at www.lightingcatalog.com. Use their great website to find the perfect light fixture for you. You can shop by category, price and items. Shopping was never this easy nor so much fun. Get lamps, chandeliers, light fixtures and lots more. Brighten your home with the best products from www.lightingcatalog.com.


After doing a bit of research, there are several concerning factors that are affecting the tech world. One of the major issues that seems to come up repeatedly is the fact that the programming world is largely male dominated. This leads many people to believe that the tech world has a bit of a misogynistic attitude. While I feel that this issue has huge room for improvement, I am not here to talk about that. The issue I would like to discuss is the efficacy of the applications and programs that are produced.
Consider all of the luxuries you use on a daily basis. What would you do if they stopped working? In some cases, your day would go on interrupted. In other scenarios, you would be deeply affected. I would guess that most people are dependent on one or more applications/products than they should be and that presents a problem. What if that program quits working?
If the failed application is something like Siri, no big deal. If the failed application is your bank security system, you might be in trouble. Other issues that are also greatly catastrophic include: flight technology failing mid-flight, your financial information being hacked from a website, major power outtages, servers overloading, and programs that simply don't do what they say they will.
While I don't have immediate solutions to solve these issues myself, measures have to be taken to mitigate possible risks. I am not an expert on these subjects but I will throw out a few solutions for the sake of argument:
These solutions were made with very little knowledge of the innerworkings of an application. Despite that, I'm sure these are considerations that any Software Developer should pay attention to. Whether you are making the next Siri or you are planning to work for Nasa one day, it is important to consider how you will prevent your application from failing.


Luis Enrique returns: Spain's Moreno newbies who can star at Euro 2020
by OmnisportLuis Enrique has returned as Spain head coach, replacing Robert Moreno at the helm heading into Euro 2020.
The former Barcelona coach stepped away from his role earlier this year as his young daughter Xana battled bone cancer. She died in August.
Former assistant Moreno took on the job in his place, but Luis Enrique is now back in charge, taking over a Spain team arguably in better shape than the one he left.
Qualification for Euro 2020 is clinched, while Moreno brought in a number of new faces - including members of Spain's successful European Under-21 Championship side.
Luis Enrique would do well to note the progress under Moreno, and we have picked out five breakthrough stars who can have a role to play at next year's finals and beyond.
FABIAN RUIZ
Arguably the outstanding player of that European Under-21 Championship team, Napoli midfielder Fabian had already caught Luis Enrique's attention and was called up in March. It was under Moreno that he established himself, though, making six appearances since his June debut. Fabian idolised Xavi as a child and he looks capable of running the midfield at the Euros.
PABLO SARABIA
Slightly older than some of the new faces at 27, Sarabia was made to wait until after his big move to Paris Saint-Germain in July for a first call-up. It will not be easy to hold down a place at PSG and nor has a fledgling international career been straightforward, but injuries saw Sarabia, an exciting, effective creator, recalled this month and he scored against Malta.
DANI OLMO
Winger Olmo left Barcelona's academy for Dinamo Zagreb in 2014 but, still just 21, looks all the better for the first-team opportunities. He starred for the Under-21s and then scored three minutes into his senior debut. Olmo is already fielding questions on a potential return to Barca and, whether now or in the future, looks set to be a Spain regular.
MIKEL OYARZABAL
Although 22-year-old Oyarzabal had featured once for Spain before Moreno took charge, he never featured under Luis Enrique - earning his sole cap for Vicente del Bosque ahead of Euro 2016, for which he did not make the squad. After a couple of seasons scoring regularly in LaLiga, however, Oyarzabal is back in the mix and opened his international account against Sweden in June.
GERARD MORENO
Sarabia may have been made to wait for senior recognition, but Gerard - also 27 - is a true late bloomer. Uncapped at youth level, the Villarreal striker debuted in October and scored three times across the November international break. Gerard has netted eight goals in LaLiga already this season and will hope to retain his form with the Euros approaching fast.


I am prescribed to 900 mg of Neurontin daily for a chronic pain disorder. I had been taking it regularly over the summer, and had gotten so used to it I didn’t feel anything when I took it anymore. However, when school started up again, I became busy and stopped taking it for several weeks. The other day, though, my pain levels were really bad, so I decided to take a couple pills, 300 mg each. A few minutes later, I took another one about an hour before my Sculpture class.
I didn’t feel anything until I got to the class, and then the effects slowly started creeping in. I felt extremely relaxed and at ease at first, but soon things became more intense. Although my body was relaxed and slowed down, my mind was very alert and active. My class was sitting in a circle in the studio, just talking about everyday things. It was a very pleasant atmosphere to be in. Strong euphoric feelings repeatedly swept over me, and I felt as though everything was right and good. I am not a naturally optimistic person, but I was as optimistic as ever then. I looked at the hardwood floor, and it began to sway slightly and looked like thick mud.
After a while, we all got up to go and see what our next assignment would be. By now the effects were so strong I felt a slight fear that I may have taken too much at once, but the thought was swept away almost immediately by my impenetrable optimism. As soon as I stood, I felt pleasantly dizzy and awkward—almost tipsy, but better. The floor felt very spongy to me, and I bounced on it a bit. I probably looked pretty weird to my classmates, bouncing on a hardwood floor, but it was just so much fun!
I also tended to play with my hair a lot the whole time, because it felt really good on my scalp. In fact, any contact with my body felt very good, on top of the wonderful relaxed feeling I already had. My professor was explaining that we would be doing iron casting as our next project—an extremely difficult and tedious process. As the rest of the class groaned, I became very excited about it! He handed us each a ball of plasticine (a clay-like material used for the first mold of the iron figure) to play with and get the feel of it. I had a wonderful time working with it, and molding a face. One very nice effect that I was not expecting was that my urge to create increased tenfold while on Neurontin. I felt like I was wasting time if I was not sketching or molding the plasticine. I also became much more talkative and interactive in my class that day.
I recalled the lyrics to Lucy in the Sky with Diamonds: “Plasticine porters with looking-glass ties”. It made me laugh out loud, and I was even more excited about making something out of the odd, clay-like material. The class that I normally don’t feel adequate in (I am far better at 2D art) was suddenly a blast, I had so much fun. I can definitely see why people might become attached to this drug. It’s great for me, because I have a prescription and can take it whenever I want, but I keep it to a minimum. In fact, taking it in class has been the only time I’ve taken all three pills at once. The best part of the experience was riding my bike home after class. It felt like I was flying, almost. I normally avoid riding on the grass, as it’s bumpy, but it was so much fun! The effects lasted quite a while. I took the pills around 5 pm and the last effects wore off sometime around 1 or 2 am. It’s hard to tell, because the come down is so smooth.
I’ve given some pills to a few of my friends, and some of them have the same experience I do, while others don’t feel anything at all, which I find very interesting. All in all, Neurontin delivers an amazing experience not quite like any other drug I’ve done. Definitely a favorite.
Experience Reports are the writings and opinions of the individual authors who submit them.
Some of the activities described are dangerous and/or illegal and none are recommended by Erowid.


geopm_pio_sst(7) – Signals and controls for Intel Speed Select Technology
Description
The SSTIOGroup implements the geopm::IOGroup(3) interface to provide hardware signals and controls for key Intel Speed Select Technology features on supported Intel platforms with Linux Kernel versions >=5.3
SST-CP: Core Power
SST Core Power feature enables the user to specify priority of cores for power distribution in a power-constrained scenario. Cores are assigned to different Class Level of Service (CLOS). Each CLOS has a defined min/max frequency and weight, which determines how the frequency is allocated.
SST-TF: Turbo Frequency
SST Turbo Frequency feature enables the user to dynamically set different turbo ratio limits for different cores. Cores are specified as high-priority or low-priority via the SST-CP feature. Cores in CLOS 0 or 1 are high priority and can reach higher than the all-core turbo ratio limit when there is sufficient power headroom. Cores in CLOS 2 or 3 are constrained below the all-core turbo ratio limit. This feature only works when SST-CP is enabled.
Signals
System Info
SST::CONFIG_LEVEL
Returns the system’s configuration level (SST-PP feature)
Aggregation: expect_same
Domain: package
Format: double
Unit: n/a
SST::COREPRIORITY_SUPPORT
Returns 1 if SST-CP feature is supported, 0 if unsupported.
Aggregation: sum
Domain: package
Format: double
Unit: n/a
SST::HIGHPRIORITY_NCORES:n
Returns the count of high priority turbo frequency cores in bucket n. Buckets 0 - 7 are supported. Buckets are defined by the number of high priority cores (cores in CLOS 0 or 1), and they determine the frequencies that are obtainable by those cores. Generally, if there are fewer high priority cores, the increase in turbo frequency limit is greater.
Aggregation: expect_same
Domain: package
Format: double
Unit: n/a
SST::HIGHPRIORITY_FREQUENCY_SSE:n
Returns the high priority turbo frequency for bucket n at the SSE license level.
Aggregation: expect_same
Domain: package
Format: double
Unit: n/a
SST::HIGHPRIORITY_FREQUENCY_AVX2:n
Returns the high priority turbo frequency for bucket n at the AVX2 license level.
Aggregation: expect_same
Domain: package
Format: double
Unit: n/a
SST::HIGHPRIORITY_FREQUENCY_AVX512:n
Returns the high priority turbo frequency for bucket n at the AVX512 license level.
Aggregation: expect_same
Domain: package
Format: double
Unit: n/a
SST::LOWPRIORITY_FREQUENCY:[SSE|AVX2|AVX512]
Returns the low-priority turbo frequency of the specified license level. Note these frequencies do not change based on the number of high priority cores.
Aggregation: expect_same
Domain: package
Format: double
Unit: n/a
SST::TURBOFREQ_SUPPORT
Returns 1 if SST-TF feature is supported, 0 if unsupported.
Aggregation: sum
Domain: package
Format: double
Unit: n/a
Configuration
SST::TURBO_ENABLE
Returns 1 if SST-TF feature is enabled, 0 if disabled.
Aggregation: sum
Domain: package
Format: double
Unit: n/a
SST::COREPRIORITY_ENABLE
Returns 1 if SST-CP feature is enabled, 0 if disabled.
Aggregation: expect_same
Domain: package
Format: double
Unit: n/a
SST::COREPRIORITY:ASSOCIATION
Returns the CPU’s assigned CLOS.
Aggregation: expect_same
Domain: core
Format: double
Unit: n/a
SST::COREPRIORITY:n:PRIORITY
Returns proportional priority for CLOS n. A lower value indicates a higher importance. Priority ranges from 0-1 and is used to distribute power amongst cores.
Aggregation: expect_same
Domain: package
Format: double
Unit: n/a
SST::COREPRIORITY:n:FREQUENCY_MIN
Returns the minimum frequency of CLOS n. Given sufficient power headroom, all cores will receive this minimum frequency before any remaining power is distributed.
Aggregation: expect_same
Domain: package
Format: double
Unit: n/a
SST::COREPRIORITY:n:FREQUENCY_MAX
Returns the maximum frequency of CLOS n. Power will not be distributed to cores beyond this maximum frequency.
Aggregation: expect_same
Domain: package
Format: double
Unit: n/a
Controls
SST::TURBO_ENABLE
Enable SST-TF feature. Enabling SST-TF also causes SST-CP to be enabled.
Aggregation: sum
Domain: package
Format: double
Unit: n/a
SST::COREPRIORITY_ENABLE
Enable SST-CP feature. Disabling SST-CP also causes SST-TF to be disabled.
Aggregation: sum
Domain: package
Format: double
Unit: n/a
SST::COREPRIORITY:ASSOCIATION
Assign a core to a CLOS.
Aggregation: expect_same
Domain: core
Format: double
Unit: n/a
SST::COREPRIORITY:n:PRIORITY
Set proportional priority for CLOS n. A lower value indicates a higher importance. Weight ranges from 0-1 and is used to distribute power amongst cores.
Aggregation: expect_same
Domain: package
Format: double
Unit: n/a
SST::COREPRIORITY:n:FREQUENCY_MIN
Set the minimum frequency of CLOS n. Given sufficient power headroom, all cores will receive this minimum frequency before any remaining power is distributed.
Aggregation: expect_same
Domain: package
Format: double
Unit: n/a
SST::COREPRIORITY:n:FREQUENCY_MAX
Set the maximum frequency of CLOS n. Power will not be distributed to cores beyond this maximum frequency.
Aggregation: expect_same
Domain: package
Format: double
Unit: n/a
Example
The following example uses geopmread and geopmwrite command-line tools. These steps can also be followed within an agent.
Enabling SST-TF
Enable SST-CP:
geopmwrite SST::COREPRIORITY_ENABLE:ENABLE board 0 1
Enable SST-TF:
geopmwrite SST::TURBO_ENABLE:ENABLE board 0 1
Ensure that the turbo ratio limit MSR has been overwritten to allow higher all-core turbo frequencies.
geopmwrite MSR::TURBO_RATIO_LIMIT:MAX_RATIO_LIMIT_0 board 0 255e8
geopmwrite MSR::TURBO_RATIO_LIMIT:MAX_RATIO_LIMIT_1 board 0 255e8
…
geopmwrite MSR::TURBO_RATIO_LIMIT:MAX_RATIO_LIMIT_7 board 0 255e8
Configuring CLOS
Set the weight 0-1. Lower weight indicates higher priority. CLOS priority decreases as the CLOS number increases and weights should indicate that to achieve decent behavior.
geopmwrite SST::COREPRIORITY:0:PRIORITY board 0 0
geopmwrite SST::COREPRIORITY:1:PRIORITY board 0 0.34
geopmwrite SST::COREPRIORITY:2:PRIORITY board 0 0.67
geopmwrite SST::COREPRIORITY:3:PRIORITY board 0 1
Set the min and max frequencies per CLOS.
geopmwrite SST::COREPRIORITY:0:MIN_FREQUENCY board 0 1.5e9
geopmwrite SST::COREPRIORITY:0:MAX_FREQUENCY board 0 3.6e9
Setting Core Priorities
To assign core 3 to CLOS 1:
geopmwrite SST::COREPRIORITY:ASSOCIATION core 3 1
See Also
geopm(7), geopm::IOGroup(3), geopmwrite(1), geopmread(1), geopm::Agg(3)


Had a BTC/KMD swap, where due to long BTC blocktimes, swap was showing "timeout" after roughly 3 hours just like with other coins, but it eventually went trough shortly after that and changed to successful.
I've been told BTC has 10x locktime than other coins, so this could be a UI discrepancy or false data from mm2? It should not show "timeout" if it's not actually timed out for good.


I just saw that v3 has come out
does this make is any easier to read water meters that have a read switch and the bounce that comes with it compared to an optical read that gives a low/high output with nice sharp signal ??
last time i used openenergy i had trouble with the meters dial slowly went out of sync with what i could count on the read switch....
is there any interest in water meter monitoring ?
as said i have a meter... very much interested in doing monitor on it... but if course i have to be able to count on the data i collect....
an idea right out of my mind could be some kind of calibration routine, ie a special sketch that you load and you tell it how many pulses each liter, then you open the tap and messure say excat 10 liters... and the emon board should now check if what you have told fits and maybe give you numbers for a software debounce routine so the "normal" sketch only counts the relly on state and the relly off state and not the noise that happens when the reed switch makes contact and when it breaks contact
on the emon cms side i also missed an easy way to see these things: flow rate, total usage, usage between readings, dayli usage....
one more thought that just came to mind, fine tune calibration.... you could do that by connecting a laptop to ftdi connector and hit enter to get a form of CLI... then enter what the dial says.... the sketch should then calc the difference and adjust with that... so quickly it should stay in sync....
does it make any sense?
Re: water meter... yeah again i know
I have not attempted this yet but have an interest in using my emonTX v2 to measure my gas and water meter. I have not verified if they have magnets in them yet but hope to do that this week. My thoughts on switch bounce was to have it look for a set time period of unchanging state before it declares the switch as having flipped. So, it reads the digital input, and then starts timing and waits for the value to not change for a set period of time. If it sees the same input value for 0.5 second or more, it concludes the switch has flipped and records it. I figured the switch bounce has to occur on a much smaller time scale than the meter wheel turning so setting that time period will not be an issue.
I am using a interrupt driven electrical power measuring routine to measure power (EmonLibPro), so my main loop simply repeats until the appropriate calculation / output interval. Adding a routine to check the input with a timer and flip a logical state seemed to me to be a low calculation overhead routine that might work. I am open to comments from more experienced folks if that assumption is incorrect.
Dan
Re: water meter... yeah again i know
I think you are on to something.... my meter says one pulse pr liter and even at full blast it takes about 7 sec's to get the one liter.... of course the more taps that are open the fast the wheel would spin... having 5 taps i guess that period could become very small, but who opens 5 taps at full blast at same time...
its rare i have kitchen tap open full at same time as dishwasher takes in water while clothes washer do the same.... and that was only 3 of them... now it would be less rare that the bathroom sink is open at full while someone takes a shower and the toilet is flushed.... :-D so in fact it was 6 taps... so its 1 sec or so if in theory all taps are open at full at same time....
last time i did monitor my usage i had most figures down.... flowrate even thou it was a pain to get right
usage between readings was also nasty to figure out....
with my best math everything was right, but then i discovered that over time the number on the meter and the one messuered started to drift more and more apart...
thou if i filled a bucket with 10 liters it would still messure so...
and as there was not an easy way for me to get that right it made no sense to continue...
not that openenegy is bad... far from... the idea is right... but it just seems to much focused on electricity alone
i wish that emoncms had calc routines for water build in... ie quick way to calc useage numbers... and routines to get the meter to stay in sync... i gues some stuff cant be calced at the backend but has to me figured on the board... stuff like flowate changes so fast it has to be done at board level...
again... openenergy is a good site.... i just wish it would add easy handling for water etc etc
Re: water meter... yeah again i know
@Boelle, did you have some luck to get a daily water use (or total) on the emoncms /server side?
I have read some older post from your water meter and I got the same problem.
My optical sensor gets the pulses and count them for 60 seconds and than it sends the total of pulses to emoncms. But How do I get a total of this at a daily rate? I tried with the power_to_kwhd but no luck.. I get this kind of graphics in emoncms now:
Do
So did somebody get this working yet?
Re: water meter... yeah again i know
Hi,
Take your pulse input and add an accumulator process, then you want to add "kWh to kWhd" after that. In other words, you'll have three feeds from the one input: instantaneous pulse count, total pulses (accumulator) and daily pulses (kWh to kWhd).
You can then visualise daily pulses feed using a bar chart.
This takes advantage of what "kWh to kWhd" really does, which is "incrementing counter to daily increments" - it doesn't matter if your count is of kWh or anything else :)
Re: water meter... yeah again i know
Tnx Dave,
It works like a charm :)
For reference to other users: a print screen from the input processors:
Re: water meter... yeah again i know
I added an oblique reference to this under the kWh to kWhd entry in the emonCMS documentation recently, but I can understand why nobody would read that just in case it did water monitoring. I think it might be possible to justify renaming processes to be less electricity specific at some future point.
Re: water meter... yeah again i know
Perhaps you could consider looking at the reed switch bounce in a different way - rather than trying to program it out, put in a simple circuit to fix it?
Its a very common problem in digital electronics, and can normally be reduced using a capacitor and a small circuit, look here for ideas.
http://www.labbookpages.co.uk/electronics/debounce.html
http://www.eng.utah.edu/~cs5780/debouncing.pdf
Re: water meter... yeah again i know
hmm...
been away for some time but might get back to monitoring...
the hardware way seems ok, will look again at the first link, just have to figure values so i dont filter out real event.
if i remember correct it took me 7 sec's to fill 1 liter at full blast from one tab, and dont think the pressure is high enough to half that if i open more
Re: water meter... yeah again i know
You shouldn't need to worry about a hardware debounce - just get the sketch to ignore interrupts within a certain time period of the first one.
If you think about what a debounce is, hardware or firmware it results in the same outcome - contacts above a certain frequency are ignored. You may as well avoid the hardware side altogether and set your maximum frequency in firmware where it's easy to adjust.
If one tap provides a pulse every 7 seconds, then I'm guessing you could probably set a maximum frequency of 1Hz (get the sketch to ignore interrupts that happen < 1000ms from the time of the last interrupt), allowing you to run seven taps full blast...
Re: water meter... yeah again i know
So slowly building my sketch now..
based it of the low power temp sketch even thou it will be powered by 5V... just wanting to keep it efficient.
Also planning to have it in sleep unless i actually use water... as for the debounce i got a few examples to go from
BUT: how do i make sure i dont loose data during a power outage? i mean i can easy count up the pulses etc and lucky me 1 pulse = 1 liter..
but should i really count one pulse then transmit and reset to 0 and then back to sleep and then just add them in emoncms?
and how do i calc the flow rate ? ie liters pr min or sec can that be done reliable in emoncms too?
Re: water meter... yeah again i know
https://github.com/openenergymonitor/emonTxFirmware/blob/master/emonTxV2...
suggests that the counted pulses are reset at each transmit right?
and flow are calculated at each pulse or interrupt... only downside would be that emoncms thinks the flow is high between transmits? or do i get it wrong?
Re: water meter... yeah again i know
tried to hack together a sketch, let me know if its total bonkers
#define RF_freq RF12_433MHZ // Frequency of RF12B module can be RF12_433MHZ, RF12_868MHZ or RF12_915MHZ. You should use the one matching the module you have.
const int nodeID = 18; // emonTx temperature RFM12B node ID - should be unique on network
const int networkGroup = 210; // emonTx RFM12B wireless network group - needs to be same as emonBase and emonGLCD
#define RF69_COMPAT 0 // set to 1 to use RFM69CW
#include <JeeLib.h> // make sure V12 (latest) is used if using RFM69CW
#include <avr/sleep.h>
ISR(WDT_vect) { Sleepy::watchdogEvent(); } // Attached JeeLib sleep function to Atmega328 watchdog -enables MCU to be put into sleep mode inbetween readings to reduce power consumption
typedef struct {
int flow;
int pulse;
int battery;
} Payload;
Payload emontx;
const int LEDpin = 9; //LED connected to Pin 9. Used to flash when transmitting
// Pulse counting settings
long pulseCount = 0; // Number of pulses.
unsigned long pulseTime,lastTime; // Used to measure flowrate.
double flow, elapsedl; // flow and liter
int ppl = 1; // pulses pr. liter.
long debouncing_time = 1000; //Debouncing Time in Milliseconds
volatile unsigned long last_micros;
void setup() {
Serial.begin(9600);
Serial.println("OpenTRV Pulse counting Example");
Serial.println("opentrv.org.uk");
Serial.print("Node: ");
Serial.print(nodeID);
Serial.print(" Freq: ");
if (RF_freq == RF12_433MHZ) Serial.print("433Mhz");
if (RF_freq == RF12_868MHZ) Serial.print("868Mhz");
if (RF_freq == RF12_915MHZ) Serial.print("915Mhz");
Serial.print(" Network: ");
Serial.println(networkGroup);
rf12_initialize(nodeID, RF_freq, networkGroup); // initialize RFM12B
rf12_control(0xC040); // set low-battery level to 2.2V i.s.o. 3.1V
delay(10);
rf12_sleep(RF12_SLEEP);
pinMode(LEDpin, OUTPUT); // Setup indicator LED
digitalWrite(LEDpin, LOW);
attachInterrupt(1, debounceInterrupt, RISING); // interrupt attached to pin3
}
void loop()
{
emontx.pulse=pulseCount; pulseCount=0;
emontx.battery=readVcc();
rf12_sleep(RF12_WAKEUP);
// if ready to send + exit loop if it gets stuck as it seems too
int i = 0; while (!rf12_canSend() && i<10) {rf12_recvDone(); i++;}
rf12_sendStart(0, &emontx, sizeof emontx);
// set the sync mode to 2 if the fuses are still the Arduino default
// mode 3 (full powerdown) can only be used with 258 CK startup fuses
rf12_sendWait(2);
rf12_sleep(RF12_SLEEP);
digitalWrite(LEDpin, HIGH); delay(2); digitalWrite(LEDpin, LOW); // flash LED
Sleepy::loseSomeTime;
}
long readVcc() {
long result;
ADMUX = _BV(REFS0) | _BV(MUX3) | _BV(MUX2) | _BV(MUX1);
delay(2);
ADCSRA |= _BV(ADSC);
while (bit_is_set(ADCSRA,ADSC));
result = ADCL;
result |= ADCH<<8;
result = 1126400L / result;
return result;
}
void debounceInterrupt() {
if((long)(micros() - last_micros) >= debouncing_time * 1000) {
onPulse();
last_micros = micros();
}
}
void onPulse()
{
lastTime = pulseTime; //used to measure time between pulses.
pulseTime = micros();
pulseCount++; //pulseCounter
emontx.flow = int((3600000000.0 / (pulseTime - lastTime))/ppl); //Calculate flowrate in Liters pr. hour
}
Re: water meter... yeah again i know
Bo, the generally perceived wisdom is you can't debounce a mechanical switch with interrupts. You need a history of what has gone before and when, and ideally after too, and that is not available in enough detail. I threw together a sketch for a gas meter, which Eric Amann says is working perfectly, and you're welcome to try that. But it works by polling, not interrupts (the interrupts are just the timebase) so it's not practical for a battery-powered rig.
Somewhere, probably under gas monitoring, there's a long discussion about the best strategy for lost and interrupted power/data. Basically, it's hard to win under every set of conditions. If you keep an 'all-time' total at source and send that at intervals, then at emonCMS you need to make assumptions to cater for resetting and roll-over, and differentiate to get rates, which will be wrong if data is lost in transmission, though the accumulated total will be correct. If you send rates in some guise or other, then emonCMS needs to make assumptions about the rate when data is lost, and the accumulated total will be wrong (and most probably the rate as well). You can try to store the accumulated count at source in EEPROM, but that has a limited number of writes, so cannot be done every few seconds (but from memory, daily is reasonable).
Re: water meter... yeah again i know
oki, will do a hunt for the sketch....i just figured interrupts was ok to use if yd did it carefull enough...
the idea of my sketch was to count the pulse on interrupt and ignore any pulses within the next second... my meter takes 2 sec's before it has taken a full turn with all taps open, 7 sec's if only one tap open.
also i would move the transmission stuff down in the interrupt routine so it would only transmit if something happens and hence have it in sleep most of the time
Re: water meter... yeah again i know
your sketch is the one posted at Fri, 25/04/2014 - 22:17
??
Re: water meter... yeah again i know
hmm.. looking a bit at emontx v2 vs v3...
is it to push it to have the v3 monitor 3 phases of electricity and a water meter at same time given that 3 phases will require 2 extra ac inputs.
if that is doable what is left of IO ?
Re: water meter... yeah again i know
looking at it... there is DIG 8 and 10 as pads... those i could use to read my heat meter, its an kamstrup multical 601 and has a 2 way Ir port on the front, it will not put out data unless requested so need both ways
there is one AC input so only need 2 more and could use DIG19 / ADC5 for one of them as i dont plan to messure temp
i dont see any other free ADC pins so are the only way to desolder the components at CT4 and use that one...
of course it all assumes that i hardwire this in .... using DIG2 to count pulses...
does it sound total bonkers? have i counted things wrong?
Re: water meter... yeah again i know
The sketch is on Github - emonTx V3 - Examples.
There's very little done in the ISR, so I don't see why it should add an appreciable load. I used the V3 and DIO2 for testing as it has the pull-down fitted, and most people are migrating towards the V3. You could use any convenient input.
I understand what you mean about sleeping but as I wrote above, you need to know what has happened before and after the real transition in order to determine that it really was a genuine transition that you are interested in. If you wake up on an interrupt, you can make a good guess at the state before the edge you triggered on, but how do you know the state that it will eventually settle to? - You might have seen a single isolated fast spike. You cannot know for certain.
I could not get the interrupt - triggered principle to work reliably, whereas the polled version appears to be totally reliable (I did say "appears"). You might be able to do better, but I was deliberately using a push-button switch that, using Trystan's original sketch, gave a count of anything between 10 and 40 pulses per transition.
Re: water meter... yeah again i know
Oki
but i want to monitor both my heat meter and water meter plus 3 phases on the electricity side
for that i would need 2 digital pins for the heat meter (IR tx and rx)
water meter is one digital input for pulse counting.
electricity is 3 ct's and 3 ac's
would that be possible using DIG 8 and 10 for the IR coms, DIG 2 to count pulses,
i then need 2 extra AC inputs and ADC5 / DIG19 could be used as i dont plan to messure temp. and CT4 with its components desoldered could be the other AC input
but again do i look at it the wrong way or can i do the hardware side in this way?
Re: water meter... yeah again i know
If you're using a V3, I think you'll need to do a bit more unsoldering because of the pull-up resistor from A5 to D5 - see the circuit diagram on Solderpad. When that's done, you have A0 - A4 on plugs, A5 is on the terminal strip.
D2 and D5 are also on the terminal strip, D9 is adjacent and D10 is near the ISP header. D11 (MOSI), D12 (MISO) & D13 (SCK) are on the ISP header.
You might be able to use DIO 6 for both the LED and your heat meter TX, depending on how important the LED is to you and whether the heat meter ignores stuff it does not understand.
The neatest arrangement I think is D2 for the water meter, add a terminal in D9 and use that plus D5 for the heat meter. That leaves D6 for the LED and D10 spare.
Re: water meter... yeah again i know
yep i think the heat meter ignores if it does not understand... LED... hmm... not as important thou nice to have for debug... i even have a sketch somewhere for the heat meter, just need to dig it out...
so at least its possible to connect it all hardware vise.... is it hard to mod the libs to calc 3phase with 3 ct and 3 ac's ?
Re: water meter... yeah again i know
"is it hard to mod the libs to calc 3phase with 3 ct and 3 ac's" It shouldn't be if you know about OOP and C++ classes.
Re: water meter... yeah again i know
hehehe, then it is :-/
Re: water meter... yeah again i know
Depending on which sleep mode you guys use, Timers can also be used to wake you up. Perhaps you could have the switch IO pin ISR do nothing more than start a 100 msec eggtimer (or restart it if it's already running). When that eggtimer ISR finally fires, you know the dust has settled for 100 msecs and it can read the pin state now, and compare it to its previous value.
But you're still exposed to the cpu load risk associated with feeding an undebounced signal straight into an interrupt pin. If there's ringing on that signal, the CPU might end up doing nothing other than servicing that ISR. You might be able to solve that by having the IO pin ISR disable itself, and the eggtimer ISR re-enable it.
Re: water meter... yeah again i know
All you actually need to do, having created three instances of EnergyMonitor (one for each phase) is to set up each with a different voltage input pin (so instead of three or four instances having the same voltage pin, which is what happens when the 4 currents are all on the same phase, each has its own). You don't have to touch the library at all.
Re: water meter... yeah again i know
oki, will give it a go once i got the board
but its in emonlib i have to do the edits right? ie to edit the voltagepin for each instance
Re: water meter... yeah again i know
It's in your sketch that you instantiate EnergyMonitor and feed it the pin numbers.
Re: water meter... yeah again i know
now i'm lost
when i look in the example sketches they dont use pin numbers, so they must get them from emonlib?
will look again to make sure its me that was blind
EDIT:
So looking in https://github.com/openenergymonitor/emonTxFirmware/blob/master/emonTxV3/RFM12B/Examples/emonTxV3_RealPower_Voltage/emonTxV3_RealPower_Voltage.ino
i cant see anywhere that it tells what pin AC input is on... so it must be in emonlib right? there i see them... but just need to be sure where to do edits
Re: water meter... yeah again i know
It depends on how you initialise the class instance, in emonLib there are two ways. One way sets them by channel number - that's what you were looking at - voltageTX(...) and currentTX(...). But look at voltage(...) and current(...) and they accept pin numbers. The two pairs achieve the same thing, just by a different route.
It's much better to change your sketch than the library, because the Arduino IDE gets totally mixed up when searching for libraries - the rules it follows elude me.
Re: water meter... yeah again i know
hmm just saw a note on github:
Note: CT must be clipped round either the Live or Neutral wire, not both!
putting a CT arround the neutral would that not give me a total of the 3 phases?
Re: water meter... yeah again i know
What current flows in the neutral? (Look up Building Blocks if you're unsure.)
Re: water meter... yeah again i know
the blue or neutral or N.. i would be tempted to say the sum of the 3 phases...
looking in building blocks but have not found the end of the rainbow yet
Re: water meter... yeah again i know
i see stuff are not the same in the UK....
in DK we have all 3 phases in the house... so we have 3 main fuses, big ones... one for each phase, after that a earth leakage relay where each phase and the neutral is connected, it trips if there is a mismatch between in and out of more than 30mA... after than in my case 1 of the phases are used to supply 1 part of the flat and the next phase supply the other half. stove and clothes washer are connected to 3 phase over a seperate breaker for each wall outlet..
but its only the stove that is 3 phase, the washer is single phase...
i suspect my idea of one CT on the neutral is only good if every thing is single phase ?
Re: water meter... yeah again i know
looked at most of it but did not find a clue on if i could get away with one CT on the blue / neutral..
but i guess not ???
Re: water meter... yeah again i know
dooh... even if i could messure on the neutral then it would require that the 3 phases are not angled, but they are 120 degrees... so out with that idea...
Re: water meter... yeah again i know
You need to be thinking phasors. The neutral current is indeed the sum of the three currents in the three phases - the vector sum. So if the three phases are accurately balanced, the vector sum is zero - there is no neutral current and you can throw away the neutral conductor, because it's doing nothing. In reality of course, the phases are not balanced so the neutral carries only the (vector) difference current.
Have you noticed there's no neutral conductor on the grid transmission lines, where the load is always relatively well balanced? Some three-phase cables have what is called a "reduced neutral" - the area of the neutral conductor is reduced compared to the phase conductors because it should be carrying very little current. (It makes the cable cheaper!)
Re: water meter... yeah again i know
yeah a lot of knowledge have turned to vapour over the years... i did attend tech college to be a electrician but never found an apprenticeship so could not continue.... and the knowledge have just disapeared like air from a party baloon.
it was just a tempting thought to clip one CT on the neutral and then one AC adapter... but now i see a bit of light at the tunnel...
i just wonder how much accuracy difference there is between 1 AC adapter for 3 phases and 3 ac adapters - 1 for each phase
Re: water meter... yeah again i know
"i just wonder how much accuracy difference there is between 1 AC adapter for 3 phases and 3 ac adapters - 1 for each phase"
That depends completely on how stiff and how well balanced the supply is where you are, and the only way to know will be to measure it over a period of time. If the total load is always well balanced, then all three voltages will rise and fall together. If the supply is very stiff, all three voltages will scarcely move at all. Anything else and you have unbalanced voltages, to what degree is anyone's guess. You can get some idea by measuring the voltage dip when you connect a large load on one phase.
Re: water meter... yeah again i know
well we have a distribution transformer station across the street no more than 20 meters from my window, but i take that is no gurantee at all, just a pointer...
but lets assume that everything is nice and 100 equal balanced... how much will the difference be between 1 ac adapter and 3 ?
Re: water meter... yeah again i know
As I wrote above, it is anyone's guess. You need to measure and record the three voltages and see what the difference is at various times of the day and week (and maybe the year too!).
The phases should be within a few percent of each other, but that is not guaranteed.
Re: water meter... yeah again i know
So i got my heat meter on emoncms and electricity...
only thing left is the damm water meter that i know have a reed switch that has bounce noise like hell
what is the "standard" arround this nowadays? hardware debounce or software?
for hardware i had this small circuit in mind
Re: water meter... yeah again i know
Eric seemed pleased with my interrupt-driven polled software debounce - http://openenergymonitor.org/emon/node/5022#comment-21046
But a hardware debounce as well should not do any harm.
Re: water meter... yeah again i know
oki, i just have the 100nf's and resistors, and would avoid to change the normal pulse sketch
Re: water meter... yeah again i know
Got the 2nd node up and attached to the water meter
copied over the pulse example and changed ppwh to ppl and set it to 1, my meter gives one pulse for each liter
and then i transmit the number of pulses between each reading and i try to also transmit the flow rate in liters each hour
will this line do that or is my math wrong?:
emontx.power = int((3600000000.0 / (pulseTime - lastTime))/ppl);
sketch attached also
Re: water meter... yeah again i know
Your maths looks wrong. Say you have a flow rate of 1 l/s, that's 3600 l/h.
pulseTime - lastTIme = 1 s = 1000 (ms), and you said ppl = 1. You want the left hand side to be 3600, and that is not<PHONE_NUMBER>.0 / 1000. It looks as if you have too many 0's there.
Re: water meter... yeah again i know
:-/ me just blindly copied over the pulse example for electricity pulse counting...
So have removed 3 0's and will test later on the day....
Re: water meter... yeah again i know
btw... using timeseries engine only is there a easy way i can clear data without touching emoncms as such? can i just delete the data files?
Re: water meter... yeah again i know
So i have looked at my water usage and i'm really in doubt if its counting right...
http://energymonitor-dk.dns4e.net/emoncms/boelle/water
if you zoom in on today at arround 17:11:15 to 17:14:30 at the first graph, it says 1 at the hole time so that is 1 pulse for all readings... that sounds ok to me since that means no bounce or false triggers...
but then if you look at same time on the liter/h and liter/15 mins it said just shy of 30 liters when i got out from the shower...
30 liters for a shower does that sound right?
the 3 last graphs are bargraphs with 86400sec interval, 3600 interval and 900 sec interval... both with delta of 1... they are based on a accumulate feed of the first feed that simply just stores the pulses between readings...
one tap at full blast takes 7 sec to fill a 1 liter jar
are there much else i can do to test if it reads right? ex. take a 10 liter bucket and fill it as fast i can after the 15 min graph has said 0 for a few times... ie after 1 hour of no use?
Re: water meter... yeah again i know
You could try holding a bucket of known capacity under the shower and timing how long it takes to fill it, then you know the flow rate for the shower and by timing how long it takes you to have a shower, you can calculate the volume of water you use.
And you can of course read your meter at intervals (every 15 min, hourly, daily, weekly?) and check that you have the same number of pulses as the meter shows (you should see 1000 pulses per m3).
I only checked once, I used 40 l for a shower, so your 30 l is likely to be close.
Re: water meter... yeah again i know
yep
i did the math and each liters takes 7 sec... so my 3 min of shower time comes to about 25 liters...
i was just shocked that so much water can pass in that little time...
now when i'm 100% sure it work as it should is there an easy way to clear the data?
Re: water meter... yeah again i know
so no easy way to just clear the readings without touching the feeds or anythingelse?
also how do i create a feed that takes the difference between the readings? i want to use that to record usage on my heat meter between the readings
Re: water meter... yeah again i know
I don't know about clearing feeds - but I've seen posts about that recently. Try a search.
As for the difference, you have "-input" in the input processing, will that not do what you want? I.E:
In input 1
Log to feed [Input 1]
-input [2]
log to feed [difference]
Re: water meter... yeah again i know
it will do it... but as it is an ever increasing value would that not generate a negative new feed? but its close.. i can see that much
the reason why i have asked abut the clearing feed is that a search did not help me much... sure me that is stupid :-D
Re: water meter... yeah again i know
found this link... but no soloution to what i want...
http://openenergymonitor.org/emon/node/2931
at page 12 of search and nothing that looks remotely what i'm after
Re: water meter... yeah again i know
tried to remove the -input thing... not it has stopped logging everything and i cant remove edit that input....
the other i can edit but they are not updating anymore
Re: water meter... yeah again i know
did a reboot and now they are all listed as inactive...
Re: water meter... yeah again i know
had to delete the inputs to get it going... so yes one way is to delete and rebuild everything to clear data...
Re: water meter... yeah again i know
i updated my water meter sketch...
the meter is still 1 pulse each liter and have run fine for weeks now without a false count,
BUT
i never came arround to have it calce the flow rate and send it over.
i figured since i get one pulse for each liter it was just a matter of calculate the time difference between pulses and then divide than in to the number of ms that happens on an hour... i did a check on calculator and if i have a difference in 7000ms between each pulse that would get me about 500 liters an hour...
so i adjusted my sketch but changed from int to float since my numbers would now be 500.00 of course this would go up and down as how much open the tap is
i have attached the sketch
NOW
i adjusted emonhub.conf to:
(last part)
[[5]]
datacodes = h, h, f, f, f, f, f, f, f, f,
[[6]]
datacodes = f, f,
for some reason it will mark node 6 as inactive, but if i change it to
[[5]]
datacodes = h, h, f, f, f, f, f, f, f, f,
#[[6]]
#datacodes = f, f,
node 6 is active again, thou it reports 3 inputs and not 2 like it should
i have eyeballed the sketch and cant see any obvious errors... and i cant see any wrong in the conf either...
but i have made a booboo somewhere...can i get a clear pointer ?
Re: water meter... yeah again i know
maybe these 2 lines in the sketch could go away?
double power, elapsedWh; // power and energy
int ppl = 1; // Pulses per Liter - found or set on the meter.
Re: water meter... yeah again i know
of course emonhub.conf should be :
[[5]]
datacodes = h, h, f, f, f, f, f, f, f, f,
[[6]]
datacodes = f, h,
last one changed from f to h as it is an int...
Re: water meter... yeah again i know
that was much better... thou in emoncms i did get a number around 5 point something and not the 500 figured i calc'ed before i flashed the sketch
have i simply done my math in the sketch wrong?
emontx.power = float((3600000.0 / (pulseTime - lastTime))); //Calculate flow
it should be liters each hour...
Re: water meter... yeah again i know
did a test this morning, 1.22 was the highest i could get
Re: water meter... yeah again i know
What are the units of time? How many microseconds are there in an hour? ! ! !
Re: water meter... yeah again i know
there are 1000ms on a sec... thats 60000 ms each min... again there are 60 of those on a hour .... 3600000ms ?
Re: water meter... yeah again i know
there are 1000ms on a sec... thats 60000 ms each min... again there are 60 of those on a hour .... 3600000ms ?
All of this is true but not quite what Robert asked, note his clue !
Re: water meter... yeah again i know
had a sudden visit...
hmm... it's something with micro... just a wild guess here, but what i get is just how many times the time difference between each pulse fits inside an hour?
Re: water meter... yeah again i know
or am i mixing micro and mili here?
Re: water meter... yeah again i know
bugger....
the time difference is micro-second right? clue to me is micros
but i'm using mili-second also....
1 hour should be<PHONE_NUMBER> micro seconds right?
so if i'm right the formula should be
emontx.power = float((3600000000 / (pulseTime - lastTime))); //Calculate flow
or am i still wrong?
Re: water meter... yeah again i know
Bo, stop panicking, sit back and just read the code. Read the code that the processor is running, not the code that you're imagining that's in your head. You're using two time units, ms & µs, but for quite separate purposes. Just trace through and check which is used for what purpose.
[I'm not trying to be nasty, I'm giving you the benefit of personal experience!]
Re: water meter... yeah again i know
i know... not thinking bad thoughts here.... just trying to figure what i'm doing wrong :-)
but yes i just discovered the 2 time units issue above.... on one side of the division i used mili's and on the other micro's
i corrected that, but will double check my math in a bit
Re: water meter... yeah again i know
so this is how i understand the code that is triggered when a pulse comes in
it sets last time to pulsetime
and then pulse time is set to mirosec since start
and it will add 1 to pulsecount
it then uses pulsetime and last time to figure how many times the difference will fit inside one hour
the last bit can also be said like how many times will the difference fit inside an hour if the flow rate is constant..
so is my brains understanding of it in sync with what really happens?
Re: water meter... yeah again i know
That's about right. The 'flow rate' you get is the flow rate between the last pulse and this one.
The millisecond timer has nothing to do with the pulses and flow rate, all it does is trigger the transmission. So what is actually transmitted is the flow rate between the last pulse before transmission and the one before that one, and the number of pulses since the last transmission. You do not send (unless there has been only one pulse), the average flow rate between transmissions. If there have been no pulses,
you still send the last average flow rate,[wrong!] you send a zero and if there is more than 71.6 minutes between pulses, the micros( ) counter has overflowed more than once and the answer is wrong anyway.Re: water meter... yeah again i know
oki, then i'm closer now...
both pulse count and flowrate is reset between transmission so it will go to 0 pretty fast after i close the tab...
Re: water meter... yeah again i know
the first number when tab was at full blast was 5700
at 2nd reading it was 1219...
but it makes sense since you said i transmit the flow rate between the last pulse before transmission and the one before that one,
will have to poke my mind on how to get the current flow rate as long the tab is open
Re: water meter... yeah again i know
would the pulse as trigger to transmit be the solution or should i simply reduce the time between transmit?
Re: water meter... yeah again i know
I don't know the answer to this - I have not thought about it. But there are clearly some improvements that need to be made to the sketch that you are using so that you avoid sending misleading data.
For example, if I am correct, and you use water at 5700 l/h, then shut off the tap and do not use any more water for 8 hours, then although the number of pulses will be zero for 8 hours, the flow rate will show 45600 l used.[Wrong!]I think you should change small things like that. Remember you are also able to process the data in emonCMS, so there you can calculate the average flow rate over periods of time, for example. You know what information you want, I think you must make your sketch and emonCMS together give you that information.
Re: water meter... yeah again i know
hmm... the flow rate goes to 0 once i have closed the tab... so you are not quite correct... but the 5700 number is the first number i get when i open the tab... at next transmit it drops to 1219 and will stay at that as long the tab is at full blast. once i close the tab the flow number drops to 0 after a max of 2 transmits and it will stay there until i open again
what i know is that the 1219 number is not correct.. it should be half that... but i will double check that its still 1 liter in 7 sec
for used liters i use pulses counted only... one pulse is one liter... on emoncms i log both the pulses between transmit and i acc. them so i know how much used since start
Re: water meter... yeah again i know
bummer... i rechecked the flow rate.
its not 1 liter in 7 sec but 1.3 liters
EDIT: means the approx liters an hour should be 668,57
Re: water meter... yeah again i know
OK, I missed seeing that emontx.power is set to zero when the message is transmitted, so you are right - it will not report the wrong value when no pulses are being received.
Re: water meter... yeah again i know
Your 5700 number - how long is it since the last pulse when you get that number? Why I ask is the micros( ) counter will overflow after approx 71.6 minutes, so if it has has overflowed more than once (i.e. it has been longer than 71.6 minutes), that would explain a wrong number (but not if it is consistently 5700).
Re: water meter... yeah again i know
oh...
that can be anything... but its only the first time after i open the tab.... so i guess if i only close the tab for like 5 min then the first number reported when i open again will be more close to the correct value...
so a early in the morning and brain not in gear wild guess: could it work if i also reset micros() after each transmit ?
Re: water meter... yeah again i know
"could it work if i also reset micros() after each transmit ?" Then you would lose the time of the last pulse.
Re: water meter... yeah again i know
of course...
hmm, dont know how i can solve this one, might throw the towel in the ring and just monitor my usage
Re: water meter... yeah again i know
Why do you need micros( ) here? If your meter is ~ 1 pulse / l, what is the minimum time between pulses with every tap open? i.e, what is your maximum flow rate? Would millis( ) give you adequate accuracy? If your maximum flow is 10 l/s, a 1 ms error would give you a reading good to 1% (1 ms error in 100 ms) and it gets better at lower flow rates.
Millis( ) of course overflows 1000 times less frequently.
Re: water meter... yeah again i know
Why? i dont know... i'm simply just reusing a sketch without know much about programming in general
the meter is excatly 1 pulse / Liter... unless some idiot have stamped the wrong numbers on it.
the only way i could figure the minimum time was to repeat the "fill bowl in 7 sec" like last night. with shower hot and cold and tap in bath hot and cold and the same in kitchen i can still fill it with 1.3 liters in 7 sec.... so must have good pressure for a 1st floor flat.
1% sounds fine for flow rate indication...
10 liter a sec sounds high... i would say about 2 if everything is taking water (kitchen tap, dish washer, clothes washer, bath tap, shower, wc) given that the kitchen tap is taking 0.18 liter a sec no matter if one tap or 3 is open.
but as you say it can only get better...
if millis overflow will i not get the same issue as with micros? but not so fast as with micros...
Re: water meter... yeah again i know
I think you want to use millis( ) for both the transmit interval and pulse timing. Millis( ) will of course overflow and wrap around - but it's only going to worry you (i.e. you get two overflows without a pulse) if you go on holiday and don't use any water for at least 4¼ million seconds - just over 7 weeks. So unless you have a round-the-world cruise planned...
Re: water meter... yeah again i know
not in my plans anytime soon no... unless somebody is really jumping up and down and wants to pay me for it :-D
so my latest attached sketch should do it if i just use millis for both transmit and pulse timing?
Re: water meter... yeah again i know
that one is a hell long back... and i ight have changed it so here is a fresh copy before any changes
Re: water meter... yeah again i know
I think you might need an unsigned long for lastpoll, see here: http://playground.arduino.cc/Code/TimingRollover
Other than that, just replace micros( ) and don't forget to lose 3 zeros when calculating the "power". (You ought to rename that "flowRate".)
Re: water meter... yeah again i know
will do.... fingers crossed tomorrow :-)
Re: water meter... yeah again i know
girlfriend/partner did a showner and i got numbers arround 720 liters/ hour.... much better...
a normal shower eats about 35 liters and takes 3 mins... so pretty close now i must say
Re: water meter... yeah again i know
have been running little under a week and must say this runs ok now.... thanks a bunch
have some problems with one electricity feed that shows up negative... but will create another thread for that
Re: water meter... yeah again i know
Boelle (Bølle?), you seem like you've come far in your project -- I'm wanting to do the same stuff, but still just getting the building blocks together (should be good now, though).
Given we're both Danish, maybe I could lend some information from you - where did you connect on your electricity board, there's nowhere I have free access to the phases to clip on the CT (three of them I guess from reading the above). Maybe I need to call an electrician to make the wires accessible in a safe manner...
And did you purchase a separate water-meter to measure water usage? I was hoping to do the same, but didn't find anything in the cheap range... My current water meter - from the water company - is purely analog.
Thanks
Lasse
Re: water meter... yeah again i know
Hi there...
for the water meter i was lucky in talking the water company in to change mine out with one that has pulse output in the form of a read switch, you need to do some hardware debounce but not the biggest problem :-D
I done not use CT's but the flasher/blinker on the meter itself... for that i simply took off the fuse panel cover and routed a 3 core wire through the wall next to the mains wires that comes from the meter... i then placed a photo transistor in front of the flasher with some good double stick tape. it far more precise than CT's given that non of the Emontx's so far have true 3 phase support... they only have 1 AC input and it will always be a math fix to figure the 2 other AC's... so yes in the end i just opted to let me meter do all the math.
Where about in DK do you live? you are welcome to send me a PM also... but be warned that the forum does not send out an mail so it might be some time before i send an reply...


Installing Linux Mint
A guide to getting started with Linux.
Purpose: This guide attempts to explain how to install Linux Mint, one of the most popular and user-friendly flavors of Linux.
Software: The following software is used in this guide:
Nutshell
- We'll start with a brief introduction to Linux in general, and talk about why we recommend Mint.
- Next, we'll download and burn the installation disc, then install Linux Mint.
- Then we'll check for software updates.
- Finally, we recommend going through the Linux version of our encryption guides, and provide some helpful links.
Part I: What is Linux? Why use it?
Linux is an open source operating system (OS) that was developed as a free alternative to Unix. Linux was created by Linus Torvalds, re-using much software from the GNU (GNU's Not Unix) project which had similar goals. Linux is open source, which means that the actual code used to program the operating system can be viewed by anyone. This allows anyone (with enough programming skills) to check for security holes, add new features, and make the operating system more efficient and reliable. We recommend using Linux because it is free, open source, and often not much different than Windows or OS X.
Free and Free
Almost all versions of Linux are free (as in no cost). Most versions of Linux are also Free Software, meaning free as in "Free Speech" not free as in "Free Beer". Free Software means that copyrights or licensing must allow anyone to use the software for any purpose, change the software, and redistribute the original software or modified version. [More info]
Open Source
As a prerequisite to being Free Software, the code must be open source. Otherwise it would be difficult to study or change. Opting for open source software is like supporting transparency in government. In order to feel comfortable allowing the program to control aspects of your computer (or for the government to control aspects of your life), it is important to know what it's actually doing. Open source software allows anyone to look at the code for backdoors, vulnerabilities, inefficiencies, design problems, or even typographical errors. Closed source applications can only claim that they are following the rules or protecting your privacy, open source applications can prove it.
Easy to Use
Now that we have the more philosophical stuff out of the way, it's time for the good news: Linux is almost as easy to use as Windows or OS X. A decade ago, you had to be very computer savvy in order to even bother attempting to use Linux, but that has changed as Linux has grown in popularity. We picked Linux Mint because it supports full disk encryption out of the box, and has a lot of useful pre-installed software. Linux Mint is especially easy to use for Windows users, since programs are listed in a menu much like the Start Menu.
Part II: Installing Linux Mint
Download the .iso
- First, go to the Linux Mint download page.
- Select either the 32-bit or 64-bit download link next to Cinnamon.
If you aren't sure which one, start with the 64-bit version and try the 32-bit version if that does not work. Most new computers
will support the 64-bit version.
- On the next page, select a link from under the MIRROR column, or use the Torrent link near the top of the page.
Option 1: Install on a Virtual Machine
This option is better because it allows you to use your current OS and windowed or full-screen Linux Mint at the same time. Everything on your computer will work just like normal, but it will be a bit slower when both are running.
- Get a free, open source program like VirtualBox.
- Create a Virtual Machine and be sure to note these settings:
- Match the architecture to the version you downloaded (i.e., 32-bit or 64-bit).
- When selecting from available OS options, prefer Mint, then Ubuntu, and thirdly Debian.
- Choose medium performance settings to begin with, you can always adjust them later.
- Mount the .iso image and start the virtual machine.
NOTE: For more detailed instructions, check out VirtualBox's guides on
Installing VirtualBox and
Getting Started.
Option 2: Burn to DVD and Reboot Your Computer
- Once you have saved the .iso file to your computer, burn it to a DVD using a DVD-burning program or one of the methods described here.
- While the computer is still turned on, insert the DVD in to the drive.

- If you have an Apple computer, turn the computer on and hold the option key from the time you hear the sound to the point where you see an image of a hard drive and a CD on the screen. Use the arrow keys to select the CD and press enter.
- If you have a PC, turn the computer on and immediately start tapping the F12 key to get to the boot device menu. Select the CD/DVD drive using the arrow keys, and press enter. If this does not work for you, see this guide.
Install Linux Mint
- Your computer should start to the Linux Mint Live Desktop.  No files on your computer will be changed, so you can feel free to explore.
- When you are ready to install, double-click the Install Linux Mint icon on the Desktop.
- Select the language you want to use with Linux Mint, then click Continue.
- Ensure that your computer meets the requirements, then click Continue.
- For the purposes of this guide, we're going to use Erase disk and install Linux Mint option. If you're feeling adventurous, you can use the other option, but that is far beyond the scope of this guide.
- We highly recommend that you select Encrypt the new Linux Mint installation for security option. This will encrypt your entire hard drive, so the computer cannot be started without the passphrase.
- We also recommend that you select the Use LVM with the new Linux Mint installation option. This will be helpful if you ever decide to make new partitions on your hard drive.
- Choose a strong password that will be used every time you start your computer. Type it again to confirm it.
- We highly recommend that you select the Overwrite empty disk space. This will write random data over the empty parts of the hard drive, so it will be virtually impossible for an adversary to determine where your encrypted files end and the empty space begins. With this option selected, the installation will take much longer, but we are of the opinion that this is time well spent. Make some margaritas to help pass the time.
- Select a location. This is mostly used for your time zone, but you may want to choose a different location in the same time zone (or even another time zone) for privacy reasons.
- Select your keyboard layout (you probably don't need to change it). You can test the setting by typing in the text box provided. If the right characters are appearing, you have the right keyboard setting.
- Enter your name (or any name...) and a name for your computer, then choose a username to log in with, and a password for your user account. Please note that this password can and should be different than the password you selected to encrypt your whole computer in a previous step.
- We also recommend that you select the options Require my password to log in and Encrypt my home folder for added security.
- Sit back and relax while the installation completes. Take a sip of your margarita and click through the slides to learn more about the software and features included in Linux Mint.
- When you see the Installation Complete box, you're nearly done! Remove the DVD from the drive, and click Restart Now to boot up your new Linux Mint installation.
Part III: Start and Update Linux Mint
- If you selected the option to encrypt the whole computer, you'll be presented with this screen. Type the computer password and press the enter key to decrypt and boot your computer.
- After you have entered your password to decrypt the computer, you will reach the main login screen. Click on your username.
- Enter the password for your user account and press the enter key or click OK.
- Once the Linux Mint desktop has loaded, we'll want to update the software. Click on the shield icon near the clock in the bottom right of the screen. Enter your user account password to launch the Update Manager. Click on Refresh to update the list, then Install Updates to install the updates.
- Once again, sit back and relax while the updates are installed. This could take some time.
Part IV: Get Encrypting
Now that you have Linux Mint installed, jump right in to our encryption guides. The guides were written with Linux Mint specifically in mind, and often you will find you already have the programs and just need to configure and use them.