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

[QUESTION] "scheduleHADiscovery" is needed when Wifi AP disappears #1365

Open
vinibali opened this issue Sep 29, 2024 · 0 comments
Open

[QUESTION] "scheduleHADiscovery" is needed when Wifi AP disappears #1365

vinibali opened this issue Sep 29, 2024 · 0 comments

Comments

@vinibali
Copy link

vinibali commented Sep 29, 2024

Describe the bug
I'm using Domoticz with "MQTT Auto Discovery Client Gateway with LAN interface" plug and it just works fine so far.
But sometimes my Wifi AP get's powered off for a whatever reason (maintenance, fw upgrade, etc). After these the device is able to connect to the Wifi AP for sure, but it's not getting any device update on Domoticz as long as I don't start a HA discovery. Why is that happening?
The autoexec I'm using has "scheduleHADiscovery" commented out as every discovery adds new - unneeded - metrics to the device, like internal temperature and so on.

Firmware:

  • Version: 1.17.732
  • Device: Tuya TH01
  • Chip/model: BK7231N - CBU
  • Device config
{
  "vendor": "Tuya",
  "bDetailed": "0",
  "name": "Full Device Name Here",
  "model": "enter short model name here",
  "chip": "BK7231N",
  "board": "TODO",
  "flags": "1073741828",
  "keywords": [
    "TODO",
    "TODO",
    "TODO"
  ],
  "pins": {
    "8": "BAT_Relay;0;0",
    "14": "Btn;1;0",
    "16": "LED;1;0",
    "20": "CHT83XX_SCK;0;0",
    "22": "CHT83XX_SDA;2;3",
    "23": "BAT_ADC;0"
  },
  "command": "",
  "image": "https://obrazki.elektroda.pl/YOUR_IMAGE.jpg",
  "wiki": "https://www.elektroda.com/rtvforum/topic_YOUR_TOPIC.html"
}

To Reproduce
Steps to reproduce the behavior:

  1. Power off the Wifi AP
  2. Wait until the next deepsleep ends
  3. Power on the Wifi AP
  4. Check Domoticz's dashboard to see the device has no update

Screenshots
NA

Additional context
autoexec.bat

// Initial led blink
SetChannel 1  1
// hold button to get into safe mode
// addEventHandler OnHold 20 SafeMode
PowerSave
mqtt_broadcastInterval 1
mqtt_broadcastItemsPerSec 5
Battery_Setup 2000 3000 1.87 2400 4096
Battery_Measure
startDriver CHT8305
setChannelType 2 Temperature_Div10
// HADiscovery on every boot doesnt seem necessary
// scheduleHADiscovery
SetChannel 1  0
waitFor WiFiState 4
// go to deep sleep if mqtt cant connect
addRepeatingEventID 30 -1 1337 DeepSleep 120
waitFor MQTTState 1
cancelRepeatingEvent 1337
publishChannels
// Data sent led blink
SetChannel 1  1
delay_ms 100
SetChannel 1  0
// additional delay to get a chance to manually connect to device, everything else is already done
delay_s 10
// Deep sleep led blink
SetChannel 1  1
delay_ms 100
SetChannel 1  0
// Deep sleep for 30 mins
DeepSleep 1800

Somewhat connects to this story:
#1100

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

1 participant