EEVblog Electronics Community Forum

Electronics => Beginners => Topic started by: anilg on November 03, 2024, 07:09:26 am

Title: OpenBeken
Post by: anilg on November 03, 2024, 07:09:26 am
I just flashed a few devices with Open Beken.  It looked like it is like Tasmota.
I tried to use it like Tasmota but it did not work?
For example I said Mem1=10 and it did not accept that input.
Does it support stand alone mode like in Tasmota?

Also, please forgive me if this is not the correct forum to post question. I
Title: Re: OpenBeken
Post by: darkspr1te on November 03, 2024, 09:11:29 am
You need to really include more information. Like where did you put that value ?
anyway in most openbk installs you will need to create a autoexec.bat file to setup the device a example below
(goto device web page, select lauch web app, select file system, select create file autoexec.bat)


typical autoexec.bat for openbk/tuya mcu based device.
Code: [Select]
startDriver TuyaMCU
startDriver tmSensor
startDriver NTP
ntp_setServer 192.168.10.1
ntp_timeZoneOfs 2
tuyaMcu_setBaudRate 115200

setChannelType 1 toggle
setChannelType 2 Voltage_div10
setChannelType 3 Power
setChannelType 4 Current_div1000
setChannelType 5 Frequency_div100
setChannelType 6 ReadOnly
setChannelType 7 Temperature
setChannelType 8 ReadOnly
setChannelType 9 ReadOnly



//ch 1 (dpid 1) power relay control
linkTuyaMCUOutputToChannel 1 bool 1
addChannel 1 1
//ch 2(dpid 20) voltage
linkTuyaMCUOutputToChannel  20 1 2
//ch 3(dpid 19) power watts
linkTuyaMCUOutputToChannel 19 1 3
//ch 4 (dpid 18)current Amps
linkTuyaMCUOutputToChannel 18 1 4
//ch 5 (dpid (133) frequency
linkTuyaMCUOutputToChannel 133 1 5
//ch 6 (dpid  102) energy cost used
linkTuyaMCUOutputToChannel 102 1 6
// ch 7 (dpid 135) temp
linkTuyaMCUOutputToChannel 135 1 7
//ch 8 (dpid  134) power factor
linkTuyaMCUOutputToChannel 134 raw 8
//ch 9 (dpid  123) energy consumed
linkTuyaMCUOutputToChannel 123 1 9




then you need to add a mqtt user to your Home assistant setup with user/pass and put that in the config mqtt section
(main device web page, config, config mqtt)

finally you need to add mqtt config to configuration.yaml

example setup
Code: [Select]
mqtt:
  sensor:
    - unique_id: "ph3_current_a"
      name: 'PH3 Current'
      state_topic: 'obk1AF0C347/4/get'
      unit_of_measurement: 'A'
      value_template: '{{ (value | int)/1000 }}'
    - unique_id: "ph3_voltage"
      name: 'PH3 Voltage'
      state_topic: 'obk1AF0C347/2/get'
      unit_of_measurement: 'V'
      value_template: '{{ (value | int)/100 }}'
    - unique_id: "ph3_power"
      name: 'PH3 Power'
      state_topic: 'obk1AF0C347/3/get'
      device_class: energy
      unit_of_measurement: 'W'
      state_class: total_increasing
      value_template: '{{ (value | int)/100 }}'   
    - unique_id: "Phase Three Factor"
      name: 'ph3_pf P/Factor'
      state_topic: 'obk1AF0C347/8/get'
      unit_of_measurement: 'pF'
      value_template: '{{ (value | int)/100 }}'
    - unique_id: "ph3_freq"
      name: 'PH3 Frequency'
      state_topic: 'obk1AF0C347/5/get'
      unit_of_measurement: 'Hz'
      value_template: '{{ (value | int)/100 }}'
    - unique_id: "ph3_power_usage_total"
      name: 'PH3 T/Power Used'
      state_topic: 'obk1AF0C347/9/get'
      device_class: energy
      unit_of_measurement: 'kWh'     
      state_class: total_increasing
      value_template: '{{ (value | int)/1000 }}'




you can also go the much harder route of TunaHACS or similar but they all require tuya logins and such.


darkspr1te
Title: Re: OpenBeken
Post by: darkspr1te on November 03, 2024, 09:18:00 am
Also you should really supply more info like which openbk was flashed and to what device, include pics if you can.

also the people creating openbk hang out on the another place,


[url=https://www.elektroda.com/rtvforum/forum390.html]https://www.elektroda.com/rtvforum/forum390.html (http://https://www.elektroda.com/rtvforum/forum390.html)
[/url]


there are plenty of examples and links to the manuals, guides and pictures.


darkspr1te