Closed LineF closed 1 year ago
Just tested latest version (commit 69b8ff) - same problem. Then I tried it directly within a debian installation - working. So it is probably a problem within AppDaemon in HAOS.
Hi That error means that you did something wrong at copying steps It cannot find the temp file, did you copied all files into the "appdaemon/apps/main" folder? If not, you need to change the config file.
Henning, can you upload the temp file from pickle to the python folder? That one is needed on AppDaemon, as it cannot be created automatically.
Yes, with "normal" linux I got at the first start, that the temp file is corrupted and would be recreated. With AppDaemon there was no such message. The file existed (zero bytes), but it wasn't touched in any way...
Can you please sent a screenshot of your folder structure? I think there is something not ok
Hi, here are some screenshots of the filesystem structure and contents of files. I can't see any issues. With the latest version the temp file has been written, but still the same error:
Martin
Interesting, I have an idea Can you change the AppDaemon config file to the following please?
init_commands: [] python_packages:
(Attention; the system_packages: should be in line with pyton_packages, but the comment shifts it for some reason) It seems the main_entity file is the issue
Hello everyone, I am working on a new commit, in which the structure of the temp file will also change. There will be more information stored in it, like the token and the serial etc.. The advantage of this is that the token can be used further and a new token is not generated every time the script is started. I don't know how the Judo server will react in the long run if new tokens are generated all the time. I will commit the script to the repo including a new temp_getjudo.pkl. So make sure that you also update the getjudo.py when you take over the temp-file.
Hi,
adbase loaded, but problem still exists:
Greetings, Martin
I found the problem, please use the code from my repository and retry it
kwargs is essential
def loop(kwargs):
AND I had to change one line: response = http.request('GET',f"https://www.myjudo.eu/interface/?token={mydata.token}&group=register&command=get%20device%20data")
instead of
response = http.request('GET',f"https://www.myjudo.eu/interface/?token={mydata[token]}&group=register&command=get%20device%20data")
I will create a Pull Request
Small hint @www-ShapeLabs-de , if you start the app with an old temp file it crashes because of mydata discrepances
Hello @danielegger1, yust tried your commit (a35e94), but got following error now:
what ?????
On Sun 12. Feb 2023 at 09:37, danielegger1 @.***> wrote:
I found the problem, please use the code from my repository and retry it
@henning https://github.com/henning, kwargs is essential
def loop(kwargs):
AND I had to change one line: response = http.request('GET',f" https://www.myjudo.eu/interface/?token={mydata.token}&group=register&command=get%20device%20data https://www.myjudo.eu/interface/?token=%7Bmydata.token%7D&group=register&command=get%20device%20data ")
instead of
response = http.request('GET',f"https://www.myjudo.eu/interface/?token={mydata[token]}&group=register&command=get%20device%20data <https://www.myjudo.eu/interface/?token=%7Bmydata[token]%7D&group=register&command=get%20device%20data>")
I will create a Pull Request
— Reply to this email directly, view it on GitHub https://github.com/www-ShapeLabs-de/Judo-i-soft-save-plus-to-mqtt-bridge/issues/10#issuecomment-1426972690, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAAJ2UCMVLL5ZZL3567KPXTWXCONRANCNFSM6AAAAAAUXCPZBM . You are receiving this because you were mentioned.Message ID: <www-ShapeLabs-de/Judo-i-soft-save-plus-to-mqtt-bridge/issues/10/1426972690 @github.com>
-- Henning Sprang http://www.sprang.de
Sorry, I missed the change in config_getjudo.py. Now the code ist working in AppDaemon. Thanks! Great project! Martin
why am i getting these emails? i am not involved in this project.
On Sun 12. Feb 2023 at 14:11, Martin Patzel @.***> wrote:
Sorry, I missed the change in config_getjudo.py. Now the code ist working in AppDaemon. Thanks! Great project! Martin
— Reply to this email directly, view it on GitHub https://github.com/www-ShapeLabs-de/Judo-i-soft-save-plus-to-mqtt-bridge/issues/10#issuecomment-1427029892, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAAJ2UH5OLQ3C7LMYJGOMKLWXDOPRANCNFSM6AAAAAAUXCPZBM . You are receiving this because you were mentioned.Message ID: <www-ShapeLabs-de/Judo-i-soft-save-plus-to-mqtt-bridge/issues/10/1427029892 @github.com>
-- Henning Sprang http://www.sprang.de
why am i getting these emails? i am not involved in this project.
Hi Henning
I don't know, but you can unsubscribe ;-)
BR Henning
ups,... sorry Henning that was my bad when using @ henning instead of the correct one
Sorry, I missed the change in config_getjudo.py. Now the code ist working in AppDaemon. Thanks! Great project! Martin
that is great :) now just do a merge with the pull request and we should be good to close this issue
PR was merged :-)
Hello,
very nice work! Didn't ever expect to get my isoft safe+ connected to HomeAssistant...
I installed it on AppDaemon on the HA instance as described, but I get errors:
2023-02-09 22:50:34.185511 INFO AppDaemon: Adding /config/appdaemon/apps to module import path 2023-02-09 22:50:34.185961 INFO AppDaemon: Adding /config/appdaemon/apps/main to module import path 2023-02-09 22:50:34.191977 WARNING AppDaemon: No app description found for: /config/appdaemon/apps/hello.py - ignoring 2023-02-09 22:50:34.193047 WARNING AppDaemon: No app description found for: /config/appdaemon/apps/main/config_getjudo.py - ignoring 2023-02-09 22:50:34.194095 WARNING AppDaemon: No app description found for: /config/appdaemon/apps/main/getjudo.py - ignoring 2023-02-09 22:50:34.195080 INFO AppDaemon: Loading App Module: /config/appdaemon/apps/main/main_entity.py 2023-02-09 22:50:34.224711 WARNING AppDaemon: No app description found for: /config/appdaemon/apps/main/messages_getjudo.py - ignoring 2023-02-09 22:50:34.225911 INFO AppDaemon: Initializing app main_app using class main_loop from module main_entity Verbunden mit MQTT Broker... Topics wurden abonniert... Autoconfigs wurden gesendet... Login erfolgreich, neuer Token: hahahahaha !!!!Achtung, Diesen Token nirgendwo Posten oder Verschicken. Hierdurch erhält man Vollzugriff auf die Anlage!!!! Lade gespeicherte Variablen
['Scriptfehler - Laden der Variablen aus Datei fehlgeschlagen in Zeile: 319', FileNotFoundError(2, 'No such file or directory')] Initialisierung erfolgreich! 2023-02-09 22:50:55.014569 WARNING AppDaemon: Suspect incorrect signature type for callback main() in main_app, should be f(self, kwargs) - discarding 2023-02-09 22:50:55.014943 WARNING main_app: ------------------------------------------------------------ 2023-02-09 22:50:55.015167 WARNING main_app: Unexpected error in worker for App main_app: 2023-02-09 22:50:55.015379 WARNING main_app: Worker Ags: {'id': 'hohohoho', 'name': 'main_app', 'objectid': 'hohohoho', 'type': 'scheduler', 'function': <function main at 0x7fac67da7a30>, 'pin_app': True, 'pin_thread': 0, 'kwargs': {'__thread_id': 'thread-0'}} 2023-02-09 22:50:55.015560 WARNING main_app: ------------------------------------------------------------ 2023-02-09 22:50:55.018149 WARNING main_app: Traceback (most recent call last): File "/usr/lib/python3.10/site-packages/appdaemon/threading.py", line 904, in worker funcref(self.AD.sched.sanitize_timer_kwargs(app, args["kwargs"])) TypeError: main() takes 0 positional arguments but 1 was given 2023-02-09 22:50:55.018458 WARNING main_app: ------------------------------------------------------------
Could you help, please?
Martin