Static IP address - Tasmota

1,863 views
Skip to first unread message

UaU

unread,
Jan 18, 2020, 11:33:51 AM1/18/20
to TasmotaUsers
Hi, 

I have about 8 Sonoff Pow R2s that I have flashed with Tasmota 7.1.2.. There is also a mqtt broker on a hassio setup on a raspberry pi for automation.
Where the setup is located there are frequent power cuts, and occasionally a few hours might pass till mains power is restored.
For various reasons I have opted for static IP addresses for all the Sonoffs and would like to keep if at all possible.

Once in a while it happens that all my devices loose all their configurations and revert back to the Basic tasmota setup and I have to repeat the whole configuration exercise which consists of:
Setting up the wifi parameters
Setting up mqtt
Defining a friendly name for the device
Passing the following commands to the Console:
ipaddress1 192.168.xxx.xxx
wificonfig 5
option19 1
option36 0
option65 1

Are there any other options I can include to prevent the resetting of the devices due to power cycling/ boot loops/ any other function I have missed? The devices are physically accessible, and I can always reflash them if they get stuck in some vicious loop.

Thanks



Seva Nechaev

unread,
Jan 18, 2020, 12:01:40 PM1/18/20
to TasmotaUsers
Some of this params could be included into your custom build. Check the https://github.com/arendst/Tasmota/blob/development/tasmota/user_config_override_sample.h

The rest prob. could be set with mqtt commands using some rule or so, when tasmota reboot is detected?


суббота, 18 января 2020 г., 17:33:51 UTC+1 пользователь UaU написал:

UaU

unread,
Jan 18, 2020, 12:09:37 PM1/18/20
to TasmotaUsers
Yes, you are right, those are options for redoing the setup phase again.

I would like to avoid the Tasmotas resetting in the first place if possible? I'm assuming they enter into some protection mode and revert to basic settings to allow access again. Just like the option36 and option65. So I was hoping there was another option/parameter that I was missing

On the other hand it might be something else completely?

Brian

unread,
Jan 18, 2020, 2:46:35 PM1/18/20
to TasmotaUsers
Are the static IP Addresses outside the DCHP range? Have you reserved the Addresses on the Router?

I power down devices for weeks at a time and have never seen the config reset.

Seva Nechaev

unread,
Jan 18, 2020, 3:09:00 PM1/18/20
to TasmotaUsers


суббота, 18 января 2020 г., 18:09:37 UTC+1 пользователь UaU написал:

I would like to avoid the Tasmotas resetting in the first place if possible? I'm assuming they enter into some protection mode and revert to basic settings to allow access again. Just like the option36



I'd day first thing is to understand what goes on. After resetting, what is the device's Restart Reason?

UaU

unread,
Jan 19, 2020, 3:06:32 AM1/19/20
to TasmotaUsers
@Brian Yes, they are outside the DHCP range. Router assigns .2-100, rest is static. I haven't reserved the addresses as such, but there don't seem to be any IP conflicts.
@Seva I'll try to get a log out of the device when it happens again.

Colin Law

unread,
Jan 19, 2020, 8:51:15 AM1/19/20
to TasmotaUsers
Doesn't it reset everything if there are several restarts in quick
succession? Something like that anyway. That could happen if your
power comes and goes several times over a short period.

Colin
> --
> You received this message because you are subscribed to the Google Groups "TasmotaUsers" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to sonoffusers...@googlegroups.com.
> To view this discussion on the web, visit https://groups.google.com/d/msgid/sonoffusers/48057ce3-7eb6-410b-824f-03c11d6a66f3%40googlegroups.com.

UaU

unread,
Jan 19, 2020, 8:56:27 AM1/19/20
to TasmotaUsers
Yes it should, but I believe I have disabled those features with the various 'setoptions'. Perhaps I am missing one though?
> To unsubscribe from this group and stop receiving emails from it, send an email to sonof...@googlegroups.com.

Colin Law

unread,
Jan 19, 2020, 11:32:01 AM1/19/20
to TasmotaUsers
On Sun, 19 Jan 2020 at 13:56, UaU <luka....@gmail.com> wrote:
>
> Yes it should, but I believe I have disabled those features with the various 'setoptions'. Perhaps I am missing one though?

I missed that, but as you say you have option36 0 and option65 1 so it
should be disabled. You could try power cycling it a number of times
to check that it does not reset.

As someone already mentioned if you compile the ip and wifi
credentials into the code then you can avoid such issues. That is
what I do, and combine that with settings for the options that cannot
be compiled in as retained topics in MQTT so they get automatically
refreshed on connecting.

Colin

UaU

unread,
Jan 21, 2020, 3:52:03 AM1/21/20
to TasmotaUsers
Doesn't compiling the settings into the code and settings into the topics only ease the reinstallation process? Or are you saying that I should create a basictasmota.bin that the device reverts to when it resets?
In both cases it seems these are palliative measures. I'll try to pull the logs when it happens next and post what they say.

Colin Law

unread,
Jan 21, 2020, 4:01:28 AM1/21/20
to UaU, TasmotaUsers
On Tue, 21 Jan 2020 at 08:52, UaU <luka....@gmail.com> wrote:
>
> Doesn't compiling the settings into the code and settings into the topics only ease the reinstallation process? Or are you saying that I should create a basictasmota.bin that the device reverts to when it resets?

When the device decides to reset its settings it restores them to
whatever the compiled in values are. So if they are compiled in and
it does reset them they go to the compiled in values.

Colin

Philip Knowles

unread,
Jan 21, 2020, 4:21:41 AM1/21/20
to Colin Law, UaU, TasmotaUsers

A way that I got around this was to save the config and then us a rule in openHAB to reinstall the config. As it’s using MQTT to do the upload it doesn’t matter what the IP address has become (although they tend to go back to the same IP). I have a sitemap which has all the items on and I just ‘turn on’ the one I need to re-config. I must admit that I have fewer occasions that I need to do this now.

 

Regards

 

Phil K

 

Sent from Mail for Windows 10

--

You received this message because you are subscribed to the Google Groups "TasmotaUsers" group.

To unsubscribe from this group and stop receiving emails from it, send an email to sonoffusers...@googlegroups.com.

To view this discussion on the web, visit https://groups.google.com/d/msgid/sonoffusers/CAL%3D0gLvNx%2B5HsoA0Xjsj%2Bd_rVceGQkmd9dOTWy7%2By9Am3Kfumg%40mail.gmail.com.

 

UaU

unread,
Jan 21, 2020, 4:36:59 AM1/21/20
to TasmotaUsers
Great, thaks. I will try these suggestions for the reinstallation.

Is there a chance at stopping the resets though? What could be causing them?


On Tuesday, January 21, 2020 at 11:21:41 AM UTC+2, Philip Knowles wrote:

A way that I got around this was to save the config and then us a rule in openHAB to reinstall the config. As it’s using MQTT to do the upload it doesn’t matter what the IP address has become (although they tend to go back to the same IP). I have a sitemap which has all the items on and I just ‘turn on’ the one I need to re-config. I must admit that I have fewer occasions that I need to do this now.

 

Regards

 

Phil K

 

Sent from Mail for Windows 10

 

From: Colin Law
Sent: 21 January 2020 09:01
To: UaU
Cc: TasmotaUsers
Subject: Re: Static IP address - Tasmota

 

On Tue, 21 Jan 2020 at 08:52, UaU <luka....@gmail.com> wrote:

> Doesn't compiling the settings into the code and settings into the topics only ease the reinstallation process? Or are you saying that I should create a basictasmota.bin that the device reverts to when it resets?

 

When the device decides to reset its settings it restores them to

whatever the compiled in values are.  So if they are compiled in and

it does reset them they go to the compiled in values.

 

Colin

 

--

You received this message because you are subscribed to the Google Groups "TasmotaUsers" group.

To unsubscribe from this group and stop receiving emails from it, send an email to sonof...@googlegroups.com.

Philip Knowles

unread,
Jan 21, 2020, 5:04:15 AM1/21/20
to UaU, TasmotaUsers

I think some of the resets are caused by losing power, wifi or MQTT repeatedly in a short period of time. Changing SetOption36 may help.

By the way my openHAB route isn’t painless as you need to set the MQTT parameters up but the bulk of the config doesn’t need to be done.

Regards

 

Phil K

 

Sent from Mail for Windows 10

 

To unsubscribe from this group and stop receiving emails from it, send an email to sonoffusers...@googlegroups.com.
To view this discussion on the web, visit https://groups.google.com/d/msgid/sonoffusers/d95a53f5-0862-4c90-aa3e-eaafebde51a1%40googlegroups.com.

 

UaU

unread,
Jan 21, 2020, 5:07:02 AM1/21/20
to TasmotaUsers
Yes, I've tried that together with option65 0, and wificonfig 5.
Guess will have to wait for it to happen again and see if a log is available.
Reply all
Reply to author
Forward
0 new messages