arendst / Tasmota

Alternative firmware for ESP8266 and ESP32 based devices with easy configuration using webUI, OTA updates, automation using timers or rules, expandability and entirely local control over MQTT, HTTP, Serial or KNX. Full documentation at
https://tasmota.github.io/docs
GNU General Public License v3.0
21.96k stars 4.77k forks source link

SetOption19 1 results in a panic #4988

Closed phdelodder closed 5 years ago

phdelodder commented 5 years ago

IMPORTANT NOTICE If you do not complete the template below it is likely that your issue will not be addressed. When providing information about your issue please be as extensive as possible so that it can be solved by as little as possible responses.

FAILURE TO COMPLETE THE REQUESTED INFORMATION WILL RESULT IN YOUR ISSUE BEING CLOSED

Describe the bug Entering setoption19 1 in the console results in a system panic.

Also, make sure these boxes are checked [x] before submitting your issue - Thank you!

To Reproduce Steps to reproduce the behavior: Compile a build with the following options enabled:

 #define USE_MCP230xx                           // Enable MCP23008/MCP23017 - Must define I2C Address in #define USE_MCP230xx_ADDR below - range 0x20 - 0x27 (+4k7 code)
     #define USE_MCP230xx_ADDR 0x20               // Enable MCP23008/MCP23017 I2C Address to use (Must be within range 0x20 through 0x27 - set according to your wired setup)
     #define USE_MCP230xx_OUTPUT                  // Enable MCP23008/MCP23017 OUTPUT support through sensor29 commands (+1k5 code)
     #define USE_MCP230xx_DISPLAYOUTPUT           // Enable MCP23008/MCP23017 to display state of OUTPUT pins on Web UI (+0k2 code)
 #define USE_MPR121                             // Enable MPR121 controller (I2C addresses 0x5A, 0x5B, 0x5C and 0x5D) in input mode for touch buttons (+1k3 code)
  #define USE_ADS1115                            // Enable ADS1115 16 bit A/D converter (I2C address 0x48, 0x49, 0x4A or 0x4B) based on Adafruit ADS1x15 library (no library needed) (+0k7 code)

Configure i2C type setoption19 1 in console

Expected behavior A clear and concise description of what you expected to happen. Homeassistant auto discovery should work.

Screenshots If applicable, add screenshots to help explain your problem.

Additional context Add any other context about the problem here. Added a stacktrace as attachment stacktrace.txt

First build: platform = ${core_2_4_2.platform} build_flags = ${core_2_4_2.build_flags}

Second build: platform = ${core_2_5_0.platform} build_flags = ${core_2_5_0.build_flags}

Both same issue.

(Please, remember to close the issue when the problem has been addressed)

Jason2866 commented 5 years ago

For core 2.5.0 try:

platform                  = ${core_stage.platform}
build_flags               = ${core_stage.build_flags}

This is still beta2. Stage has fixed some mandantory bugs

platform = ${core_2_5_0.platform}
build_flags = ${core_2_5_0.build_flags}

You have to delete in users folder under .platformio in folders platforms and packages folders containing *8266*

phdelodder commented 5 years ago

Same result, different stack trace. stacktrace.txt

arendst commented 5 years ago

I love this line

15:19:41 MQT: stat/MCU/STATUS10 = {"StatusSNS":{"Time":"2019-01-20T15:19:41","BME280":{"Temperature":15.0,"Humidity":51.7,"Pressure":1017.9},"ADS1115":{"A0":3293,"A1":3294,"A2":3293,"A3":3291},"MCP230XX":{"D0":0,"D1":0,"D2":0,"D3":0,"D4":0,"D5":0,"D6":0,"D7":0,"D8":0,"D9":0,"D10":0,"D11":0,"D12":0,"D13":0,"D14":0,"D15":0},"MPR121A":{"Button0":0,"Button1":0,"Button2":0,"Button3":0,"Button4":0,"Button5":0,"Button6":0,"Button7":0,"Button8":0,"Button9":0,"Button10":0,"Button11":0,"Button12":0},"PressureUnit":"hPa","TempUni ...

As Hass discovery needs to send one MQTT message for every parameter you can likely expect a problem here as there are over 20 messages to send.

The current implementation will fail as the MQTT client will stall the device resulting in your exceptions.

I can't think of an easy solution.

Can you find out how many messages were able to get send before the device breaks-up and restarts? Is it always the same amount or does it change?

timota commented 5 years ago

Same issue when entering SetOption19 1 - device reboots

Device Sonoff Basic with: BME280, BH1750 + WS2812

20:26:22 CMD: status 0 20:26:22 MQT: stat/f3-r1-light-table/STATUS = {"Status":{"Module":1,"FriendlyName":["f3-r1-light-table","f3-r1-light-table-ws"],"Topic":"f3-r1-light-table","ButtonTopic":"0","Power":0,"PowerOnState":3,"LedState":1,"SaveData":1,"SaveState":1,"SwitchTopic":"0","SwitchMode":[0,0,0,0,0,0,0,0],"ButtonRetain":0,"SwitchRetain":0,"SensorRetain":0,"PowerRetain":0}} 20:26:22 MQT: stat/f3-r1-light-table/STATUS1 = {"StatusPRM":{"Baudrate":115200,"GroupTopic":"sonoffs","OtaUrl":"http://192.168.0.53:9541/data/firmwares/sonoff.bin","RestartReason":"Software Watchdog","Uptime":"0T00:02:22","StartupUTC":"2019-01-21T20:24:00","Sleep":50,"BootCount":192,"SaveCount":401,"SaveAddress":"F5000"}} 20:26:22 MQT: stat/f3-r1-light-table/STATUS2 = {"StatusFWR":{"Version":"6.4.1.7(95f39be-sonoff)","BuildDateTime":"2019-01-07T14:13:57","Boot":31,"Core":"2_5_0BETA2","SDK":"3.0.0-dev(c0f7b44)"}} 20:26:22 MQT: stat/f3-r1-light-table/STATUS3 = {"StatusLOG":{"SerialLog":2,"WebLog":2,"SysLog":2,"LogHost":"192.168.1.201","LogPort":514,"SSId":["VM1126584",""],"TelePeriod":300,"SetOption":["0000A009","558180C0","00000009"]}} 20:26:22 MQT: stat/f3-r1-light-table/STATUS4 = {"StatusMEM":{"ProgramSize":547,"Free":456,"Heap":16,"ProgramFlashSize":1024,"FlashSize":1024,"FlashChipId":"14405E","FlashMode":3,"Features":["00000809","0FDAE794","000383A0","23B617CE","00003BC0"]}} 20:26:22 MQT: stat/f3-r1-light-table/STATUS5 = {"StatusNET":{"Hostname":"f3-r1-light-table-6518","IPAddress":"192.168.1.176","Gateway":"192.168.1.1","Subnetmask":"255.255.255.0","DNSServer":"192.168.1.1","Mac":"DC:4F:22:0A:D9:76","Webserver":2,"WifiConfig":2}} 20:26:22 MQT: stat/f3-r1-light-table/STATUS6 = {"StatusMQT":{"MqttHost":"192.168.1.1","MqttPort":1883,"MqttClientMask":"DVES%06X","MqttClient":"DVES_0AD97676","MqttUser":"master","MqttType":1,"MAX_PACKET_SIZE":1000,"KEEPALIVE":15}} 20:26:22 MQT: stat/f3-r1-light-table/STATUS7 = {"StatusTIM":{"UTC":"Mon Jan 21 20:26:22 2019","Local":"Mon Jan 21 20:26:22 2019","StartDST":"Sun Mar 31 01:00:00 2019","EndDST":"Sun Oct 27 02:00:00 2019","Timezone":99,"Sunrise":"08:08","Sunset":"16:24"}} 20:26:22 MQT: stat/f3-r1-light-table/STATUS10 = {"StatusSNS":{"Time":"2019-01-21T20:26:22","BME280":{"Temperature":22.1,"Humidity":43.2,"Pressure":1002.1},"BH1750":{"Illuminance":31},"PressureUnit":"hPa","TempUnit":"C"}} 20:26:22 MQT: stat/f3-r1-light-table/STATUS11 = {"StatusSTS":{"Time":"2019-01-21T20:26:22","Uptime":"0T00:02:22","Vcc":3.428,"SleepMode":"Dynamic","Sleep":50,"LoadAvg":19,"POWER1":"OFF","POWER2":"OFF","Dimmer":89,"Color":"001FE2","HSBColor":"232,100,89","Channel":[0,12,88],"Scheme":0,"Width":1,"Fade":"OFF","Speed":1,"LedTable":"OFF","Wifi":{"AP":1,"SSId":"VM1126584","BSSId":"B0:39:56:D6:C2:2C","Channel":6,"RSSI":82}}}

It creates partial entries in MQTT Homeassistant topic:

for light: {"name":"f3-r1-light-table-ws","cmd_t":"~cmnd/POWER2","stat_t":"~tele/STATE","val_tpl":"{{value_json.POWER2}}","pl_off":"OFF","pl_on":"ON","avty_t":"~tele/LWT","pl_avail":"Online","pl_not_avail":"Offline","bri_cmd_t":"~cmnd/Dimmer","bri_stat_t":"~tele/STATE","bri_scl":100,"on_cmd_type":"brightness","bri_val_tpl":"{{value_json.Dimmer}}","rgb_cmd_t":"~cmnd/Color2","rgb_stat_t":"~tele/STATE","rgb_val_tpl":"{{value_json.Color.split(',')[0:3]|join(',')}}","fx_cmd_t":"~cmnd/Scheme","fx_stat_t":"~tele/STATE","fx_val_tpl":"{{value_json.Scheme}}","fx_list":["0","1","2","3","4"],"uniq_id":"0AD976_LI_2","device":{"identifiers":["0AD976"],"name":"f3-r1-light-table","model":"Sonoff Basic","sw_version":"6.4.1.7(95f39be-sonoff)","manufacturer":"Tasmota"}, "~":"f3-r1-light-table/"}

for switch: {"name":"f3-r1-light-table","cmd_t":"~cmnd/POWER1","stat_t":"~tele/STATE","val_tpl":"{{value_json.POWER1}}","pl_off":"OFF","pl_on":"ON","avty_t":"~tele/LWT","pl_avail":"Online","pl_not_avail":"Offline","uniq_id":"0AD976_RL_1","device":{"identifiers":["0AD976"],"name":"f3-r1-light-table","model":"Sonoff Basic","sw_version":"6.4.1.7(95f39be-sonoff)","manufacturer":"Tasmota"}, "~":"f3-r1-light-table/"}

No entries for sensors at all.

Also devices that has been created in HASS - shows as offline

arendst commented 5 years ago

The latest development version contains changes regarding Hass discovery handling.

Pls give it a try an report back your results.

timota commented 5 years ago

Upgraded to the latest 6.4.1.10 2.5.0-beta2

  1. Run SetOption19 1 Syslog with "More Debug"
    Jan 22 12:13:39 f3-r1-light-table-6518 ESP-WIF: Checking connection...
    Jan 22 12:13:39 f3-r1-light-table-6518 ESP-WIF: Connected
    Jan 22 12:13:42 f3-r1-light-table-6518 ESP-HTP: Console
    Jan 22 12:13:50 f3-r1-light-table-6518 ESP-CMD: SetOption19 1
    Jan 22 12:13:50 f3-r1-light-table-6518 ESP-SRC: WebConsole from 192.168.1.1
    Jan 22 12:13:50 f3-r1-light-table-6518 ESP-RSL: Received Topic /SetOption19, Data Size 1, Data 1
    Jan 22 12:13:50 f3-r1-light-table-6518 ESP-RSL: Group 0, Index 19, Command SETOPTION, Data 1
    Jan 22 12:13:50 f3-r1-light-table-6518 ESP-MQT: homeassistant/light/0AD976_LI_1/config =  (retained)
    Jan 22 12:13:50 f3-r1-light-table-6518 ESP-MQT: homeassistant/switch/0AD976_RL_1/config = {"name":"f3-r1-light-table","cmd_t":"~cmnd/POWER1","stat_t":"~tele/STATE","val_tpl":"{{value_json.POWER1}}","pl_off":"OFF","pl_on":"ON","avty_t":"~tele/LWT","pl_avail":"Online","pl_not_avail":"Offline","uniq_id":"0AD976_RL_1","device":{"identifiers":["0AD976"],"name":"f3-r1-light-table","model":"Sonoff Basic","sw_version":"6.4.1.10(dcabb9c-sonoff)","manufacturer":"Tasmota"}, "~":"f3-r1-light-table/"} (retained)
    Jan 22 12:13:50 f3-r1-light-table-6518 ESP-MQT: homeassistant/switch/0AD976_RL_2/config =  (retained)
    Jan 22 12:13:50 f3-r1-light-table-6518 ESP-MQT: homeassistant/light/0AD976_LI_2/config = {"name":"f3-r1-light-table-ws","cmd_t":"~cmnd/POWER2","stat_t":"~tele/STATE","val_tpl":"{{value_json.POWER2}}","pl_off":"OFF","pl_on":"ON","avty_t":"~tele/LWT","pl_avail":"Online","pl_not_avail":"Offline","bri_cmd_t":"~cmnd/Dimmer","bri_stat_t":"~tele/STATE","bri_scl":100,"on_cmd_type":"brightness","bri_val_tpl":"{{value_json.Dimmer}}","rgb_cmd_t":"~cmnd/Color2","rgb_stat_t":"~tele/STATE","rgb_val_tpl":"{{value_json.Color.split(',')[0:3]|join
    Jan 22 12:13:50 f3-r1-light-table-6518 ESP-MQT: homeassistant/light/0AD976_LI_3/config =  (retained)
    Jan 22 12:13:50 f3-r1-light-table-6518 ESP-MQT: homeassistant/switch/0AD976_RL_3/config =  (retained)
    Jan 22 12:13:50 f3-r1-light-table-6518 ESP-MQT: homeassistant/light/0AD976_LI_4/config =  (retained)
    Jan 22 12:13:50 f3-r1-light-table-6518 ESP-MQT: homeassistant/switch/0AD976_RL_4/config =  (retained)
    Jan 22 12:13:50 f3-r1-light-table-6518 ESP-MQT: homeassistant/light/0AD976_LI_5/config =  (retained)
    Jan 22 12:13:50 f3-r1-light-table-6518 ESP-MQT: homeassistant/light/0AD976_LI_6/config =  (retained)

No topics in MQTT, nothing has been created

  1. Run SetOption19 0
Jan 22 12:16:13 f3-r1-light-table-6518 ESP-CMD: SetOption19 0
Jan 22 12:16:13 f3-r1-light-table-6518 ESP-SRC: WebConsole from 192.168.1.1
Jan 22 12:16:13 f3-r1-light-table-6518 ESP-RSL: Received Topic /SetOption19, Data Size 1, Data 0
Jan 22 12:16:13 f3-r1-light-table-6518 ESP-RSL: Group 0, Index 19, Command SETOPTION, Data 0
Jan 22 12:16:13 f3-r1-light-table-6518 ESP-MQT: homeassistant/light/0AD976_LI_1/config =  (retained)
Jan 22 12:16:13 f3-r1-light-table-6518 ESP-MQT: homeassistant/switch/0AD976_RL_1/config =  (retained)
Jan 22 12:16:13 f3-r1-light-table-6518 ESP-MQT: homeassistant/switch/0AD976_RL_2/config =  (retained)
Jan 22 12:16:13 f3-r1-light-table-6518 ESP-MQT: homeassistant/light/0AD976_LI_2/config =  (retained)
Jan 22 12:16:13 f3-r1-light-table-6518 ESP-MQT: homeassistant/light/0AD976_LI_3/config =  (retained)
Jan 22 12:16:13 f3-r1-light-table-6518 ESP-MQT: homeassistant/switch/0AD976_RL_3/config =  (retained)
Jan 22 12:16:13 f3-r1-light-table-6518 ESP-MQT: homeassistant/light/0AD976_LI_4/config =  (retained)
Jan 22 12:16:13 f3-r1-light-table-6518 ESP-MQT: homeassistant/switch/0AD976_RL_4/config =  (retained)
Jan 22 12:16:13 f3-r1-light-table-6518 ESP-MQT: homeassistant/light/0AD976_LI_5/config =  (retained)
Jan 22 12:16:13 f3-r1-light-table-6518 ESP-MQT: homeassistant/switch/0AD976_RL_5/config =  (retained)
Jan 22 12:16:22 f3-r1-light-table-6518 ESP-HTP: Web server active on f3-r1-light-table-6518 with IP address 192.168.1.176

This line appear in mqtt log homeassistant/light/0AD976_LI_1/config (null)

  1. Reset 5 Another try, but first run SetOption19 to confirm if it enabled or not
    Jan 22 12:17:22 f3-r1-light-table-6518 ESP-WIF: Checking connection...
    Jan 22 12:17:22 f3-r1-light-table-6518 ESP-WIF: Connected
    Jan 22 12:17:34 f3-r1-light-table-6518 ESP-CMD: SetOption19
    Jan 22 12:17:34 f3-r1-light-table-6518 ESP-SRC: WebConsole from 192.168.1.1
    Jan 22 12:17:34 f3-r1-light-table-6518 ESP-RSL: Received Topic /SetOption19, Data Size 0, Data
    Jan 22 12:17:34 f3-r1-light-table-6518 ESP-RSL: Group 0, Index 19, Command SETOPTION, Data
    Jan 22 12:17:34 f3-r1-light-table-6518 ESP-MQT: stat/f3-r1-light-table/RESULT = {"SetOption19":"OFF"}
    Jan 22 12:17:42 f3-r1-light-table-6518 ESP-CMD: SetOption19 1
    Jan 22 12:17:42 f3-r1-light-table-6518 ESP-SRC: WebConsole from 192.168.1.1
    Jan 22 12:17:42 f3-r1-light-table-6518 ESP-RSL: Received Topic /SetOption19, Data Size 1, Data 1
    Jan 22 12:17:42 f3-r1-light-table-6518 ESP-RSL: Group 0, Index 19, Command SETOPTION, Data 1
    Jan 22 12:17:42 f3-r1-light-table-6518 ESP-MQT: homeassistant/light/0AD976_LI_1/config =  (retained)
    Jan 22 12:17:42 f3-r1-light-table-6518 ESP-MQT: homeassistant/switch/0AD976_RL_1/config = {"name":"f3-r1-light-table","cmd_t":"~cmnd/POWER1","stat_t":"~tele/STATE","val_tpl":"{{value_json.POWER1}}","pl_off":"OFF","pl_on":"ON","avty_t":"~tele/LWT","pl_avail":"Online","pl_not_avail":"Offline","uniq_id":"0AD976_RL_1","device":{"identifiers":["0AD976"],"name":"f3-r1-light-table","model":"Sonoff Basic","sw_version":"6.4.1.10(dcabb9c-sonoff)","manufacturer":"Tasmota"}, "~":"f3-r1-light-table/"} (retained)
    Jan 22 12:17:42 f3-r1-light-table-6518 ESP-MQT: homeassistant/switch/0AD976_RL_2/config =  (retained)
    Jan 22 12:17:42 f3-r1-light-table-6518 ESP-MQT: homeassistant/light/0AD976_LI_2/config = {"name":"f3-r1-light-table-ws","cmd_t":"~cmnd/POWER2","stat_t":"~tele/STATE","val_tpl":"{{value_json.POWER2}}","pl_off":"OFF","pl_on":"ON","avty_t":"~tele/LWT","pl_avail":"Online","pl_not_avail":"Offline","bri_cmd_t":"~cmnd/Dimmer","bri_stat_t":"~tele/STATE","bri_scl":100,"on_cmd_type":"brightness","bri_val_tpl":"{{value_json.Dimmer}}","rgb_cmd_t":"~cmnd/Color2","rgb_stat_t":"~tele/STATE","rgb_val_tpl":"{{value_json.Color.split(',')[0:3]|join
    Jan 22 12:17:42 f3-r1-light-table-6518 ESP-MQT: homeassistant/light/0AD976_LI_3/config =  (retained)
    Jan 22 12:17:42 f3-r1-light-table-6518 ESP-MQT: homeassistant/switch/0AD976_RL_3/config =  (retained)
    Jan 22 12:17:42 f3-r1-light-table-6518 ESP-MQT: homeassistant/light/0AD976_LI_4/config =  (retained)

    These topics appear as retained

    homeassistant/light/0AD976_LI_2/config {"name":"f3-r1-light-table-ws","cmd_t":"~cmnd/POWER2","stat_t":"~tele/STATE","val_tpl":"{{value_json.POWER2}}","pl_off":"OFF","pl_on":"ON","avty_t":"~tele/LWT","pl_avail":"Online","pl_not_avail":"Offline","bri_cmd_t":"~cmnd/Dimmer","bri_stat_t":"~tele/STATE","bri_scl":100,"on_cmd_type":"brightness","bri_val_tpl":"{{value_json.Dimmer}}","rgb_cmd_t":"~cmnd/Color2","rgb_stat_t":"~tele/STATE","rgb_val_tpl":"{{value_json.Color.split(',')[0:3]|join(',')}}","fx_cmd_t":"~cmnd/Scheme","fx_stat_t":"~tele/STATE","fx_val_tpl":"{{value_json.Scheme}}","fx_list":["0","1","2","3","4"],"uniq_id":"0AD976_LI_2","device":{"identifiers":["0AD976"],"name":"f3-r1-light-table","model":"Sonoff Basic","sw_version":"6.4.1.10(dcabb9c-sonoff)","manufacturer":"Tasmota"}, "~":"f3-r1-light-table/"}
    homeassistant/switch/0AD976_RL_1/config {"name":"f3-r1-light-table","cmd_t":"~cmnd/POWER1","stat_t":"~tele/STATE","val_tpl":"{{value_json.POWER1}}","pl_off":"OFF","pl_on":"ON","avty_t":"~tele/LWT","pl_avail":"Online","pl_not_avail":"Offline","uniq_id":"0AD976_RL_1","device":{"identifiers":["0AD976"],"name":"f3-r1-light-table","model":"Sonoff Basic","sw_version":"6.4.1.10(dcabb9c-sonoff)","manufacturer":"Tasmota"}, "~":"f3-r1-light-table/"}

But homeassistant sees both devices as unavailable and no sensors at all.

arendst commented 5 years ago

@timota pls show GPIO config either with command gpio or a gui screen picture of module config

timota commented 5 years ago

Done

Jan 22 13:04:50 f3-r1-light-table-6518 ESP-CMD: gpio
Jan 22 13:04:50 f3-r1-light-table-6518 ESP-SRC: WebConsole from 192.168.1.1
Jan 22 13:04:50 f3-r1-light-table-6518 ESP-RSL: Received Topic /gpio, Data Size 0, Data
Jan 22 13:04:50 f3-r1-light-table-6518 ESP-RSL: Group 0, Index 1, Command GPIO, Data
Jan 22 13:04:50 f3-r1-light-table-6518 ESP-MQT: stat/f3-r1-light-table/RESULT = {"GPIO1":"6 (I2C SDA)","GPIO2":"0 (None)","GPIO3":"5 (I2C SCL)","GPIO4":"0 (None)","GPIO14":"7 (WS2812)"}
arendst commented 5 years ago

@timota Pls provide output of TelePeriod message containing sensor data.

timota commented 5 years ago
14:03:00 MQT: tele/f3-r1-light-table/STATE = {"Time":"2019-01-22T14:03:00","Uptime":"0T00:45:14","Vcc":3.437,"SleepMode":"Dynamic","Sleep":50,"LoadAvg":19,"POWER1":"OFF","POWER2":"OFF","Dimmer":10,"Color":"191919","HSBColor":"0,0,10","Channel":[9,9,9],"Scheme":0,"Width":1,"Fade":"OFF","Speed":1,"LedTable":"OFF","Wifi":{"AP":1,"SSId":"VM1126584","BSSId":"B0:39:56:D6:C2:2C","Channel":6,"RSSI":80}}
14:03:00 MQT: tele/f3-r1-light-table/SENSOR = {"Time":"2019-01-22T14:03:00","BME280":{"Temperature":21.0,"Humidity":43.6,"Pressure":992.4},"BH1750":{"Illuminance":5},"PressureUnit":"hPa","TempUnit":"C"}
14:04:51 CMD: gpio
arendst commented 5 years ago

OK. From your info I see that your fulltopic has not been changed as would be needed for sensor detection. Your fulltopic has to be in a state like %topic%/%prefix%/ for detection to work.

For now let's stop discussing your issue here as the original issue is about Software Watchdog restarts which seem to have been solved when looking to your responses.

If you continue to have sensor detection problems pls open a new issue dedicated to your issue.

phdelodder commented 5 years ago

@arendst I will try to test you new version tomorrow evening at the latest.

timota commented 5 years ago

@arendst ok, thanks. But can you clarify for me. According to Wiki https://github.com/arendst/Sonoff-Tasmota/wiki/Home-Assistant

The topic will automatically be changed to topic/prefix/COMMAND, e.g. sonoff/cmnd/POWER

does that mean that my topic has not been changed automatically ? Is this a bug or missconfiguration from my side?

Thanks

arendst commented 5 years ago

As I didn't design the hass_discovery code and looking at the detection mechanism now I can imagine situations where the current check for topic change doesn't work.

I will change it to force the desired fulltopic change in a following update.

timota commented 5 years ago

Thanks. I changed topic manually - and HASS starts to detect Switches, but no sensors.

Looks like i need to raise new issue about sensors.

martikainen87 commented 5 years ago

Flashed 4 of my blitzwolf plugs with the latest one from http://thehackbox.org/tasmota/020500/, is it necessary to do a 'reset 5'?

martikainen87 commented 5 years ago

Flashed 4 of my blitzwolf plugs with the latest one from http://thehackbox.org/tasmota/020500/, is it necessary to do a 'reset 5'?

Did a reset 5 since it was loosing connection to wifi. The topic was not changed automatically to topic/prefix when using SetOption19 1

I'll report back if I get any hard resets.

arendst commented 5 years ago

As you did not use the utmost latest (which was not yet compiled at the time you downloaded your binary) you did not hevae the latest forced fulltopic fix so that explains the not changed topic/prefix.

arendst commented 5 years ago

I'm not sure you do have that commit as on the hackbox only the previous commit is available:

image

The devs are compiled on the hour so it should be available after that.

arendst commented 5 years ago

Pls provide output of command status 0.

martikainen87 commented 5 years ago

You were totaly right, it was me who thought that the binary's were automatically updated when a new commit was issued :) 3 of the devices are running good so far, one of them are reconnecting to wifi every 15-20 seconds, I'll do a full reset on that one as soon as I have the time to bring out the soldering station.

Thanks for a superb software and the quick fixes! 👍

martikainen87 commented 5 years ago

First panic occured,

00:00:00 Project sonoff nas_pow Version 6.4.1.10(bda3126-sonoff)-2_5_0_BETA2
00:00:00 WIF: Connecting to AP1 Martikainen in mode 11N as nas_pow-5320...
00:00:02 RSL: nas_pow/tele/SENSOR = {"Time":"1970-01-01T00:00:02","ENERGY":{"TotalStartTime":"2019-01-20T15:54:03","Total":0.121,"Yesterday":0.009,"Today":0.022,"Power":42,"ApparentPower":42,"ReactivePower":0,"Factor":1.00,"Voltage":214,"Current":0.197}}
00:00:06 WIF: Connected
00:00:06 HTP: Web server active on nas_pow-5320 with IP address 192.168.1.65
00:00:08 MQT: Attempting connection...
00:00:08 MQT: Connected
00:00:08 MQT: nas_pow/tele/LWT = Online (retained)
00:00:08 MQT: nas_pow/cmnd/POWER = 
00:00:08 MQT: nas_pow/tele/INFO1 = {"Module":"BlitzWolf SHP","Version":"6.4.1.10(bda3126-sonoff)","FallbackTopic":"cmnd/nas_pow_2A34C8C8_fb/","GroupTopic":"sonoffs"}
00:00:08 MQT: nas_pow/tele/INFO2 = {"WebServerMode":"Admin","Hostname":"nas_pow-5320","IPAddress":"192.168.1.65"}
00:00:08 MQT: nas_pow/tele/INFO3 = {"RestartReason":"Software Watchdog"}
00:00:08 MQT: nas_pow/stat/RESULT = {"POWER":"ON"}
00:00:08 MQT: nas_pow/stat/POWER = ON
17:14:54 MQT: homeassistant/sensor/2A34C8_ENERGY_Yesterday/config = {"name":"nas_pow ENERGY Yesterday","stat_t":"~SENSOR","avty_t":"~LWT","pl_avail":"Online","pl_not_avail":"Offline","unit_of_meas":"kWh","val_tpl":"{{value_json['ENERGY'].Yesterday}}","uniq_id":"2A34C8_ENERGY_Yesterday","device":{"identifiers":["2A34C8"],"name":"nas_pow","model":"BlitzWolf SHP","sw_version":"6.4.1.10(bda3126-sonoff)","manufacturer":"Tasmota"}, "~":"nas_pow/tele/"} (retained)
17:14:54 MQT: homeassistant/sensor/2A34C8_ENERGY_Today/config = {"name":"nas_pow ENERGY Today","stat_t":"~SENSOR","avty_t":"~LWT","pl_avail":"Online","pl_not_avail":"Offline","unit_of_meas":"kWh","val_tpl":"{{value_json['ENERGY'].Today}}","uniq_id":"2A34C8_ENERGY_Today","device":{"identifiers":["2A34C8"],"name":"nas_pow","model":"BlitzWolf SHP","sw_version":"6.4.1.10(bda3126-sonoff)","manufacturer":"Tasmota"}, "~":"nas_pow/tele/"} (retained)
17:14:54 MQT: homeassistant/sensor/2A34C8_ENERGY_Power/config = {"name":"nas_pow ENERGY Power","stat_t":"~SENSOR","avty_t":"~LWT","pl_avail":"Online","pl_not_avail":"Offline","unit_of_meas":"W","val_tpl":"{{value_json['ENERGY'].Power}}","uniq_id":"2A34C8_ENERGY_Power","device":{"identifiers":["2A34C8"],"name":"nas_pow","model":"BlitzWolf SHP","sw_version":"6.4.1.10(bda3126-sonoff)","manufacturer":"Tasmota"}, "~":"nas_pow/tele/"} (retained)
17:14:54 MQT: homeassistant/sensor/2A34C8_ENERGY_ApparentPower/config = {"name":"nas_pow ENERGY ApparentPower","stat_t":"~SENSOR","avty_t":"~LWT","pl_avail":"Online","pl_not_avail":"Offline","unit_of_meas":" ","val_tpl":"{{value_json['ENERGY'].ApparentPower}}","uniq_id":"2A34C8_ENERGY_ApparentPower","device":{"identifiers":["2A34C8"],"name":"nas_pow","model":"BlitzWolf SHP","sw_version":"6.4.1.10(bda3126-sonoff)","manufacturer":"Tasmota"}, "~":"nas_pow/tele/"} (retained)
17:14:54 MQT: homeassistant/sensor/2A34C8_ENERGY_ReactivePower/config = {"name":"nas_pow ENERGY ReactivePower","stat_t":"~SENSOR","avty_t":"~LWT","pl_avail":"Online","pl_not_avail":"Offline","unit_of_meas":" ","val_tpl":"{{value_json['ENERGY'].ReactivePower}}","uniq_id":"2A34C8_ENERGY_ReactivePower","device":{"identifiers":["2A34C8"],"name":"nas_pow","model":"BlitzWolf SHP","sw_version":"6.4.1.10(bda3126-sonoff)","manufacturer":"Tasmota"}, "~":"nas_pow/tele/"} (retained)
17:14:54 MQT: homeassistant/sensor/2A34C8_ENERGY_Factor/config = {"name":"nas_pow ENERGY Factor","stat_t":"~SENSOR","avty_t":"~LWT","pl_avail":"Online","pl_not_avail":"Offline","unit_of_meas":" ","val_tpl":"{{value_json['ENERGY'].Factor}}","uniq_id":"2A34C8_ENERGY_Factor","device":{"identifiers":["2A34C8"],"name":"nas_pow","model":"BlitzWolf SHP","sw_version":"6.4.1.10(bda3126-sonoff)","manufacturer":"Tasmota"}, "~":"nas_pow/tele/"} (retained)
17:14:54 MQT: homeassistant/sensor/2A34C8_ENERGY_Voltage/config = {"name":"nas_pow ENERGY Voltage","stat_t":"~SENSOR","avty_t":"~LWT","pl_avail":"Online","pl_not_avail":"Offline","unit_of_meas":"V","val_tpl":"{{value_json['ENERGY'].Voltage}}","uniq_id":"2A34C8_ENERGY_Voltage","device":{"identifiers":["2A34C8"],"name":"nas_pow","model":"BlitzWolf SHP","sw_version":"6.4.1.10(bda3126-sonoff)","manufacturer":"Tasmota"}, "~":"nas_pow/tele/"} (retained)
17:14:54 MQT: homeassistant/sensor/2A34C8_ENERGY_Current/config = {"name":"nas_pow ENERGY Current","stat_t":"~SENSOR","avty_t":"~LWT","pl_avail":"Online","pl_not_avail":"Offline","unit_of_meas":"A","val_tpl":"{{value_json['ENERGY'].Current}}","uniq_id":"2A34C8_ENERGY_Current","device":{"identifiers":["2A34C8"],"name":"nas_pow","model":"BlitzWolf SHP","sw_version":"6.4.1.10(bda3126-sonoff)","manufacturer":"Tasmota"}, "~":"nas_pow/tele/"} (retained)

Status 0

17:15:18 CMD: status 0
17:15:18 MQT: nas_pow/stat/STATUS = {"Status":{"Module":45,"FriendlyName":["nas_pow"],"Topic":"nas_pow","ButtonTopic":"0","Power":1,"PowerOnState":3,"LedState":1,"SaveData":1,"SaveState":1,"SwitchTopic":"0","SwitchMode":[0,0,0,0,0,0,0,0],"ButtonRetain":0,"SwitchRetain":0,"SensorRetain":0,"PowerRetain":0}}
17:15:18 MQT: nas_pow/stat/STATUS1 = {"StatusPRM":{"Baudrate":115200,"GroupTopic":"sonoffs","OtaUrl":"http://thehackbox.org/tasmota/release/sonoff.bin","RestartReason":"Software Watchdog","Uptime":"0T00:00:33","StartupUTC":"2019-01-22T16:14:45","Sleep":50,"BootCount":14,"SaveCount":32,"SaveAddress":"F6000"}}
17:15:18 MQT: nas_pow/stat/STATUS2 = {"StatusFWR":{"Version":"6.4.1.10(bda3126-sonoff)","BuildDateTime":"2019-01-22T15:12:01","Boot":31,"Core":"2_5_0_BETA2","SDK":"3.0.0-dev(c0f7b44)"}}
17:15:18 MQT: nas_pow/stat/STATUS3 = {"StatusLOG":{"SerialLog":2,"WebLog":2,"SysLog":0,"LogHost":"","LogPort":514,"SSId":["Martikainen",""],"TelePeriod":300,"SetOption":["000A8009","558180C0","00000200"]}}
17:15:18 MQT: nas_pow/stat/STATUS4 = {"StatusMEM":{"ProgramSize":548,"Free":452,"Heap":21,"ProgramFlashSize":1024,"FlashSize":1024,"FlashChipId":"144068","FlashMode":3,"Features":["00000809","0FDAE794","000383A0","23B617CE","00003BC0"]}}
17:15:18 MQT: nas_pow/stat/STATUS5 = {"StatusNET":{"Hostname":"nas_pow-5320","IPAddress":"192.168.1.65","Gateway":"192.168.1.1","Subnetmask":"255.255.255.0","DNSServer":"8.8.8.8","Mac":"CC:50:E3:2A:34:C8","Webserver":2,"WifiConfig":4}}
17:15:18 MQT: nas_pow/stat/STATUS6 = {"StatusMQT":{"MqttHost":"192.168.1.2","MqttPort":1883,"MqttClientMask":"nas_pow_%06X","MqttClient":"nas_pow_2A34C8C8","MqttUser":"sonoff","MqttType":1,"MAX_PACKET_SIZE":1000,"KEEPALIVE":15}}
17:15:18 MQT: nas_pow/stat/STATUS7 = {"StatusTIM":{"UTC":"Tue Jan 22 16:15:18 2019","Local":"Tue Jan 22 17:15:18 2019","StartDST":"Sun Mar 31 02:00:00 2019","EndDST":"Sun Oct 27 03:00:00 2019","Timezone":"+01:00","Sunrise":"08:32","Sunset":"17:31"}}
17:15:18 MQT: nas_pow/stat/STATUS9 = {"StatusPTH":{"PowerDelta":80,"PowerLow":0,"PowerHigh":0,"VoltageLow":0,"VoltageHigh":0,"CurrentLow":0,"CurrentHigh":0}}
17:15:18 MQT: nas_pow/stat/STATUS10 = {"StatusSNS":{"Time":"2019-01-22T17:15:18","ENERGY":{"TotalStartTime":"2019-01-20T15:54:03","Total":0.122,"Yesterday":0.009,"Today":0.023,"Power":103,"ApparentPower":122,"ReactivePower":66,"Factor":0.84,"Voltage":215,"Current":0.568}}}
17:15:18 MQT: nas_pow/stat/STATUS11 = {"StatusSTS":{"Time":"2019-01-22T17:15:18","Uptime":"0T00:00:33","Vcc":3.556,"SleepMode":"Dynamic","Sleep":50,"LoadAvg":33,"POWER":"ON","Wifi":{"AP":1,"SSId":"Martikainen","BSSId":"FC:EC:DA:8A:71:7C","Channel":6,"RSSI":34}}}

Please let me know what information you need and how to get it, the other 2 that are still running without panics does not have any load on them, this one that paniced is sitting before my UPS and has 100-150watt load.

arendst commented 5 years ago

When did you get the panic? Shortly after executing command SetOption19 1 or some minutes later?

martikainen87 commented 5 years ago

minutes later, i updated the device in my office, moved it to the where the UPS is and connected it, right after i wrote the post above where I wrote "You were totaly right, it was me who thought that the binary"

At 17:15 it paniced, then once again at 17:30

17:33:41 MQT: nas_pow/stat/STATUS11 = {"StatusSTS":{"Time":"2019-01-22T17:33:41","Uptime":"0T00:03:52"

And a few minutes ago I got this in the console and the sensors in HA haven't updated since the below information.

17:35:06 MQT: nas_pow/tele/SENSOR = {"Time":"2019-01-22T17:35:06","ENERGY":{"TotalStartTime":"2019-01-20T15:54:03","Total":0.156,"Yesterday":0.009,"Today":0.057,"Period":9,"Power":99,"ApparentPower":122,"ReactivePower":71,"Factor":0.81,"Voltage":217,"Current":0.559}}
17:39:50 APP: Serial logging disabled
17:40:06 MQT: nas_pow/tele/STATE = {"Time":"2019-01-22T17:40:06","Uptime":"0T00:10:17","Vcc":3.556,"SleepMode":"Dynamic","Sleep":50,"LoadAvg":19,"POWER":"ON","Wifi":{"AP":1,"SSId":"Martikainen","BSSId":"78:8A:20:49:85:9B","Channel":11,"RSSI":42}}
17:40:06 MQT: nas_pow/tele/SENSOR = {"Time":"2019-01-22T17:40:06","ENERGY":{"TotalStartTime":"2019-01-20T15:54:03","Total":0.164,"Yesterday":0.009,"Today":0.065,"Period":8,"Power":101,"ApparentPower":128,"ReactivePower":78,"Factor":0.79,"Voltage":210,"Current":0.610}}
arendst commented 5 years ago

If after some minutes it is not related to Hass discovery but probably to core 2.5.0 issues. This is still beta so I wouldn't use 2.5.0 in production.

And a few minutes ago I got this in the console and the sensors in HA haven't updated since the below information.

Nothing wrong with that. No need to have seriallogging active anyway if you have no serial connection.

I suggest you move to core 2.4.2 as available on http://thehackbox.org/tasmota/

I just tried core 2.5.0 too and had lots of wifi errors. 2.4.2 is stable and Hass discovery works as expected:

homeassistant/light/22EAA3_LI_1/config (null)
homeassistant/switch/22EAA3_RL_1/config {"name":"Blitzwolf SHP2","cmd_t":"~cmnd/POWER","stat_t":"~tele/STATE","val_tpl":"{{value_json.POWER}}","pl_off":"OFF","pl_on":"ON","avty_t":"~tele/LWT","pl_avail":"Online","pl_not_avail":"Offline","uniq_id":"22EAA3_RL_1","device":{"identifiers":["22EAA3"],"name":"Blitzwolf SHP2","model":"BlitzWolf SHP","sw_version":"6.4.1.10(1fe1839-sonoff)","manufacturer":"Tasmota"}, "~":"blitzwolf/"}
homeassistant/light/22EAA3_LI_2/config (null)
homeassistant/switch/22EAA3_RL_2/config (null)
homeassistant/light/22EAA3_LI_3/config (null)
homeassistant/switch/22EAA3_RL_3/config (null)
homeassistant/light/22EAA3_LI_4/config (null)
homeassistant/switch/22EAA3_RL_4/config (null)
homeassistant/light/22EAA3_LI_5/config (null)
homeassistant/switch/22EAA3_RL_5/config (null)
homeassistant/light/22EAA3_LI_6/config (null)
homeassistant/switch/22EAA3_RL_6/config (null)
homeassistant/light/22EAA3_LI_7/config (null)
homeassistant/switch/22EAA3_RL_7/config (null)
homeassistant/light/22EAA3_LI_8/config (null)
homeassistant/switch/22EAA3_RL_8/config (null)
homeassistant/sensor/22EAA3_ENERGY_TotalStartTime/config {"name":"Blitzwolf SHP2 ENERGY TotalStart","stat_t":"~SENSOR","avty_t":"~LWT","pl_avail":"Online","pl_not_avail":"Offline","unit_of_meas":" ","val_tpl":"{{value_json['ENERGY'].TotalStartTime}}","uniq_id":"22EAA3_ENERGY_TotalStartTime","device":{"identifiers":["22EAA3"],"name":"Blitzwolf SHP2","model":"BlitzWolf SHP","sw_version":"6.4.1.10(1fe1839-sonoff)","manufacturer":"Tasmota"}, "~":"blitzwolf/tele/"}
homeassistant/sensor/22EAA3_ENERGY_Total/config {"name":"Blitzwolf SHP2 ENERGY Total","stat_t":"~SENSOR","avty_t":"~LWT","pl_avail":"Online","pl_not_avail":"Offline","unit_of_meas":"kWh","val_tpl":"{{value_json['ENERGY'].Total}}","uniq_id":"22EAA3_ENERGY_Total","device":{"identifiers":["22EAA3"],"name":"Blitzwolf SHP2","model":"BlitzWolf SHP","sw_version":"6.4.1.10(1fe1839-sonoff)","manufacturer":"Tasmota"}, "~":"blitzwolf/tele/"}
homeassistant/sensor/22EAA3_ENERGY_Yesterday/config {"name":"Blitzwolf SHP2 ENERGY Yesterday","stat_t":"~SENSOR","avty_t":"~LWT","pl_avail":"Online","pl_not_avail":"Offline","unit_of_meas":"kWh","val_tpl":"{{value_json['ENERGY'].Yesterday}}","uniq_id":"22EAA3_ENERGY_Yesterday","device":{"identifiers":["22EAA3"],"name":"Blitzwolf SHP2","model":"BlitzWolf SHP","sw_version":"6.4.1.10(1fe1839-sonoff)","manufacturer":"Tasmota"}, "~":"blitzwolf/tele/"}
homeassistant/sensor/22EAA3_ENERGY_Today/config {"name":"Blitzwolf SHP2 ENERGY Today","stat_t":"~SENSOR","avty_t":"~LWT","pl_avail":"Online","pl_not_avail":"Offline","unit_of_meas":"kWh","val_tpl":"{{value_json['ENERGY'].Today}}","uniq_id":"22EAA3_ENERGY_Today","device":{"identifiers":["22EAA3"],"name":"Blitzwolf SHP2","model":"BlitzWolf SHP","sw_version":"6.4.1.10(1fe1839-sonoff)","manufacturer":"Tasmota"}, "~":"blitzwolf/tele/"}
homeassistant/sensor/22EAA3_ENERGY_Power/config {"name":"Blitzwolf SHP2 ENERGY Power","stat_t":"~SENSOR","avty_t":"~LWT","pl_avail":"Online","pl_not_avail":"Offline","unit_of_meas":"W","val_tpl":"{{value_json['ENERGY'].Power}}","uniq_id":"22EAA3_ENERGY_Power","device":{"identifiers":["22EAA3"],"name":"Blitzwolf SHP2","model":"BlitzWolf SHP","sw_version":"6.4.1.10(1fe1839-sonoff)","manufacturer":"Tasmota"}, "~":"blitzwolf/tele/"}
homeassistant/sensor/22EAA3_ENERGY_ApparentPower/config {"name":"Blitzwolf SHP2 ENERGY ApparentPo","stat_t":"~SENSOR","avty_t":"~LWT","pl_avail":"Online","pl_not_avail":"Offline","unit_of_meas":" ","val_tpl":"{{value_json['ENERGY'].ApparentPower}}","uniq_id":"22EAA3_ENERGY_ApparentPower","device":{"identifiers":["22EAA3"],"name":"Blitzwolf SHP2","model":"BlitzWolf SHP","sw_version":"6.4.1.10(1fe1839-sonoff)","manufacturer":"Tasmota"}, "~":"blitzwolf/tele/"}
homeassistant/sensor/22EAA3_ENERGY_ReactivePower/config {"name":"Blitzwolf SHP2 ENERGY ReactivePo","stat_t":"~SENSOR","avty_t":"~LWT","pl_avail":"Online","pl_not_avail":"Offline","unit_of_meas":" ","val_tpl":"{{value_json['ENERGY'].ReactivePower}}","uniq_id":"22EAA3_ENERGY_ReactivePower","device":{"identifiers":["22EAA3"],"name":"Blitzwolf SHP2","model":"BlitzWolf SHP","sw_version":"6.4.1.10(1fe1839-sonoff)","manufacturer":"Tasmota"}, "~":"blitzwolf/tele/"}
homeassistant/sensor/22EAA3_ENERGY_Factor/config {"name":"Blitzwolf SHP2 ENERGY Factor","stat_t":"~SENSOR","avty_t":"~LWT","pl_avail":"Online","pl_not_avail":"Offline","unit_of_meas":" ","val_tpl":"{{value_json['ENERGY'].Factor}}","uniq_id":"22EAA3_ENERGY_Factor","device":{"identifiers":["22EAA3"],"name":"Blitzwolf SHP2","model":"BlitzWolf SHP","sw_version":"6.4.1.10(1fe1839-sonoff)","manufacturer":"Tasmota"}, "~":"blitzwolf/tele/"}
martikainen87 commented 5 years ago

Will do! I'll be back with a status report soon :)

martikainen87 commented 5 years ago

The topic change seemed to work, but not sure about the stability, i did OTA flash and a reset 5 afterwards. SetOption19 1 and the sensors updated in HA, but then it stopped updating in HA, and nothing was shown in the log.

I issued a "status 0" command and the plug rebooted, then it started having some issues with wifi I guess.

This is after i issued 'status 0'

00:00:00 Project sonoff nas_pow Version 6.4.1.10(1fe1839-sonoff)-2_4_2
00:00:00 WIF: Connecting to AP1 Martikainen in mode 11N as nas_pow-5320...
00:00:02 RSL: nas_pow/tele/SENSOR = {"Time":"1970-01-01T00:00:02","ENERGY":{"TotalStartTime":"2019-01-22T18:16:38","Total":0.142,"Yesterday":0.000,"Today":0.142,"Power":53,"ApparentPower":53,"ReactivePower":0,"Factor":1.00,"Voltage":214,"Current":0.248}}
00:00:06 WIF: Connected
00:00:06 HTP: Web server active on nas_pow-5320 with IP address 192.168.1.65
18:27:08 MQT: homeassistant/sensor/2A34C8_ENERGY_Yesterday/config = {"name":"nas_pow ENERGY Yesterday","stat_t":"~SENSOR","avty_t":"~LWT","pl_avail":"Online","pl_not_avail":"Offline","unit_of_meas":"kWh","val_tpl":"{{value_json['ENERGY'].Yesterday}}","uniq_id":"2A34C8_ENERGY_Yesterday","device":{"identifiers":["2A34C8"],"name":"nas_pow","model":"BlitzWolf SHP","sw_version":"6.4.1.10(1fe1839-sonoff)","manufacturer":"Tasmota"}, "~":"nas_pow/tele/"} (retained)
18:27:08 MQT: homeassistant/sensor/2A34C8_ENERGY_Today/config = {"name":"nas_pow ENERGY Today","stat_t":"~SENSOR","avty_t":"~LWT","pl_avail":"Online","pl_not_avail":"Offline","unit_of_meas":"kWh","val_tpl":"{{value_json['ENERGY'].Today}}","uniq_id":"2A34C8_ENERGY_Today","device":{"identifiers":["2A34C8"],"name":"nas_pow","model":"BlitzWolf SHP","sw_version":"6.4.1.10(1fe1839-sonoff)","manufacturer":"Tasmota"}, "~":"nas_pow/tele/"} (retained)
18:27:08 MQT: homeassistant/sensor/2A34C8_ENERGY_Power/config = {"name":"nas_pow ENERGY Power","stat_t":"~SENSOR","avty_t":"~LWT","pl_avail":"Online","pl_not_avail":"Offline","unit_of_meas":"W","val_tpl":"{{value_json['ENERGY'].Power}}","uniq_id":"2A34C8_ENERGY_Power","device":{"identifiers":["2A34C8"],"name":"nas_pow","model":"BlitzWolf SHP","sw_version":"6.4.1.10(1fe1839-sonoff)","manufacturer":"Tasmota"}, "~":"nas_pow/tele/"} (retained)
18:27:08 MQT: homeassistant/sensor/2A34C8_ENERGY_ApparentPower/config = {"name":"nas_pow ENERGY ApparentPower","stat_t":"~SENSOR","avty_t":"~LWT","pl_avail":"Online","pl_not_avail":"Offline","unit_of_meas":" ","val_tpl":"{{value_json['ENERGY'].ApparentPower}}","uniq_id":"2A34C8_ENERGY_ApparentPower","device":{"identifiers":["2A34C8"],"name":"nas_pow","model":"BlitzWolf SHP","sw_version":"6.4.1.10(1fe1839-sonoff)","manufacturer":"Tasmota"}, "~":"nas_pow/tele/"} (retained)
18:27:08 MQT: homeassistant/sensor/2A34C8_ENERGY_ReactivePower/config = {"name":"nas_pow ENERGY ReactivePower","stat_t":"~SENSOR","avty_t":"~LWT","pl_avail":"Online","pl_not_avail":"Offline","unit_of_meas":" ","val_tpl":"{{value_json['ENERGY'].ReactivePower}}","uniq_id":"2A34C8_ENERGY_ReactivePower","device":{"identifiers":["2A34C8"],"name":"nas_pow","model":"BlitzWolf SHP","sw_version":"6.4.1.10(1fe1839-sonoff)","manufacturer":"Tasmota"}, "~":"nas_pow/tele/"} (retained)
18:27:08 MQT: homeassistant/sensor/2A34C8_ENERGY_Factor/config = {"name":"nas_pow ENERGY Factor","stat_t":"~SENSOR","avty_t":"~LWT","pl_avail":"Online","pl_not_avail":"Offline","unit_of_meas":" ","val_tpl":"{{value_json['ENERGY'].Factor}}","uniq_id":"2A34C8_ENERGY_Factor","device":{"identifiers":["2A34C8"],"name":"nas_pow","model":"BlitzWolf SHP","sw_version":"6.4.1.10(1fe1839-sonoff)","manufacturer":"Tasmota"}, "~":"nas_pow/tele/"} (retained)
18:27:08 MQT: homeassistant/sensor/2A34C8_ENERGY_Voltage/config = {"name":"nas_pow ENERGY Voltage","stat_t":"~SENSOR","avty_t":"~LWT","pl_avail":"Online","pl_not_avail":"Offline","unit_of_meas":"V","val_tpl":"{{value_json['ENERGY'].Voltage}}","uniq_id":"2A34C8_ENERGY_Voltage","device":{"identifiers":["2A34C8"],"name":"nas_pow","model":"BlitzWolf SHP","sw_version":"6.4.1.10(1fe1839-sonoff)","manufacturer":"Tasmota"}, "~":"nas_pow/tele/"} (retained)
18:27:08 MQT: homeassistant/sensor/2A34C8_ENERGY_Current/config = {"name":"nas_pow ENERGY Current","stat_t":"~SENSOR","avty_t":"~LWT","pl_avail":"Online","pl_not_avail":"Offline","unit_of_meas":"A","val_tpl":"{{value_json['ENERGY'].Current}}","uniq_id":"2A34C8_ENERGY_Current","device":{"identifiers":["2A34C8"],"name":"nas_pow","model":"BlitzWolf SHP","sw_version":"6.4.1.10(1fe1839-sonoff)","manufacturer":"Tasmota"}, "~":"nas_pow/tele/"} (retained)
18:27:15 MQT: nas_pow/tele/STATE = {"Time":"2019-01-22T18:27:15","Uptime":"0T00:00:16","Vcc":3.556,"SleepMode":"Dynamic","Sleep":50,"LoadAvg":19,"POWER":"ON","Wifi":{"AP":1,"SSId":"Martikainen","BSSId":"78:8A:20:49:85:9B","Channel":11,"RSSI":38}}
18:27:15 MQT: nas_pow/tele/SENSOR = {"Time":"2019-01-22T18:27:15","ENERGY":{"TotalStartTime":"2019-01-22T18:16:38","Total":0.143,"Yesterday":0.000,"Today":0.143,"Period":0,"Power":117,"ApparentPower":147,"ReactivePower":88,"Factor":0.80,"Voltage":216,"Current":0.680}}
18:27:26 WIF: Connecting to AP1 Martikainen in mode 11N as nas_pow-5320...
18:27:30 WIF: Connected
18:27:30 MQT: Attempting connection...
18:27:30 MQT: Connected
18:27:30 MQT: nas_pow/tele/LWT = Online (retained)
18:27:30 MQT: nas_pow/cmnd/POWER = 
18:27:48 MQT: Attempting connection...
18:27:48 MQT: Connect failed to 192.168.1.2:1883, rc -2. Retry in 10 sec
18:27:50 WIF: Connecting to AP1 Martikainen in mode 11N as nas_pow-5320...
18:28:00 WIF: Connected

Do I need to to a hard reflash? (serial connection and erase_flash before flashing..) I thought somone said that a OTA update + Reset 5 should suffice.

martikainen87 commented 5 years ago

Gonna try this on another plug, but the updates right now are slow..

18:39:54 MQT: nas_pow/tele/SENSOR = {"Time":"2019-01-22T18:39:54","ENERGY":{"TotalStartTime":"2019-01-22T18:16:38","Total":0.166,"Yesterday":0.000,"Today":0.166,"Power":29,"ApparentPower":132,"ReactivePower":129,"Factor":0.22,"Voltage":216,"Current":0.611}}
18:39:55 MQT: nas_pow/tele/SENSOR = {"Time":"2019-01-22T18:39:55","ENERGY":{"TotalStartTime":"2019-01-22T18:16:38","Total":0.166,"Yesterday":0.000,"Today":0.166,"Power":109,"ApparentPower":133,"ReactivePower":76,"Factor":0.82,"Voltage":216,"Current":0.614}}
18:42:16 MQT: nas_pow/tele/STATE = {"Time":"2019-01-22T18:42:16","Uptime":"0T00:15:17","Vcc":3.556,"SleepMode":"Dynamic","Sleep":50,"LoadAvg":19,"POWER":"ON","Wifi":{"AP":1,"SSId":"Martikainen","BSSId":"FC:EC:DA:8A:71:7C","Channel":6,"RSSI":38}}
18:42:16 MQT: nas_pow/tele/SENSOR = {"Time":"2019-01-22T18:42:16","ENERGY":{"TotalStartTime":"2019-01-22T18:16:38","Total":0.171,"Yesterday":0.000,"Today":0.171,"Period":9,"Power":113,"ApparentPower":134,"ReactivePower":72,"Factor":0.84,"Voltage":221,"Current":0.606}}
18:47:16 MQT: nas_pow/tele/STATE = {"Time":"2019-01-22T18:47:16","Uptime":"0T00:20:17","Vcc":3.556,"SleepMode":"Dynamic","Sleep":50,"LoadAvg":19,"POWER":"ON","Wifi":{"AP":1,"SSId":"Martikainen","BSSId":"FC:EC:DA:8A:71:7C","Channel":6,"RSSI":38}}
18:47:16 MQT: nas_pow/tele/SENSOR = {"Time":"2019-01-22T18:47:16","ENERGY":{"TotalStartTime":"2019-01-22T18:16:38","Total":0.180,"Yesterday":0.000,"Today":0.180,"Period":9,"Power":115,"ApparentPower":140,"ReactivePower":80,"Factor":0.82,"Voltage":219,"Current":0.641}}
18:49:56 MQT: nas_pow/tele/SENSOR = {"Time":"2019-01-22T18:49:56","ENERGY":{"TotalStartTime":"2019-01-22T18:16:38","Total":0.185,"Yesterday":0.000,"Today":0.185,"Power":0,"ApparentPower":138,"ReactivePower":138,"Factor":0.00,"Voltage":216,"Current":0.638}}
18:49:57 MQT: nas_pow/tele/SENSOR = {"Time":"2019-01-22T18:49:57","ENERGY":{"TotalStartTime":"2019-01-22T18:16:38","Total":0.185,"Yesterday":0.000,"Today":0.185,"Power":109,"ApparentPower":131,"ReactivePower":73,"Factor":0.83,"Voltage":216,"Current":0.606}}

Before it updated as soon as the power usage changed, now its every other minute or so

ascillato commented 5 years ago

Hi @martikainen87

The software reset in that device happened right after entering the command setoption19 1 or it just happens?

martikainen87 commented 5 years ago

The software reset was after 'status 0' command, and the plug just rebooted (I can hear the UPS beeping :P ) without me doing anything, I've just let it be to see if it starts updating as it should.

18:55:35 MQT: homeassistant/sensor/2A34C8_ENERGY_ReactivePower/config = {"name":"nas_pow ENERGY ReactivePower","stat_t":"~SENSOR","avty_t":"~LWT","pl_avail":"Online","pl_not_avail":"Offline","unit_of_meas":" ","val_tpl":"{{value_json['ENERGY'].ReactivePower}}","uniq_id":"2A34C8_ENERGY_ReactivePower","device":{"identifiers":["2A34C8"],"name":"nas_pow","model":"BlitzWolf SHP","sw_version":"6.4.1.10(1fe1839-sonoff)","manufacturer":"Tasmota"}, "~":"nas_pow/tele/"} (retained)
18:55:35 MQT: homeassistant/sensor/2A34C8_ENERGY_Factor/config = {"name":"nas_pow ENERGY Factor","stat_t":"~SENSOR","avty_t":"~LWT","pl_avail":"Online","pl_not_avail":"Offline","unit_of_meas":" ","val_tpl":"{{value_json['ENERGY'].Factor}}","uniq_id":"2A34C8_ENERGY_Factor","device":{"identifiers":["2A34C8"],"name":"nas_pow","model":"BlitzWolf SHP","sw_version":"6.4.1.10(1fe1839-sonoff)","manufacturer":"Tasmota"}, "~":"nas_pow/tele/"} (retained)
18:55:35 MQT: homeassistant/sensor/2A34C8_ENERGY_Voltage/config = {"name":"nas_pow ENERGY Voltage","stat_t":"~SENSOR","avty_t":"~LWT","pl_avail":"Online","pl_not_avail":"Offline","unit_of_meas":"V","val_tpl":"{{value_json['ENERGY'].Voltage}}","uniq_id":"2A34C8_ENERGY_Voltage","device":{"identifiers":["2A34C8"],"name":"nas_pow","model":"BlitzWolf SHP","sw_version":"6.4.1.10(1fe1839-sonoff)","manufacturer":"Tasmota"}, "~":"nas_pow/tele/"} (retained)
18:55:35 MQT: homeassistant/sensor/2A34C8_ENERGY_Current/config = {"name":"nas_pow ENERGY Current","stat_t":"~SENSOR","avty_t":"~LWT","pl_avail":"Online","pl_not_avail":"Offline","unit_of_meas":"A","val_tpl":"{{value_json['ENERGY'].Current}}","uniq_id":"2A34C8_ENERGY_Current","device":{"identifiers":["2A34C8"],"name":"nas_pow","model":"BlitzWolf SHP","sw_version":"6.4.1.10(1fe1839-sonoff)","manufacturer":"Tasmota"}, "~":"nas_pow/tele/"} (retained)
18:55:42 MQT: nas_pow/tele/STATE = {"Time":"2019-01-22T18:55:42","Uptime":"0T00:00:16","Vcc":3.556,"SleepMode":"Dynamic","Sleep":50,"LoadAvg":19,"POWER":"ON","Wifi":{"AP":1,"SSId":"Martikainen","BSSId":"78:8A:20:49:85:9B","Channel":11,"RSSI":40}}
18:55:42 MQT: nas_pow/tele/SENSOR = {"Time":"2019-01-22T18:55:42","ENERGY":{"TotalStartTime":"2019-01-22T18:16:38","Total":0.195,"Yesterday":0.000,"Today":0.195,"Period":0,"Power":107,"ApparentPower":135,"ReactivePower":83,"Factor":0.79,"Voltage":212,"Current":0.638}}
18:55:52 MQT: Attempting connection...
18:55:52 MQT: Connected
18:55:52 MQT: nas_pow/tele/LWT = Online (retained)
18:55:52 MQT: nas_pow/cmnd/POWER = 
18:56:02 MQT: nas_pow/tele/SENSOR = {"Time":"2019-01-22T18:56:02","ENERGY":{"TotalStartTime":"2019-01-22T18:16:38","Total":0.196,"Yesterday":0.000,"Today":0.196,"Power":44,"ApparentPower":133,"ReactivePower":126,"Factor":0.33,"Voltage":211,"Current":0.629}}
18:56:03 MQT: nas_pow/tele/SENSOR = {"Time":"2019-01-22T18:56:03","ENERGY":{"TotalStartTime":"2019-01-22T18:16:38","Total":0.196,"Yesterday":0.000,"Today":0.196,"Power":96,"ApparentPower":96,"ReactivePower":0,"Factor":1.00,"Voltage":157,"Current":0.613}}
18:56:09 MQT: nas_pow/tele/SENSOR = {"Time":"2019-01-22T18:56:09","ENERGY":{"TotalStartTime":"2019-01-22T18:16:38","Total":0.196,"Yesterday":0.000,"Today":0.196,"Power":24,"ApparentPower":32,"ReactivePower":21,"Factor":0.75,"Voltage":53,"Current":0.596}}
18:56:10 RSL: nas_pow/tele/SENSOR = {"Time":"2019-01-22T18:56:10","ENERGY":{"TotalStartTime":"2019-01-22T18:16:38","Total":0.196,"Yesterday":0.000,"Today":0.196,"Power":35,"ApparentPower":35,"ReactivePower":0,"Factor":1.00,"Voltage":53,"Current":0.656}}
18:56:13 WIF: Connecting to AP1 Martikainen in mode 11N as nas_pow-5320...
18:56:17 WIF: Connected
18:56:17 MQT: Attempting connection...
18:56:17 MQT: Connected
18:56:17 MQT: nas_pow/tele/LWT = Online (retained)
18:56:17 MQT: nas_pow/cmnd/POWER = 
ascillato commented 5 years ago

Ok, in that case, your issue is not related to this thread.

Please, try a full erase with esptool.py in that device, as explained in the wiki, and then please flash the precompiled bins from development branch.

If after that procedure, your issue remains, please open a new issue with the troubleshooting template complete. Thanks

phdelodder commented 5 years ago

Using the latest pull I was able to get every property in hass.

ascillato2 commented 5 years ago

Great to know that it is working now for you.

Closing issue as it has been fixed. Thanks.

Jason2866 commented 5 years ago

Great. Time to close issue😊