Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG]: TerrariumPi crashes during startup #770

Closed
Dave0408 opened this issue Jan 4, 2023 · 3 comments
Closed

[BUG]: TerrariumPi crashes during startup #770

Dave0408 opened this issue Jan 4, 2023 · 3 comments

Comments

@Dave0408
Copy link

Dave0408 commented Jan 4, 2023

I have just updated to the latest TerrariumPi version 4.6.1 and now I can't get the software to start at all.
Here is the log extract:

pi@raspberrypi:~ $ tail -f /var/log/syslog
Jan  4 21:22:03 raspberrypi python[854]: 2023-01-04 21:22:03,299 - INFO    - terrariumEngine       - Loading Meross cloud connection.
Jan  4 21:22:03 raspberrypi python[854]: 2023-01-04 21:22:03,301 - INFO    - terrariumCloud        - Waiting for Meross cloud connection ...
Jan  4 21:22:04 raspberrypi python[854]: 2023-01-04 21:22:04,291 - INFO    - terrariumCloud        - Closed Meross cloud connection
Jan  4 21:22:04 raspberrypi python[854]: 2023-01-04 21:22:04,293 - ERROR   - terrariumCloud        - Error in cloud run: __init__() missing 1 required positional argument: 'skill_number'
Jan  4 21:22:04 raspberrypi python[854]: Traceback (most recent call last):
Jan  4 21:22:04 raspberrypi python[854]:   File "/home/pi/TerrariumPI/terrariumCloud.py", line 49, in _run
Jan  4 21:22:04 raspberrypi python[854]:     data.result()
Jan  4 21:22:04 raspberrypi python[854]:   File "/usr/lib/python3.7/concurrent/futures/_base.py", line 432, in result
Jan  4 21:22:04 raspberrypi python[854]:     return self.__get_result()
Jan  4 21:22:04 raspberrypi python[854]:   File "/usr/lib/python3.7/concurrent/futures/_base.py", line 384, in __get_result
Jan  4 21:22:04 raspberrypi python[854]:     raise self._exception
Jan  4 21:22:04 raspberrypi python[854]:   File "/home/pi/TerrariumPI/terrariumCloud.py", line 187, in _main_process
Jan  4 21:22:04 raspberrypi python[854]:     await self.manager.async_device_discovery()
Jan  4 21:22:04 raspberrypi python[854]:   File "/home/pi/TerrariumPI/venv/lib/python3.7/site-packages/meross_iot/manager.py", line 331, in async_device_discovery
Jan  4 21:22:04 raspberrypi python[854]:     http_devices = await self._http_client.async_list_devices()
Jan  4 21:22:04 raspberrypi python[854]:   File "/home/pi/TerrariumPI/venv/lib/python3.7/site-packages/meross_iot/http_api.py", line 417, in async_list_devices
Jan  4 21:22:04 raspberrypi python[854]:     return [HttpDeviceInfo.from_dict(x) for x in result]
Jan  4 21:22:04 raspberrypi python[854]:   File "/home/pi/TerrariumPI/venv/lib/python3.7/site-packages/meross_iot/http_api.py", line 417, in <listcomp>
Jan  4 21:22:04 raspberrypi python[854]:     return [HttpDeviceInfo.from_dict(x) for x in result]
Jan  4 21:22:04 raspberrypi python[854]:   File "/home/pi/TerrariumPI/venv/lib/python3.7/site-packages/meross_iot/model/shared.py", line 27, in from_dict
Jan  4 21:22:04 raspberrypi python[854]:     obj = cls(**new_dict)
Jan  4 21:22:04 raspberrypi python[854]: TypeError: __init__() missing 1 required positional argument: 'skill_number'
Jan  4 21:22:04 raspberrypi python[854]: 2023-01-04 21:22:04,316 - WARNING - terrariumCloud        - Reconnecting to Meross cloud. Somehow the connection was lost ...
Jan  4 21:22:04 raspberrypi python[854]: 2023-01-04 21:22:04,319 - INFO    - terrariumCloud        - Stopping Meross cloud ...
Jan  4 21:22:04 raspberrypi python[854]: 2023-01-04 21:22:04,324 - INFO    - terrariumCloud        - Waiting for Meross cloud connection ...

after a short while:

Jan  4 21:23:32 raspberrypi python[854]: Exception in thread Thread-2:
Jan  4 21:23:32 raspberrypi python[854]: Traceback (most recent call last):
Jan  4 21:23:32 raspberrypi python[854]:   File "/home/pi/TerrariumPI/terrariumCloud.py", line 49, in _run
Jan  4 21:23:32 raspberrypi python[854]:     data.result()
Jan  4 21:23:32 raspberrypi python[854]:   File "/usr/lib/python3.7/concurrent/futures/_base.py", line 432, in result
Jan  4 21:23:32 raspberrypi python[854]:     return self.__get_result()
Jan  4 21:23:32 raspberrypi python[854]:   File "/usr/lib/python3.7/concurrent/futures/_base.py", line 384, in __get_result
Jan  4 21:23:32 raspberrypi python[854]:     raise self._exception
Jan  4 21:23:32 raspberrypi python[854]:   File "/home/pi/TerrariumPI/terrariumCloud.py", line 187, in _main_process
Jan  4 21:23:32 raspberrypi python[854]:     await self.manager.async_device_discovery()
Jan  4 21:23:32 raspberrypi python[854]:   File "/home/pi/TerrariumPI/venv/lib/python3.7/site-packages/meross_iot/manager.py", line 331, in async_device_discovery
Jan  4 21:23:32 raspberrypi python[854]:     http_devices = await self._http_client.async_list_devices()
Jan  4 21:23:32 raspberrypi python[854]:   File "/home/pi/TerrariumPI/venv/lib/python3.7/site-packages/meross_iot/http_api.py", line 417, in async_list_devices
Jan  4 21:23:32 raspberrypi python[854]:     return [HttpDeviceInfo.from_dict(x) for x in result]
Jan  4 21:23:32 raspberrypi python[854]:   File "/home/pi/TerrariumPI/venv/lib/python3.7/site-packages/meross_iot/http_api.py", line 417, in <listcomp>
Jan  4 21:23:32 raspberrypi python[854]:     return [HttpDeviceInfo.from_dict(x) for x in result]
Jan  4 21:23:32 raspberrypi python[854]:   File "/home/pi/TerrariumPI/venv/lib/python3.7/site-packages/meross_iot/model/shared.py", line 27, in from_dict
Jan  4 21:23:32 raspberrypi python[854]:     obj = cls(**new_dict)
Jan  4 21:23:32 raspberrypi python[854]: TypeError: __init__() missing 1 required positional argument: 'skill_number'
Jan  4 21:23:32 raspberrypi python[854]: During handling of the above exception, another exception occurred:
Jan  4 21:23:32 raspberrypi python[854]: Traceback (most recent call last):
Jan  4 21:23:32 raspberrypi python[854]:   File "/usr/lib/python3.7/threading.py", line 917, in _bootstrap_inner
Jan  4 21:23:32 raspberrypi python[854]:     self.run()
Jan  4 21:23:32 raspberrypi python[854]:   File "/usr/lib/python3.7/threading.py", line 865, in run
Jan  4 21:23:32 raspberrypi python[854]:     self._target(*self._args, **self._kwargs)
Jan  4 21:23:32 raspberrypi python[854]:   File "/home/pi/TerrariumPI/terrariumCloud.py", line 52, in _run
Jan  4 21:23:32 raspberrypi python[854]:     self.reconnect()
Jan  4 21:23:32 raspberrypi python[854]:   File "/home/pi/TerrariumPI/terrariumCloud.py", line 145, in reconnect
Jan  4 21:23:32 raspberrypi python[854]:     self.stop()
Jan  4 21:23:32 raspberrypi python[854]:   File "/home/pi/TerrariumPI/terrariumCloud.py", line 137, in stop
Jan  4 21:23:32 raspberrypi python[854]:     self.__engine['thread'].join()
Jan  4 21:23:32 raspberrypi python[854]:   File "/usr/lib/python3.7/threading.py", line 1029, in join
Jan  4 21:23:32 raspberrypi python[854]:     raise RuntimeError("cannot join current thread")
Jan  4 21:23:32 raspberrypi python[854]: RuntimeError: cannot join current thread

I don't know if this is related to my Meross power strip or the incorrectly/erroneously defined remote switch. See #769

Any idea how to get it up and running again?

Thanks in advance.

@theyosh
Copy link
Owner

theyosh commented Jan 4, 2023

This is just fixed in the latest code update. Meross did change their api: albertogeniola/MerossIot#274

Stop TP4. Do a git pull and then rerun the installer sudo ./install.sh After that, it should startup again.

@Dave0408
Copy link
Author

Dave0408 commented Jan 4, 2023

Thanks. Fixed and is running again!

@theyosh
Copy link
Owner

theyosh commented Jan 5, 2023

Closing due to a Meross API change.

@theyosh theyosh closed this as completed Jan 5, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants