TuyaGateway v2.0 now available

Do you have exactly these type of switches which are flashable ?
Oh and is TuyaGateway a nice replacement for localtuya ? I don’t really
know much about tuya systems ^^

I followed the instructions in the wiki for the docker-compose install and when I bring the container up I get a repeating error in the log

python: can't open file 'main.py': [Errno 2] No such file or directory,
python: can't open file 'main.py': [Errno 2] No such file or directory,
python: can't open file 'main.py': [Errno 2] No such file or directory,
python: can't open file 'main.py': [Errno 2] No such file or directory,
python: can't open file 'main.py': [Errno 2] No such file or directory,
python: can't open file 'main.py': [Errno 2] No such file or directory,
python: can't open file 'main.py': [Errno 2] No such file or directory,
python: can't open file 'main.py': [Errno 2] No such file or directory,
python: can't open file 'main.py': [Errno 2] No such file or directory,
python: can't open file 'main.py': [Errno 2] No such file or directory,
python: can't open file 'main.py': [Errno 2] No such file or directory,
python: can't open file 'main.py': [Errno 2] No such file or directory,
python: can't open file 'main.py': [Errno 2] No such file or directory,
python: can't open file 'main.py': [Errno 2] No such file or directory,
python: can't open file 'main.py': [Errno 2] No such file or directory,
python: can't open file 'main.py': [Errno 2] No such file or directory,
python: can't open file 'main.py': [Errno 2] No such file or directory,
python: can't open file 'main.py': [Errno 2] No such file or directory,

compose file entry…

  tuyagateway:
    image: "tuyagateway:latest"
    hostname: tuyagateway
    container_name: tuyagateway
    working_dir: /usr/src/app
    volumes:
      - ${USERDIR}/docker/tuyagateway/config:/usr/src/app/config
    command: "python -u main.py"
    restart: always
    network_mode: host

I copied the repository using got and ran “make docker” as explained in the docs.

What’s did I do wrong?

the documentation was a bit outdated. It should read:

  tuyagateway:
    image: "tuyagateway:latest"
    hostname: tuyagateway 
    container_name: tuyagateway   
    working_dir: /usr/src/app    
    volumes:
      - ./config:/usr/src/app/config    
    command: "tuyagateway"
    restart: always
    network_mode: host
1 Like

The idea of TuyaGateway is to leave the original firmware of the tuya devices intact. No flashing required. I started development of TuyaFace/TuyaGateway because localtuya gave me a lot of errors/ unpredictable behavior. Theoretically every tuya device can be used with tuyaGateway. At this point it does require some technical insight into tuya devices (dp value, deviceid, localkey) and homeassistant configuration.

If there was an easy way for people to share gizmo models you could build up a reference database like Tasmota templates.

2 Likes

Yeah, working towards that goal… I Don’t have the time atm. to develop it.

1 Like

I have tuya doorbell w/ camera and alarm and YES willing to help if it will bring this tuya into HASS

Is GismoCaster included in the TuyaGateway docker container?

No, GismoCaster is a separate docker-container (at least the way I run it).

1 Like

Hello,

I just installed everything and it is working damn fine :smiley:
Just a little question.
I have a switch which is splitted in 2 different modules, (So they connect seperatly to the wifi)
(This)
Is there a way to combine them to one switch? So they are showed in Home Assistant as one device but with 2 entities in my example top and bottom ? (Or left and right depends on how you look at the switch ^^)

A gismos defining features are ip/id/key. IOW you should be able to group gismos to show it as one device in HA. At the moment that isn’t possible. Please add it as a feature request at github

In which one ^^ TuyaGateway or GismoCaster ^^

GismoCaster. Thanks!

Hi, a problem, I installed everything correctly, but when I go to enter the credentials admin: admin in gismocaster, it gives me this error “Please enter the correct username and password …” and if I try to reload the page is no longer loaded

1 Like

Firstly, congrats @Tradeface ! This sounds like a great project!

I am by far no expert in Linux, etc, but I have been finding my way pretty well until now…
I am having difficulty installing/understanding the process…
I am using:

  • Ubuntu 18.04.4 LTS (installed on a old Sony VAIO Laptop)
  • Home Assistant 0.113.1
  • Docker
  • Home Assistant - Mosquitto broker 5.1

I get the following errors when attempting to follow the instructions:

Attempting to install as admin via terminal:

Install via pip

root@vaio_hassio: pip install tuyagateway
Collecting tuyagateway
  Could not find a version that satisfies the requirement tuyagateway (from versions: )
No matching distribution found for tuyagateway

Install from source

root@vaio_hassio: git clone https://github.com/TradeFace/tuyagateway.git

Command 'git' not found, but can be installed with:

apt install git

root@vaio_hassio: apt install  https://github.com/TradeFace/tuyagateway.git
Reading package lists... Done
Building dependency tree       
Reading state information... Done
E: Unable to locate package https://github.com/TradeFace
E: Couldn't find any package by glob 'https://github.com/TradeFace'
E: Couldn't find any package by regex 'https://github.com/TradeFace'

I have the same issue when attempting to follow the “Installation Docker”

Am I supposed to do both types of installation? PIP and DOCKER?
Can anyone please help?

Thank you in advance.

First you run

sudo aptget install git

git clone https://github.com/TradeFace/tuyagateway.git
cd tuyagateway
make docker
1 Like

Thanks for your assistance @francisp

I successfully installed tuyagateway.
Do I need to install GismoCaster etc?

Thanks

Yes, same way to install GismoCaster

Unfortunately it didnt seem to work…
These are the steps I took:

sudo -i
git clone https://github.com/TradeFace/gismocaster.git

The above worked correctly…

cd gismocaster
make docker

When I entered “make docker” it got to step 6 then displayed 1000’s of lines of the same error before continuing onto the next step:

"topic_type": "subscribe", "default_value": "~aux_command", "publish_topic": "aux_state_topic", "values": []}, {"name": "aux_state_topic", "abbreviation": "aux_stat_t", "topic_type": "publish", "default_value": "~aux_state", "values": []}, {"name": "availability_topic", "abbreviation": "avty_t", "topic_type": "publish", "default_value": "~availability", "values": [{"name": "payload_available", "abbreviation": "pl_avail", "type_value": "string", "default_value": "online", "tuya_value": true}, {"name": "payload_not_available", "abbreviation": "pl_not_avail", "type_value": "string", "default_value": "offline", "tuya_value": false}]}, {"name": "away_mode_command_topic", "abbreviation": "away_mode_cmd_t", "topic_type": "subscribe", "default_value": "~away_mode_command", "publish_topic": "away_mode_state_topic", "values": []}, {"name": "away_mode_state_topic", "abbreviation": "away_mode_stat_t", "topic_type": "publish", "default_value": "~away_mode_state", "values": []}, {"name": "current_temperature_topic", "abbreviation": "curr_temp_t", "topic_type": "publish", "default_value": "~current_temperature", "values": []}, {"name": "fan_mode_command_topic", "abbreviation": "fan_mode_cmd_t", "topic_type": "subscribe", "default_value": "~fan_mode_command", "publish_topic": "fan_mode_state_topic", "values": []}, {"name": "fan_mode_state_topic", "abbreviation": "fan_mode_stat_t", "topic_type": "publish", "default_value": "~fan_mode_state", "values": []}, {"name": "hold_command_topic", "abbreviation": "hold_cmd_t", "topic_type": "subscribe", "default_value": "~hold_command", "publish_topic": "hold_state_topic", "values": []}, {"name": "hold_state_topic", "abbreviation": "hold_stat_t", "topic_type": "publish", "default_value": "~hold_state", "values": []}, {"name": "json_attributes_topic", "abbreviation": "json_attr_t", "topic_type": "publish", "default_value": "~attributes", "values": []}, {"name": "mode_command_topic", "abbreviation": 
2020-07-27 04:34:18,642 WARNING  [mqtt.mqtt] () Failed to connect to MQTT Broker Setting matching query does not exist.
2020-07-27 04:34:18,642 DEBUG    [mqtt.mqtt] Publishing tuyagateway/config/homeassistant/vacuum {"values": [], "topics": [], "templates": []} True
2020-07-27 04:34:18,650 WARNING  [mqtt.mqtt] () Failed to connect to MQTT Broker Setting matching query does not exist.
2020-07-27 04:34:18,651 DEBUG    [mqtt.mqtt] Publishing tuyagateway/config/homeassistant/lock {"values": [], "topics": [], "templates": []} True
2020-07-27 04:34:18,725 WARNING  [mqtt.mqtt] () Failed to connect to MQTT Broker Setting matching query does not exist.

When I ran the command: docker run -it --rm --name my-app1 gismocaster ( I changed the name to my-app1 because TUYAGATEWAY is using my-app in Docker)
I received the following error:

root@vaio_hassio:~/gismocaster  docker run -it --rm --name my-app1 gismocaster
python: can't open file './web/manage.py runserver 0.0.0.0:8000 --noreload': [Errno 2] No such file or directory

I hope I am explaining this correcly.
Thank you in advance.

Does TuyaGateway also work with the variety of Tuya based vacuums out there?