Grid Connect SG120HA timing out (offline) TUYA, localtuya, devicepulse

Here is a reply to Decystan from redit. https://www.reddit.com/r/homeautomation/comments/1am9k16/grid_connect_sg120ha_timing_out/

Question:
Not sure if its a silly question or not but I’ve had a few grid connect products and I’ve had no problems so far however this one has got me stumped. I’ve used the app and instructions like I have every other time to connect devices but this device keeps saying its timing out, I’ve changed locations to be closer to the router, confirmed it’s 2.4ghz about 20 times and have reset the router quite a few times now aswell.

AP mode doesn’t seem to be an option for this device unless it just refuses to go into it as it does NOT flash slowly no matter how many times I reset it. I can find the device in the app easy and it says connecting to device but then after about 30-40 seconds it says “device timed out” and I cannot figure out why.

For $70 AUD and no bad history with Grid Connect I’m sure there’s something I’m missing and/or doing wrong.

hopefully I can connect it but if it’s a product thing then I may just have to return it.

If there’s any help or ideas I could get that would be greatly appreciated!

I have the same thing. It looks like a firmware issue that Arlec hasn’t bothered to patch. I’ve used a combination of localtuya, tuya, devicepulse, unifi apps to do a work around. doesn’t fix the issue but, it minimises this being offline in HA.

alias: Restart Kitchen BT Hub
description: ""
triggers:
  - type: turned_off
    device_id: foo
    entity_id: bar
    domain: switch
    trigger: device
    for:
      hours: 0
      minutes: 3
      seconds: 0
  - type: not_connected
    device_id: foo1
    entity_id: bar1
    domain: binary_sensor
    trigger: device
    for:
      hours: 0
      minutes: 3
      seconds: 0
conditions: []
actions:
  - parallel:
      - action: unifi.reconnect_client
        metadata: {}
        data:
          device_id: foo
      - action: logbook.log
        metadata: {}
        data:
          domain: Wake-word detection
          message: >-
            Restart W-NIC on device via unifi controller. #Automation told me to
            do it.
          entity_id: switch.kitchen_bt_hub
      - action: logbook.log
        metadata: {}
        data:
          domain: Wake-word detection
          message: >-
            Restart W-NIC on device via unifi controller. #Automation told me to
            do it.
          entity_id: switch.kitchen_hub_bt_socket_1
mode: single

Try turning off the 5Ghz radio on your router till they pair. Turn off other devices such as your mobile phone in your pocket as well. They need a clean signal.

I’ve a vague recollection of UniFi and Asus difficulties working with some Tuya devices. Some issues were fixed with router firmware updates. My experience with Arlec that they are just a warehouse for rebadged Chinese Tuya stuff, and their tech support is very spotty. The only bonus is they are approved for connection in Australia, something that is rare for Tuya devices grey imported from China directly

If that doesn’t work, take it back to Bunnings for a refund. Act computer naive: Tell them it doesn’t work when you tried to connect it with your “new Telstra router that only has 5Ghz” - a very common issue with IOT devices that only talk on 2.4Ghz, and the 2.4Ghz requirement is in very fine print you didn’t see when you bought the device - point to the box to show them - you need a magnifying glass to see it. They’re not faulty, just you realised they are incompatible with your computer setup. They are not “fit for purpose” - a ACCC term they will instantly recognise. They won’t ask technical questions. They will give you a voucher if you don’t have a receipt, as long as it was part of their product range, even if it is discontinued. Bunnings carry most Arlec products which are usually rebadged Tuya stuff. After a wave of returns they will dump the product and you will find the remaining stock for $2 in the bargain bin (where you can repurchase them, pull them apart, reflash them with custom firmware, add a huge cell battery for longer life, put them inside your custom 3D printed box, and get a few years life out of them - grins) My friends raids every Bunnings store between Tullamarine and Geelong when he collects me for a visit downunder. We always find something to reflash or tinker with.

For the BlueTooth devices, check how many are in the vicinity. By the time each vehicle with TPM (tyre pressure monitoring) with four tyres each vehicle, and a host of other BLE devices saturate the airwaves around your home, you don’t get a word in edgewise. By design, to conserve battery life, most BLE sensors don’t establish two way sessions, so any transmissions that are made but not caught by the hub for retransmission are lost. Not a problem for some sensors such as temperature and humidity, but critical for things like presence sensors and window switches connected to an alarm. Be aware of device number limitations with BLE technology as well.

For giggles, in case you are wary of reflashing the hub unit, set up a spare ESP32 and monitor the incoming BLE traffic through ESPHome configured as a BLE proxy and tracker. You will be amazed.

I know for my personal use case, the IOT network it is connecting to is 2.4GHz only. For that exact situation. I do love the approach on the Telstra comment. I don’t think anyone at Bunnings cares that much.

Also, it’s a pretty limited range requirement. >5M line of sight, with >5 devices (10 MAX per room). I’ve only got 2 BT Hubs setup as a test use case.

  1. Kitchen for door sensors to talk back to HA for Automations
  2. Office/Shed for door sensors and temp sensors for the same reason

I feel like realistically, it would be better to move over to a " Aqara Smart Hub M3" to have a unified IoT Hub moving towards Matter as the primary protocol and zigbee as a secondary.

Re-flashing
100% down with the idea of moving to like an ESPHome, Tasmota or WLED when keeping things on wifi. Just to get out of the mixed bag experience with differing hardware and cloud providers. Tuya, Shelly and Sensibo all drive me nuts in different ways :stuck_out_tongue: Honestly the videos i’ve seen on this cooks my noodle. happy to be pointed in the right direction :D. (Have loads of spare RaspberryPi’s and ESP32, ESP8266 devices i’m happy to destroy in the process.)

Here’s a 3D drawing from the original design

here’s my janky placement over my UniFi map of the kitchen ~20M SQ (5.2M x 3.8M)

Those distances should work ok.

A little nag in the back of my head about UniFy needing some tweaks to work with IOT devices - maybe some searching will unearth it.

You are right. This is what I have set it to.

I have 32 devices on this network. It’s got its own VLAN for tuya, ESP, shelly and the sonoff stuff. The 3 devices that have always had issues are:

  • Deebot robo vac (Ecovacs Deebot N79S)
  • Rainbird (Rainbird ESP-Me)
  • 2x Arlec BT hub/bridges (same model#)

This is my 3rd Deebot. While I’ve had this in place for over 2-years. seems like a common issue, where the NIC goes offline. The restart NIC automation seems to be a stable remediation.

Rainbird has the cheapest antenna, as they just cheaped out in the manufacturing process. This is a bad product, I wish I hadn’t spent $400 on this retic and just did an ESP OpenSprinkler setup. The restart NIC remediation works here too.

TUYA product have been generally good. except for this unit, i can see the NIC/device is online on the unifi platform. offline on SmartLife and HA

Curious on RSSI levels for your devices, both working, and unreliable. Are the signals borderline for some?

Static IP addresses all around?

Fixed channel WiFi? Any overlaps with neighbours that have foolishly fiddled with their router output power settings in the vain hope it will improve connectivity?

2.4GHz… 100% getting some cross talk with other devices. It’s less then >7% interference. It’s better than in most of the commercial deployments I do. Theres only a couple of selfish neighbours who have miss configured AP’s. here is a month of spectrum analysis.


Both devices are really close to the WAP’s (each one is in a different area of the house, so they connect to different ones. amazing signal’s -45dB and -67dB.

Pretty much everything is with Static IP’s

Are your APs hard wired Ethernet back to the router, or do they also have to compete with other traffic?

What chips/SOCs are in the three misbehaving devices? Are the antennas add-on, built in, or a hybrid? Does moving them closer affect reliability much? Are their power supply batteries on the low side? Do disconnection patterns follow any rhyme or rhythm - time of day, usage of another piece of equipment, somebody arriving/leaving the premises/neighbourhood, passing aircraft/trains/trams, sunspots, moon phases, temperature, anything?

Is the hidden SSID double width channel one you control? Maybe it is splattering all the other ones. Try with 20Mhz spread and see if anything changes much.

Is your open security on the Starlink an issue? All the neighbourhood teenagers piling on instead of going to bed, made worse now by school holidays? Bypassing the new Aussie government TikTok/FaceBoob/InstaGram social media bans and watching porn on your account?

Do your neighbours also complain about connectivity, coming here in these forums to ask for automation hints on rebooting their router and linked devices regularly, not realising that may actually exacerbate the issue with automatic channel re-selection and reconfiguration? Are you guilty of the same sin, to get those three errant devices working again? Are you able to track which channel they use and for how long? All the other devices too?

I have an app on my Android phone called WiFi Analyser by FarProc (not on Google Play any more, but the latest version 3.11.2 is working well and downloadable from third party open source websites) which has graphical and audible feedback that is very handy to detect signal issues, directional preferences, channel optimisations, and hot and cold reception areas. You can watch the results of moving devices in real time, channel allocation for both 2.4Ghz and 5Ghz devices, etc. Free, and I would have paid good money for it in retrospect as it is a valuable tool. Highly recommended.

For BlueTooth, Nordic Semiconductor have a few scanner utilities that will report devices, signal strength, and other usage statistics that they share with WiFi across the common 2.4Ghz band. nRF Connect is one. The format of the open source Bluetooth LE Scanner by Alexandros Schillings is also useful. You will find the source code on GitHub.

Finding shielded areas, Faraday cages, antennas pointing in the wrong direction, leaky microwave ovens, interference hotspots, noisy orange street lamps obsolete firmware, overloaded devices, poor solder joints, low voltage, ageing devices, are just some of the issues you have to contend with.

Pinpointing the underlying cause is difficult. Solving it once you find it will be a doddle!

expect the back workshop. That’s the jankiest of wifi backhaul. Only cameras and speakers dangling from that one.

Q: What chips/SOCs are in the three misbehaving devices?
A: ESP32 for the rainbird, ESP8266 for the BT Hubs. Both are using vendor firmware. Deebot does share the chips, I would assume a cheap ESP32/8266 too.

Q: Are the antennas add-on, built in, or a hybrid?
A: Stock vendor built into antennas.

Q: Does moving them closer affect reliability much?
A: No, both are less than 5M from different WAP’s. This rules out the WAP infrastructure, moving the issue back to the device.

Q: Are their power supply batteries on the low side?
A: The Issue is with the BT bridge “SG120HA” with intermittent connectivity. The devices are using mains power on a standard GPO, have tried substituting different sockets. The issue is still consistent. This rules out the power infrastructure, moving the issue back to the device.

Q: Do disconnection patterns follow any rhyme or rhythm - time of day, usage of another piece of equipment, somebody arriving/leaving the premises/neighbourhood, passing aircraft/trains/trams, sunspots, moon phases, temperature, anything?
A: No, completely random, like the other person from redit. It’s residential, so no spiky power. No trains or airports near or other identifiable environmental interference. Also, the interference appears to be isolated to a few select devices on the 2.4GHz spectrum, ruling out common spectrum issues like microwaves or rogue AP’s.

Q: Is the hidden SSID double width channel one you control? Maybe it is splattering all the other ones. Try with 20Mhz spread and see if anything changes much.
A: Those are all the external devices/APs fighting for 2.4GHz spectrum. They are causing ~7% cross-talk. minor issue, that cannot be solved.

Q: Is your open security on the Starlink an issue?
A: N/A, this is an external APs fighting for 2.4GHz spectrum. Adding to the external noise. I use a hardwired nbn service and no open SSID’s. :stuck_out_tongue:

Q: Do your neighbours also complain about connectivity…
A: Not the ones I personally talk to. Given this is >7% utilisation of whatever channel I’m on, i didn’t care for the conversation. To ensure airtime fairness, i did limit all device bandwidth to >5/5Mb, as I assume most traffic is reporting back to cloud services for telemetry. Again, these 3 devices on the 2.4GHz band, there are 39 other devices on 2.4GHz without issues. Moving the probability of the issue back to bad firmware.

Q: I have an app on my Android phone called WiFi Analyser
A: The Unifi platform has an equivalent in the platform, also used WiFi Analyser, inSSIDer, Wifiman and Sidekick. Still not a network issue

Q: For BlueTooth, Nordic Semiconductor have a few scanner utilities that will report devices, signal strength…
A: Want to get to that point. The issue is lower on the OSI stack; no point trying to triage end-user device issues.

I’ve highlighted in PURPLE this issue I have identified. Which is the same issue from the original post from someone else, the only common thing is the BT Bridge, which has an inconsistent network stability

Q: Finding shielded areas, Faraday cages…
A: Agreed, if the issue was broad, that’s where I would look. As the issue is narrow between the wireless access point and the BT bridge. You can see I’ve isolated/substituted the issues down to the device. Which you can see is common for multiple people.

  • Finding shielded areas, Faraday cages, antennas pointing in the wrong direction NA, getting low noise between -45 and 67dB
  • leaky microwave ovens NA, explicitly tested and ruled out in substitutions
  • interference hotspots NA, explicitly tested and ruled out, in with multiple-interference testing
  • noisy orange street lamps NA so far away from a street lamp, not even a consideration
  • obsolete firmware YES, agreed. original post
  • overloaded devices NA, 5-device well under the 20-device specification… OSI comment
  • poor solder joints, low voltage. …???, multiple people from different sides of the country. might be a mass manufacturing issue
  • ageing devices. NA, replicated on new and old devices

Wondering if the obsolete firmware on the devices is locked to a fixed WiFi channel, and drops out when your upline swaps to a different channel, and doesn’t follow it? It might be a simple logic flow error in the original code.

Maybe the devices are TOO close, their receivers being swamped?

OpenBeken may be the way to go for flashing your non ESP devices. More recent firmware updates from Expressif have improved connectivity. There was recent code changes to improve WiFi connectivity and restarts in poor signal conditions.

ESPHome should give you BLE tracker/proxy functionality for your hub. It has also received some love in that area recently. Maybe retain the Arlec hub for your buttons that appear to use non-standard protocols, and use a spare ESP32 for the others in passthrough mode.

Your RainBird could possibly have a replacement antenna fitted. They are cheaply available from Asian websites if you do not wish to have a piece of ‘calibrated’ length wire hanging out the side. Just match the connector, if clipped in, or soldered on. A 3dB one (doubling your signal) should be OK to boost your connection rates. Maybe same for the others. Lots of Silastic please!

Post a picture of both sides of the boards you are not sure about. Come to think about it - post them anyway. Clear please, so we can read the chip markings. Some of your previous screen shots were just at the lower threshold of readability.

As usual, nothing obvious stands out. Futzing around may help till you find the underlying cause.