Git Product home page Git Product logo

proxmox_tuya-convert_container's Introduction

New Proxmox tuya-convert Container

This script will create a new Proxmox LXC container with the latest Debian and setup tuya-convert. To create a new LXC container, run the following in a SSH session or the console from Proxmox interface

bash -c "$(wget -qLO - https://github.com/whiskerz007/proxmox_tuya-convert_container/raw/master/create_container.sh)"

During the setup process, you may be prompted to select your storage location or wireless interface (if you have more than one usable option). The wireless interface will be assigned to container. (Note: When the container is running, no other container or VM will have access to the interface.) After the successful completion of the script, start the container identified by the script, then use the login credentials shown to start the tuya-convert script. If you need to stop tuya-convert, press CTRL + C, tuya-convert will be halted, and you will be brought back to the login prompt. If you login again it will start tuya-convert again.

Prerequisite

In order for this script to work appropriately, you must first have the drivers installed and setup correctly for your WiFi adapter in Proxmox. The beginning the of the script will test for valid WLAN interfaces. An error will be produced if one can not be found.

Custom Firmware

To add custom firmware (not supplied by tuya-convert), connect to the samba share created by the container (details are provided at the login prompt) and add the binary to the tuya-convert/files/ folder. Your binary will listed under the custom firmware menu.

proxmox_tuya-convert_container's People

Contributors

whiskerz007 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

proxmox_tuya-convert_container's Issues

Error creating lxc

I am getting this error

Processing triggers for systemd (232-25+deb9u12) ... ./install_prereq.sh: line 8: -H: command not found ERROR: 127@124: A failure has occured.

full log

No Samba connection

Hello

I have the new tuya-convert_container on my updated Proxmox and it works but the only think that is not working is the samba. i get the ip in the console but cant connect to it on my file explorder on my windows 10. so i cant upload any bin files :(.

anyone have the same problem or knows a solution?

Cannot download debian strech, is license truly needed

Hi,
Found your nice script. But I'm getting an error that I cannot get past.
Tried to google but only found info that it might relate to fact that I don't have a license for proxmox. But is that truly needed?

root@pve:~# bash -c "$(wget -qO - https://raw.githubusercontent.com/whiskerz007/proxmox_tuya-convert_container/master/create_container.sh)" -s local-lvm Get:1 http://security.debian.org stretch/updates InRelease [94.3 kB] Ign:2 http://ftp.fi.debian.org/debian stretch InRelease Get:3 http://ftp.fi.debian.org/debian stretch-updates InRelease [91.0 kB] Hit:4 http://ftp.fi.debian.org/debian stretch Release Ign:6 https://enterprise.proxmox.com/debian/pve stretch InRelease Err:7 https://enterprise.proxmox.com/debian/pve stretch Release 401 Unauthorized Reading package lists... Done E: The repository 'https://enterprise.proxmox.com/debian/pve stretch Release' does not have a Release file. N: Updating from such a repository can't be done securely, and is therefore disabled by default. N: See apt-secure(8) manpage for repository creation and user configuration details. ERROR: 100@29: A failure has occured.

Fails when container performs update

Updating container OS...
E: Repository 'http://security.debian.org buster/updates InRelease' changed its 'Suite' value from 'stable' to 'oldstable'
E: Repository 'http://ftp.debian.org/debian buster InRelease' changed its 'Suite' value from 'stable' to 'oldstable'
E: Repository 'http://ftp.debian.org/debian buster-updates InRelease' changed its 'Suite' value from 'stable-updates' to 'oldstable-updates'
[ERROR:LXC] 100@53 Unknown failure occured.
[ERROR] 100@218 Unknown failure occured.

Is there a way to force it through?

Static IP?

Is it possible to set a static IP for the tuya convert container? Or to keep one MAC that doesn't change?
Thx and awesome script! :)

Used to work but now container cannot start after new build

I've used your wonderful script before and it worked perfectly.. However I've tried multiple times today and even though it appears to build without error it fails to start with the following erroor:

root@pve:~# systemctl status [email protected]
โ— [email protected] - PVE LXC Container: 101
   Loaded: loaded (/lib/systemd/system/[email protected]; static; vendor preset: enabled)
   Active: failed (Result: exit-code) since Sat 2020-01-11 17:35:17 AEST; 16s ago
     Docs: man:lxc-start
           man:lxc
           man:pct
  Process: 17171 ExecStart=/usr/bin/lxc-start -n 101 (code=exited, status=1/FAILURE)

Jan 11 17:35:16 pve systemd[1]: Starting PVE LXC Container: 101...
Jan 11 17:35:17 pve lxc-start[17171]: lxc-start: 101: lxccontainer.c: wait_on_daemonized_start: 856 No such file or directory - Failed to receive the container state
Jan 11 17:35:17 pve lxc-start[17171]: lxc-start: 101: tools/lxc_start.c: main: 330 The container failed to start
Jan 11 17:35:17 pve lxc-start[17171]: lxc-start: 101: tools/lxc_start.c: main: 333 To get more details, run the container in foreground mode
Jan 11 17:35:17 pve lxc-start[17171]: lxc-start: 101: tools/lxc_start.c: main: 336 Additional information can be obtained by setting the --logfile and --logpriority options
Jan 11 17:35:17 pve systemd[1]: [email protected]: Control process exited, code=exited, status=1/FAILURE
Jan 11 17:35:17 pve systemd[1]: [email protected]: Failed with result 'exit-code'.
Jan 11 17:35:17 pve systemd[1]: Failed to start PVE LXC Container: 101.

Trying to run the container in foreground mode didn't really give me much more:

root@pve:~# lxc-start -n 101 -F
lxc-start: 101: conf.c: run_buffer: 335 Script exited with status 25
lxc-start: 101: start.c: lxc_init: 861 Failed to run lxc.hook.pre-start for container "101"
lxc-start: 101: start.c: __lxc_start: 1944 Failed to initialize container "101"
lxc-start: 101: tools/lxc_start.c: main: 330 The container failed to start
lxc-start: 101: tools/lxc_start.c: main: 336 Additional information can be obtained by setting the --logfile and --logpriority options

Any ideas as to what the problem might be?

Thank you in advance.

Regards,
Michal

Error starting LXC container - [ERROR] 255@214 Unknown failure occured.

Thanks for a great project here but I'm stuck at even starting the LXC container, getting the following error:

root@node1:~# bash -c "$(wget -qLO - https://github.com/whiskerz007/proxmox_tuya-convert_container/raw/master/create_container.sh)"
[INFO] Using 'local-lvm' for storage location.
[INFO] Using 'wlan0' wireless interface.
[INFO] Container ID is 102.
Updating LXC template list...
Downloading LXC template...
Creating LXC container...
Starting LXC container...
unable to get PID for CT 102 (not running?)
can only push files to a running CT
[ERROR] 255@214 Unknown failure occured.
Logical volume "vm-102-disk-0" successfully removed

I get the menu to select WLAN device but after that it tries to start the LXC with the above error. I'm using Proxmox 6.2-4 on a NUC.

Best regards, svippe

./install_prereq.sh ./install_prereq.sh: line 8: -H: command not found

Installed but doesnt work.


Issue: unable to pass install_prereq.sh script:
message: "./install_prereq.sh: line 8: -H: command not found "
I was able to use the older version of proxmox tuya convert but not with this new one.
I went inside the file:

#!/bin/bash

set -e

apt-get update
apt-get upgrade -y
apt-get install -y dnsmasq hostapd screen curl python-pip python3-pip python-setuptools python3-setuptools python3-wheel python-dev python3-dev mosquit$
-H pip3 install paho-mqtt tornado git+https://github.com/M4dmartig4n/sslpsk.git pycrypto
-H pip2 install git+https://github.com/M4dmartig4n/sslpsk.git pycrypto

echo "Ready to start upgrade"

I passed line 8 by taking the -H out but i can't get through line 9. It seems like it got something to do with the pycrpto. I even tried to update python still did nothing.

Please help.
Thank you.

File not found - 3rd party software

I copy a new bin file to the files directory it can be seen in tuya-convert, yet when I try to use it it says File Not Found (even though it is there)

image

Fail to install

Hello When I try to install/use this command I received the following error:

root@pve:~# bash -c "$(wget -qLO - https://github.com/whiskerz007/proxmox_tuya-convert_container/raw/master/create_container.sh)"
E: Failed to fetch https://enterprise.proxmox.com/debian/pve/dists/buster/InRelease 401 Unauthorized [IP: 212.224.123.70 443]
E: The repository 'https://enterprise.proxmox.com/debian/pve buster InRelease' is not signed.
[ERROR] 100@64 Unknown failure occured.
[ERROR] 100@67 Unknown failure occured.

Can it be fixed?

Thank you and cheers

Would not run on my proxmox

Install kept failing on my Proxmox for 2 reasons:

  1. would not work with synology remote disc, installer just failed - had to use local disc
  2. Failed ot install dependencies due to update release change

I updated the Apt Update to 'apt-get update --allow-releaseinfo-change' and it now installs dependencies and works fine.

@whiskerz007 not sure if this is unique to my setup or you need to change for all on the master

[ERROR] 100@64 [ERROR] 100@67

When I copy and paste Whiskerz script into my proxmox pve I get the following error and can't get any further.

Does anyone know how to get round it? I'd love to be able to flash my Tuya plugs from Proxmox on my NUC.

Thanks!

root@pve:~# bash -c "$(wget -qLO - https://github.com/whiskerz007/proxmox_tuya-convert_container/raw/master/create_container.sh)"
E: Failed to fetch https://enterprise.proxmox.com/debian/pve/dists/buster/InRelease 401 Unauthorized [IP: 51.91.38.34 443]
E: The repository 'https://enterprise.proxmox.com/debian/pve buster InRelease' is not signed.
[ERROR] 100@64 Unknown failure occured.
[ERROR] 100@67 Unknown failure occured.

-bash: msg: command not found

all messages in the script are not shown, the cause is that msg is not recognized by bash in proxmox 6.2. I think it the script needs "echo" or any other output message command.

Template error line 166 on install

Hi,

Getting the following while running the create script on a new Proxmox 8.0.3 server:

root@prox:~# bash -c "$(wget -qLO - https://github.com/whiskerz007/proxmox_tuya-convert_container/raw/master/create_container.sh)"
[INFO] Using 'local-lvm' for storage location.
[INFO] Using 'wlx001d437023a5' wireless interface.
[INFO] Container ID is 100.
Updating LXC template list...
Downloading LXC template...
bash: line 166: TEMPLATES: bad array subscript

Pretty new to Proxmox and containers and I can't seem to work out what's going on, any pointers would be great.

Thanks

lxc_network_move_created_netdev_priv: 3119 Operation not permitted

Hi,

I'm having this issue when deploying the container:

[INFO] Using 'local-zfs' for storage location.
[INFO] Using 'wlx7c8bca0b9240' wireless interface.
[INFO] Container ID is 104.
Updating LXC template list...
Downloading LXC template...
Creating LXC container...
Starting LXC container...
command failed: Operation not supported (-95)
lxc_network_move_created_netdev_priv: 3119 Operation not permitted - Failed to move network device "wlx7c8bca0b9240" with ifindex 4 to network namespace 10579
lxc_spawn: 1743 Failed to create the network
__lxc_start: 1950 Failed to spawn container "104"
startup for container '104' failed
[ERROR] 255@212 Unknown failure occured.

Proxmox 6.3-3

Let me know if you need more information.

Thank you.

unknown failure

Starting LXC container...
Customizing container OS...
Updating container OS...
E: Repository 'http://security.debian.org buster/updates InRelease' changed its 'Suite' value from 'stable' to 'oldstable'
E: Repository 'http://ftp.debian.org/debian buster InRelease' changed its 'Suite' value from 'stable' to 'oldstable'
E: Repository 'http://ftp.debian.org/debian buster-updates InRelease' changed its 'Suite' value from 'stable-updates' to 'oldstable-updates'
[ERROR:LXC] 100@53 Unknown failure occured.
[ERROR] 100@218 Unknown failure occured.
Logical volume "vm-104-disk-0" successfully removed

I'm on proxmox 7.2-4

container not able to start.

Hi, Im very much a proxmox and linux newbie. I ran the script to create the container. I can see in my promox dashboard that vm101 was created. When I go to start the container I receive the following error. Any thoughts? Again, I apologize if this is a user error.

Nov 16 11:39:04 nuc systemd[1]: Starting PVE LXC Container: 101...
Nov 16 11:39:04 nuc lxc-start[17655]: lxc-start: 101: lxccontainer.c: wait_on_daemonized_start: 856 No such file or directory - Failed to receive the container state

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.