@Sispheor j'essaye de securiser mon mosquitto. Mais apparemment il ya un problème avec les certificats auto signés comme je l'ai lu sur un site.
Currently the Paho python client require a CA certificate file and so it is not possible to use a self signed certificate. I came across a couple github threads relating to this but no real solution.
certains conseille d'utiliser tls_insecure() mais cela me semble être comme acheter un coffre fort et laisser la porte ouverte.
je regarde avec let's encrypt mais je bute sur le fait qu'il faut un domaine et je n'ai pas encore trouvé comment faire pour avoir un certificat pour mosquitto. Mais je continue de creuser et tester.
tant que j'utilise mosquitto sans securite tout va bien. user/mdp fonctionne aussi mais c'est transmis en clair.
je fais un neuron qui me sert a interroger mes capteur miplant(miflora) de xiaomi.
Cela fonctionne bien mais j'aimerais que ce soit sécurisé.(je securise mon reseau local au mieux de mes connaissances).
salut, j'ai une erreur que je ne comprends pas avec event. j'ai le script suivant qui fonctionne tous les jours sauf le lundi :
- name: "wake-up"
signals:
- event:
hour: "08"
minute: "00"
day_of_week: "1,2,3,4,5,6,7"
- systemdate:
say_template:
- "Il est {{ hours }} heures et {{ minutes }} minutes"
Après verification mon raspberry n'est affilié à aucun syndicat interdisant de travailler le lundi ;)
une idée?
Merci d'avance.
@Sispheor
J'ai fait cela d'après la doc qui indique:
"Let's make a complete example. We want Kalliope to wake us up each morning of working day (Monday to friday) at 7:30 AM and: - Wish us good morning - Give us the time - Play our favourite web radio
The synapse in the brain would be"
- name: "wake-up"
signals:
- event:
hour: "7"
minute: "30"
day_of_week: "1,2,3,4,5"
neurons:
- say:
message:
- "Good morning"
- systemdate:
say_template:
- "It is {{ hours }} hours and {{ minutes }} minutes"
Il est bien dit que l'example va du lundi au vendredi et la liste des jours commence par 1
C'est donc une erreur de la doc?
Salut à tous!
Une idée si les neurones 'Gmail' et 'RSS' vont être mis à jour? Quand je tente leur installation, j'ai une erreur après le warning à propos de la version. Par exemple pour Gmail:
Traceback (most recent call last):
File "/usr/local/lib/python3.7/dist-packages/kalliope-0.7.1-py3.7.egg/kalliope/core/NeuronLauncher.py", line 62, in start_neuron
instantiated_neuron = NeuronLauncher.launch_neuron(neuron)
File "/usr/local/lib/python3.7/dist-packages/kalliope-0.7.1-py3.7.egg/kalliope/core/NeuronLauncher.py", line 44, in launch_neuron
resources_dir=neuron_folder)
File "/usr/local/lib/python3.7/dist-packages/kalliope-0.7.1-py3.7.egg/kalliope/core/Utils/Utils.py", line 140, in get_dynamic_class_instantiation
return klass(**parameters)
File "/usr/local/lib/python3.7/dist-packages/kalliope-0.7.1-py3.7.egg/kalliope/neurons/ansible_playbook/ansible_playbook.py", line 20, in __init__
super(Ansible_playbook, self).__init__(**kwargs)
File "/usr/local/lib/python3.7/dist-packages/kalliope-0.7.1-py3.7.egg/kalliope/core/NeuronModule.py", line 82, in __init__
brain_loader = BrainLoader()
File "/usr/local/lib/python3.7/dist-packages/kalliope-0.7.1-py3.7.egg/kalliope/core/Models/Singleton.py", line 6, in __call__
cls._instances[cls] = super(Singleton, cls).__call__(*args, **kwargs)
File "/usr/local/lib/python3.7/dist-packages/kalliope-0.7.1-py3.7.egg/kalliope/core/ConfigurationManager/BrainLoader.py", line 45, in __init__
self.brain = self.load_brain()
File "/usr/local/lib/python3.7/dist-packages/kalliope-0.7.1-py3.7.egg/kalliope/core/ConfigurationManager/BrainLoader.py", line 91, in load_brain
neurons = self.get_neurons(synapses_dict["neurons"], self.settings)
File "/usr/local/lib/python3.7/dist-packages/kalliope-0.7.1-py3.7.egg/kalliope/core/ConfigurationManager/BrainLoader.py", line 127, in get_neurons
if ConfigurationChecker().check_neuron_dict(neuron_dict):
File "/usr/local/lib/python3.7/dist-packages/kalliope-0.7.1-py3.7.egg/kalliope/core/ConfigurationManager/ConfigurationChecker.py", line 165, in check_neuron_dict
check_neuron_exist(neuron_name)
File "/usr/local/lib/python3.7/dist-packages/kalliope-0.7.1-py3.7.egg/kalliope/core/ConfigurationManager/ConfigurationChecker.py", line 147, in check_neuron_exist
imp.load_source(neuron_module_name.capitalize(), neuron_resource_path)
File "/usr/lib/python3.7/imp.py", line 171, in load_source
module = _load(spec)
File "<frozen importlib._bootstrap>", line 696, in _load
File "<frozen importlib._bootstrap>", line 677, in _load_unlocked
File "<frozen importlib._bootstrap_external>", line 728, in exec_module
File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
File "resources/neurons/gmail_checker/gmail_checker.py", line 4, in <module>
from gmail import Gmail
ModuleNotFoundError: No module named 'gmail'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/local/bin/kalliope", line 11, in <module>
load_entry_point('kalliope==0.7.1', 'console_scripts', 'kalliope')()
File "/usr/local/lib/python3.7/dist-packages/kalliope-0.7.1-py3.7.egg/kalliope/__init__.py", line 109, in main
res_manager.install()
File "/usr/local/lib/python3.7/dist-packages/kalliope-0.7.1-py3.7.egg/kalliope/core/ResourcesManager.py", line 121, in install
if self.run_ansible_playbook_module(install_file_path=self.install_file_path):
File "/usr/local/lib/python3.7/dist-packages/kalliope-0.7.1-py3.7.egg/kalliope/core/ResourcesManager.py", line 331, in run_ansible_playbook_module
NeuronLauncher.start_neuron(neuron)
File "/usr/local/lib/python3.7/dist-packages/kalliope-0.7.1-py3.7.egg/kalliope/core/NeuronLauncher.py", line 65, in start_neuron
'%s' ". -> Execution skipped, run with debug flag for more information" % (neuron.name, e.message))
AttributeError: 'ModuleNotFoundError' object has no attribute 'message'
Des idées?
ModuleNotFoundError: No module named 'kodijson'
me rappelle plus d'où ça vient. Vais faire une recherche sur le gitter si je retrouve. Merci à tous ;)
Patrick @corus87 août 18 2020 15:21
I can confirm that the latest version of pyowm is not working and raises the mentioned error
@juanpa669 Install version 2.10.0 as required by the neuron and it should work.
just run sudo pip3 install pyowm==2.10.0