Skip to content

Commit

Permalink
Merge branch 'hotfix/deamon_serial_issue'
Browse files Browse the repository at this point in the history
  • Loading branch information
unknown committed Apr 20, 2018
2 parents 2b1ae21 + 04099a9 commit 9219988
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 2 deletions.
7 changes: 5 additions & 2 deletions plugin_info/info.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"id" : "teleinfo",
"name" : "Téléinfo",
"description" : "Plugin pour utiliser les modems téléinformation USB",
"description" : "Plugin pour utiliser les modems téléinformation USB / Série",
"licence" : "AGPL",
"author" : "Cédric GUINE",
"require" : "3.0",
Expand All @@ -10,7 +10,10 @@
"hasDependency" : true,
"hasOwnDeamon" : true,
"maxDependancyInstallTime" : 45,
"link" : {
"forum":"http://forum.jeedom.fr/viewtopic.php?f=28&t=614"
},
"changelog" : "https://Jeedom-Plugins-Extra.github.io/plugin-teleinfo/#language#/changelog",
"documentation" : "https://Jeedom-Plugins-Extra.github.io/plugin-teleinfo/#language#/",
"pluginVersion" : "2.7.0"
"pluginVersion" : "2.7.1"
}
6 changes: 6 additions & 0 deletions ressources/install_apt.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ PROGRESS_FILE=/tmp/jeedom/teleinfo/dependance
PROGRESS_FILE=$1
touch ${PROGRESS_FILE}
echo 0 > ${PROGRESS_FILE}

function apt_install {
sudo apt-get -y install "$@"
if [ $? -ne 0 ]; then
Expand All @@ -25,22 +26,27 @@ echo 10 > ${PROGRESS_FILE}
#apt_install python3
#apt_install python3-pip
echo "Lancement de l'installation/mise à jour des dépendances Téléinfo"
echo "Raffraichissement du système"
sudo apt-get update
echo 20 > ${PROGRESS_FILE}
echo "Installation de la librairie ftdi pour modem 2 compteurs"
sudo apt-get -y install python-ftdi
sudo apt-get -y install python-ftdi1
#pip_install pyftdi
pip_install pylibftdi
echo 30 > ${PROGRESS_FILE}
#pip_install python-ftdi1
echo 40 > ${PROGRESS_FILE}
echo "Installation de la librairie serial"
pip_install serial
echo 50 > ${PROGRESS_FILE}
echo "Mise à jour de cmdline ou inittab suivant système"
if [ -e /dev/ttyAMA0 ]; then
sed -i 's/console=ttyAMA0,115200//; s/kgdboc=ttyAMA0,115200//' /boot/cmdline.txt
if [ -e /etc/inittab ]; then
sed -i 's|[^:]*:[^:]*:respawn:/sbin/getty[^:]*ttyAMA0[^:]*||' /etc/inittab
fi
echo "Désactivation de la sortie serie vers la console"
sudo systemctl stop [email protected]
sudo systemctl disable [email protected]
fi
Expand Down

0 comments on commit 9219988

Please sign in to comment.