Tag: Data Logging

  • RDP – Roastmaster Datagram Protocol

    RDP – Roastmaster Datagram Protocol

    What is RDP?

    RDP is a protocol we created specifically for Roastmaster that allows any processor-equipped circuit board to send temperature data directly to Roastmaster iOS.

    Historically, Roastmaster has relied on 3rd party manufacturers to produce both the hardware, as well as the software API that Roastmaster would use to communicate with that hardware. If those APIs contain bugs, or didn’t function correctly, there was nothing that could be done with Roastmaster to resolve it.

    RDP was specially designed for Roastmaster, and is now built directly into Roastmaster’s code. Anyone can use RDP on virtually any hardware. This removes the reliance on 3rd party vendors, and lets anyone design and build a probe host for very little cost that can easily communicate with Roastmaster using this flexible protocol.

    It’s also fully open source, and published and publicly documented under the permissive MIT license, which means it’s free to use by any individual or manufacturer, whether for personal or professional adoption.

    What is a Protocol?

    A protocol is really nothing more than a language two entities agree to “speak” in order to communicate with each other. If you speak English, you can understand the information in this article because you understand the English language. English is, essentially, the “protocol” of this article.

    The same is true with software. As long as two applications or devices speak the same “language”, they can talk to each other and share information. Since Roastmaster now “speaks” RDP, any circuit board with a CPU and WiFi capabilities can be programmed to talk directly to Roastmaster using the language of RDP.

    Roaster Manufacturers

    We get endless inquiries about whether Roastmaster supports roaster brand X or roaster brand Y.  Chances are, we’ve fielded questions for your brands of roasters. The answer, of course, is always (regrettably) no, because this has relied on Roastmaster and the roaster speaking the same language.

    This has been a frustrating barrier that we are pleased to have finally removed with RDP. RDP can be implemented in your roasters for a tiny cost per unit, and offer out-of-the-box compatibility with Roastmaster. Users would have no configuration burden, or aftermarket mod’ing to perform–they would just unpack it and start capturing data!

    Please, if you’re entertaining the idea of this, reach out to us. We’re happy to discuss the specifics with you.

    What is a Probe Host?

    A “probe host” is required to send readings to Roastmaster. A probe host is comprised of the hardware required to gather the data, and simple software to interpret and send this information over WiFi to Roastmaster.

    A probe host can be a DIY project, based on a popular SBC (Single Board Computer), such as Arduino, Raspberry Pi, or Feather Huzzah. Or, it can be a professionally designed circuit board built in a roasting appliance, designed and coded by the manufacturer to provide out-of-the-box support for Roastmaster iOS.

    Whatever the specifics, as long as it can run software, read a probe, and send those readings as UDP packets over WiFi, it can be used to communicate those readings to Roastmaster iOS.

    Hardware

    The hardware of a DIY probe host is comprised of three elements.

    AurduinoUno

    A small SBC (Single Board Computer) with WiFi capabilities, capable of running simple software programs or sketches.
    Max31855Breakout

    One or more Thermocouple Amp Boards attached to the SBC. These amp boards accept the positive and negative thermocouple leads, and perform the hot and cold junction compensation calculations to translate the probe’s voltage into a temperature.

    KThermocouple

    One or more thermocouples, attached to each amp board.

    Software

    The software running on the processor of the probe host reads and interprets the thermocouple voltage, builds a simple JSON packet according to the rules of the RDP protocol, and sends that string as a UDP packet across the WiFi network, where Roastmaster is listening and receives it.

    How Do I Get Started?

    First, you must assemble the hardware. Yes, this will probably require a soldering iron, and some basic electronics knowledge. It is not, however, and advanced project.

    Once you have hardware, it’s just a matter of obtaining or writing simple software to read and interpret the thermocouple voltage signal, generate the RDP network datagrams, and send them to Roastmaster over WiFi.

    Resources

    Complete documentation is available in the RDP Datasheet. It includes explanations, examples and best practices for creating your own software, or tweaking software available on forums or Github.

    I am hopeful that users will embrace this protocol in the spirit of open source, and share their work, so that soon there will be a repository of software for different devices to help folks get started building their own probe hosts.

    In the mean time, we’ve already created a sample software sketch for the Feather Huzzah board and Max 318555 amp board on GitHub. Feel free to download, and modify it to suit your needs.

  • Setting Up the Range Probe

    Setting Up the Range Probe

    The Range probe has been discontinued and will no longer be supported in future versions of Roastmaster

    Setting Up a Range Probe for Data Logging

    1. Attach the Range probe to your iOS device.
    2. Navigate to the Probes list from Roastmaster’s Utilities window.
    3. If you have not already purchased the Data Logging option, tap “Data Logging Store” and enable Data Logging. Roastmaster will guide you through the purchase.
    4. Tap the + button to add a new Probe.
    5. If the Range is attached, the Status field should display “Linked”, and report the current probe temperature.
    6. Tap “Save”.
  • BlueTherm Duo Temperature Discrepancies

    BlueTherm Duo Temperature Discrepancies

    This issue was resolved in Roastmaster 7.0.1

    Issue

    Data Logging users using the Bluetherm Duo may, in some cases, experience discrepancies between the temperature displayed in Roastmaster and the temperature displayed on the Bluetherm Duo. This occurs when the Bluetherm Duo supplies its data to the app in the Fahrenheit scale, when Roastmaster is expecting the Celsius scale.

    When Does This Happen?

    Roastmaster operates internally in the Celsius temperature scale, translating probe readings to Fahrenheit for screen display and database purposes when curves are set to Fahrenheit.

    Consequently, when opening a connection to a probe, Roastmaster issues a command to the Bluetherm Duo to supply its readings in the Celsius scale. The Bluetherm Duo, instead of switching to the requested scale as the documentation suggests, toggles its current setting from C to F or vice versa, resulting in a discrepancy every 2nd time this command is issued, and in those times, supplying a Fahrenheit number when Roastmaster is expecting a Celsius number.

    When this bug presents, it will manifest in the Roast Console and Analyzer in the following ways:

    1. If your curve is set to Celsius, Roastmaster will display the number it’s given, which will be the Fahrenheit translation provided in lieu of the desired Celsius number.
    2. If your curve is set to Fahrenheit, Roastmaster will translate what it believes to be a Celsius number using a standard C to F formula, and display the result – in essence a Celsius temperature translated twice.

    When Does This Occur

    Since the Celsius command is issued to the Bluetherm Duo whenever a probe connects, this issue will result in the curve displaying the wrong temperature on alternating probe connections. Connections occur whenever Roastmaster needs to know the probe temperature, such as when viewing the probe details screen, the roast console or the roast analyzer.

    Most users use 2 probes with the Bluetherm Duo. Because every second connection causes the Bluetherm Duo to come back into sync, it’s probable that users roasting with 2 probes are unaware of this issue. This is the reason it’s taken me a few weeks to pinpoint the cause.

    If you make use of curve templates, and/or roast back to back batches, it’s also probable that you never physically disconnect from the Bluetherm Duo at all, so may have never seen this issue.

    How do I work around this issue?

    If the probes are reporting erroneous numbers in the roast console, simply exit out of the roast console, wait 15 seconds (unused probes will be disconnected), then open the roast console window again.

    If you are using 1 probe, the curve temperature should then be in sync. If you are using two curves, both curves will have issued the Celsius command, causing it to come in sync, then immediately go out of sync again. In this case, you will need to delete one curve, and recreate it. The last probe connection should bring the Bluetherm Duo back into sync.

    When Will This Be Fixed?

    I don’t have any word from the manufacturer yet if this behavior is the intended behavior or simply a spot in the documentation that has been translated in a less than understandable way. Whatever the case, I have reworked the code so that Roastmaster will query the unit to determine the scale it’s given, and translate accordingly.

    Until the update goes live, please inspect your curves before starting a roast. If all appears well, you can proceed normally. The probes will not disconnect in normal use for any reason other than a Bluetooth protocol error for the duration of the roast.

  • Database Error 1002

    Database Error 1002

    This issue was resolved in Roastmaster 7.0.2

    With iOS 7, Apple ushered in a lot of changes, both in the look of the OS as well as much of its underlying functionality. One of the more impactful changes for Roastmaster was a big shift in how Core Data operates with SQL databases like Roastmaster’s. As with any shift in technology, it has not been without its share of bumps in the road.

    It has surfaced since iOS 7 that in two uncommon scenarios, Roastmaster may display “Error opening database: 1002 – Could not perform compatibility check” when either launching the app and opening the main database, or manually opening any other database.

    Why Does This Happen?

    If you encounter this error due to either of the following two situations, do not fear – your data is not gone, Core Data is simply refusing to open it.

    In BOTH of these cases, I can easily and quickly reset the offending “flag” in the database file, and send it back to you in its original operational state. This error can present due to one of two situations:

    You have recently experienced an unexpected shutdown of your iOS device. This can be due to a hard reset of the device (such as in a hang, freeze or kernel panic), or due to the device shutting down on its own (such a in a low battery situation, or other iOS or hardware malfunction).

    If an iOS device experiences a core OS freeze, and a hard reset is performed, or the OS unexpectedly reboots for another reason, iOS may fail to reset the “busy” flag of the database files, causing Core Data to reject the database the next time you attempt to open it because it thinks the files are already in use.

    I can easily reset the busy flag by simply opening it in an external SQLite editor, exporting it via Roastmaster and sending right back to you.

    You have just restored or setup an iOS device from an iCloud or iTunes backup

    During the backup process, when iCloud or iTunes encounter a Roastmaster database file (.sqlite), it notices its two supporting cache files (.wal and .shm) and coalesces all three into a single, portable .sqlite file, in a process similar to what Roastmaster performs when you export a database. The single resulting .sqlite file(s) are backed up to iTunes or iCloud and stored in the device backup. This all happens transparently in the backup process.

    It appears that in the coalescing process, iTunes and iCloud fail to reset the journal mode on the database(s) from WAL mode (3 files) to DELETE mode (1 file). During the restore, it restores an intact .sqlite file, but since the journal mode is erroneously left as WAL, iOS expects the 2 supporting files. When it does not find them, it refuses to open the database.

    I can easily recreate the extraneous cache files by simply opening it in an external SQLite editor, exporting it via Roastmaster and sending right back to you.

    How Do I Get My Data Back?

    Regardless of which of these situations has presented itself, your data can be easily retrieved.

    If You Have an Exported Backup (or can make one from another device)

    If you have an external backup that is up to date, or are able to export an up-to-date file from another Roastmaster installation, this is the easiest way. Just import the resulting sqlite backup file into Roastmaster, and open that database by tapping the logo on the home screen, tapping the database button and opening it manually.

    If You Do Not Have a Backup

    You will need to send your database folder to me and I will “reset” the database. All that is required on my end to simply open the database in an external SQL editor. This will either A) reset the “busy” flag if it was left marked as “in use” after an unexpected reboot or B) reset (what I believe) to be an erroneous journal mode not properly set during the coalesce phase of the iTunes/iCloud backup.

    In most cases I can do this immediately and return the database file back to you for easy import, and you will be up and running in no time.

    Since Roastmaster actually opens a database to prep it for export, you will not be able to export the database from the app. You will need to use iTunes file sharing to copy the databases folder to your desktop by following these steps:

    1. Tether the device to iTunes
    2. In the “File Sharing” pane of the “Apps” tab, select Roastmaster
    3. In the “Roastmaster Documents” pane, find the “Databases” folder and copy the folder to your desktop
    4. ZIP that folder and email it to support@rainfroginc.com

    I will return a single database file that can be easily imported from Dropbox or email or copied to your Roastmaster documents folder via iTunes file sharing, then choosing “Import from documents” from Roastmaster’s home screen.

    When Will This Be Fixed?

    Unfortunately, it does not appear that I can do anything to fix either of these bugs until the actual causes are revealed. The bugs lie in either iCloud, iTunes or iOS itself – it’s unclear at the moment. I’ve filed two separate bug reports with Apple outlining the problem, and how to reproduce it.

    If you’ve found this page after encountering this error, PLEASE let me know – even if you don’t need my help in resetting your database. The more users I can report having this issue, the higher priority Apple is likely to assign to getting it fixed for good.

  • Setting Up the iCelsius BBQ

    Setting Up the iCelsius BBQ

    The iCelsius BBW probe is discontinued and will no longer be supported in future versions of Roastmaster.

    Setting Up an iCelsius BBQ for Data Logging

    1. Attach the iCelsius BBQ to your iOS device.
    2. Navigate to the Probes list from Roastmaster’s Utilities window.
    3. If you have not already purchased the Data Logging option, tap “Data Logging Store” and enable Data Logging. Roastmaster will guide you through the purchase.
    4. Tap the + button to add a new Probe.
    5. If the iCelsius is attached, the Status field should display “Linked”, and report the current probe temperature.
    6. Tap “Save”.

    Roastmaster only supports the wired BBQ probe. The manufacturer has not yet made the Wireless software available for public use.