Switchbot et domoticz
Switchbot et domoticz
Bonjour je viens de faire une box domotique sous domoticz et je cherche donc a mettre mes équipements dessus j'ai un switchbot comme celui-ci https://urlz.fr/dJav et trois autres comme cela https://urlz.fr/dJax des idées ? j'ai trouver l'IP mais je n'ai pas les commandes pour le premier
Re: Switchbot et domoticz
https://community.jeedom.com/t/tuto-dom ... hbot/12166 J'ai trouvé dons je partage
Re: Switchbot et domoticz
Bonjour
Je me permets de relancer le sujet
Avez-vous trouvé une solution?
D'avance merci
Je me permets de relancer le sujet
Avez-vous trouvé une solution?
D'avance merci
Re: Switchbot et domoticz
Bonsoir
je déterre un peu, mais j'ai réussi à actionner un switchbot en bluetooth à partir d'un orangepi
j'ai utilisé ce tuto :
https://github.com/OpenWonderLabs/pytho ... /README.md
Du coup j'aimerais incorporer un bouton interrupteur qui actionne ce switch dans domoticz.
Les commandes sudo python3 switchbot_py3.py -d F9:38:1F:6E:12:33 -c on et
sudo python3 switchbot_py3.py -d F9:38:1F:6E:12:33 -c off
fonctionnent en ssh , maintenant je ne sais pas comment les incorporer dans domoticz pour les exécuter sans erreur genre 32512.
Pouvez-vous m'aider?
Merci
je déterre un peu, mais j'ai réussi à actionner un switchbot en bluetooth à partir d'un orangepi
j'ai utilisé ce tuto :
https://github.com/OpenWonderLabs/pytho ... /README.md
Du coup j'aimerais incorporer un bouton interrupteur qui actionne ce switch dans domoticz.
Les commandes sudo python3 switchbot_py3.py -d F9:38:1F:6E:12:33 -c on et
sudo python3 switchbot_py3.py -d F9:38:1F:6E:12:33 -c off
fonctionnent en ssh , maintenant je ne sais pas comment les incorporer dans domoticz pour les exécuter sans erreur genre 32512.
Pouvez-vous m'aider?
Merci
Re: Switchbot et domoticz
Bonsoir
Et bien merci chat GPT4
voici le script Lua qui fonctionne :
remplacez switchbot par le nom de votre interrupteur et les chemins vers le script en.py
Vraiment trop fort ce chat GPT
Et bien merci chat GPT4
voici le script Lua qui fonctionne :
Code : Tout sélectionner
commandArray = {}
-- Define the device that will trigger the script
local switchbot_device = 'switchbot'
-- Define the Python command to execute
local switchbot_cmd = ''
if (devicechanged[switchbot_device] == 'On') then
switchbot_cmd = 'python3 /home/orangepi/python-host/switchbot_py3.py -d F9:38:1F:6E:12:63 -c on'
elseif (devicechanged[switchbot_device] == 'Off') then
switchbot_cmd = 'python3 /home/orangepi/python-host/switchbot_py3.py -d F9:38:1F:6E:12:63 -c off'
end
-- Execute the Python command if it's defined
if (switchbot_cmd ~= '') then
os.execute(switchbot_cmd)
print('SwitchBot command executed: ' .. switchbot_cmd)
end
return commandArray
Vraiment trop fort ce chat GPT