Coder Social home page Coder Social logo

jutta-proto / protocol-bt-cpp Goto Github PK

View Code? Open in Web Editor NEW
43.0 10.0 3.0 154 KB

C++ JURA protocol implementation for controlling a Jura coffee maker over a Bluetooth connection.

License: GNU General Public License v3.0

CMake 4.23% C++ 95.54% Shell 0.23%
hacktoberfest cpp cpp20 bluetooth jura coffee-machine

protocol-bt-cpp's People

Contributors

com8 avatar ocrox avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Forkers

gdiepen ocrox

protocol-bt-cpp's Issues

Heartbeat Encoding example wrong?

I try to replicate encDecBytes on another platform.
Unfortunately I get slightly different results for your example in the readme in section "Heartbeat".

So providing input 0x 00 7F 80 shall result in encoded/decoded 0x 77 65 6D
but I get 0x 3B 65 6D, which is close but not equal.

Do you have another input/output combination for verification?
Thanks!

Accessing to setting through BT protocol

Greetings, I would like to inquire if there is a method to access the setting for the automatic shutdown feature on the Jura E6 machine. For example to change the duration for AutoOFF. I assume such an option exists, given its inclusion in the JOE mobile application. However, I would appreciate any information you might have on this matter, particularly if you have encountered it before. Thanks in advance.

Disconnect every few seconds

Hello,
Thanks a lot for the job, perfectly works with my Jura S80, the only problem I have is it disconnect every few seconds
image

Any idea ?

I use atom bluetooth proxy

substitutions:
  name: atom-bluetooth-proxy
  board: m5stack-atom
  mac: 0d350c

esphome:
  name: ${name}
  name_add_mac_suffix: true

esp32:
  board: ${board}
  framework:
    type: esp-idf

# Enable Home Assistant API
api:

# Enable logging
logger:

ota:

improv_serial:

# captive_portal:

bluetooth_proxy:
  active: true

wifi:
  ssid: !secret wifi_ssid
  password: !secret wifi_password
  use_address: ${name}-${mac}.local

esp32_ble_tracker:
  scan_parameters:
    interval: 1100ms
    window: 1100ms
    active: true

GTK-based program using BT protocol crashes with segmentation fault error

Greetings,

I attempted to execute a gtk-based example program using the BT (Bluetooth) protocol. Upon successfully building the program, I proceeded to run it. However, upon clicking the "Connect" button, the application crashed after a few seconds. Below is the log output:

[ info ] [thread 50639] Launching Version: 0.0.0 dev
[ info ] [thread 50639] Coffee maker found!
[ info ] [thread 50646] Scan stopped
[ info ] [thread 50646] Loading machines...
[ info ] [thread 50646] Loaded 484 machines.
Segmentation fault

Wifi Module

Hey,

first of all you did a stunning Job and a very good documentation. I just wonder if the Wi-Fi dongle from Jura works the same beside from the connection type? Did you ever had a look into this?

Need help modifying code for NFC coffee detection window.

I intend to modify the source codebase to include the opening of the NFC detection window every time a coffee request is made. I would appreciate it if you could provide me with instructions on the specific part of the codebase where these modifications should be made. Based on my understanding, it seems likely that the changes will need to be made within the CoffeeSelectionWidget.cpp file on_coffee_button_clicked() function, but I am open to any guidance or recommendations you may have. Thanks in advance.

Jura X3C

Has anyone managed to get the stats characteristic to work on an X3C

Coffee machine turning on via BT protocol

Can the coffee machine be powered on via Bluetooth protocol after a power outage? The maximum time available to be in ON mode so appears to be 9 hours. I see that this can be achieved through the UART protocol. But I want to know is it possible to solve this issue via BT protocol? Or maybe there's a way to disable automatic turn off.

Discrepancy between test_exec and other "tools"/"code"

Hi all

I have found an interesting issue. When I grab the manufacturerData from a peripheral, noble is giving me what appears to be incorrect data. Looking at the three samples, you will see the data from noble and bluetoothcli is different from the data returned from test_exec. I believe the data from test_exec to be correct. However, even if i hard code the key from test_exec into noble, the hearbeat fails to keep the session alive.

my environment is Linux jura 5.15.0-1046-raspi #49-Ubuntu SMP PREEMPT Thu Jan 18 12:45:41 UTC 2024 aarch64 aarch64 aarch64 GNU/Linux on Ubuntu 22.04.4 LTS

any guidance would be greatly appreciated

from noble

{
  localName: 'TT214H BlueFrog',
  txPowerLevel: undefined,
  manufacturerData: <Buffer ab 00 2a 05 08 03 31 3d e5 2e fa 00 46 43 83 42 01 c0 01 b6 28 00 00 00 00 00 00 00 00>,
  serviceData: [],
  serviceUuids: [ '1523', '1623' ],
  solicitationServiceUuids: [],
  serviceSolicitationUuids: []
}

from bluetoothcli

^Croot@jura:/home/amazon/btEngine# bluetoothctl info F8:FB:C3:2A:78:70
Device F8:FB:C3:2A:78:70 (random)
        Name: TT214H BlueFrog
        Alias: TT214H BlueFrog
        Paired: no
        Trusted: no
        Blocked: no
        Connected: no
        LegacyPairing: no
        UUID: Unknown                   (00001523-0000-1000-8000-00805f9b34fb)
        UUID: Unknown                   (00001623-0000-1000-8000-00805f9b34fb)
        ManufacturerData Key: 0x00ab
        ManufacturerData Value:
  2a 05 08 03 31 3d e5 2e fa 00 46 43 83 42 01 c0  *...1=....FC.B..
  01 b6 28 00 00 00 00 00 00 00 00                 ..(........   

From test_exec

[  info  ] [thread 55801]       Loading machines...
[  info  ] [thread 55801]       Loaded 543 machines.
[  info  ] [thread 55801]       Loading JOE from 'machinefiles/EF567_c.xml'...
[  info  ] [thread 55801]       JOE loaded.
[  info  ] [thread 55801]       Found machine 'GIGA X3c (INTB)' Version: 6 with 31 products.
[  info  ] [thread 55801]       Sending stay in BLE mode...
[  info  ] [thread 55801]       Key: 42. <---- - 0x2A
[  info  ] [thread 55801]       Wrote: 77656D
[  info  ] [thread 55801]       Connected.

the relevant code section is below

noble.on('discover', async (peripheral: Peripheral)=> {
      if (peripheral.address === CoffeeMachineUtils.toHexString(self.machineId)) {
        self.machine = peripheral;
        
        try {
          self.setState(MACHINE_STATE.CONNECTING)
          await peripheral.connectAsync();
          self.setState(MACHINE_STATE.CONNECTED)
          noble.stopScanning();
          console.log(peripheral.advertisement.manufacturerData)
        } catch (e) {
          self.setState(MACHINE_STATE.DISCONNECTED)
          throw e;
        }
      }
    })

Control Coffee Machine only with Bluetooth in Raspberry Pi

I am trying to implement a similar system to the one you have in another repository where we have a Raspbeery Pi and a RFID payment system. My question is if there is a way to not use UART and only use Bluetooth. Could the Barista mode help? I am yet to fully understand that mode and how to interact with it. I am able to brew coffee and detect when someone orders a new one, but I would need a way to make the coffee machine wait for the confirmation of payment from the Raspbeery Pi.
I thought about just cancelling the coffe if possible and then order the coffee from the Pi but that does not show anything on the screen. Thank you in advance!

GTK-based application using BT protocol product selection issue

When a GTK-based program employs the Bluetooth (BT) protocol, the program functions correctly during the selection of the first product. However, when the selection is attempted for the second time, the program repeats the selection of the first product.

Statistics via Bluetooth

I'm mostly interested in reading statistics via Bluetooth. It seems that "Statistics Command" and "Statistics Data" isn't documented yet. Is there any chance to get more information about it?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.