Skip to content

Commit

Permalink
Support for HDMI CEC protocol (#19434)
Browse files Browse the repository at this point in the history
  • Loading branch information
s-hadinger authored Sep 1, 2023
1 parent 48cf04d commit f7c4c16
Show file tree
Hide file tree
Showing 35 changed files with 1,560 additions and 3 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ All notable changes to this project will be documented in this file.

## [13.1.0.2]
### Added
- Support for HDMI CEC protocol

### Breaking Changed

Expand Down
7 changes: 7 additions & 0 deletions tasmota/include/i18n.h
Original file line number Diff line number Diff line change
Expand Up @@ -771,6 +771,13 @@
// Commands xdrv_60_shift595.ino - 74x595 family shift register driver
#define D_CMND_SHIFT595_DEVICE_COUNT "Shift595DeviceCount"

// Commands xdrv_70_hdmi_cec.ino
#define D_PRFX_HDMI "Hdmi"
#define D_CMND_HDMI_SEND "Send"
#define D_CMND_HDMI_SEND_RAW "SendRaw"
#define D_CMND_HDMI_TYPE "Type"
#define D_CMND_HDMI_ADDR "Addr"

// Commands xdrv_89_dali.ino
#define D_CMND_DALI_POWER "power"
#define D_CMND_DALI_DIMMER "dim"
Expand Down
6 changes: 6 additions & 0 deletions tasmota/include/tasmota_template.h
Original file line number Diff line number Diff line change
Expand Up @@ -211,6 +211,7 @@ enum UserSelectablePins {
GPIO_LOX_O2_RX, // LOX-O2 RX
GPIO_GM861_TX, GPIO_GM861_RX, // GM861 Serial interface
GPIO_DINGTIAN_OE, // New version of Dingtian relay board where PL is not shared with OE
GPIO_HDMI_CEC, // Support for HDMI CEC
GPIO_SENSOR_END };

// Error as warning to rethink GPIO usage with max 2045
Expand Down Expand Up @@ -469,6 +470,7 @@ const char kSensorNames[] PROGMEM =
D_SENSOR_LOX_O2_RX "|"
D_SENSOR_GM861_TX "|" D_SENSOR_GM861_RX "|"
D_GPIO_DINGTIAN_OE "|"
D_SENSOR_HDMI_CEC "|"
;

const char kSensorNamesFixed[] PROGMEM =
Expand Down Expand Up @@ -697,6 +699,10 @@ const uint16_t kGpioNiceList[] PROGMEM = {
AGPIO(GPIO_MCP23XXX_INT) + MAX_MCP23XXX,
#endif

#ifdef USE_HDMI_CEC
AGPIO(GPIO_HDMI_CEC), // HDMI CEC bus
#endif

AGPIO(GPIO_TXD), // Serial interface
AGPIO(GPIO_RXD), // Serial interface

Expand Down
4 changes: 2 additions & 2 deletions tasmota/include/tasmota_types.h
Original file line number Diff line number Diff line change
Expand Up @@ -742,7 +742,7 @@ typedef struct {
uint16_t modbus_sbaudrate; // 736
uint16_t shutter_motorstop; // 738
uint8_t battery_level_percent; // 73A
uint8_t free_73B[2]; // 73B
uint8_t hdmi_addr[2]; // 73B HDMI CEC physical address - warning this is a non-aligned uint16

uint8_t novasds_startingoffset; // 73D
uint8_t web_color[18][3]; // 73E
Expand Down Expand Up @@ -845,7 +845,7 @@ typedef struct {
uint8_t tcp_config; // F5F
uint8_t light_step_pixels; // F60

uint8_t ex_modbus_sbaudrate; // F61 - v12.2.0.5
uint8_t hdmi_cec_device_type; // F61 - v13.1.0.1 (was ex_modbus_sbaudrate v12.2.0.5)

uint8_t modbus_sconfig; // F62

Expand Down
1 change: 1 addition & 0 deletions tasmota/language/af_AF.h
Original file line number Diff line number Diff line change
Expand Up @@ -655,6 +655,7 @@
#define D_SENSOR_I2S_BCLK_IN "I2S WS IN"
#define D_SENSOR_I2S_DIN "I2S DIN"
#define D_SENSOR_I2S_DOUT "I2S DOUT"
#define D_SENSOR_HDMI_CEC "HDMI CEC"
#define D_SENSOR_WS2812 "WS2812"
#define D_SENSOR_DFR562 "MP3 Speler"
#define D_SENSOR_DFR562_BUSY "MP3 Bezet"
Expand Down
1 change: 1 addition & 0 deletions tasmota/language/bg_BG.h
Original file line number Diff line number Diff line change
Expand Up @@ -655,6 +655,7 @@
#define D_SENSOR_I2S_BCLK_IN "I2S WS IN"
#define D_SENSOR_I2S_DIN "I2S DIN"
#define D_SENSOR_I2S_DOUT "I2S DOUT"
#define D_SENSOR_HDMI_CEC "HDMI CEC"
#define D_SENSOR_WS2812 "WS2812"
#define D_SENSOR_DFR562 "MP3 Player"
#define D_SENSOR_DFR562_BUSY "MP3 Busy"
Expand Down
1 change: 1 addition & 0 deletions tasmota/language/ca_AD.h
Original file line number Diff line number Diff line change
Expand Up @@ -655,6 +655,7 @@
#define D_SENSOR_I2S_BCLK_IN "I2S WS IN"
#define D_SENSOR_I2S_DIN "I2S DIN"
#define D_SENSOR_I2S_DOUT "I2S DOUT"
#define D_SENSOR_HDMI_CEC "HDMI CEC"
#define D_SENSOR_WS2812 "WS2812"
#define D_SENSOR_DFR562 "Reproductor MP3"
#define D_SENSOR_DFR562_BUSY "MP3 Ocupat"
Expand Down
1 change: 1 addition & 0 deletions tasmota/language/cs_CZ.h
Original file line number Diff line number Diff line change
Expand Up @@ -655,6 +655,7 @@
#define D_SENSOR_I2S_BCLK_IN "I2S WS IN"
#define D_SENSOR_I2S_DIN "I2S DIN"
#define D_SENSOR_I2S_DOUT "I2S DOUT"
#define D_SENSOR_HDMI_CEC "HDMI CEC"
#define D_SENSOR_WS2812 "WS2812"
#define D_SENSOR_DFR562 "MP3 Player"
#define D_SENSOR_DFR562_BUSY "MP3 Busy"
Expand Down
1 change: 1 addition & 0 deletions tasmota/language/de_DE.h
Original file line number Diff line number Diff line change
Expand Up @@ -655,6 +655,7 @@
#define D_SENSOR_I2S_BCLK_IN "I2S WS IN"
#define D_SENSOR_I2S_DIN "I2S DIN"
#define D_SENSOR_I2S_DOUT "I2S DOUT"
#define D_SENSOR_HDMI_CEC "HDMI CEC"
#define D_SENSOR_WS2812 "WS2812"
#define D_SENSOR_DFR562 "MP3 Player"
#define D_SENSOR_DFR562_BUSY "MP3 Busy"
Expand Down
1 change: 1 addition & 0 deletions tasmota/language/el_GR.h
Original file line number Diff line number Diff line change
Expand Up @@ -655,6 +655,7 @@
#define D_SENSOR_I2S_BCLK_IN "I2S WS IN"
#define D_SENSOR_I2S_DIN "I2S DIN"
#define D_SENSOR_I2S_DOUT "I2S DOUT"
#define D_SENSOR_HDMI_CEC "HDMI CEC"
#define D_SENSOR_WS2812 "WS2812"
#define D_SENSOR_DFR562 "MP3 Player"
#define D_SENSOR_DFR562_BUSY "MP3 Busy"
Expand Down
1 change: 1 addition & 0 deletions tasmota/language/en_GB.h
Original file line number Diff line number Diff line change
Expand Up @@ -655,6 +655,7 @@
#define D_SENSOR_I2S_BCLK_IN "I2S WS IN"
#define D_SENSOR_I2S_DIN "I2S DIN"
#define D_SENSOR_I2S_DOUT "I2S DOUT"
#define D_SENSOR_HDMI_CEC "HDMI CEC"
#define D_SENSOR_WS2812 "WS2812"
#define D_SENSOR_DFR562 "MP3 Player"
#define D_SENSOR_DFR562_BUSY "MP3 Busy"
Expand Down
1 change: 1 addition & 0 deletions tasmota/language/es_ES.h
Original file line number Diff line number Diff line change
Expand Up @@ -655,6 +655,7 @@
#define D_SENSOR_I2S_BCLK_IN "I2S WS IN"
#define D_SENSOR_I2S_DIN "I2S DIN"
#define D_SENSOR_I2S_DOUT "I2S DOUT"
#define D_SENSOR_HDMI_CEC "HDMI CEC"
#define D_SENSOR_WS2812 "WS2812"
#define D_SENSOR_DFR562 "MP3 Player"
#define D_SENSOR_DFR562_BUSY "MP3 Busy"
Expand Down
1 change: 1 addition & 0 deletions tasmota/language/fr_FR.h
Original file line number Diff line number Diff line change
Expand Up @@ -655,6 +655,7 @@
#define D_SENSOR_I2S_BCLK_IN "I2S WS In"
#define D_SENSOR_I2S_DIN "I2S DIn"
#define D_SENSOR_I2S_DOUT "I2S DOut"
#define D_SENSOR_HDMI_CEC "HDMI CEC"
#define D_SENSOR_WS2812 "WS2812"
#define D_SENSOR_DFR562 "MP3 Player"
#define D_SENSOR_DFR562_BUSY "MP3 Busy"
Expand Down
1 change: 1 addition & 0 deletions tasmota/language/fy_NL.h
Original file line number Diff line number Diff line change
Expand Up @@ -655,6 +655,7 @@
#define D_SENSOR_I2S_BCLK_IN "I2S WS IN"
#define D_SENSOR_I2S_DIN "I2S DIN"
#define D_SENSOR_I2S_DOUT "I2S DOUT"
#define D_SENSOR_HDMI_CEC "HDMI CEC"
#define D_SENSOR_WS2812 "WS2812"
#define D_SENSOR_DFR562 "MP3 Speler"
#define D_SENSOR_DFR562_BUSY "MP3 Bezet"
Expand Down
1 change: 1 addition & 0 deletions tasmota/language/he_HE.h
Original file line number Diff line number Diff line change
Expand Up @@ -655,6 +655,7 @@
#define D_SENSOR_I2S_BCLK_IN "I2S WS IN"
#define D_SENSOR_I2S_DIN "I2S DIN"
#define D_SENSOR_I2S_DOUT "I2S DOUT"
#define D_SENSOR_HDMI_CEC "HDMI CEC"
#define D_SENSOR_WS2812 "WS2812"
#define D_SENSOR_DFR562 "נגן מוזיקה"
#define D_SENSOR_DFR562_BUSY "MP3 Busy"
Expand Down
1 change: 1 addition & 0 deletions tasmota/language/hu_HU.h
Original file line number Diff line number Diff line change
Expand Up @@ -655,6 +655,7 @@
#define D_SENSOR_I2S_BCLK_IN "I2S WS IN"
#define D_SENSOR_I2S_DIN "I2S DIN"
#define D_SENSOR_I2S_DOUT "I2S DOUT"
#define D_SENSOR_HDMI_CEC "HDMI CEC"
#define D_SENSOR_WS2812 "WS2812"
#define D_SENSOR_DFR562 "MP3 lejátszó"
#define D_SENSOR_DFR562_BUSY "MP3 elfoglalt"
Expand Down
1 change: 1 addition & 0 deletions tasmota/language/it_IT.h
Original file line number Diff line number Diff line change
Expand Up @@ -655,6 +655,7 @@
#define D_SENSOR_I2S_BCLK_IN "I2S - WS IN"
#define D_SENSOR_I2S_DIN "I2S - DIN"
#define D_SENSOR_I2S_DOUT "I2S - DOUT"
#define D_SENSOR_HDMI_CEC "HDMI CEC"
#define D_SENSOR_WS2812 "WS2812"
#define D_SENSOR_DFR562 "Riproduttore MP3"
#define D_SENSOR_DFR562_BUSY "MP3 occupato"
Expand Down
1 change: 1 addition & 0 deletions tasmota/language/ko_KO.h
Original file line number Diff line number Diff line change
Expand Up @@ -655,6 +655,7 @@
#define D_SENSOR_I2S_BCLK_IN "I2S WS IN"
#define D_SENSOR_I2S_DIN "I2S DIN"
#define D_SENSOR_I2S_DOUT "I2S DOUT"
#define D_SENSOR_HDMI_CEC "HDMI CEC"
#define D_SENSOR_WS2812 "WS2812"
#define D_SENSOR_DFR562 "MP3 Player"
#define D_SENSOR_DFR562_BUSY "MP3 Busy"
Expand Down
1 change: 1 addition & 0 deletions tasmota/language/nl_NL.h
Original file line number Diff line number Diff line change
Expand Up @@ -655,6 +655,7 @@
#define D_SENSOR_I2S_BCLK_IN "I2S WS IN"
#define D_SENSOR_I2S_DIN "I2S DIN"
#define D_SENSOR_I2S_DOUT "I2S DOUT"
#define D_SENSOR_HDMI_CEC "HDMI CEC"
#define D_SENSOR_WS2812 "WS2812"
#define D_SENSOR_DFR562 "MP3 Speler"
#define D_SENSOR_DFR562_BUSY "MP3 Bezet"
Expand Down
1 change: 1 addition & 0 deletions tasmota/language/pl_PL.h
Original file line number Diff line number Diff line change
Expand Up @@ -655,6 +655,7 @@
#define D_SENSOR_I2S_BCLK_IN "I2S WS IN"
#define D_SENSOR_I2S_DIN "I2S DIN"
#define D_SENSOR_I2S_DOUT "I2S DOUT"
#define D_SENSOR_HDMI_CEC "HDMI CEC"
#define D_SENSOR_WS2812 "WS2812"
#define D_SENSOR_DFR562 "Odtwarzacz MP3"
#define D_SENSOR_DFR562_BUSY "MP3 zajęty"
Expand Down
1 change: 1 addition & 0 deletions tasmota/language/pt_BR.h
Original file line number Diff line number Diff line change
Expand Up @@ -655,6 +655,7 @@
#define D_SENSOR_I2S_BCLK_IN "I2S WS IN"
#define D_SENSOR_I2S_DIN "I2S DIN"
#define D_SENSOR_I2S_DOUT "I2S DOUT"
#define D_SENSOR_HDMI_CEC "HDMI CEC"
#define D_SENSOR_WS2812 "WS2812"
#define D_SENSOR_DFR562 "MP3 Player"
#define D_SENSOR_DFR562_BUSY "MP3 Busy"
Expand Down
1 change: 1 addition & 0 deletions tasmota/language/pt_PT.h
Original file line number Diff line number Diff line change
Expand Up @@ -655,6 +655,7 @@
#define D_SENSOR_I2S_BCLK_IN "I2S WS IN"
#define D_SENSOR_I2S_DIN "I2S DIN"
#define D_SENSOR_I2S_DOUT "I2S DOUT"
#define D_SENSOR_HDMI_CEC "HDMI CEC"
#define D_SENSOR_WS2812 "WS2812"
#define D_SENSOR_DFR562 "Leitor de MP3"
#define D_SENSOR_DFR562_BUSY "MP3 Ocupado"
Expand Down
1 change: 1 addition & 0 deletions tasmota/language/ro_RO.h
Original file line number Diff line number Diff line change
Expand Up @@ -655,6 +655,7 @@
#define D_SENSOR_I2S_BCLK_IN "I2S WS IN"
#define D_SENSOR_I2S_DIN "I2S DIN"
#define D_SENSOR_I2S_DOUT "I2S DOUT"
#define D_SENSOR_HDMI_CEC "HDMI CEC"
#define D_SENSOR_WS2812 "WS2812"
#define D_SENSOR_DFR562 "MP3 Player"
#define D_SENSOR_DFR562_BUSY "MP3 Busy"
Expand Down
1 change: 1 addition & 0 deletions tasmota/language/ru_RU.h
Original file line number Diff line number Diff line change
Expand Up @@ -656,6 +656,7 @@
#define D_SENSOR_I2S_BCLK_IN "I2S WS IN"
#define D_SENSOR_I2S_DIN "I2S DIN"
#define D_SENSOR_I2S_DOUT "I2S DOUT"
#define D_SENSOR_HDMI_CEC "HDMI CEC"
#define D_SENSOR_WS2812 "WS2812"
#define D_SENSOR_DFR562 "MP3 Player"
#define D_SENSOR_DFR562_BUSY "MP3 Busy"
Expand Down
1 change: 1 addition & 0 deletions tasmota/language/sk_SK.h
Original file line number Diff line number Diff line change
Expand Up @@ -655,6 +655,7 @@
#define D_SENSOR_I2S_BCLK_IN "I2S WS IN"
#define D_SENSOR_I2S_DIN "I2S DIN"
#define D_SENSOR_I2S_DOUT "I2S DOUT"
#define D_SENSOR_HDMI_CEC "HDMI CEC"
#define D_SENSOR_WS2812 "WS2812"
#define D_SENSOR_DFR562 "MP3 Player"
#define D_SENSOR_DFR562_BUSY "MP3 Busy"
Expand Down
1 change: 1 addition & 0 deletions tasmota/language/sv_SE.h
Original file line number Diff line number Diff line change
Expand Up @@ -655,6 +655,7 @@
#define D_SENSOR_I2S_BCLK_IN "I2S WS IN"
#define D_SENSOR_I2S_DIN "I2S DIN"
#define D_SENSOR_I2S_DOUT "I2S DOUT"
#define D_SENSOR_HDMI_CEC "HDMI CEC"
#define D_SENSOR_WS2812 "WS2812"
#define D_SENSOR_DFR562 "MP3 spelare"
#define D_SENSOR_DFR562_BUSY "MP3 upptaget"
Expand Down
1 change: 1 addition & 0 deletions tasmota/language/tr_TR.h
Original file line number Diff line number Diff line change
Expand Up @@ -655,6 +655,7 @@
#define D_SENSOR_I2S_BCLK_IN "I2S WS IN"
#define D_SENSOR_I2S_DIN "I2S DIN"
#define D_SENSOR_I2S_DOUT "I2S DOUT"
#define D_SENSOR_HDMI_CEC "HDMI CEC"
#define D_SENSOR_WS2812 "WS2812"
#define D_SENSOR_DFR562 "MP3 Player"
#define D_SENSOR_DFR562_BUSY "MP3 Busy"
Expand Down
1 change: 1 addition & 0 deletions tasmota/language/uk_UA.h
Original file line number Diff line number Diff line change
Expand Up @@ -655,6 +655,7 @@
#define D_SENSOR_I2S_BCLK_IN "I2S WS IN"
#define D_SENSOR_I2S_DIN "I2S DIN"
#define D_SENSOR_I2S_DOUT "I2S DOUT"
#define D_SENSOR_HDMI_CEC "HDMI CEC"
#define D_SENSOR_WS2812 "WS2812"
#define D_SENSOR_DFR562 "MP3 Player"
#define D_SENSOR_DFR562_BUSY "MP3 Busy"
Expand Down
1 change: 1 addition & 0 deletions tasmota/language/vi_VN.h
Original file line number Diff line number Diff line change
Expand Up @@ -655,6 +655,7 @@
#define D_SENSOR_I2S_BCLK_IN "I2S WS IN"
#define D_SENSOR_I2S_DIN "I2S DIN"
#define D_SENSOR_I2S_DOUT "I2S DOUT"
#define D_SENSOR_HDMI_CEC "HDMI CEC"
#define D_SENSOR_WS2812 "WS2812"
#define D_SENSOR_DFR562 "MP3 Player"
#define D_SENSOR_DFR562_BUSY "MP3 Busy"
Expand Down
1 change: 1 addition & 0 deletions tasmota/language/zh_CN.h
Original file line number Diff line number Diff line change
Expand Up @@ -655,6 +655,7 @@
#define D_SENSOR_I2S_BCLK_IN "I2S WS IN"
#define D_SENSOR_I2S_DIN "I2S DIN"
#define D_SENSOR_I2S_DOUT "I2S DOUT"
#define D_SENSOR_HDMI_CEC "HDMI CEC"
#define D_SENSOR_WS2812 "WS2812"
#define D_SENSOR_DFR562 "MP3 Player"
#define D_SENSOR_DFR562_BUSY "MP3 Busy"
Expand Down
1 change: 1 addition & 0 deletions tasmota/language/zh_TW.h
Original file line number Diff line number Diff line change
Expand Up @@ -655,6 +655,7 @@
#define D_SENSOR_I2S_BCLK_IN "I2S WS IN"
#define D_SENSOR_I2S_DIN "I2S DIN"
#define D_SENSOR_I2S_DOUT "I2S DOUT"
#define D_SENSOR_HDMI_CEC "HDMI CEC"
#define D_SENSOR_WS2812 "WS2812"
#define D_SENSOR_DFR562 "MP3 Player"
#define D_SENSOR_DFR562_BUSY "MP3 Busy"
Expand Down
3 changes: 3 additions & 0 deletions tasmota/my_user_config.h
Original file line number Diff line number Diff line change
Expand Up @@ -783,6 +783,9 @@

#endif // USE_SPI

// -- One wire sensors ----------------------------
// #define USE_HDMI_CEC // Add support for HDMI CEC bus (+7k code)

// -- Serial sensors ------------------------------
//#define USE_MHZ19 // Add support for MH-Z19 CO2 sensor (+2k code)
//#define USE_SENSEAIR // Add support for SenseAir K30, K70 and S8 CO2 sensor (+2k3 code)
Expand Down
2 changes: 1 addition & 1 deletion tasmota/tasmota_support/settings.ino
Original file line number Diff line number Diff line change
Expand Up @@ -1731,7 +1731,7 @@ void SettingsDelta(void) {
Settings->energy_current_calibration2 = Settings->energy_current_calibration;
}
if (Settings->version < 0x0C020005) { // 12.2.0.5
Settings->modbus_sbaudrate = Settings->ex_modbus_sbaudrate;
Settings->modbus_sbaudrate = Settings->hdmi_cec_device_type; // was ex_modbus_sbaudrate
Settings->param[P_SERIAL_SKIP] = 0;
}
if (Settings->version < 0x0C030102) { // 12.3.1.2
Expand Down
Loading

0 comments on commit f7c4c16

Please sign in to comment.