Hello Everyone, this my first post, so please be gentle. First of all, thank you to the people in the community creating and maintaining openbeken.
After researching on solutions for monitoring power for my 3D printers, I ended up buying several of these
Tuya ATORCH S1-B/W/T/H Smart Socket Energy Monitor (BK7231N) (C3BS)
With help from articles on this forum I have been able to desolder the C3BS, flash openbeken with a TTL USB via Linux machine. Now I have a lovely closed-loop means to monitor my 3d printer farm power consumption with stats sent via MQTT to a Raspberry Pi running LibreNMS, and a custom app that draws nice graphs. (Openbeken -> MQTT -> perl script -> snmp -> LibreNMS custom app).
My issue that I need some help with:
I would like to now know why (and how to fix) the "toggle" on the interface for the power meter though, I have the channel 1 set for toggle, and I have the meter in "controlled" mode, pressing the button to toggle the relay definitely powers it off (and back on again), I can observe that openbeken sees the state change from 0 to 1 etc, but I click "Toggle on", this also changes the state and the button goes green/red etc, but the relay does not switch. I must have an error somewhere, or is an unsupported feature. it is the same on all four of my Atorch S1s...
Would someone be able to point me in the right direction or where to start trying to troubleshoot this? Here is my autoexec for info:
startDriver TuyaMCU
startDriver NTP
tuyaMcu_setBaudRate 115200
setChannelType 1 toggle
setChannelType 2 Voltage_div100
setChannelType 3 Power_div100
setChannelType 4 Current_div1000
setChannelType 5 Frequency_div100
setChannelType 6 EnergyCost_div1000
setChannelType 7 Temperature
setChannelType 8 PowerFactor_div100
setChannelType 9 EnergyTotal_kWh_div1000
//ch 1 (dpid 1) power relay control
linkTuyaMCUOutputToChannel 1 bool 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
All the meters are running 1.07 on the MCU as far as I can tell, thats what the config menu tells me.
thanks in advance
AI: Have you tried toggling the relay using other OpenBeken interfaces, such as MQTT commands or the HTTP API, and if so, does the relay switch as expected through those methods?
I have not, however the log indicates that something is being picked up and this shows the that the value toggles (probably causing the state to observed as changing on the home page)
AI: When you attempt to toggle the relay via the web UI, do you see any errors or unusual messages in the OpenBeken logs or debug output that might indicate what's going wrong?
Nothing obvious, but I'm not totally show
After researching on solutions for monitoring power for my 3D printers, I ended up buying several of these
Tuya ATORCH S1-B/W/T/H Smart Socket Energy Monitor (BK7231N) (C3BS)
With help from articles on this forum I have been able to desolder the C3BS, flash openbeken with a TTL USB via Linux machine. Now I have a lovely closed-loop means to monitor my 3d printer farm power consumption with stats sent via MQTT to a Raspberry Pi running LibreNMS, and a custom app that draws nice graphs. (Openbeken -> MQTT -> perl script -> snmp -> LibreNMS custom app).
My issue that I need some help with:
I would like to now know why (and how to fix) the "toggle" on the interface for the power meter though, I have the channel 1 set for toggle, and I have the meter in "controlled" mode, pressing the button to toggle the relay definitely powers it off (and back on again), I can observe that openbeken sees the state change from 0 to 1 etc, but I click "Toggle on", this also changes the state and the button goes green/red etc, but the relay does not switch. I must have an error somewhere, or is an unsupported feature. it is the same on all four of my Atorch S1s...
Would someone be able to point me in the right direction or where to start trying to troubleshoot this? Here is my autoexec for info:
startDriver TuyaMCU
startDriver NTP
tuyaMcu_setBaudRate 115200
setChannelType 1 toggle
setChannelType 2 Voltage_div100
setChannelType 3 Power_div100
setChannelType 4 Current_div1000
setChannelType 5 Frequency_div100
setChannelType 6 EnergyCost_div1000
setChannelType 7 Temperature
setChannelType 8 PowerFactor_div100
setChannelType 9 EnergyTotal_kWh_div1000
//ch 1 (dpid 1) power relay control
linkTuyaMCUOutputToChannel 1 bool 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
All the meters are running 1.07 on the MCU as far as I can tell, thats what the config menu tells me.
thanks in advance
AI: Have you tried toggling the relay using other OpenBeken interfaces, such as MQTT commands or the HTTP API, and if so, does the relay switch as expected through those methods?
I have not, however the log indicates that something is being picked up and this shows the that the value toggles (probably causing the state to observed as changing on the home page)
AI: When you attempt to toggle the relay via the web UI, do you see any errors or unusual messages in the OpenBeken logs or debug output that might indicate what's going wrong?
Nothing obvious, but I'm not totally show