<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40"><head><meta http-equiv=Content-Type content="text/html; charset=utf-8"><meta name=Generator content="Microsoft Word 12 (filtered medium)"><style><!--
/* Font Definitions */
@font-face
{font-family:"Cambria Math";
panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
{font-family:Calibri;
panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
{font-family:Tahoma;
panose-1:2 11 6 4 3 5 4 4 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
{margin:0cm;
margin-bottom:.0001pt;
font-size:12.0pt;
font-family:"Times New Roman","serif";}
a:link, span.MsoHyperlink
{mso-style-priority:99;
color:blue;
text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
{mso-style-priority:99;
color:purple;
text-decoration:underline;}
p.MsoAcetate, li.MsoAcetate, div.MsoAcetate
{mso-style-priority:99;
mso-style-link:"Balloon Text Char";
margin:0cm;
margin-bottom:.0001pt;
font-size:8.0pt;
font-family:"Tahoma","sans-serif";}
span.EmailStyle17
{mso-style-type:personal-reply;
font-family:"Calibri","sans-serif";
color:#1F497D;}
span.BalloonTextChar
{mso-style-name:"Balloon Text Char";
mso-style-priority:99;
mso-style-link:"Balloon Text";
font-family:"Tahoma","sans-serif";}
.MsoChpDefault
{mso-style-type:export-only;}
@page WordSection1
{size:612.0pt 792.0pt;
margin:72.0pt 72.0pt 72.0pt 72.0pt;}
div.WordSection1
{page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]--></head><body lang=EN-GB link=blue vlink=purple><div class=WordSection1><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>Yes, that looks like a great starting point.<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'><o:p> </o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>You'll need to do a bit of parsing within Node-Red processing blocks. The switch node (block) is good for a bit of easy pre-processing.<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'><o:p> </o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>Dom Brambley's posts will be helpful too:<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'><o:p> </o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'><a href="https://www.ibm.com/developerworks/community/blogs/B-Fool/?lang=en">https://www.ibm.com/developerworks/community/blogs/B-Fool/?lang=en</a><o:p></o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'><o:p> </o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'><o:p> </o:p></span></p><div style='border:none;border-top:solid #B5C4DF 1.0pt;padding:3.0pt 0cm 0cm 0cm'><p class=MsoNormal><b><span lang=EN-US style='font-size:10.0pt;font-family:"Tahoma","sans-serif"'>From:</span></b><span lang=EN-US style='font-size:10.0pt;font-family:"Tahoma","sans-serif"'> opentrv-dev-bounces@lists.opentrv.org.uk [mailto:opentrv-dev-bounces@lists.opentrv.org.uk] <b>On Behalf Of </b>Bo Herrmannsen<br><b>Sent:</b> 07 May 2015 16:36<br><b>To:</b> Closed list for developer discussions<br><b>Subject:</b> Re: [OpenTRV-dev] opentrv to emoncms<o:p></o:p></span></p></div><p class=MsoNormal><o:p> </o:p></p><div><p class=MsoNormal>unless i'm mistaken this link has a recipe i could use:<o:p></o:p></p><div><p class=MsoNormal><o:p> </o:p></p></div><div><p class=MsoNormal>the current cost part: <a href="https://jonathanleach1.wordpress.com/2014/02/16/node-red/">https://jonathanleach1.wordpress.com/2014/02/16/node-red/</a><o:p></o:p></p></div><div><p class=MsoNormal><o:p> </o:p></p></div><div><p class=MsoNormal>it says that node-red has a direct serial input block...<o:p></o:p></p></div><div><p class=MsoNormal><o:p> </o:p></p></div><div><p class=MsoNormal>my thought now is to take one string in... look for house code for say kitchen, and if that code is there....<o:p></o:p></p></div><div><p class=MsoNormal><o:p> </o:p></p></div><div><p class=MsoNormal>then i'm a bit lost yet on how to split up the entire string so that i can send off the data to emoncms<o:p></o:p></p></div><div><p class=MsoNormal><o:p> </o:p></p></div><div><p class=MsoNormal>might get it when i have looked a bit more at it....<o:p></o:p></p></div><div><p class=MsoNormal><o:p> </o:p></p></div><div><p class=MsoNormal><o:p> </o:p></p><div><div><p class=MsoNormal>2015-05-07 16:56 GMT+02:00 Aideen McConville <<a href="mailto:aideen@amcc.myzen.co.uk" target="_blank">aideen@amcc.myzen.co.uk</a>>:<o:p></o:p></p><div><div><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>Sending data to emonCMS looks like:</span><o:p></o:p></p><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'> </span><o:p></o:p></p><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'><a href="http://host/emoncms/input/post.json?json=%7Bcc-watts:200,cc-temp:22.5%7D&apikey=" target="_blank">http://host/emoncms/input/post.json?json={cc-watts:200,cc-temp:22.5}&apikey=</a>…..</span><o:p></o:p></p><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'> </span><o:p></o:p></p><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>or (since emonCMS version 8.4.?)</span><o:p></o:p></p><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'> </span><o:p></o:p></p><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'><a href="http://host/emoncms/input/post.json?node=1&json=%7Bcc-watts:200,cc-temp:22.5%7D&apikey=" target="_blank">http://host/emoncms/input/post.json?node=1&json={cc-watts:200,cc-temp:22.5}&apikey=</a>…..</span><o:p></o:p></p><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'> </span><o:p></o:p></p><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>Currently, with the Conrad units, there's only an idea of house codes, rather than individual node codes (I think). You could improvise by setting different frost values to differentiate different units</span><o:p></o:p></p><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'> </span><o:p></o:p></p><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>Ideally, use MQTT early in the mix with a tree structure like</span><o:p></o:p></p><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>house/opentrv/study/temp</span><o:p></o:p></p><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>house/opentrv/study/light</span><o:p></o:p></p><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>house/opentrv/bedroom1/temp</span><o:p></o:p></p><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>house/emonTx/watts</span><o:p></o:p></p><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>house/emonTx/pipetemp</span><o:p></o:p></p><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>etc</span><o:p></o:p></p><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'> </span><o:p></o:p></p><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>Node-Red makes it easy to connect these things with minimal coding. It is well versed in the ways of MQTT, JSON and even emonCMS so lots of examples out there (but still with a degree of flux between versions).</span><o:p></o:p></p><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'> </span><o:p></o:p></p><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>Having several Pi's is power for the course :-)</span><o:p></o:p></p><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'> </span><o:p></o:p></p><div style='border:none;border-top:solid #B5C4DF 1.0pt;padding:3.0pt 0cm 0cm 0cm'><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'><b><span lang=EN-US style='font-size:10.0pt;font-family:"Tahoma","sans-serif"'>From:</span></b><span lang=EN-US style='font-size:10.0pt;font-family:"Tahoma","sans-serif"'> <a href="mailto:opentrv-dev-bounces@lists.opentrv.org.uk" target="_blank">opentrv-dev-bounces@lists.opentrv.org.uk</a> [mailto:<a href="mailto:opentrv-dev-bounces@lists.opentrv.org.uk" target="_blank">opentrv-dev-bounces@lists.opentrv.org.uk</a>] <b>On Behalf Of </b>Bo Herrmannsen<br><b>Sent:</b> 07 May 2015 15:29<br><b>To:</b> Closed list for developer discussions<br><b>Subject:</b> Re: [OpenTRV-dev] opentrv to emoncms</span><o:p></o:p></p></div><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'> <o:p></o:p></p><div><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'>hmm<o:p></o:p></p><div><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'> <o:p></o:p></p></div><div><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'>my idea so far...:<o:p></o:p></p></div><div><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'> <o:p></o:p></p></div><div><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'>i have one spare usb port left... use that with and ftdi and extend the serial plug so i could wall mount an OpenTRV and use that one to collect the data from all the others.<o:p></o:p></p></div><div><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'> <o:p></o:p></p></div><div><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'>could the perl example be used to forward the data so they show up in emoncms as individual nodes? or how does it work?<o:p></o:p></p></div></div><div><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'> <o:p></o:p></p><div><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'>2015-05-07 16:07 GMT+02:00 Aideen McConville <<a href="mailto:aideen@amcc.myzen.co.uk" target="_blank">aideen@amcc.myzen.co.uk</a>>:<o:p></o:p></p><div><div><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>Hi Bo,</span><o:p></o:p></p><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'> </span><o:p></o:p></p><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>I too am interested in collecting data from OpenTRV, OpenEnergyMonitor (oem) and other sensors and wrangling it as required (e.g. sending to emonCMS and other possible stores/dashboards).</span><o:p></o:p></p><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'> </span><o:p></o:p></p><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>Rather than modify (and complexify!) the code in individual sensor nodes, I am planning to use a central node to receive, store and forward data (e.g. using MQTT and Node-Red). It's fairly easy to send data from any sensor to emonCMS using oem's input API and the same techniques can be useful for the oem sensors themselves (emonTx and emonTH). I can provide a simple Perl example on request (sends Currentcost energy meter serial data to emonCMS).</span><o:p></o:p></p><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'> </span><o:p></o:p></p><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>One OpenTRV unit could act as an interim (RFMxx) gateway - listening for data from other "busier" units and forwarding it to the main gateway (e.g. via a FTDI - USB link to a mini wireless router or Raspberry Pi).</span><o:p></o:p></p><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'> </span><o:p></o:p></p><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>I currently have one OpenTRV Rev2 board (r4111) talking to a Conrad valve drive. It is connected to, and powered by, the USB port of a micro TP-Link router via FTDI (same USB BUB as used to talk to Jeenodes and oem units). The TP-Link router is running OpenWRT (embedded Linux) and has some USB tools and the Mosquitto client software installed (further details on request). A Raspberry Pi would work just as well.</span><o:p></o:p></p><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'> </span><o:p></o:p></p><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>To "see" the serial data from the OpenTRV board, I just need to logon to the router and type:</span><o:p></o:p></p><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'> </span><o:p></o:p></p><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'># stty -F /dev/ttyUSB0 4800 raw -echo</span><o:p></o:p></p><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'> </span><o:p></o:p></p><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'># cat < /dev/ttyUSB0</span><o:p></o:p></p><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'> </span><o:p></o:p></p><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>A further step: to remove the "><a href="mailto:%22%20lines%20from%20the%20output%20and%20pass%20the%20rest%20on%20to%20a%20Mosquitto%20broker%20(running%20elsewhere%20on%20the%20network):%0d%C2%A0%0d#+awk+'NF+%3E+1'+/dev/ttyUSB0+%7C+mosquitto_pub+-l+-h+192.168.1.112+-t+'house/opentrv/lab'%0D%C2%A0%0DI+can+then+see+the+data+on+a+beefier+linux+box+(one+with+a+hard+drive!)+running+the+broker:%0D%C2%A0%0D$+mosquitto_sub+-t+'house/%23'%0D:%0DFHT8V+TX%0D=F0" target="_blank">" lines from the output and pass the rest on to a Mosquitto broker (running elsewhere on the network):</a></span><o:p></o:p></p><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'><span style='font-size:11.0pt;font-family:"Calibri","sans-serif"'><a href="mailto:%22%20lines%20from%20the%20output%20and%20pass%20the%20rest%20on%20to%20a%20Mosquitto%20broker%20(running%20elsewhere%20on%20the%20network):%0d%C2%A0%0d#+awk+'NF+%3E+1'+/dev/ttyUSB0+%7C+mosquitto_pub+-l+-h+192.168.1.112+-t+'house/opentrv/lab'%0D%C2%A0%0DI+can+then+see+the+data+on+a+beefier+linux+box+(one+with+a+hard+drive!)+running+the+broker:%0D%C2%A0%0D$+mosquitto_sub+-t+'house/%23'%0D:%0DFHT8V+TX%0D=F0" target="_blank"> </a></span><o:p></o:p></p><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'><span style='font-size:11.0pt;font-family:"Calibri","sans-serif"'><a href="mailto:%22%20lines%20from%20the%20output%20and%20pass%20the%20rest%20on%20to%20a%20Mosquitto%20broker%20(running%20elsewhere%20on%20the%20network):%0d%C2%A0%0d#+awk+'NF+%3E+1'+/dev/ttyUSB0+%7C+mosquitto_pub+-l+-h+192.168.1.112+-t+'house/opentrv/lab'%0D%C2%A0%0DI+can+then+see+the+data+on+a+beefier+linux+box+(one+with+a+hard+drive!)+running+the+broker:%0D%C2%A0%0D$+mosquitto_sub+-t+'house/%23'%0D:%0DFHT8V+TX%0D=F0" target="_blank"># awk 'NF > 1' /dev/ttyUSB0 | mosquitto_pub -l -h 192.168.1.112 -t 'house/opentrv/lab'</a></span><o:p></o:p></p><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'><span style='font-size:11.0pt;font-family:"Calibri","sans-serif"'><a href="mailto:%22%20lines%20from%20the%20output%20and%20pass%20the%20rest%20on%20to%20a%20Mosquitto%20broker%20(running%20elsewhere%20on%20the%20network):%0d%C2%A0%0d#+awk+'NF+%3E+1'+/dev/ttyUSB0+%7C+mosquitto_pub+-l+-h+192.168.1.112+-t+'house/opentrv/lab'%0D%C2%A0%0DI+can+then+see+the+data+on+a+beefier+linux+box+(one+with+a+hard+drive!)+running+the+broker:%0D%C2%A0%0D$+mosquitto_sub+-t+'house/%23'%0D:%0DFHT8V+TX%0D=F0" target="_blank"> </a></span><o:p></o:p></p><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'><span style='font-size:11.0pt;font-family:"Calibri","sans-serif"'><a href="mailto:%22%20lines%20from%20the%20output%20and%20pass%20the%20rest%20on%20to%20a%20Mosquitto%20broker%20(running%20elsewhere%20on%20the%20network):%0d%C2%A0%0d#+awk+'NF+%3E+1'+/dev/ttyUSB0+%7C+mosquitto_pub+-l+-h+192.168.1.112+-t+'house/opentrv/lab'%0D%C2%A0%0DI+can+then+see+the+data+on+a+beefier+linux+box+(one+with+a+hard+drive!)+running+the+broker:%0D%C2%A0%0D$+mosquitto_sub+-t+'house/%23'%0D:%0DFHT8V+TX%0D=F0" target="_blank">I can then see the data on a beefier linux box (one with a hard drive!) running the broker:</a></span><o:p></o:p></p><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'><span style='font-size:11.0pt;font-family:"Calibri","sans-serif"'><a href="mailto:%22%20lines%20from%20the%20output%20and%20pass%20the%20rest%20on%20to%20a%20Mosquitto%20broker%20(running%20elsewhere%20on%20the%20network):%0d%C2%A0%0d#+awk+'NF+%3E+1'+/dev/ttyUSB0+%7C+mosquitto_pub+-l+-h+192.168.1.112+-t+'house/opentrv/lab'%0D%C2%A0%0DI+can+then+see+the+data+on+a+beefier+linux+box+(one+with+a+hard+drive!)+running+the+broker:%0D%C2%A0%0D$+mosquitto_sub+-t+'house/%23'%0D:%0DFHT8V+TX%0D=F0" target="_blank"> </a></span><o:p></o:p></p><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'><span style='font-size:11.0pt;font-family:"Calibri","sans-serif"'><a href="mailto:%22%20lines%20from%20the%20output%20and%20pass%20the%20rest%20on%20to%20a%20Mosquitto%20broker%20(running%20elsewhere%20on%20the%20network):%0d%C2%A0%0d#+awk+'NF+%3E+1'+/dev/ttyUSB0+%7C+mosquitto_pub+-l+-h+192.168.1.112+-t+'house/opentrv/lab'%0D%C2%A0%0DI+can+then+see+the+data+on+a+beefier+linux+box+(one+with+a+hard+drive!)+running+the+broker:%0D%C2%A0%0D$+mosquitto_sub+-t+'house/%23'%0D:%0DFHT8V+TX%0D=F0" target="_blank">$ mosquitto_sub -t 'house/#'</a></span><o:p></o:p></p><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'><span style='font-size:11.0pt;font-family:"Calibri","sans-serif"'><a href="mailto:%22%20lines%20from%20the%20output%20and%20pass%20the%20rest%20on%20to%20a%20Mosquitto%20broker%20(running%20elsewhere%20on%20the%20network):%0d%C2%A0%0d#+awk+'NF+%3E+1'+/dev/ttyUSB0+%7C+mosquitto_pub+-l+-h+192.168.1.112+-t+'house/opentrv/lab'%0D%C2%A0%0DI+can+then+see+the+data+on+a+beefier+linux+box+(one+with+a+hard+drive!)+running+the+broker:%0D%C2%A0%0D$+mosquitto_sub+-t+'house/%23'%0D:%0DFHT8V+TX%0D=F0" target="_blank">:</a></span><o:p></o:p></p><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'><span style='font-size:11.0pt;font-family:"Calibri","sans-serif"'><a href="mailto:%22%20lines%20from%20the%20output%20and%20pass%20the%20rest%20on%20to%20a%20Mosquitto%20broker%20(running%20elsewhere%20on%20the%20network):%0d%C2%A0%0d#+awk+'NF+%3E+1'+/dev/ttyUSB0+%7C+mosquitto_pub+-l+-h+192.168.1.112+-t+'house/opentrv/lab'%0D%C2%A0%0DI+can+then+see+the+data+on+a+beefier+linux+box+(one+with+a+hard+drive!)+running+the+broker:%0D%C2%A0%0D$+mosquitto_sub+-t+'house/%23'%0D:%0DFHT8V+TX%0D=F0" target="_blank">FHT8V TX</a></span><o:p></o:p></p><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'><span style='font-size:11.0pt;font-family:"Calibri","sans-serif"'><a href="mailto:%22%20lines%20from%20the%20output%20and%20pass%20the%20rest%20on%20to%20a%20Mosquitto%20broker%20(running%20elsewhere%20on%20the%20network):%0d%C2%A0%0d#+awk+'NF+%3E+1'+/dev/ttyUSB0+%7C+mosquitto_pub+-l+-h+192.168.1.112+-t+'house/opentrv/lab'%0D%C2%A0%0DI+can+then+see+the+data+on+a+beefier+linux+box+(one+with+a+hard+drive!)+running+the+broker:%0D%C2%A0%0D$+mosquitto_sub+-t+'house/%23'%0D:%0DFHT8V+TX%0D=F0" target="_blank">=F0%@20C4;T6 1 W255 0 F255 0 W255 0 F255 0;S12 12 21;HC18 11;{"@":"120b","L":235,"B|mV":3332,"occ|%":0,"vC|%":0}</a></span><o:p></o:p></p><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>FHT8V TX</span><o:p></o:p></p><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>FHT8V TX</span><o:p></o:p></p><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>=F0%@20C5;T6 5 W255 0 F255 0 W255 0 F255 0;S12 12 21;HC18 11;{"@":"120b","L":234,"B|mV":3332,"occ|%":0,"vC|%":0}</span><o:p></o:p></p><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>FHT8V TX</span><o:p></o:p></p><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>=F0%@20C5;T6 9 W255 0 F255 0 W255 0 F255 0;S12 12 21;HC18 11;{"@":"120b","L":234,"B|mV":3332,"occ|%":0,"vC|%":0}</span><o:p></o:p></p><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>FHT8V TX</span><o:p></o:p></p><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>FHT8V TX</span><o:p></o:p></p><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>:</span><o:p></o:p></p><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'> </span><o:p></o:p></p><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>Not sure if this helps with your quest, but if any particlar details are of interest, let me know.</span><o:p></o:p></p><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'> </span><o:p></o:p></p><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>Aideen</span><o:p></o:p></p><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'> </span><o:p></o:p></p><div style='border:none;border-top:solid #B5C4DF 1.0pt;padding:3.0pt 0cm 0cm 0cm'><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'><b><span lang=EN-US style='font-size:10.0pt;font-family:"Tahoma","sans-serif"'>From:</span></b><span lang=EN-US style='font-size:10.0pt;font-family:"Tahoma","sans-serif"'> <a href="mailto:opentrv-dev-bounces@lists.opentrv.org.uk" target="_blank">opentrv-dev-bounces@lists.opentrv.org.uk</a> [mailto:<a href="mailto:opentrv-dev-bounces@lists.opentrv.org.uk" target="_blank">opentrv-dev-bounces@lists.opentrv.org.uk</a>] <b>On Behalf Of </b>Bo Herrmannsen<br><b>Sent:</b> 05 May 2015 12:11<br><b>To:</b> Closed list for developer discussions<br><b>Subject:</b> [OpenTRV-dev] opentrv to emoncms</span><o:p></o:p></p></div><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'> <o:p></o:p></p><div><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'>hi again<o:p></o:p></p><div><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'> <o:p></o:p></p></div><div><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'>i'm going to fiddle with my bed-roller server box and i wanted to add data from the OpenTRV units<o:p></o:p></p></div><div><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'> <o:p></o:p></p></div><div><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'> <o:p></o:p></p></div><div><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'>2 ways i can think of it<o:p></o:p></p></div><div><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'> <o:p></o:p></p></div><div><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'> <o:p></o:p></p></div><div><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'>1) Each Opentrv board sends the data to emoncms... they at least work on the same freq, but they dont use the same module,... latest rfm lib that emontx boards use are updated to be able to use rfm69 but i think their boards are still shipped with rfm12 or was it 22.... <o:p></o:p></p></div><div><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'> <o:p></o:p></p></div><div><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'>anyways my idea was to send commands to the valve, then to emoncms... then sleep for the 2 mins or so<o:p></o:p></p></div><div><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'> <o:p></o:p></p></div><div><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'> <o:p></o:p></p></div><div><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'>2) have one emontx board grap the data it needs from one Opentrv board that again wireless gets data from the others.... i have 2 emontx boards and one opentrv at my hot water cylinder...<o:p></o:p></p></div><div><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'> <o:p></o:p></p></div><div><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'>one of the emontx boards allready gets data from the heatmeter via an IR optical serial port<o:p></o:p></p></div><div><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'> <o:p></o:p></p></div><div><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'>the other one only monitors my water meter so most of the time it will just sit there idle and just report 0 water usage to the emoncms system... i think this one will be mostly suited <o:p></o:p></p></div><div><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'> <o:p></o:p></p></div><div><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'>right now that board only sends over 2 numbers<o:p></o:p></p></div><div><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'> <o:p></o:p></p></div><div><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'>1) liters an hour<o:p></o:p></p></div><div><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'>2) clicks since last reading (liters)<o:p></o:p></p></div><div><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'> <o:p></o:p></p></div><div><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'>it reports to emoncms every 4 sec<o:p></o:p></p></div><div><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'> <o:p></o:p></p></div><div><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'>so for each opentrv i just need to collect and add:<o:p></o:p></p></div><div><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'> <o:p></o:p></p></div><div><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'>1)battery voltage<o:p></o:p></p></div><div><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'>2)temp<o:p></o:p></p></div><div><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'>3)light level<o:p></o:p></p></div><div><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'>4)valve open %<o:p></o:p></p></div><div><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'> <o:p></o:p></p></div><div><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'>i have attached 2 files... one for each of the emontx boards<o:p></o:p></p></div><div><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'> <o:p></o:p></p></div><div><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'>the small file is the one for the water meter and the other is for the heatmeater, electricity pulse, and hotwater temp...<o:p></o:p></p></div><div><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'> <o:p></o:p></p></div><div><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'>my idea is to add something to the watermeter skecth that can grab serial data and pick what is needed... i just dont have any clue how.. also the serial data from the opentrv must be in the same order or the emontx will start to report false data.... maybe have the opentrv buffer the data and just update the output when new values are there?<o:p></o:p></p></div><div><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'> <o:p></o:p></p></div><div><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'>anyone have idea or could help out?<o:p></o:p></p></div><div><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'> <o:p></o:p></p></div><div><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'>the zip file is the sketch for my opentrv that controls the hot water<o:p></o:p></p></div><div><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'> <o:p></o:p></p></div></div></div></div><p class=MsoNormal style='mso-margin-top-alt:auto;margin-bottom:12.0pt'><br>_______________________________________________<br>OpenTRV-dev mailing list<br><a href="mailto:OpenTRV-dev@lists.opentrv.org.uk" target="_blank">OpenTRV-dev@lists.opentrv.org.uk</a><br><a href="http://lists.opentrv.org.uk/listinfo/opentrv-dev" target="_blank">http://lists.opentrv.org.uk/listinfo/opentrv-dev</a><o:p></o:p></p></div><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'> <o:p></o:p></p></div></div></div><p class=MsoNormal style='margin-bottom:12.0pt'><br>_______________________________________________<br>OpenTRV-dev mailing list<br><a href="mailto:OpenTRV-dev@lists.opentrv.org.uk">OpenTRV-dev@lists.opentrv.org.uk</a><br><a href="http://lists.opentrv.org.uk/listinfo/opentrv-dev" target="_blank">http://lists.opentrv.org.uk/listinfo/opentrv-dev</a><o:p></o:p></p></div><p class=MsoNormal><o:p> </o:p></p></div></div></div></div></body></html>