ESPHome  2022.6.2
Data Structures | Namespaces | Enumerations | Functions | Variables
bedjet_base.h File Reference

Go to the source code of this file.

Data Structures

struct  esphome::bedjet::BedjetPacket
 
struct  esphome::bedjet::BedjetFlags
 
struct  esphome::bedjet::BedjetStatusPacket
 The format of a BedJet V3 status packet. More...
 
class  esphome::bedjet::BedjetCodec
 This class is responsible for encoding command packets and decoding status packets. More...
 

Namespaces

 esphome
 
 esphome::bedjet
 

Enumerations

enum  esphome::bedjet::BedjetPacketFormat : uint8_t { esphome::bedjet::PACKET_FORMAT_DEBUG = 0x05, esphome::bedjet::PACKET_FORMAT_V3_HOME = 0x56 }
 
enum  esphome::bedjet::BedjetPacketType : uint8_t { esphome::bedjet::PACKET_TYPE_STATUS = 0x1, esphome::bedjet::PACKET_TYPE_DEBUG = 0x2 }
 

Functions

struct esphome::bedjet::BedjetFlags esphome::bedjet::__attribute__ ((packed))
 

Variables

int a_
 
int b_
 
int conn_test_passed
 (0x20) Bit is set 1 if the last connection test passed. More...
 
int leds_enabled
 (0x10) Bit is set 1 if the LEDs on the device are enabled. More...
 
int c_
 
int units_setup
 (0x04) Bit is set 1 if the device's units have been configured. More...
 
int d_
 
int beeps_muted
 (0x01) Bit is set 1 if the device's sound output is muted. More...
 
enum esphome::bedjet::BedjetPacketFormat esphome::bedjet::__attribute__
 
uint8_t is_partial
 1 indicates that this is a partial packet, and more data can be read directly from the characteristic. More...
 
BedjetPacketFormat packet_format
 BedjetPacketFormat::PACKET_FORMAT_V3_HOME for BedJet V3 status packet format. More...
 
uint8_t expecting_length
 The expected total length of the status packet after merging the additional packet. More...
 
BedjetPacketType packet_type
 Typically BedjetPacketType::PACKET_TYPE_STATUS for BedJet V3 status packet. More...
 
uint8_t time_remaining_hrs
 Hours remaining in program runtime. More...
 
uint8_t time_remaining_mins
 Minutes remaining in program runtime. More...
 
uint8_t time_remaining_secs
 Seconds remaining in program runtime. More...
 
uint8_t actual_temp_step
 Actual temp of the air blown by the BedJet fan; value represents 2 * degrees_celsius. More...
 
uint8_t target_temp_step
 Target temp that the BedJet will try to heat to. See actual_temp_step. More...
 
BedjetMode mode
 BedJet operating mode. More...
 
uint8_t fan_step
 BedJet fan speed; value is in the 0-19 range, representing 5% increments (5%-100%): `5 + 5. More...
 
uint8_t max_hrs
 Max hours of mode runtime. More...
 
uint8_t max_mins
 Max minutes of mode runtime. More...
 
uint8_t min_temp_step
 Min temp allowed in mode. See actual_temp_step. More...
 
uint8_t max_temp_step
 Max temp allowed in mode. See actual_temp_step. More...
 
uint16_t turbo_time
 Time remaining in BedjetMode::MODE_TURBO. More...
 
uint8_t ambient_temp_step
 Current ambient air temp. More...
 
uint8_t shutdown_reason
 The reason for the last device shutdown. More...
 
uint32_t _skip_1_
 
uint16_t _skip_2_
 
uint8_t _skip_3_
 
uint8_t update_phase
 The current status/phase of a firmware update. More...
 
uint8_t flags
 
uint32_t _skip_4_
 See BedjetFlags for the packed byte flags. More...
 

Variable Documentation

◆ _skip_1_

uint32_t _skip_1_

Definition at line 122 of file bedjet_base.h.

◆ _skip_2_

uint16_t _skip_2_

Definition at line 124 of file bedjet_base.h.

◆ _skip_3_

uint8_t _skip_3_

Definition at line 125 of file bedjet_base.h.

◆ _skip_4_

uint32_t _skip_4_

See BedjetFlags for the packed byte flags.

Definition at line 136 of file bedjet_base.h.

◆ a_

int a_

Definition at line 83 of file bedjet_base.h.

◆ actual_temp_step

uint8_t actual_temp_step

Actual temp of the air blown by the BedJet fan; value represents 2 * degrees_celsius.

See #bedjet_temp_to_c and #bedjet_temp_to_f

Definition at line 97 of file bedjet_base.h.

◆ ambient_temp_step

uint8_t ambient_temp_step

Current ambient air temp.

This is the coldest air the BedJet can blow. See actual_temp_step.

Definition at line 116 of file bedjet_base.h.

◆ b_

int b_

Definition at line 84 of file bedjet_base.h.

◆ beeps_muted

int beeps_muted

(0x01) Bit is set 1 if the device's sound output is muted.

Definition at line 90 of file bedjet_base.h.

◆ c_

int c_

Definition at line 87 of file bedjet_base.h.

◆ conn_test_passed

int conn_test_passed

(0x20) Bit is set 1 if the last connection test passed.

Definition at line 85 of file bedjet_base.h.

◆ d_

int d_

Definition at line 89 of file bedjet_base.h.

◆ expecting_length

uint8_t expecting_length

The expected total length of the status packet after merging the additional packet.

Definition at line 88 of file bedjet_base.h.

◆ fan_step

uint8_t fan_step

BedJet fan speed; value is in the 0-19 range, representing 5% increments (5%-100%): `5 + 5.

  • fan_step`

Definition at line 105 of file bedjet_base.h.

◆ flags

uint8_t flags

Definition at line 134 of file bedjet_base.h.

◆ is_partial

uint8_t is_partial

1 indicates that this is a partial packet, and more data can be read directly from the characteristic.

Definition at line 83 of file bedjet_base.h.

◆ leds_enabled

int leds_enabled

(0x10) Bit is set 1 if the LEDs on the device are enabled.

Definition at line 86 of file bedjet_base.h.

◆ max_hrs

uint8_t max_hrs

Max hours of mode runtime.

Definition at line 107 of file bedjet_base.h.

◆ max_mins

uint8_t max_mins

Max minutes of mode runtime.

Definition at line 108 of file bedjet_base.h.

◆ max_temp_step

uint8_t max_temp_step

Max temp allowed in mode. See actual_temp_step.

Definition at line 110 of file bedjet_base.h.

◆ min_temp_step

uint8_t min_temp_step

Min temp allowed in mode. See actual_temp_step.

Definition at line 109 of file bedjet_base.h.

◆ mode

BedjetMode mode

BedJet operating mode.

Definition at line 102 of file bedjet_base.h.

◆ packet_format

BedjetPacketFormat packet_format

BedjetPacketFormat::PACKET_FORMAT_V3_HOME for BedJet V3 status packet format.

BedjetPacketFormat::PACKET_FORMAT_DEBUG for debugging packets.

Definition at line 85 of file bedjet_base.h.

◆ packet_type

BedjetPacketType packet_type

Typically BedjetPacketType::PACKET_TYPE_STATUS for BedJet V3 status packet.

Definition at line 89 of file bedjet_base.h.

◆ shutdown_reason

uint8_t shutdown_reason

The reason for the last device shutdown.

Definition at line 118 of file bedjet_base.h.

◆ target_temp_step

uint8_t target_temp_step

Target temp that the BedJet will try to heat to. See actual_temp_step.

Definition at line 99 of file bedjet_base.h.

◆ time_remaining_hrs

uint8_t time_remaining_hrs

Hours remaining in program runtime.

Definition at line 92 of file bedjet_base.h.

◆ time_remaining_mins

uint8_t time_remaining_mins

Minutes remaining in program runtime.

Definition at line 93 of file bedjet_base.h.

◆ time_remaining_secs

uint8_t time_remaining_secs

Seconds remaining in program runtime.

Definition at line 94 of file bedjet_base.h.

◆ turbo_time

uint16_t turbo_time

Time remaining in BedjetMode::MODE_TURBO.

Definition at line 113 of file bedjet_base.h.

◆ units_setup

int units_setup

(0x04) Bit is set 1 if the device's units have been configured.

Definition at line 88 of file bedjet_base.h.

◆ update_phase

uint8_t update_phase

The current status/phase of a firmware update.

Definition at line 130 of file bedjet_base.h.