I think you still have problem because this old IP is remembered in settings. Please use ntp_setServer to assign a new, correct NTP server IP.
Helpful post? Buy me a coffee.
Czy wolisz polską wersję strony elektroda?
Nie, dziękuję Przekieruj mnie tamC:\Users\qrctg>ping hora.roa.es
Haciendo ping a hora.roa.es [150.214.94.5] con 32 bytes de datos:
Tiempo de espera agotado para esta solicitud.
Tiempo de espera agotado para esta solicitud.
Estadísticas de ping para 150.214.94.5:
Paquetes: enviados = 2, recibidos = 0, perdidos = 2
(100% perdidos),
Control-C
^C
C:\Users\qrctg>ping minuto.roa.es
Haciendo ping a minuto.roa.es [150.214.94.10] con 32 bytes de datos:
Tiempo de espera agotado para esta solicitud.
Tiempo de espera agotado para esta solicitud.
Estadísticas de ping para 150.214.94.10:
Paquetes: enviados = 2, recibidos = 0, perdidos = 2
(100% perdidos),
Control-C
^C
startDriver TuyaMCU
startDriver tmSensor
startDriver NTP
ntp_setServer 193.136.152.71
ntp_timeZoneOfs 1
setChannelType 1 temperature_div10
linkTuyaMCUOutputToChannel 1 val 1
setChannelType 2 Humidity
linkTuyaMCUOutputToChannel 2 val 2
setChannelType 3 ReadOnlyLowMidHigh
linkTuyaMCUOutputToChannel 3 val 3
setChannelLabel 3 BatteryLevel
xeparrelik wrote:
I've bought this device and I wanted to flash OpenBK into it, could anyone please tell me the instructions on how to flash it?
p.kaczmarek2 wrote:Main_IsConnectedToWiFi should only check for WiFi connection, not NTP... you seem to have found correctly the issue, but the fix should be rather to add the NTP check somewhere, I'm not sure where yet.
return g_bHasWiFiConnected>0 && (g_cfg.staticIP.localIPAddr[0] != 0 || g_currentIPString[0] != 0);
startDriver TuyaMCU
// TEMP $CH1
setChannelType 1 temperature_div10
linkTuyaMCUOutputToChannel 1 val 1 // maybe I just understand it wrong.. but now the value from TyuaMCU 1 should be connected to ch1??
// HUM $CH2
setChannelType 2 Humidity
linkTuyaMCUOutputToChannel 2 val 2
startDriver tmSensor
startDriver NTP
ntp_timeZoneOfs 1
ntp_setServer 192.168.1.132 // local NTP server for speed and loop prevention in case of internet outage
// now wait for NTP
waitFor NTPState 1
// now wait for MQTT
waitFor MQTTState 1
delay_s 1
publish DATA {"ROOM":"KITCHEN","TEMPERATURE":$CH1,"HUMIDITY":$CH2} // both are zero .. I also tried $1
REST OF YOUR OLD SCRIPT HERE....
// now wait for MQTT
waitFor MQTTState 1
// now wait for channel 1 to become non zero
// if channel 1 is still 0, loop, wait 0.1s and check again
again:
delay_s 0.1
if $CH1==0 then goto again
publish DATA {"ROOM":"KITCHEN","TEMPERATURE":$CH1,"HUMIDITY":$CH2}
GAAD wrote:Is there a chance to reprogram it and free myself from Tuya?
divadiow wrote:Code: JSONLog in, to see the code
p.kaczmarek2 wrote:@GAAD as long as the dpIDs didn't change, it should be very easy, like with similiar modules. tmSensor driver should work. Just remember the basics that have been spoken on forum many time, like that you need to disconnect TuyaMCU for the time of the flashing because it's using the same UART port, etc, etc.
startDriver NTP
ntp_setServer 192.168.1.253
waitFor NTPState 1
startDriver TuyaMCU
startDriver tmSensor
ntp_timeZoneOfs 1
setChannelType 1 temperature_div10
linkTuyaMCUOutputToChannel 1 val 1
setChannelType 2 Humidity
linkTuyaMCUOutputToChannel 2 val 2
linkTuyaMCUOutputToChannel 3 val 3
setChannelType 3 ReadOnlyLowMidHigh
setChannelLabel 3 "Battery Level"
mqtt_broadcastItemsPerSec 20
waitFor MQTTState 1
// now wait for channel 1 to become non zero
// if channel 1 is still 0, loop, wait 0.1s and check again
again:
delay_s 0.1
if $CH1==0 then goto again
publish DATA {"ROOM":"SYPIALNIA 1","TEMPERATURE":$CH1,"HUMIDITY":$CH2}
startDriver NTP
ntp_setServer 192.168.1.253
waitFor NTPState 1
startDriver TuyaMCU
startDriver tmSensor
ntp_timeZoneOfs 1
setChannelType 1 temperature
linkTuyaMCUOutputToChannel 1 val 1
setChannelType 2 Humidity
linkTuyaMCUOutputToChannel 2 val 2
setChannelLabel 3 "Battery Level State"
linkTuyaMCUOutputToChannel 3 val 3
setChannelType 3 ReadOnlyLowMidHigh
setChannelLabel 4 "Battery Level"
linkTuyaMCUOutputToChannel 4 val 4
setChannelType 4 ReadOnlyLowMidHigh
mqtt_broadcastItemsPerSec 20
waitFor MQTTState 1
// now wait for channel 1 to become non zero
// if channel 1 is still 0, loop, wait 0.1s and check again
again:
delay_s 0.1
if $CH1==0 then goto again
publish DATA {"ROOM":"SYPIALNIA 1","TEMPERATURE":$CH1,"HUMIDITY":$CH2}
startDriver NTP
ntp_setServer 192.168.1.253
waitFor NTPState 1
startDriver TuyaMCU
startDriver tmSensor
ntp_timeZoneOfs 1
//setChannelType 1 temperature_div10
setChannelType 1 temperature
linkTuyaMCUOutputToChannel 1 val 1
setChannelType 2 Humidity
linkTuyaMCUOutputToChannel 2 val 2
setChannelLabel 3 "Battery Level State"
linkTuyaMCUOutputToChannel 3 val 3
setChannelType 3 ReadOnlyLowMidHigh
setChannelLabel 4 "Battery Level"
linkTuyaMCUOutputToChannel 4 val 4
setChannelType 4 ReadOnlyLowMidHigh
mqtt_broadcastItemsPerSec 20
waitFor MQTTState 1
// now wait for channel 1 to become non zero
// if channel 1 is still 0, loop, wait 0.1s and check again
again:
delay_s 0.1
if $CH1==0 then goto again
publish DATA {"ROOM":"SYPIALNIA 1","TEMPERATURE":$CH1,"HUMIDITY":$CH2, "BATTERY Level State":$CH3,"BATTERY Level":$CH4}
p.kaczmarek2 wrote:Thank you for sharing, that's what he asked for. So the temperature unit selection dpID on this device is 9, it's an enumeration with two possible options - C or F.
startDriver NTP
ntp_setServer 192.168.1.253
waitFor NTPState 1
ntp_timeZoneOfs 1
startDriver TuyaMCU
startDriver tmSensor
setChannelType 1 temperature_div10
//setChannelType 1 temperature
linkTuyaMCUOutputToChannel 1 val 1
setChannelType 2 Humidity
linkTuyaMCUOutputToChannel 2 val 2
setChannelLabel 3 "Battery State"
linkTuyaMCUOutputToChannel 3 val 3
setChannelType 3 ReadOnlyLowMidHigh
setChannelLabel 4 "Battery"
linkTuyaMCUOutputToChannel 4 val 4
setChannelType 4 BatteryLevelPercent
mqtt_broadcastItemsPerSec 20
waitFor MQTTState 1
// now wait for channel 1 to become non zero
// if channel 1 is still 0, loop, wait 0.1s and check again
again:y
delay_s 0.1
if $CH1==0 then goto again
publish DATA {"Temperature":$CH1,"Humidity":$CH2,"Battery State":$CH3,"Battery Level":$CH4}
Info:MAIN:Main_OnWiFiStatusChange - WIFI_STA_CONNECTED - 4
Info:MAIN:Time 11, idle 88107/s, free 66000, MQTT 0(0), bWifi 1, secondsWithNoPing -1, socks 4/38
Info:MAIN:HA discovery is scheduled, but MQTT connection is not present yet
Info:NTP:Seconds since Jan 1 1900 = 3943894588
Info:NTP:Unix time : 1734905788
Info:NTP:Local Time : 2024-12-22 22:16:28
Info:MAIN:Time 12, idle 186198/s, free 74848, MQTT 0(0), bWifi 1, secondsWithNoPing -1, socks 2/38
Info:MAIN:HA discovery is scheduled, but MQTT connection is not present yet
Info:NTP:NTP offset set
Info:MAIN:Started TuyaMCU.
Info:MAIN:Started tmSensor.
Info:GEN:Channel 1 type changed to temperature
Info:GEN:Channel 2 type changed to Humidity
Info:GEN:Channel 3 type changed to ReadOnlyLowMidHigh
Info:GEN:Channel 4 type changed to BatteryLevelPercent
Info:MQTT:mqtt_userName mqtt
mqtt_pass mqtt
mqtt_clientID obk689EE87D
mqtt_host 192.168.1.253:1883
Info:MQTT:mqtt_connection_cb: Successfully connected
Info:MQTT:mqtt_subscribed to obk689EE87D/+/set
Info:MQTT:mqtt_subscribed to bekens_n/+/set
Info:MQTT:mqtt_subscribed to cmnd/obk689EE87D/+
Info:MQTT:mqtt_subscribed to cmnd/bekens_n/+
Info:MQTT:mqtt_subscribed to obk689EE87D/+/get
Info:MAIN:Time 13, idle 181915/s, free 72368, MQTT 0(1), bWifi 1, secondsWithNoPing -1, socks 2/38
Info:MAIN:Will do request HA discovery now.
Info:HTTP:HASS counts: 0 rels, 0 pwms, 0 inps, 0 excluded
Info:MQTT:Queued topic=homeassistant/sensor/TiW_Disp_1_temperature_1/config, 1 items in queue
Info:MQTT:Queued topic=homeassistant/sensor/TiW_Disp_1_humidity_2/config, 2 items in queue
Info:MQTT:Queued topic=homeassistant/sensor/TiW_Disp_1_sensor_3/config, 3 items in queue
Info:MQTT:Queued topic=homeassistant/sensor/TiW_Disp_1_temp/config, 4 items in queue
Info:MQTT:Queued topic=homeassistant/sensor/TiW_Disp_1_rssi/config, 5 items in queue
Info:MQTT:Queued topic=homeassistant/sensor/TiW_Disp_1_uptime/config, 6 items in queue
Info:MQTT:Queued topic=homeassistant/sensor/TiW_Disp_1_build/config, 7 items in queue
Info:MQTT:Queued topic=homeassistant/sensor/TiW_Disp_1_ssid/config, 8 items in queue
Info:MQTT:Queued topic=homeassistant/sensor/TiW_Disp_1_ip/config, 9 items in queue
Info:TuyaMCU:Received: 55 AA 00 01 00 24 7B 22 70 22 3A 22 67 37 63 6A 6D 65 66 75 6F 75 63 6D 63 62 32 73 22 2C 22 76 22 3A 22 31 2E 31 2E 36 22 7D DC
Info:TuyaMCU:ProcessIncoming[v=0]: cmd 1 (QueryProductInformation) len 43
Info:TuyaMCU:ParseQueryProductInformation: received {"p":"g7cjmefuoucmcb2s","v":"1.1.6"}
Info:MQTT:Publishing val TiW_Disp_1 to obk689EE87D/host retain=0
Info:MQTT:Publishing val OpenBK7231N 1.17.780 Nov 29 2024 09:48:51 to obk689EE87D/build retain=0
Info:MQTT:Publishing val d8:d6:68:9e:e8:7d to obk689EE87D/mac retain=0
Info:MQTT:Publishing val (313 bytes) to homeassistant/sensor/TiW_Disp_1_temperature_1/config retain=1
Info:MQTT:Publishing val (302 bytes) to homeassistant/sensor/TiW_Disp_1_humidity_2/config retain=1
Info:MQTT:Publishing val (385 bytes) to homeassistant/sensor/TiW_Disp_1_sensor_3/config retain=1
Info:MQTT:Publishing val 34.00 to obk689EE87D/temp retain=0
Info:MQTT:Publishing val SALON to obk689EE87D/ssid retain=0
Info:MQTT:Publishing val 1734909389 to obk689EE87D/datetime retain=0
Info:MQTT:Publishing val 2 to obk689EE87D/sockets retain=0
Info:MQTT:Publishing val -80 to obk689EE87D/rssi retain=0
Info:MQTT:Publishing val 13 to obk689EE87D/uptime retain=0
Info:MQTT:Publishing val 58176 to obk689EE87D/freeheap retain=0
Info:MQTT:Publishing val 192.168.1.72 to obk689EE87D/ip retain=0
Info:MQTT:Channel has changed! Publishing 0.000000 to channel 1
Info:MQTT:Publishing val 0.000000 to obk689EE87D/1/get retain=0
Info:MQTT:Channel has changed! Publishing 0.000000 to channel 2
Info:MQTT:Publishing val 0.000000 to obk689EE87D/2/get retain=0
Info:MQTT:Channel has changed! Publishing 0.000000 to channel 3
Info:MQTT:Publishing val 0.000000 to obk689EE87D/3/get retain=0
Info:MQTT:MQTT client in mqtt_incoming_publish_cb topic obk689EE87D/1/get
Info:MQTT:Channel has changed! Publishing 0.000000 to channel 4
Info:MQTT:Publishing val 0.000000 to obk689EE87D/4/get retain=0
Info:MQTT:MQTT client in mqtt_incoming_publish_cb topic obk689EE87D/2/get
Info:MQTT:MQTT client in mqtt_incoming_publish_cb topic obk689EE87D/3/get
Info:MAIN:Time 14, idle 152993/s, free 57808, MQTT 1(1), bWifi 1, secondsWithNoPing -1, socks 2/38
Info:MQTT:MQTT client in mqtt_incoming_publish_cb topic obk689EE87D/4/get
Error:CMD:cmd again:y NOT found (args )
Info:TuyaMCU:Received: 55 AA 00 02 00 00 01
Info:TuyaMCU:ProcessIncoming[v=0]: cmd 2 (MCUconf) len 7
Info:TuyaMCU:ProcessIncoming: TUYA_CMD_MCU_CONF, TODO!
Error:CMD:cmd again:y NOT found (args )
Error:CMD:cmd again:y NOT found (args )
Error:CMD:cmd again:y NOT found (args )
Error:CMD:cmd again:y NOT found (args )
Error:CMD:cmd again:y NOT found (args )
Info:MQTT:Publishing val (334 bytes) to homeassistant/sensor/TiW_Disp_1_temp/config retain=1
Info:MQTT:Publishing val (331 bytes) to homeassistant/sensor/TiW_Disp_1_rssi/config retain=1
Info:MQTT:Publishing val (333 bytes) to homeassistant/sensor/TiW_Disp_1_uptime/config retain=1
Info:MAIN:Time 15, idle 136009/s, free 57352, MQTT 1(1), bWifi 1, secondsWithNoPing -1, socks 2/38
Error:CMD:cmd again:y NOT found (args )
Error:CMD:cmd again:y NOT found (args )
Error:CMD:cmd again:y NOT found (args )
Error:CMD:cmd again:y NOT found (args )
Error:CMD:cmd again:y NOT found (args )
Error:CMD:cmd again:y NOT found (args )
Info:MQTT:Publishing val (260 bytes) to homeassistant/sensor/TiW_Disp_1_build/config retain=1
Info:MQTT:Publishing val (291 bytes) to homeassistant/sensor/TiW_Disp_1_ssid/config retain=1
Info:MQTT:Publishing val (275 bytes) to homeassistant/sensor/TiW_Disp_1_ip/config retain=1
Info:MAIN:Time 16, idle 181320/s, free 57448, MQTT 1(1), bWifi 1, secondsWithNoPing -1, socks 2/38
Error:CMD:cmd again:y NOT found (args )
Error:CMD:cmd again:y NOT found (args )
Error:CMD:cmd again:y NOT found (args )
Error:CMD:cmd again:y NOT found (args )
Error:CMD:cmd again:y NOT found (args )
Error:CMD:cmd again:y NOT found (args )
Info:MQTT:Channel has changed! Publishing 0.000000 to channel 1
Info:MQTT:Publishing val 0.000000 to obk689EE87D/1/get retain=0
Info:MQTT:Channel has changed! Publishing 0.000000 to channel 2
Info:MQTT:Publishing val 0.000000 to obk689EE87D/2/get retain=0
Info:MQTT:Channel has changed! Publishing 0.000000 to channel 3
Info:MQTT:Publishing val 0.000000 to obk689EE87D/3/get retain=0
Info:MQTT:Channel has changed! Publishing 0.000000 to channel 4
Info:MQTT:Publishing val 0.000000 to obk689EE87D/4/get retain=0
Info:MQTT:MQTT client in mqtt_incoming_publish_cb topic obk689EE87D/1/get
Info:MAIN:Time 17, idle 212585/s, free 58320, MQTT 1(1), bWifi 1, secondsWithNoPing -1, socks 2/38
Info:MQTT:MQTT client in mqtt_incoming_publish_cb topic obk689EE87D/2/get
Info:MQTT:MQTT client in mqtt_incoming_publish_cb topic obk689EE87D/3/get
Info:MQTT:MQTT client in mqtt_incoming_publish_cb topic obk689EE87D/4/get
Error:CMD:cmd again:y NOT found (args )
Info:TuyaMCU:Received: 55 AA 00 02 00 00 01
Info:TuyaMCU:ProcessIncoming[v=0]: cmd 2 (MCUconf) len 7
Info:TuyaMCU:ProcessIncoming: TUYA_CMD_MCU_CONF, TODO!
Info:TuyaMCU:Received: 55 AA 00 05 00 05 09 04 00 01 00 17
Info:TuyaMCU:ProcessIncoming[v=0]: cmd 5 (WiFiSelect) len 12
Info:TuyaMCU:V0_ParseRealTimeWithRecordStorage: processing id 9, dataType 4-enum and 1 data bytes
Info:TuyaMCU:V0_ParseRealTimeWithRecordStorage: byte 0
Error:CMD:cmd again:y NOT found (args )
Error:CMD:cmd again:y NOT found (args )
Error:CMD:cmd again:y NOT found (args )
Error:CMD:cmd again:y NOT found (args )
Info:MAIN:Time 18, idle 127274/s, free 58320, MQTT 1(1), bWifi 1, secondsWithNoPing -1, socks 2/38
Error:CMD:cmd again:y NOT found (args )
Info:TuyaMCU:Received: 55 AA 00 05 00 08 0A 02 00 04 00 00 01 5E 7B
Info:TuyaMCU:ProcessIncoming[v=0]: cmd 5 (WiFiSelect) len 15
Info:TuyaMCU:V0_ParseRealTimeWithRecordStorage: processing id 10, dataType 2-val and 4 data bytes
Info:TuyaMCU:V0_ParseRealTimeWithRecordStorage: int32 350
Error:CMD:cmd again:y NOT found (args )
Error:CMD:cmd again:y NOT found (args )
Error:CMD:cmd again:y NOT found (args )
Error:CMD:cmd again:y NOT found (args )
Info:MAIN:Time 19, idle 313858/s, free 58320, MQTT 1(1), bWifi 1, secondsWithNoPing -1, socks 2/38
Error:CMD:cmd again:y NOT found (args )
Error:CMD:cmd again:y NOT found (args )
Error:CMD:cmd again:y NOT found (args )
Error:CMD:cmd again:y NOT found (args )
Error:CMD:cmd again:y NOT found (args )
Error:CMD:cmd again:y NOT found (args )
Info:MAIN:Time 20, idle 193190/s, free 58320, MQTT 1(1), bWifi 1, secondsWithNoPing -1, socks 2/38
Info:GEN:dhcp=0 ip=192.168.1.72 gate=192.168.1.1 mask=255.255.255.0 mac=d8:d6:68:9e:e8:7d
Info:GEN:sta: 1, softap: 0, b/g/n
Info:GEN:sta:rssi=-81,ssid=SALON,bssid=10:fe:ed:76:04:0c,channel=1,cipher_type:Error
Error:CMD:cmd again:y NOT found (args )
Error:CMD:cmd again:y NOT found (args )
Error:CMD:cmd again:y NOT found (args )
Error:CMD:cmd again:y NOT found (args )
Error:CMD:cmd again:y NOT found (args )
Error:CMD:cmd again:y NOT found (args )
Error:CMD:cmd again:y NOT found (args )
Error:CMD:cmd again:y NOT found (args )
Error:CMD:cmd again:y NOT found (args )
Error:CMD:cmd again:y NOT found (args )
Error:CMD:cmd again:y NOT found (args )
Error:CMD:cmd again:y NOT found (args )
Error:CMD:cmd again:y NOT found (args )
Info:MAIN:Time 24, idle 187143/s, free 58320, MQTT 1(1), bWifi 1, secondsWithNoPing -1, socks 2/38
Error:CMD:cmd again:y NOT found (args )
Info:TuyaMCU:Received: 55 AA 00 05 00 08 0C 02 00 04 00 00 00 4B 69
Info:TuyaMCU:ProcessIncoming[v=0]: cmd 5 (WiFiSelect) len 15
Info:TuyaMCU:V0_ParseRealTimeWithRecordStorage: processing id 12, dataType 2-val and 4 data bytes
Info:TuyaMCU:V0_ParseRealTimeWithRecordStorage: int32 75
Error:CMD:cmd again:y NOT found (args )
Error:CMD:cmd again:y NOT found (args )
Error:CMD:cmd again:y NOT found (args )
Error:CMD:cmd again:y NOT found (args )
Error:CMD:cmd again:y NOT found (args )
Error:CMD:cmd again:y NOT found (args )
Info:MAIN:Time 26, idle 186859/s, free 58320, MQTT 1(1), bWifi 1, secondsWithNoPing -1, socks 2/38
Error:CMD:cmd again:y NOT found (args )
Error:CMD:cmd again:y NOT found (args )
Error:CMD:cmd again:y NOT found (args )
Error:CMD:cmd again:y NOT found (args )
Error:CMD:cmd again:y NOT found (args )
Error:CMD:cmd again:y NOT found (args )
Error:CMD:cmd again:y NOT found (args )
Error:CMD:cmd again:y NOT found (args )
Error:CMD:cmd again:y NOT found (args )
Error:CMD:cmd again:y NOT found (args )
Error:CMD:cmd again:y NOT found (args )
Error:CMD:cmd again:y NOT found (args )
Error:CMD:cmd again:y NOT found (args )
Error:CMD:cmd again:y NOT found (args )
Error:CMD:cmd again:y NOT found (args )
Error:CMD:cmd again:y NOT found (args )
Error:CMD:cmd again:y NOT found (args )
Info:MAIN:Time 31, idle 179048/s, free 58304, MQTT 1(1), bWifi 1, secondsWithNoPing -1, socks 2/38
Error:CMD:cmd again:y NOT found (args )
Error:CMD:cmd again:y NOT found (args )
Error:CMD:cmd again:y NOT found (args )
Info:MAIN:Time 33, idle 189492/s, free 58304, MQTT 1(1), bWifi 1, secondsWithNoPing -1, socks 2/38
Error:CMD:cmd again:y NOT found (args )
Info:TuyaMCU:Received: 55 AA 00 05 00 08 12 02 00 04 00 00 00 3C 60
Info:TuyaMCU:ProcessIncoming[v=0]: cmd 5 (WiFiSelect) len 15
Info:TuyaMCU:V0_ParseRealTimeWithRecordStorage: processing id 18, dataType 2-val and 4 data bytes
Info:TuyaMCU:V0_ParseRealTimeWithRecordStorage: int32 60
Info:MAIN:Time 35, idle 185815/s, free 58320, MQTT 1(1), bWifi 1, secondsWithNoPing -1, socks 2/38
Error:CMD:cmd again:y NOT found (args )
Error:CMD:cmd again:y NOT found (args )
Error:CMD:cmd again:y NOT found (args )
Error:CMD:cmd again:y NOT found (args )
Error:CMD:cmd again:y NOT found (args )
Error:CMD:cmd again:y NOT found (args )
Error:CMD:cmd again:y NOT found (args )
Info:MAIN:Time 42, idle 542106/s, free 58304, MQTT 1(1), bWifi 1, secondsWithNoPing -1, socks 2/38
Error:CMD:cmd again:y NOT found (args )
Info:TuyaMCU:Received: 55 AA 00 05 00 08 01 02 00 04 00 00 00 EE 01
Info:TuyaMCU:ProcessIncoming[v=0]: cmd 5 (WiFiSelect) len 15
Info:TuyaMCU:V0_ParseRealTimeWithRecordStorage: processing id 1, dataType 2-val and 4 data bytes
Info:TuyaMCU:V0_ParseRealTimeWithRecordStorage: int32 238
Info:GEN:CHANNEL_Set channel 1 has changed to 238 (flags 0)
Info:MQTT:Channel has changed! Publishing 238.000000 to channel 1
Info:MQTT:Publishing val 238.000000 to obk689EE87D/1/get retain=0
Info:MQTT:MQTT client in mqtt_incoming_publish_cb topic obk689EE87D/1/get
Info:MQTT:Publishing val {"Temperature":238,"Humidity":0,"Battery to obk689EE87D/DATA/get retain=0
Info:MQTT:MQTT client in mqtt_incoming_publish_cb topic obk689EE87D/DATA/get
Info:MAIN:Time 46, idle 188008/s, free 58304, MQTT 1(1), bWifi 1, secondsWithNoPing -1, socks 2/38
Info:MQTT:Publishing val TiW_Disp_1 to obk689EE87D/host retain=0
Info:MQTT:Publishing val OpenBK7231N 1.17.780 Nov 29 2024 09:48:51 to obk689EE87D/build retain=0
Info:MQTT:Publishing val d8:d6:68:9e:e8:7d to obk689EE87D/mac retain=0
Info:MQTT:Publishing val 35.37 to obk689EE87D/temp retain=0
Info:MQTT:Publishing val SALON to obk689EE87D/ssid retain=0
Info:MQTT:Publishing val 1734909423 to obk689EE87D/datetime retain=0
Info:MQTT:Publishing val 2 to obk689EE87D/sockets retain=0
Info:MQTT:Publishing val -82 to obk689EE87D/rssi retain=0
Info:MQTT:Publishing val 47 to obk689EE87D/uptime retain=0
Info:MQTT:Publishing val 58016 to obk689EE87D/freeheap retain=0
Info:MQTT:Publishing val 192.168.1.72 to obk689EE87D/ip retain=0
Info:MQTT:Channel has changed! Publishing 238.000000 to channel 1
Info:MQTT:Publishing val 238.000000 to obk689EE87D/1/get retain=0
Info:MQTT:Channel has changed! Publishing 49.000000 to channel 2
Info:MQTT:Publishing val 49.000000 to obk689EE87D/2/get retain=0
Info:MQTT:Channel has changed! Publishing 0.000000 to channel 3
Info:MQTT:Publishing val 0.000000 to obk689EE87D/3/get retain=0
Info:MQTT:MQTT client in mqtt_incoming_publish_cb topic obk689EE87D/1/get
Info:MQTT:Channel has changed! Publishing 0.000000 to channel 4
Info:MQTT:MQTT client in mqtt_incoming_publish_cb topic obk689EE87D/2/get
Info:MQTT:Publishing val 0.000000 to obk689EE87D/4/get retain=0
Info:MQTT:MQTT client in mqtt_incoming_publish_cb topic obk689EE87D/3/get
Info:MAIN:Time 48, idle 223341/s, free 58016, MQTT 1(1), bWifi 1, secondsWithNoPing -1, socks 2/38
Info:MAIN:Time 50, idle 189749/s, free 58320, MQTT 1(1), bWifi 1, secondsWithNoPing -1, socks 2/38
Info:GEN:dhcp=0 ip=192.168.1.72 gate=192.168.1.1 mask=255.255.255.0 mac=d8:d6:68:9e:e8:7d
Info:GEN:sta: 1, softap: 0, b/g/n
Info:GEN:sta:rssi=-78,ssid=SALON,bssid=10:fe:ed:76:04:0c,channel=1,cipher_type:Error
Info:MAIN:Time 55, idle 157007/s, free 58320, MQTT 1(1), bWifi 1, secondsWithNoPing -1, socks 2/38
Info:MAIN:Time 57, idle 187162/s, free 58320, MQTT 1(1), bWifi 1, secondsWithNoPing -1, socks 2/38
Info:MAIN:Time 59, idle 192763/s, free 58320, MQTT 1(1), bWifi 1, secondsWithNoPing -1, socks 2/38
Info:TuyaMCU:Received: 55 AA 00 05 00 08 02 02 00 04 00 00 00 31 45
Info:TuyaMCU:ProcessIncoming[v=0]: cmd 5 (WiFiSelect) len 15
Info:TuyaMCU:V0_ParseRealTimeWithRecordStorage: processing id 2, dataType 2-val and 4 data bytes
Info:TuyaMCU:V0_ParseRealTimeWithRecordStorage: int32 49
Info:GEN:No change in channel 2 (still set to 49) - ignoring
GAAD wrote:Why the errors in the logs for the Tuya MCU? Maybe this version negotiates commas?
smoeller95s wrote:To change from F to C i try the command "tuyaMcu_sendState 9 4 0" This not work.
[MQTT] Apply channel type multiplier on (if any) on channel value before publishing it
clearIO
startDriver NTP
ntp_setServer 192.168.1.253
waitFor NTPState 1
ntp_timeZoneOfs 1
startDriver TuyaMCU
startDriver tmSensor
setChannelType 1 temperature_div10
linkTuyaMCUOutputToChannel 1 val 1
setChannelType 2 Humidity
linkTuyaMCUOutputToChannel 2 val 2
setChannelType 3 ReadOnly //LowMidHigh
setChannelLabel 3 "Batt_state"
linkTuyaMCUOutputToChannel 3 val 3
setChannelType 4 ReadOnly
setChannelLabel 4 "Batt_level"
linkTuyaMCUOutputToChannel 4 val 4
sensor:
- platform: tuya
name: "Temperatura"
device_class: "temperature"
sensor_datapoint: 3
unit_of_measurement: "°C"
accuracy_decimals: 1
filters:
- multiply: 0.1
clearIO
PowerSave 1
startDriver NTP
ntp_setServer 192.168.1.253
waitFor NTPState 1
ntp_timeZoneOfs 1
startDriver TuyaMCU
startDriver tmSensor
// Flags 134743044
setChannelType 1 temperature_div10
linkTuyaMCUOutputToChannel 1 val 1
setChannelType 2 Humidity
linkTuyaMCUOutputToChannel 2 val 2
setChannelType 3 ReadOnlyLowMidHigh
setChannelLabel 3 "Batt_state"
linkTuyaMCUOutputToChannel 3 val 3
//setChannelType 4 BatteryLevelPercent
setChannelType 4 ReadOnly
setChannelLabel 4 "Batt_level"
linkTuyaMCUOutputToChannel 4 val 4