Sunday 26 December 2021

Benexmart Irrigation Timer - Tasmota / ESPHome conversion

Finding a cost effective Tuya water timer that can be converted, has been a bit of a hit and miss.

Earlier this year I found this Water Timer. Price was about $60 AUD from AliExpress. The Timer itself uses the TYWE1S module and consists of a single button and relay to control the valve.

Manufacture: Benexmart
Model: FJSJKZQ-TY-W-XV-JS (PCB Markings)

I have been running the timer via the regular Tuya integration with Home Assistant, but had the odd event when it failed to turn off. 

The original vendor listing isn't active, but I found these links.

TuyaSmart Life Store

https://www.aliexpress.com/item/4001244982369.html
https://www.aliexpress.com/item/4001363870790.html





As with recent devices, this was shipped with the newer Tuya firmware that doesn't work with tuya-convert, and needs to be flashed directly via serial.


credit


Important note: Make sure your flasher is set to 3.3v

Opening

Opening the device takes a little patience. Case is glued. I started at the bottom (vents) and pried around, carefully breaking the glue. Once open you can access the 4 screws holding the front plate on. These have a small amount of silicon applied, but easily removed.


Tasmota config

There wasn't an existing Template for this device, but it was simple enough to create.

Device has LED (red), Button and relay. The Green led is linked to the valve state and not controllable independantly.

{"NAME":"FJSJKZQ","GPIO":[0,0,0,0,32,0,0,0,288,0,224,0,0,0],"FLAG":0,"BASE":18}


GPIO4 - Button - 1
GPIO12 - Led - 1
GPIO14 Relay - 1

Other Config

Console commands to configure auto off rule, in case of WiFi/MQTT interruption and (red) LED function.

Set red led to reflect WiFi/MQTT connection state (optional)

LedPower 1

Automatic turn off after 15 minutes (900 Seconds)

Rule1 ON power1#state=1 DO RuleTimer1 900 ENDON ON Rules#Timer=1 DO Power1 off ENDON
Rule1 1

ESPHome Config (Update Feb 24)

This is a sample ESPHome config. It features fail safe to turn off after 60 mins where wifi connection is lost. It leverages a Home Assistant calendar for flexible scheduling. 

esphome:
  name: watervalve
  friendly_name: WaterValve

esp8266:
  board: esp01_1m

# Enable logging
logger:

# Enable Home Assistant API
api:
  encryption:
    key: "<snip>"

ota:
  password: "<snip>"

wifi:
  ssid: !secret wifi_ssid
  password: !secret wifi_password
  domain: .ha

  # Enable fallback hotspot (captive portal) in case wifi connection fails
  ap:
    ssid: "Watervalve Fallback Hotspot"
    password: "<snip>"

captive_portal:

web_server:
  port: 80
  auth:
    username: !secret web_server_admin_user
    password: !secret web_server_password

script:
  - id: valve_failsafe
    mode: restart    # Solenoid will be kept on for another 60 minutes since
                     # the latest time the script is executed
    then:
      - logger.log: "FAILSAFE set for 60 minutes"
      #- delay: 1 min
      - delay: 60 min
      - logger.log: "FAILSAFE TRIGGERED!!! Turning off valve"
      - switch.turn_off: water_valve

time:
  - platform: homeassistant
    id: homeassistant_time
    on_time_sync:
      then:
        - logger.log: "Synchronized system clock"

switch:
  - platform: gpio
    pin: GPIO14
    name: water_valve
    id: water_valve
    #restore_mode: always off   # default when power is turned on
    icon: mdi:pipe-valve
    # synchronise the LED with the relay
    on_turn_on:
      then:
        - logger.log: "Water Valve On"
        - output.turn_on: valve_led
        - script.execute: valve_failsafe  # Set timer for 60 minutes
    on_turn_off:
      then:
        - logger.log: "Water Valve Off"
        - output.turn_off: valve_led
        - script.stop: valve_failsafe  # Cancel Set timer for 60 minutes

  - platform: restart
    id: restart_controller

binary_sensor:
  - platform: gpio
    pin: GPIO4
    name: Button
    id: button
    device_class: window
    # when button is pressed, toggle the switch on/off
    on_press:
      then:
        - switch.toggle: water_valve

  - platform: status
    name: Controller status

  - platform: homeassistant
    name: "Irrigation - Rear garden"
    entity_id: calendar.irrigation_water_valve
    on_press:
      then:
        - switch.turn_on: water_valve
    on_release:
      then:
        - switch.turn_off: water_valve

output:
  - platform: gpio
    id: valve_led
    pin: GPIO12
    #restore_mode: always off   # default when power is turned on

sensor:
  - platform: wifi_signal
    name: Garden Controller WiFi Signal
    update_interval: 10s

  - platform: uptime
    name: Garden Controller Uptime




Friday 12 November 2021

Mirabella Genio Power Plugs - Teardown / Open



This range of plugs can be sourced from Kmart or BigW for about $25-$30 AUD.

Mirabella Genio Wi-Fi Power Plug with Energy Monitoring (I002931) Kmart $25 Mirabella

Mirabella Genio Wi-Fi Double Power Plug with USB Ports (I002932) Kmart $29 Mirabella

New design

The new variety of Mirabella Genio Power Plugs lack screws and are now glued. With a bit of persistence, you can open these with a box cutter and small spatula or similar opening tool.

Mirabella are still using the TYWE2S is this design which is compatible with Tasmota.




Unfortunately these devices run the new Tuya firmware, which prevents using OTA tuya-convert to flash Tasmota or ESPHome.


WARNING - DISCLAIMER
Proceed at your own risk. This information is provided as a guide and you take full responsibility for any harm or damage that may result. Opening any mains powered device should only be done by a professional. I accept no responsibility for any malfunctioning devices as a result of this tutorial. This process will void warranty of the device. Proceed at your own risk.

Opening


Run the boxcutter around the outside, then use the spatula to carefully break the glue.

Once you have separated the sides, insert a the spatula just under the step a lift up. The corners can be a bit stubborn. Release both sides before trying to separate fully.

My favourite is the iSesamo from mymagmat.com, but you can find similar on ebay for half the price.



ISesamo - Ebay













Flashing

Only method available is serial. The TYWE2S IO can be accessed after unscrewing the PCB and separating the backplate. There is sufficient cable length to gain access.


Please see the other blog posts for flashing process.

Wednesday 19 May 2021

We are sorry, but you do not have access to Please contact your organization administrator for access.

We are sorry, but you do not have access to <service Name>. Please contact  your organization administrator for access.

If you are a Google Workspace user and you see this message, it means your Google Workspace admin has turned off the a Google service for your account .

To resolve the issue, contact you Google Workspace admin or where you are the admin, please consult this article 

https://support.google.com/a/answer/182442?hl=en

Click a service name below for instructions (requires an administrator account).



Google Workspace


Additional Google Services


Google Workspace Marketplace Apps
Calendar
Google Chat
Cloud Search
Directory
Drive
Gmail
Currents
Groups for Business
Jamboard
Keep
Google Meet
Google Voice
Google Sites
Classic Sites
Tasks
Classic Hangouts
Vault

Blogger
Brand Accounts
Google Ads
Google Analytics
Google Cloud
Google Domains
Google Earth
Google Maps
Google My Maps
Google Payments
Google Photos
Google Play
Search and Assistant
Search Console
Web & App Activity
YouTube
Other...

Any Google Workspace Marketplace app



We are sorry, but you do not have access to google maps. Please contact your organization administrator for access.



We are sorry, but you do not have access to google maps. Please contact  your organization administrator for access.

We are sorry, but you do not have access to google maps.



If you are a Google Workspace user and you see this message, it means your Google Workspace admin has turned off the Google Maps service for your account.

Google recently made a change in Workspace admin:


"When the Google Maps service control is set to off, users are prevented from using Google Maps when signed into their Workspace account."


To resolve the issue, contact you Google Workspace admin or where you are the admin, please consult this article https://support.google.com/a/answer/6304830?hl=en





 

Sunday 28 March 2021

How to Flash Tasmota onto a Arlec Grid Connect Smart Plug-In Socket PC190HA from Bunnings

 

About

The Arlec PC190HA is a cost effective smart socket that is Tasmota compatible. The socket uses the TYWE2S module based upon the ESP8266.

This socket can be purchased from Bunnings individually for $17.50 or in a 4 pack for $60.

Downside of this unit, is Arlec have introduced Tri-Groove Security screws, which is rather uncommon and does make opening this unit a little more difficult, but not impossible. More about this later.


Tri-Groove Security Screw


Replacing the firmware

Arlec like many other manufactures have updated the Tuya firmware. Frustratingly this means the OTA update method via Tuya-Convert is no longer an option. Efforts are still ongoing to fix this, but there is no ETA.

The alternative is to flash via serial using a USB to TTL Serial Converter and Tasmotizer (Windows).



HW-417 USB to TTL Serial Converter

Opening the PC190HA

To get access the TYWES2 requires opening the socket. At this point I remind readers;

WARNING - DISCLAIMER
Proceed at your own risk. This information is provided as a guide and you take full responsibility for any harm or damage that may result. Opening any mains powered device should only be done by a professional. I accept no responsibility for any malfunctioning devices as a result for this tutorial. This process will void warranty of the device. Proceed at your own risk.

With that out of the way opening the PC190HA will require a Tri-Groove screwdriver or similar.

Make your own Tri-groove screwdriver

As I couldn't find a local supplier, I opted to fashion my own from a spare Allen key (~4mm or 1/8") and a common triangular file.

Process isn't as difficult as it seems and even a rough tool will be sufficient to remove the screws. Below was my first attempt and I was successful in removing the screws. 



To fashion the Tri-Groove tool, place the Allen key into a vice and simply file a V from the middle of every second flat side. Position the file at a ~45 degree angle.

With any luck the tool will be sufficient to remove the screws. The top case is secured by three lugs which can be overcome by hand.



Flashing

The PC190HA uses the common TYWE2S module and is relatively easy to get access to the serial port pads. The rear cover will need to be removed to expose the IO0 pad on the TYWE2S. Remove the single Philips screw in the centre of the PCB.


Solder on jumper wires.





To successfully flash the TYWE2S the USB TTL converter needs to be connected supplying 3.3v. Also  IO0 needs to be pulled to ground, at initial power on only.

Make sure your USB TTL converter is set to supply 3.3v, not 5v.


The approach I used was to split off an additional ground wire and hold it on the IO0 pad, while connecting the USB TTL converter.

Open Tasmotizer, Select the USB port.


Select Release and optionally backup original firmware.
Note: you can preload the WiFi and other configuration detail if you so choose.

Click Tasmotize!



If flashing was successful, unsolder the jumper wires and reassemble. I opted to keep the Tri-Groove screws, but you can replace with similar Philips head screws if needed.

Setup

By Default Tasmota will present as an AP. My preferred option is to use a phone to connect and configure the WiFi. Once it is connected to your WiFi use Fing (Android app) to locate the device IP and connect to the web interface at http://192.168.4.1

Arlec PC190HA Tasmota configuration

Refer to the Tasmota Devices database at https://templates.blakadder.com/arlec_PC190HA.html

Template: {"NAME":"Arlec-PC190HA","GPIO":[0,0,0,0,320,0,0,0,224,576,32,0,0,0],"FLAG":0,"BASE":18}