Status of the switch when the power is turned off
Moderators: grovkillen, Stuntteam, TD-er
Status of the switch when the power is turned off
Hi, ESP firmware - mega-20180407. I created a SWITCH, the option - Send Boot state - activated. If the power supply ESP is missing, Domoticz does not determine the status of the switch. When the power ESP is turned on, the SWITCH will be turned off, and Domotics can show the old information that the SWITCH is ON. How to fix it?
Re: Status of the switch when the power is turned off
Have you tried with a dummy variable?
Re: Status of the switch when the power is turned off
Which gpio are you using? Gpio 0,2,15 have fixed boot states that could be a src of error.BuddhaZen wrote: ↑07 Apr 2018, 14:37 Hi, ESP firmware - mega-20180407. I created a SWITCH, the option - Send Boot state - activated. If the power supply ESP is missing, Domoticz does not determine the status of the switch. When the power ESP is turned on, the SWITCH will be turned off, and Domotics can show the old information that the SWITCH is ON. How to fix it?
Alternatively you could add a rule to send device state manually after boot.
Domoticz on Raspi 2 -- 14 ESP units (hacked Sonoff,NodeMCUs, Wemos, self-built units) running with RC140- Mega 2.0.0 dev8
Re: Status of the switch when the power is turned off
Sorry, newbie here. How could I do this?
I am using an "FHEM HTTP" Controller and would also like try sending boot state manually. In the documentation (https://www.letscontrolit.com/wiki/inde ... _Reference) I have only found the commands "Publish" and the "Send*"-Commands but they seem either MQTT-only or to other ESPs or raw HTTP requests.
Any other way to force sending of the current value to the configured controller?
I have also tried something like this:
Code: Select all
on System#Boot do
TaskValueSet 1,1,0
TaskRun 1
endon
Re: Status of the switch when the power is turned off
Hi, if using GPIO4, make sure that I2C is deactivated in the hardware tab. I would try that first before going with the rule.
The rules (first need to be activated under advanced tab):
Code: Select all
On system#boot do
timerset,1,10
Endon
On Rules#Timer=1 do
TaksRun,1 //(assuming the input switch device is on Task 1)
Endon
Domoticz on Raspi 2 -- 14 ESP units (hacked Sonoff,NodeMCUs, Wemos, self-built units) running with RC140- Mega 2.0.0 dev8
Re: Status of the switch when the power is turned off
Yep, I2C of course disabled )) Thank you, I will continue to understand this issue further.
UPD:
Solved the problem in this way:
Code: Select all
On system#boot do
timerset,1,10
Endon
On Rules#Timer=1 do
SendToHTTP [domoticz IP],8080,/json.htm?type=command¶m=switchlight&idx=3&switchcmd=Off
Endon
It's bad that there is no memorization of the current state Switch

Who is online
Users browsing this forum: No registered users and 14 guests