Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Retain values after restart #6

Open
SoundGuy opened this issue Oct 15, 2018 · 1 comment
Open

Retain values after restart #6

SoundGuy opened this issue Oct 15, 2018 · 1 comment

Comments

@SoundGuy
Copy link

SoundGuy commented Oct 15, 2018

I don't know why, but Tasmota restarted.
Afterwards, the pid_* values was reset and the device stopped heating (because of , i assume pid_sp)
how do we make the value retained after restart?

I'm also interested in understanding how to add the values to the be displayed on main webserver gui (or the MQTT/Log when asked for)

see log: (07:29:54)

2018-10-15 07:39:15Topic: tele/sonoffSousVide/PIDQos: 1{"power":"0.000"}
2018-10-15 07:39:15Topic: tele/sonoffSousVide/SENSORQos: 1{"Time":"2018-10-15T05:39:14","DS18B20":{"Temperature":47.50},"TempUnit":"C"}
2018-10-15 07:39:15Topic: tele/sonoffSousVide/STATEQos: 1{"Time":"2018-10-15T05:39:14","Uptime":"0T00:00:26","Vcc":3.172,"POWER":"OFF","Wifi":{"AP":1,"SSId":"corbomite5-2.4","BSSId":"9C:6F:52:29:54:69","Channel":11,"RSSI":8}}
2018-10-15 07:39:05Topic: tele/sonoffSousVide/PIDQos: 1{"power":"0.000"}
2018-10-15 07:39:05Topic: tele/sonoffSousVide/SENSORQos: 1{"Time":"2018-10-15T05:39:04","DS18B20":{"Temperature":47.56},"TempUnit":"C"}
2018-10-15 07:39:05Topic: tele/sonoffSousVide/STATEQos: 1{"Time":"2018-10-15T05:39:04","Uptime":"0T00:00:16","Vcc":3.173,"POWER":"OFF","Wifi":{"AP":1,"SSId":"corbomite5-2.4","BSSId":"9C:6F:52:29:54:69","Channel":11,"RSSI":8}}
2018-10-15 07:39:04Topic: tele/sonoffSousVide/PIDQos: 1{"power":"0.000"}
2018-10-15 07:39:03Topic: tele/sonoffSousVide/PIDQos: 1{"power":"0.000"}
2018-10-15 07:39:02Topic: tele/sonoffSousVide/PIDQos: 1{"power":"0.000"}
2018-10-15 07:39:01Topic: tele/sonoffSousVide/PIDQos: 1{"power":"0.000"}
2018-10-15 07:39:00Topic: tele/sonoffSousVide/PIDQos: 1{"power":"0.000"}
2018-10-15 07:38:59Topic: tele/sonoffSousVide/PIDQos: 1{"power":"0.000"}
2018-10-15 07:38:58Topic: tele/sonoffSousVide/PIDQos: 1{"power":"0.000"}
2018-10-15 07:38:57Topic: stat/sonoffSousVide/POWERQos: 1OFF
2018-10-15 07:38:57Topic: stat/sonoffSousVide/RESULTQos: 1{"POWER":"OFF"}
2018-10-15 07:38:57Topic: tele/sonoffSousVide/INFO3Qos: 1{"RestartReason":"Software/System restart"}
2018-10-15 07:38:57Topic: tele/sonoffSousVide/INFO2Qos: 1{"WebServerMode":"Admin","Hostname":"sonoffSousVide-2691","IPAddress":"192.168.1.63"}
2018-10-15 07:38:57Topic: tele/sonoffSousVide/INFO1Qos: 1{"Module":"Sonoff Basic","Version":"6.2.1.9","FallbackTopic":"DVES_582A83","GroupTopic":"sonoffs"}
2018-10-15 07:38:57Topic: cmnd/sonoffSousVide/POWERQos: 1
2018-10-15 07:38:57Topic: tele/sonoffSousVide/LWTQos: 1Online
2018-10-15 07:29:54Topic: tele/sonoffSousVide/LWTQos: 1Offline
2018-10-15 07:29:32Topic: tele/sonoffSousVide/PIDQos: 1{"power":"0.119"}
2018-10-15 07:29:32Topic: tele/sonoffSousVide/SENSORQos: 1{"Time":"2018-10-15T05:29:31","DS18B20":{"Temperature":50.00},"TempUnit":"C"}
2018-10-15 07:29:31Topic: tele/sonoffSousVide/STATEQos: 1{"Time":"2018-10-15T05:29:30","Uptime":"0T13:52:23","Vcc":3.171,"POWER":"OFF","Wifi":{"AP":1,"SSId":"corbomite5-2.4","BSSId":"9C:6F:52:29:54:69","Channel":11,"RSSI":8}}
2018-10-15 07:29:30Topic: cmnd/sonoffSousVide/POWERQos: 1
2018-10-15 07:29:30Topic: tele/sonoffSousVide/LWTQos: 1Online
2018-10-15 07:29:29Topic: tele/sonoffSousVide/LWTQos: 1Offline
2018-10-15 07:29:10Topic: stat/sonoffSousVide/POWERQos: 1OFF
2018-10-15 07:29:04Topic: stat/sonoffSousVide/RESULTQos: 1{"POWER":"OFF"}
2018-10-15 07:28:59Topic: stat/sonoffSousVide/POWERQos: 1ON
2018-10-15 07:28:59Topic: stat/sonoffSousVide/RESULTQos: 1{"POWER":"ON"}
2018-10-15 07:28:56Topic: tele/sonoffSousVide/PIDQos: 1{"power":"0.089"}
2018-10-15 07:28:56Topic: tele/sonoffSousVide/SENSORQos: 1{"Time":"2018-10-15T05:28:55","DS18B20":{"Temperature":50.00},"TempUnit":"C"}

@colinl
Copy link
Owner

colinl commented Oct 16, 2018

Just realised I replied to this in Issue #5. Copying here what I said, for completeness:
@SoundGuy on restart the parameters will go to whatever values you have compiled in by setting them in user_config.h. There are three ways of setting them to your desired values:

  1. Set them in user_config.h
  2. Possibly your preferred route is to publish the mqtt commands to set them up as Retained topics in your MQTT broker. Then when the Sonoff initially connects it will automatically pickup those commands and set the paramters appropriately.
  3. Work out what has to be done in the code to automatically save the parameters to flash and ammend the code accordingly. Hopefully you would then let me have the code to incorporate into the source. I have not found this necessary as I use the 'compiled in' method. I keep the source files for each of my devices on separate branches in a git repository so that to build any of my devices I just have to checkout the appropriate branch, build it, and update OTA.

On the question of tuning did you look at my blog and follow the suggested technique there? Without knowing what the parameters are set to and without seeing the power on the graph as I suggested it is impossible to know what to suggest.

As to why it restarted in the first place, I notice that you are getting LWT offlne/online messages, that suggests that your wifi connection may be flaky. If the wifi drops out for too long then, dependant on the setting for WIFI_CONFIG_TOOL in user_config.h, the sonoff may restart.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants