<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 15 (filtered medium)"><style><!--
/* Font Definitions */
@font-face
        {font-family:Helvetica;
        panose-1:2 11 6 4 2 2 2 2 2 4;}
@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;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0cm;
        font-size:11.0pt;
        font-family:"Calibri",sans-serif;}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:blue;
        text-decoration:underline;}
span.EmailStyle18
        {mso-style-type:personal-reply;
        font-family:"Calibri",sans-serif;
        color:windowtext;}
.MsoChpDefault
        {mso-style-type:export-only;
        font-family:"Calibri",sans-serif;
        mso-fareast-language:EN-US;}
@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 style='word-wrap:break-word'><div class=WordSection1><p class=MsoNormal><span style='mso-fareast-language:EN-US'>Hi Tristan,<o:p></o:p></span></p><p class=MsoNormal><span style='mso-fareast-language:EN-US'><o:p> </o:p></span></p><p class=MsoNormal><span style='mso-fareast-language:EN-US'>That’s great – if you can receive secure frames you’ve gone through most of the required pain </span><span style='font-family:"Segoe UI Emoji",sans-serif;mso-fareast-language:EN-US'>😊</span><span style='mso-fareast-language:EN-US'> <o:p></o:p></span></p><p class=MsoNormal><span style='mso-fareast-language:EN-US'><o:p> </o:p></span></p><p class=MsoNormal><span style='mso-fareast-language:EN-US'>In the meanwhile, I cleaned up my code, it’s at </span><a href="https://github.com/wintersteiger/wlmcd">wintersteiger/wlmcd: @wintersteiger's library for monitoring and configuring devices (github.com)</a>. <o:p></o:p></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>The program to monitor a Radbot via CC1101 module is here: <a href="https://github.com/wintersteiger/wlmcd/blob/main/apps/cc1101-radbot-monitor/cc1101-radbot-monitor.cpp">wlmcd/cc1101-radbot-monitor.cpp at main · wintersteiger/wlmcd (github.com)</a> (It expects the Radbot ID/key in radbot.cfg.)<o:p></o:p></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>Secure frame decoding and decryption is here: <a href="https://github.com/wintersteiger/wlmcd/blob/a90231c2efcb8750ecd2785339d6a12b40979dc1/radbot.cpp#L217">https://github.com/wintersteiger/wlmcd/blob/a90231c2efcb8750ecd2785339d6a12b40979dc1/radbot.cpp#L217</a><o:p></o:p></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>(Trivial) JSON value decoding is here: <a href="https://github.com/wintersteiger/wlmcd/blob/a90231c2efcb8750ecd2785339d6a12b40979dc1/radbot.cpp#L154">https://github.com/wintersteiger/wlmcd/blob/a90231c2efcb8750ecd2785339d6a12b40979dc1/radbot.cpp#L154</a><o:p></o:p></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>I also have code to do the same with a RFM69H module, but I haven’t tried it with Radbots yet, so I don’t have a corresponding config for it. I’m super busy this week, but I may be able to get that figured out next weekend.<o:p></o:p></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>Cheers,<o:p></o:p></p><p class=MsoNormal>Christoph<span style='mso-fareast-language:EN-US'><o:p></o:p></span></p><p class=MsoNormal><span style='mso-fareast-language:EN-US'><o:p> </o:p></span></p><div style='border:none;border-top:solid #E1E1E1 1.0pt;padding:3.0pt 0cm 0cm 0cm'><p class=MsoNormal><b><span lang=EN-US>From:</span></b><span lang=EN-US> OpenTRV-dev <opentrv-dev-bounces@lists.opentrv.org.uk> <b>On Behalf Of </b>Tristan Keen<br><b>Sent:</b> 10 January 2021 10:38<br><b>To:</b> Closed list for developer discussions <opentrv-dev@lists.opentrv.org.uk><br><b>Subject:</b> Re: [OpenTRV-dev] Dongle<o:p></o:p></span></p></div><p class=MsoNormal><o:p> </o:p></p><div><p class=MsoNormal>  Thanks to all your help - though I'd already ordered an Adafruit RFM69HCW 868 MHz "Bonnet" for my Raspberry Pi (from Pimoroni), on the strength of a Hope datasheet suggesting it was an easy replacement part.<o:p></o:p></p><div><p class=MsoNormal><o:p> </o:p></p></div><div><p class=MsoNormal>  Unfortunately while the pinout might be the same, the registers are totally different so it's been slow going; especially when I realised Manchester encoding is implemented completely differently between the two - I was about to give up & buy a new module. Luckily, despite <a href="https://github.com/opentrv/OTRadioLink/blob/345b45f9df92eac78caa483d4230a11bde21d7d8/content/OTRadioLink/utility/OTRFM23BLink_OTRFM23BLink.cpp#L787">https://github.com/opentrv/OTRadioLink/blob/345b45f9df92eac78caa483d4230a11bde21d7d8/content/OTRadioLink/utility/OTRFM23BLink_OTRFM23BLink.cpp#L787</a> your (Christoph's) config actually shows Manchester was turned off.  Trying that as a last-gasp effort seems to work - I can now receive valid secure frames with sensible IDs matching some of the hex printed inside the Radbots, and incrementing message_counters from the trailer.<o:p></o:p></p></div><div><p class=MsoNormal><o:p> </o:p></p></div><div><p class=MsoNormal>  Now to read up on the encryption approach & get that working in Python, then I'll try reprogramming the key on one of the radbots to a known value.  Yes, my current code is similarly littered with odd notes, some copied in material and private IDs, I'll clean it up a bit & clone it publically when I've got my MVP working.<o:p></o:p></p></div><div><p class=MsoNormal><o:p> </o:p></p></div><div><p class=MsoNormal>Thanks,<o:p></o:p></p></div><div><p class=MsoNormal>Tristan.<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>On Thu, 7 Jan 2021 at 19:23, Damon Hart-Davis <<a href="mailto:dhd@exnet.com">dhd@exnet.com</a>> wrote:<o:p></o:p></p></div><blockquote style='border:none;border-left:solid #CCCCCC 1.0pt;padding:0cm 0cm 0cm 6.0pt;margin-left:4.8pt;margin-right:0cm'><div><p class=MsoNormal>Purged of third-party copyright material, would you consider adding that to an appropriate place in our Wiki or one of the GitHub repos?<o:p></o:p></p><div><p class=MsoNormal><o:p> </o:p></p></div><div><p class=MsoNormal>Good to have register settings for another radio widely available (and the Pi stuff)!<o:p></o:p></p></div><div><p class=MsoNormal><o:p> </o:p></p></div><div><p class=MsoNormal>Note that there is one non-JSON data item in there, the valve %, which is a single binary byte easy for a boiler controller with a small MCU to use...<o:p></o:p></p><div><div><p class=MsoNormal><o:p> </o:p></p></div><div><p class=MsoNormal>Rgds<o:p></o:p></p></div><div><p class=MsoNormal><o:p> </o:p></p></div><div><p class=MsoNormal>Damon<o:p></o:p></p></div><div><p class=MsoNormal><o:p> </o:p></p><div><p class=MsoNormal><br><br><o:p></o:p></p><blockquote style='margin-top:5.0pt;margin-bottom:5.0pt'><div><p class=MsoNormal>On 7 Jan 2021, at 19:14, <a href="mailto:christoph@winterstiger.at" target="_blank">christoph@winterstiger.at</a> wrote:<o:p></o:p></p></div><p class=MsoNormal><o:p> </o:p></p><div><div><div><p class=MsoNormal>Hi Tristan,<o:p></o:p></p></div><div><p class=MsoNormal> <o:p></o:p></p></div><div><p class=MsoNormal>That’s right, I have this working. I played around with multiple different modules and I think the cheapest option is a TI CC1101-based module (lots of options for under GBP 10 on eBay). Most of them come with antennas that should work fine for development purposes if you’re in the same room as the RadBot.<o:p></o:p></p></div><div><p class=MsoNormal> <o:p></o:p></p></div><div><p class=MsoNormal>That module (and many similar ones) uses the SPI-bus for communication, which is very easy to use on an RPI, and there are also options for other platforms, e.g. CH431A-based modules (but I haven’t tried those yet). This takes voltage + ground + 4 SPI wires + 1 interrupt wire (interrupts when the module received a packet). On the RPI, no other hardware is required and I think a CH431A wouldn’t need any other external components either.<o:p></o:p></p></div><div><p class=MsoNormal> <o:p></o:p></p></div><div><p class=MsoNormal>For my own experiments I wrote a monitoring app that lets me configure the module on the fly so I can play around with all those RF-related options, but I foolishly copied a bunch of copyrighted text from the various datasheets into it, so now I’ll have to remove that before I can publish it. I attached the RadBot config I use, which gives you all the register settings for the CC1101. Once all the registers are set, you just need an event handler for rising edges on the interrupt lines to get the raw packets. Those are encrypted by the RadBot with a pre-set key, so they need to be decrypted. Once that is done, the actual data decoding is trivial as it’s just a simple JSON object.<o:p></o:p></p></div><div><p class=MsoNormal> <o:p></o:p></p></div><div><p class=MsoNormal>I’ll try to find some time over this or the next weekend to clean up my code so I can publish it. <o:p></o:p></p></div><div><p class=MsoNormal> <o:p></o:p></p></div><div><p class=MsoNormal>Cheers,<o:p></o:p></p></div><div><p class=MsoNormal>Christoph<o:p></o:p></p></div><div><p class=MsoNormal> <o:p></o:p></p></div><div style='border:none;border-top:solid #E1E1E1 1.0pt;padding:3.0pt 0cm 0cm 0cm'><div><p class=MsoNormal><b><span lang=EN-US>From:</span></b><span lang=EN-US> OpenTRV-dev <<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>Tristan Keen<br><b>Sent:</b> 30 December 2020 10:33<br><b>To:</b> <a href="mailto:opentrv-dev@lists.opentrv.org.uk" target="_blank">opentrv-dev@lists.opentrv.org.uk</a><br><b>Subject:</b> Re: [OpenTRV-dev] Dongle</span><o:p></o:p></p></div></div><div><p class=MsoNormal> <o:p></o:p></p></div><div><div><p class=MsoNormal>Hi Christoph,<o:p></o:p></p></div><div><div><p class=MsoNormal> <o:p></o:p></p></div></div><div><div><p class=MsoNormal>I read from the mailing-list archives that you recently managed to "... receive the messages on a raspberry pi with a cheapo 868Mhz transceiver and it works fairly reliably".<o:p></o:p></p></div><div><div><p class=MsoNormal> <o:p></o:p></p></div></div><div><div><p class=MsoNormal>Would it be possible to share a bit more detail on what actual transceiver you used with what Pi, plus any other hardware mods you had to make? Additionally the code you used to decode the messages - even in partial form if you prefer. I'm an experienced developer with some hardware knowledge, so anything rough would still be gratefully received.<o:p></o:p></p></div></div><div><div><p class=MsoNormal> <o:p></o:p></p></div></div><div><div><p class=MsoNormal>I'm trying to make up something similar to the Stats Hub to collect information broadcast by the OpenTRV/Radbots, but without building so much custom hardware if possible...<o:p></o:p></p></div></div><div><div><p class=MsoNormal> <o:p></o:p></p></div></div><div><div><p class=MsoNormal>Thanks in advance,<o:p></o:p></p></div></div><div><div><p class=MsoNormal>Tristan Keen.<o:p></o:p></p></div></div><div><div><p class=MsoNormal> <o:p></o:p></p></div></div></div></div></div><p class=MsoNormal><cc1101-radbot.cfg><span style='font-size:10.5pt;font-family:"Helvetica",sans-serif'>_______________________________________________<br>OpenTRV-dev mailing list<br></span><a href="mailto:OpenTRV-dev@lists.opentrv.org.uk" target="_blank"><span style='font-size:10.5pt;font-family:"Helvetica",sans-serif'>OpenTRV-dev@lists.opentrv.org.uk</span></a><span style='font-size:10.5pt;font-family:"Helvetica",sans-serif'><br></span><a href="http://lists.opentrv.org.uk/listinfo/opentrv-dev" target="_blank"><span style='font-size:10.5pt;font-family:"Helvetica",sans-serif'>http://lists.opentrv.org.uk/listinfo/opentrv-dev</span></a><o:p></o:p></p></div></blockquote></div><p class=MsoNormal><o:p> </o:p></p></div></div></div></div><p class=MsoNormal>_______________________________________________<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></blockquote></div></div></body></html>