Cannot get Tuya Integration to work

Huge thank you to everyone who has posted above. I bought myself one of these and following this thread has helped me to get everything set up and running in HA. I do have a couple of questions that hopefully you can help me with:

I set up the power switch, temperature scale, backlight and ringer in HA and the status is being reported. Has anyone worked out how to control these settings using HA rather than just report on them?

Once I have finished setting it up in HA (using LocalTuya) is it safe to remove it from the Smart Life app and can it be connected to the official Inkbird app instead?

Thanks

No, sorry, have not tried these. I guess the only one I would find interesting enough here would be figuring out how to calibrate the temperature offset, but I also have not looked at this yet. Since I use Homeassistant notifications I donā€™t really care about the built-in ringer (or backlight, for that matter) :wink:

I donā€™t think thatĀ“s possible, I assume it would generate a new localkey (due to the need of resetting the device) but feel free to try it out! Worst that can happen is that you have to re-integrate it back with the Tuya service again. Once you do that 4-5 times it also wonā€™t feel as annoyingly complicated :wink:

1 Like

@Asmus is correct, if you re-pair with any of the apps (Inkbird or Tuya) then a new localkey is generated. That being said, if you use the Bluestacks approach you can pair with, and continue to use, the Inkbird Pro app which contains the same functionality as the Inkbird BBQ 4T app.

3 Likes

@jaytee @Asmus

Thanks both. It would be useful if I could get the unit to make a sound either using HA or one of the apps so Iā€™m going to give that Bluestacks method a go using the Inkbird Pro app, thanks for your help :slight_smile:

Here are the Inkbird IBBQ-4T values I figured out while implementing via config flow if it helps anyone:

Value 1     TRUE/False      Unknown
Value 19    c/f             Farenhight/Celcius
Value 101   0-100           Battery %
Value 102   0,30,3601       Screen Timeout in seconds, (or 0 or 3601)
Value 104   True/FALSE      Mute
Value 105   0               Unknown
Value 107   7541            Probe 1 Temp
Value 108   7631            Probe 2 Temp
Value 109   7631            Probe 3 Temp
Value 110   7771            Probe 4 Temp
Value 111   0               Unknown

5 Likes

@DDomnick This is great information. I purchased the IBBQ-4BW during Prime Days and Iā€™m now utilizing your information as the basis for my configuration.
The IBBQ-4BW has the following DPS values:

Friendly Name	  Platform	           DPS	Unit of Measure	Device Class	Scaling Factor
ibbq_power	      binary_sensor	       1		            power	
ibbq_		                           13			
ibbq_wifi_on_off  switch	           19			
ibbq_battery	  sensor	           101	%	            battery      	1
ibbq_timout		                       102			                        1
ibbq_sound	      switch	           104			
ibbq_probe_1	  sensor	           107	ĀŗF	            temperature	    0.01
ibbq_probe_2	  sensor	           108	ĀŗF	            temperature	    0.01
ibbq_probe_3	  sensor	           109	ĀŗF	            temperature	    0.01
ibbq_probe_4	  sensor	           110	ĀŗF	            temperature	    0.01
ibbq_light	      light	               111			
ibbq_wifi_signal  sensor	           112	dBm	            signal_strength	
ibbq_		                           116			
ibbq_		                           117			
ibbq_		                           118			
ibbq_		                           119			

I believe that DPS 13 is bluetooth signal but the current value is 303300608. Not sure how to setup DPS 102 in localtuya as it is the value for the light to turn off. DPS 116-119 have no current values and I havenā€™t been able get them to change.

1 Like

Tuya has published official Integration! Now you are welcomed to join beta test. For people who share their valuable opinions will get a bigger gift. We are delighted to get feedback from you all to provide better experience on Tuya IoT Platform.Try it now!!
Tuya Official Integration Beta Test
Tuya home-assistant integration Github Repo

Tuya has published official Integration! Now you are welcomed to join beta test.
With Tuya official Home Assistant integration, you can:

-Use Home Assistant to link up with 310,000 (Powered by Tuya) smart devices
-Develop your own driver for New device integration
-Use 1000+ APIs in Tuya cloud and voice control integration like Google Assistant and Alexa
Try it now!!
Tuya Official Integration Beta Test
Tuya home-assistant integration Github Repo

Value 111 on the iBBQ-4T is a bitmask showing which probes are connected. This is the function I use in node.js to work it out with an example:

// Determine which probes are connected
function whichProbes(decVal) {
  // 15 = no probes
  // P1/2/3/4 = 1/2/4/8
  var binVal = (15 - decVal).toString(2)
  var reverseVal = binVal.split("");
  reverseVal = reverseVal.reverse();
  return reverseVal;
}

Eg.
111 returns 3
15 - 3 = 12
12 decimal = 1100 binary
Reverse it = 0011
0011 = Probe1 off, probe2 off, probe3 on, probe4 on

Hope that helps

I can vouch for this method too. I wanted to keep using the Inkbird Pro app so went and found the last old version which kept the device key in the clear. You get a new key each time you pair, but with Bluestacks you can find the key quickly.

Great info! Thanks!

Can confirm it works great with InkBird Pro v2.8.5, BlueStacks, BSTweaker and MWT TuyaKeyExtractor for getting the localkey. (HOW TO - Get All Local Tuya Keys (ALL KEYS, SIMPLE, NO SOLDERING) - YouTube)
And you can still use the recent version of the InkBird Pro app (settings are in sync to)

InkBird Pro v2.8.5 mirror: InkBird Pro APK | APKDownload.com

2 Likes

I looked some time back for an API or a way to get the data to Node-Red/MQTT but had no success. Happily, since then I started using Home Assistant. When I searched for adding it to HA, I found this and it works! Thank you, everyone!

Thanks everyone for all the hard work and effort. Just added this to my instance and it still works. For me, I used the InkBird APK with rooted bluestacks & special thanks to LiquidBlackNL for the link ā€“ had a terrible time searching for it.
I am mirroring the apk as well now in case it gets lost to time
Google Drive Link / Mirror for InkBird version 2.8.5
Personal Website Link / Mirror for InkBird version 2.8.5

1 Like

Thanks to Trickiegt for posting the 2.8.5 apk of inkbird pro. I was able to use the latest inkbird pro app on my phone and get the local key with the old version in bluestacks. This was after signing up for an IOT tuya and doing it that way too which was not necessary. I wanted to have a fallback of the inkbird pro app since the tuya one is limitied and in chinese.

Now that I have the 4 probes of my IBBQ-4T wifi in home assistant. How do I get that data to show up in lovelace like some of the above CloudBBQ and the weber igrill. All of those are bluetooth using MQTT. Iā€™m sure it is possible since the data is there. But I just donā€™t know where to begin with having high/low sliders for temperature points along with alarms/notifications.

I saw someone on reddit with this wifi IBBQ-4T has similar dashboard using nodered booleans and other stuff. Any help is appreciated. Thanks!

19 you can use select to switch between

the 102 light timeout i tried to use number but the configuration wont stick

also 1 i think is charging and not power because it goes to True when the charging cable is plugged in else it is false

image

Another approach to get the localkey; use ADB. Install the 2.8.5 version of the InkBird app, login and make sure the device is connected. Enable usb debugging in Android, connect your phone with the computer and create a backup from the app with:

adb backup -noapk com.inkbird.smartpro

Extract the backup file with:

( printf "\x1f\x8b\x08\x00\x00\x00\x00\x00" ; tail -c +25 backup.ab ) |  tar xfvz -

Now you can find the key in

apps/com.inkbird.smartpro/sp/preferences_global_key********************.xml

Just search for localKey.


Butā€¦ Iā€™m here for something else. Iā€™d like to integrate the IBBQ-4T as well but I want to keep the Inkbird app and all the cloud stuff so Iā€™ve installed the Tuya Smart app, added the device: under kitchen there is a ā€œFood Probe (Wi-Fi)ā€ device, pressed the button on the device 3 times quickly and choose ā€œBlink Quicklyā€, the device was discovered and added. After that Iā€™ve followed the guide: Tuya - Home Assistant and got the device in Home Assistant. Butā€¦ Iā€™m just getting a climate entity: climate.ibbq_4t, thatā€™s it. No temperatures. Am I missing something? Or is it not supported yet as of: Vote for Tuya Integration New Device Driver Support! Ā· Discussion #86 Ā· tuya/tuya-home-assistant Ā· GitHub where ā€œTemp sensorā€ is listed?

I have the exact same problem.
Added the IBBQ-4T to the Tuya Smart app the same way royduin did and IĀ“m also just getting a climate.ibbq_4t in Home Assistant. (which can be switched on/off inte the app/ha, but no temperature-sensors in HA).

Is everyone, that has it working, still using LocalTuya?

I just fired mine up. Localtuya and my IBBQ.

image

And my dashboard. All looks fine.

@kbrown01 - I like your dashboard - Iā€™ve gotten the probe temps and battery % working, but a few questions if you donā€™t mind:

  • How did you get the battery to say ā€œchargingā€, mine says the % or ā€œx* x,000%ā€ when charging
  • How did you get the ā€œsetā€ entries (pretty much the entire left column)

Thanks!

Entire left column would like need a few things. I would actually do it different as I built that years ago and now know how to use ā€˜jqā€™ and parse a JSON file. That said, here is the code for that:

type: vertical-stack
cards:
  - type: entities
    title: iBBQ Temperature Settings
    entities:
      - type: section
        label: Probe Set Temperatures
      - type: custom:slider-entity-row
        entity: input_number.ibbq_target_probe_1
        state: '{{states(''input_number.ibbq_target_probe_1'') | round | int}} ĀŗF'
        name: IBBQ Set Temp 1
        icon: mdi:thermometer
        condition: '{{states(''binary_sensor.ibbq_power'') == ''on''}} '
      - type: custom:slider-entity-row
        entity: input_number.ibbq_target_probe_2
        state: '{{states(''input_number.ibbq_target_probe_2'') | round | int}} ĀŗF'
        name: IBBQ Set Temp 2
        icon: mdi:thermometer
        condition: '{{states(''binary_sensor.ibbq_power'') == ''on''}} '
      - type: custom:slider-entity-row
        entity: input_number.ibbq_target_probe_3
        icon: mdi:thermometer
        state: '{{states(''input_number.ibbq_target_probe_3'') | round | int}} ĀŗF'
        name: IBBQ Set Temp 3
        condition: '{{states(''binary_sensor.ibbq_power'') == ''on''}} '
      - type: custom:slider-entity-row
        entity: input_number.ibbq_target_probe_4
        icon: mdi:thermometer
        state: '{{states(''input_number.ibbq_target_probe_4'') | round | int}} ĀŗF'
        name: IBBQ Set Temp 4
        condition: '{{states(''binary_sensor.ibbq_power'') == ''on''}} '
      - type: section
        label: Set All Probes (either select meat and doneness or direct)
      - type: conditional
        conditions:
          - entity: binary_sensor.ibbq_power
            state: 'on'
        row:
          entity: input_select.meat_types
      - type: conditional
        conditions:
          - entity: binary_sensor.ibbq_power
            state: 'on'
        row:
          entity: input_select.meat_temps
      - type: conditional
        conditions:
          - entity: binary_sensor.ibbq_power
            state: 'on'
        row:
          type: custom:slider-entity-row
          entity: input_number.ibbq_target_probe_all
          hide_state: false
          name: Direct Set
      - type: section
        label: Set iBBQ Check Timer
      - type: conditional
        conditions:
          - entity: binary_sensor.ibbq_power
            state: 'on'
        row:
          type: custom:slider-entity-row
          entity: input_number.ibbq_timer_setting
          hide_state: false
          name: Set Time
      - type: conditional
        conditions:
          - entity: binary_sensor.ibbq_power
            state: 'on'
        row:
          entity: input_boolean.ibbqtimeswitch

Which you likely need these in input_selectā€™s:

meat_types:
   name: Meat
   options:
     - Poultry
     - Pig
     - Lamb
     - Beef
     - Venison
     - Alligator
   initial: Pig
   icon: mdi:cow

meat_temps:
    name: Doneness
    options:
      - Rare
      - Medium-Rare
      - Medium
      - Medium-Well
      - Well
    initial: Rare
    icon: mdi:fire

And this in automations:

- id: '1626830122913'
  alias: Set iBBQ Target Temps
  description: ''
  trigger:
  - platform: state
    entity_id: input_number.ibbq_target_probe_all
  condition: []
  action:
  - service: input_number.set_value
    data_template:
      entity_id:
      - input_number.ibbq_target_probe_1
      - input_number.ibbq_target_probe_2
      - input_number.ibbq_target_probe_3
      - input_number.ibbq_target_probe_4
      value: '{{ states.input_number.ibbq_target_probe_all.state | int }}'
  mode: single
- id: '1626894736185'
  alias: Set iBBQ Timer
  description: ''
  trigger:
  - platform: state
    entity_id: input_boolean.ibbqtimeswitch
    to: 'on'
  condition: []
  action:
  - service: timer.start
    data:
      duration: '{{ (states.input_number.ibbq_timer_setting.state | int) * 60 }}'
    target:
      entity_id: timer.ibbq_timer
  mode: single
- id: '1626897113672'
  alias: Cancel iBBQ Timer
  description: ''
  trigger:
  - platform: state
    entity_id: input_boolean.ibbqtimeswitch
    to: 'off'
  condition: []
  action:
  - service: timer.cancel
    target:
      entity_id: timer.ibbq_timer
  mode: single
- id: '1626904362258'
  alias: iBBQ Probe Alarm
  description: ''
  trigger:
  - platform: template
    value_template: "{% if states('sensor.ibbq_probe_1') != 'unknown' and states('sensor.ibbq_probe_1')\
      \ | round | int > states('input_number.ibbq_target_probe_1') | round | int %}\n\
      \  true\n{% elif states('sensor.ibbq_probe_2') != 'unknown' and states('sensor.ibbq_probe_2')\
      \ | round | int > states('input_number.ibbq_target_probe_2') | round | int %}\n\
      \  true\n{% elif states('sensor.ibbq_probe_3') != 'unknown' and states('sensor.ibbq_probe_3')\
      \ | round | int > states('input_number.ibbq_target_probe_3') | round | int %}\n\
      \  true\n{% elif states('sensor.ibbq_probe_4') != 'unknown' and states('sensor.ibbq_probe_4')\
      \ | round | int > states('input_number.ibbq_target_probe_4') | round | int %}\n\
      \  true\n{% endif %}"
  condition:
  - condition: state
    entity_id: binary_sensor.ibbq_power
    state: 'on'
  action:
  - service: media_player.play_media
    data:
      media_content_id: air_horn_03
      media_content_type: sound
    target:
      entity_id:
      - media_player.deck_alexa
      - media_player.kitchen_alexa
      - media_player.stereo_alexa
  - service: notify.alexa_media_stereo_alexa
    data:
      data:
        type: tts
      message: i B B Q temperature probe warning
  - service: notify.alexa_media_deck_alexa
    data:
      message: i B B Q temperature probe warning
      data:
        type: tts
  - service: notify.alexa_media_kitchen_alexa
    data:
      message: i B B Q temperature probe warning
      data:
        type: tts
  mode: single
- id: '1626908831776'
  alias: iBBQ Timer Announcement
  description: ''
  trigger:
  - platform: state
    entity_id: timer.ibbq_timer
    from: active
    to: idle
  condition: []
  action:
  - service: media_player.play_media
    data:
      media_content_id: air_horn_03
      media_content_type: sound
    target:
      entity_id:
      - media_player.deck_alexa
      - media_player.kitchen_alexa
      - media_player.stereo_alexa
  - service: notify.mobile_app_sm_g955u
    data:
      message: The i B B Q timer is finshed
      title: iBBQ Update Status
  - service: notify.alexa_media_deck_alexa
    data:
      message: The i B B Q timer is finshed
      title: IBBQ Timer
      data:
        type: tts
  - service: notify.alexa_media_stereo_alexa
    data:
      message: The i B B Q timer is finshed
      title: IBBQ Timer
      data:
        type: tts
  - service: notify.alexa_media_kitchen_alexa
    data:
      message: The i B B Q timer is finshed
      title: IBBQ Timer
      data:
        type: tts
  - service: input_boolean.turn_off
    target:
      entity_id: input_boolean.ibbqtimeswitch
  mode: single
- id: '1626988470201'
  alias: iBBQ Meat and Temp
  description: ''
  trigger:
  - platform: state
    entity_id: input_select.meat_types
  - platform: state
    entity_id: input_select.meat_temps
  condition: []
  action:
  - service: var.set
    data:
      entity_id: var.meatmaptemp
  - service: input_number.set_value
    target:
      entity_id:
      - input_number.ibbq_target_probe_1
      - input_number.ibbq_target_probe_2
      - input_number.ibbq_target_probe_3
      - input_number.ibbq_target_probe_4
    data:
      value: '{{states.var.meatmaptemp.state}}'

I am trying to remember it all as it was a few years back I wrote this. That may be everything or maybe you can find some missing pieces and I will dig them out. That includes some things like the automation to announce on Alexa if a probe reaches a certain set temperature.

1 Like