Australia - Electrically Certified Hardware

Did u ground gpio0 when u plug usb in

I tried founding a0 and also tried grounding reset
neither had an effect

Maybe a misstype, but you ground GPIO0 not A0.

After and Australian approved smartplug, preferably zwave or ZigBee that show power consumption. Iā€™ve got a few Dlink wifi ones that are very unreliable and also a WeMo but they arenā€™t available anymore.

I seen the xiaomi ones work with deconz but they donā€™t have the insulated pins required here.

Cheers

In the case of Z-Wave you could go with Aeotec Smart Switch 6. Iā€™ve got two of them and they do support power consumption reports.

Another popular choice are the WiFi-based Kogan plugs - however you want to flash your own firmware.
You get 4-6 of the Kogan plugs for the price of a single Aeotec Smart Switch.

no I couldnā€™t find a gpio0 on this module.

Have you tried adding it to the Grid app and doing a firmware update first, then try flashing with Tuya Convert 2. I read something the other day about some things needing a firmware update first.

It will not work with TC1, as the 190HA appears to be an revised version of the 189HA which needed TC2. Also, make sure you are using a clean install of Raspbian and a fresh download of TC2.

Iā€™ve done a fresh install with Ubuntu, Iā€™ll try doing a firmware update. I just canā€™t get the thing to serial flash itā€™s not being picked up at allā€¦
legit doing my head in! haha

Thats really odd, my phone isnā€™t getting an ip from vtrust-flash when it worked fine.
Its a ubuntu laptop and was fine for the last flash. Rebooted phone and laptop

Bingo, seems tuya-convert v1 is terminating a heap of stuff in ubuntu to do its job where as V2 isnā€™t!

And despite connecting the device to Grid Connect and doing an update iā€™ve been unable to flash it using Tuya-Convert v1 or v2

This is what i have in the v2 logs

Backing up NetworkManager.cfg...
Restarting NetworkManager...
Backing up /etc/dnsmasq.conf...
Writing dnsmasq config file...
Creating new /etc/dnsmasq.conf...
Writing hostapd config file...
Configuring AP interface...
Applying iptables rules...
Starting DNSMASQ server...

dnsmasq: failed to create listening socket for port 53: Address already in use
RTNETLINK answers: File exists
Starting AP on wlp2s0 in screen terminal...
Configuration file: /etc/hostapd/hostapd.conf
Using interface wlp2s0 with hwaddr 18:cf:5e:ed:7a:a3 and ssid "vtrust-flash"
wlp2s0: interface state UNINITIALIZED->ENABLED
wlp2s0: AP-ENABLED 
wlp2s0: STA 34:29:12:38:d4:00 IEEE 802.11: authenticated
wlp2s0: STA 34:29:12:38:d4:00 IEEE 802.11: associated (aid 1)
wlp2s0: AP-STA-CONNECTED 34:29:12:38:d4:00
wlp2s0: STA 34:29:12:38:d4:00 RADIUS: starting accounting session C21CC582432580B9
wlp2s0: STA 34:29:12:38:d4:00 WPA: pairwise key handshake completed (RSN)
wlp2s0: STA d8:f1:5b:92:aa:d7 IEEE 802.11: authenticated
wlp2s0: STA d8:f1:5b:92:aa:d7 IEEE 802.11: associated (aid 2)
wlp2s0: AP-STA-CONNECTED d8:f1:5b:92:aa:d7
wlp2s0: STA d8:f1:5b:92:aa:d7 RADIUS: starting accounting session 1098184EA398748C
wlp2s0: STA d8:f1:5b:92:aa:d7 WPA: pairwise key handshake completed (RSN)
wlp2s0: AP-STA-DISCONNECTED d8:f1:5b:92:aa:d7
wlp2s0: STA d8:f1:5b:92:aa:d7 IEEE 802.11: disassociated
wlp2s0: STA d8:f1:5b:92:aa:d7 IEEE 802.11: disassociated
wlp2s0: STA d8:f1:5b:92:aa:d7 IEEE 802.11: disassociated
wlp2s0: STA d8:f1:5b:92:aa:d7 IEEE 802.11: disassociated
wlp2s0: STA d8:f1:5b:92:aa:d7 IEEE 802.11: disassociated
wlp2s0: STA d8:f1:5b:92:aa:d7 IEEE 802.11: disassociated
wlp2s0: STA d8:f1:5b:92:aa:d7 IEEE 802.11: disassociated
wlp2s0: STA d8:f1:5b:92:aa:d7 IEEE 802.11: deauthenticated due to inactivity (timer DEAUTH/REMOVE)
wlp2s0: interface state ENABLED->DISABLED
wlp2s0: AP-STA-DISCONNECTED 34:29:12:38:d4:00
wlp2s0: AP-DISABLED 
nl80211: deinit ifname=wlp2s0 disabled_11b_rates=0

Listening on port 80
^CTraceback (most recent call last):
  File "./fake-registration-server.py", line 160, in <module>
    main()
  File "./fake-registration-server.py", line 156, in main
    tornado.ioloop.IOLoop.current().start()
  File "/usr/local/lib/python3.6/dist-packages/tornado/platform/asyncio.py", line 148, in start
    self.asyncio_loop.run_forever()
  File "/usr/lib/python3.6/asyncio/base_events.py", line 438, in run_forever
    self._run_once()
  File "/usr/lib/python3.6/asyncio/base_events.py", line 1415, in _run_once
    event_list = self._selector.select(timeout)
  File "/usr/lib/python3.6/selectors.py", line 445, in select
    fd_event_list = self._epoll.poll(timeout, max_ev)
KeyboardInterrupt
Listening on port 80
^CTraceback (most recent call last):
  File "./fake-registration-server.py", line 160, in <module>
    main()
  File "./fake-registration-server.py", line 156, in main
    tornado.ioloop.IOLoop.current().start()
  File "/usr/local/lib/python3.6/dist-packages/tornado/platform/asyncio.py", line 148, in start
    self.asyncio_loop.run_forever()
  File "/usr/lib/python3.6/asyncio/base_events.py", line 438, in run_forever
    self._run_once()
  File "/usr/lib/python3.6/asyncio/base_events.py", line 1415, in _run_once
    event_list = self._selector.select(timeout)
  File "/usr/lib/python3.6/selectors.py", line 445, in select
    fd_event_list = self._epoll.poll(timeout, max_ev)

Seems whatever Tuya-Convert is doing its wiping the config to the plug and the app canā€™t find it so thats quite interesting.

Try

sudo systemctl stop systemd-resolved

Before starting tuya-convert. It looks like tuya-convert is trying to start up itā€™s own DNS server (port 53) to send the update requests to tuyaconvert rather than the proper servers. But because Ubuntu want to have their own local DNS server, it doesnā€™t work. You then get errors about lookups, but for running tuya-convert this is in fine. Once you are are done, you can restart it by changing stop to start above. I have had to do this with V1 and V2.

Have you tried to swap Rx & Tx just in case?

yep tried that. multiple times :confused:

Iā€™ll give the DNS thing a go. Iā€™m honestly considering getting a pi for the conversionsā€¦ canā€™t tell if itā€™s me or these devices
I got one going no issues on the arlec grid convert though. the other one is in pieces as I thought maybe Iā€™d try de-soldering it to flash it

These might be of interest

I like the look of these. Iā€™ve been searching for a consistent look across lights, fans, and outlets. And, it has energy monitoring at the switch.
Thanks for the link.

1 Like

I just saw these GridConnect smart ceiling fans at Bunnings (in Dural NSW) last weekend. Has anyone perhaps bought one and flashed Tasmota/ESPHome and could share the experience and configuration?

2 Likes

Iā€™m willing to brick an item up to $50, beyond that either I wonā€™t flash it or not buy it unless proven to work with new firmware

Apologies for the delay in posting config, in fact someone beat me to the Tasmota template;

 {"NAME":"KoganPOW","GPIO":[0,0,0,17,134,132,0,0,131,56,21,0,0],"FLAG":0,"BASE":52}

Adapted it to ESPHome using this config;

substitutions:
  plug_name: kogan_pow2_1234

  # Higher value gives lower watt readout
  current_res: "0.00087"

  # Lower value gives lower voltage readout
  voltage_div: "775"

esphome:
  name: ${plug_name}
  platform: ESP8266
  board: esp8285

wifi:
  ssid: 'WiFi'
  password: 'Password'

  ap:
    ssid: "${plug_name} Hotspot"
    password: "Password"

captive_portal:

logger:

api:
  password: "Password"

ota:
  password: "Password"

web_server:
  port: 80

time:
  - platform: homeassistant
    id: homeassistant_time
    
binary_sensor:
  - platform: status
    name: "${plug_name}"

  - platform: gpio
    pin:
      number: 03
      mode: INPUT_PULLUP
      inverted: True
    name: "${plug_name}_button"
    on_press:
      - switch.toggle: relay

switch:
- platform: gpio
  name: "${plug_name}_Relay"
  pin: GPIO14
  restore_mode: ALWAYS_OFF
  id: relay

  on_turn_on:
    - switch.turn_on: led

  on_turn_off:
    - switch.turn_off: led

- platform: gpio
  name: "${plug_name}_LED"
  id: led
  pin: GPIO13
  inverted: True

sensor:
  - platform: hlw8012
    sel_pin:
      number: GPIO12
      inverted: True
    cf_pin: GPIO04
    cf1_pin: GPIO05
    current_resistor: ${current_res}
    voltage_divider: ${voltage_div}
    current:
      name: "${plug_name}_Amperage"
      unit_of_measurement: A
    voltage:
      name: "${plug_name}_Voltage"
      unit_of_measurement: V
    power:
      name: "${plug_name}_Wattage"
      unit_of_measurement: W
      id: "${plug_name}_Wattage"
    change_mode_every: 8
    update_interval: 10s
  - platform: total_daily_energy
    name: "${plug_name}_Total Daily Energy"
    power_id: "${plug_name}_Wattage"
    filters:
        # Multiplication factor from W to kW is 0.001
        - multiply: 0.001
    unit_of_measurement: kWh
      
# Extra sensor to keep track of plug uptime
  - platform: uptime
    name: "${plug_name}_Uptime"
1 Like

Itā€™s from Bunnings, brick it and return it. ā€œitā€™s faultyā€.

7 Likes

How do i submit an issue for Tuya-convert 2 (which i believe is made by M4dmartig4n
On the other Tuya Convert by Arendst i can see an issues page, on m4dmartig4n i canā€™t see one

Edit: Sorry, I didnā€™t read that properly the first time on my phone. I thought you were asking where to submit a code. Apologies.