Code: Select all
sudo service domoticz.sh stop
sudo service domoticz.sh start
Moderators: leecollings, remb0
Code: Select all
sudo service domoticz.sh stop
sudo service domoticz.sh start
It works for a few minutes. If you don't do anything, this happens:MJVR wrote: ↑Friday 12 April 2019 15:56 I have the same problems since a couple of days. What works for me is a restart of Domoticz (SSH)
After a reboot the errors return. So it works as long you don't reboot or update.Code: Select all
sudo service domoticz.sh stop sudo service domoticz.sh start
.2019-04-12 19:49:52.229 Error: (ToonApiLib) failed to load 'plugin.py', Python Path used was '/home/pi/domoticz/plugins/toonapilib4domoticz/:/usr/lib/python3.4/:/usr/lib/python3.4/plat-arm-linux-gnueabihf:/usr/lib/python3.4/lib-dynload:/usr/local/lib/python3.4/dist-packages:/usr/lib/python3/dist-packages:/usr/lib/python3.4/dist-packages:/usr/lib/dist-python'.
2019-04-12 19:49:52.229 Error: (Toon ) Module Import failed, exception: 'ImportError'
2019-04-12 19:49:52.229 Error: (Toon ) Module Import failed: ' Name: toonapilib'
2019-04-12 19:49:52.229 Error: (Toon ) Error Line details not available
that did well with "almost" no errors.. except when installing the toonapilibCode: Select all
sudo apt-get update
Code: Select all
sudo apt-get upgrade
Code: Select all
sudo apt-get dist-upgrade
Code: Select all
sudo apt-get autoremove
"then reboot system"Code: Select all
sudo apt-get autoclean
Code: Select all
cd domoticz
Code: Select all
./updatebeta
Code: Select all
pip3 install --upgrade setuptools
Code: Select all
pip3 install -U pip
Code: Select all
pip3 install --user toonapilib -U
Code: Select all
cd /home/pi/domoticz/plugins
Code: Select all
git clone https://github.com/JohnvandeVrugt/toonapilib4domoticz
Code: Select all
sudo service domoticz restart
if someone can tell me this is my problem???Installing collected packages: toonapilib, cachetools, coloredlogs, dateparser, requests, humanfriendly, regex, pytz, python-dateutil, tzlocal, urllib3, chardet, idna, certifi, six
Running setup.py install for toonapilib
warning: no previously-included files matching '__pycache__' found under directory '*'
Could not find .egg-info directory in install record for toonapilib
Running setup.py install for regex
BASE_DIR is /tmp/pip-build-i6rmfj2c/regex
building 'regex._regex' extension
arm-linux-gnueabihf-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -g -fstack-protector-strong -Wformat -Werror=format-security -D_FORTIFY_SOURCE=2 -fPIC -I/usr/include/python3.4m -c regex_3/_regex.c -o build/temp.linux-armv7l-3.4/regex_3/_regex.o
regex_3/_regex.c: In function ?fuzzy_match_group_fld?:
regex_3/_regex.c:11327:10: warning: ?data.new_text_pos? may be used uninitialized in this function [-Wmaybe-uninitialized]
if (!record_fuzzy(state, data.fuzzy_type, data.new_text_pos - data.step))
^
regex_3/_regex.c: In function ?fuzzy_match_string_fld?:
regex_3/_regex.c:11102:10: warning: ?data.new_text_pos? may be used uninitialized in this function [-Wmaybe-uninitialized]
if (!record_fuzzy(state, data.fuzzy_type, data.new_text_pos - data.step))
^
arm-linux-gnueabihf-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -g -fstack-protector-strong -Wformat -Werror=format-security -D_FORTIFY_SOURCE=2 -fPIC -I/usr/include/python3.4m -c regex_3/_regex_unicode.c -o build/temp.linux-armv7l-3.4/regex_3/_regex_unicode.o
arm-linux-gnueabihf-gcc -pthread -shared -Wl,-O1 -Wl,-Bsymbolic-functions -Wl,-z,relro -Wl,-z,relro -g -fstack-protector-strong -Wformat -Werror=format-security -D_FORTIFY_SOURCE=2 build/temp.linux-armv7l-3.4/regex_3/_regex.o build/temp.linux-armv7l-3.4/regex_3/_regex_unicode.o -o build/lib.linux-armv7l-3.4/regex/_regex.cpython-34m.so
/usr/local/lib/python3.4/dist-packages/setuptools/dist.py:472: UserWarning: Normalizing '2019.04.10' to '2019.4.10'
normalized_version,
Could not find .egg-info directory in install record for regex (from dateparser~=0.7.1->toonapilib)
Running setup.py install for tzlocal
Could not find .egg-info directory in install record for tzlocal (from dateparser~=0.7.1->toonapilib)
Successfully installed toonapilib cachetools coloredlogs dateparser requests humanfriendly regex pytz python-dateutil tzlocal urllib3 chardet idna certifi six
Cleaning up...
Hmmm im also habing some email contact with Costas from toonapilib and he explicitly told me NOT to use sudo??? This gets confusing...dressie wrote:I'm missing the "sudo" commands during installation. If you copy/paste the instructions from https://github.com/JohnvandeVrugt/toona ... TALL_PI.md it should go without any issues.
Make sure you also have this one: sudo apt-get install python3-pip.
You really shouldn't get any error during installation.
I found out that I had two API's running from Toon, one on Domoticz and one on a test HomeAssist. I remover the HA one and have only one API @Toon. So far it's all fine again.
Yes, on Raspberry Pi you should use the SUDO command actually.astrapowerrr wrote: ↑Friday 12 April 2019 20:44Hmmm im also habing some email contact with Costas from toonapilib and he explicitly told me NOT to use sudo??? This gets confusing...dressie wrote:I'm missing the "sudo" commands during installation. If you copy/paste the instructions from https://github.com/JohnvandeVrugt/toona ... TALL_PI.md it should go without any issues.
Make sure you also have this one: sudo apt-get install python3-pip.
You really shouldn't get any error during installation.
I found out that I had two API's running from Toon, one on Domoticz and one on a test HomeAssist. I remover the HA one and have only one API @Toon. So far it's all fine again.
But i will try with sudo...
Verzonden vanaf mijn iPhone met Tapatalk
Code: Select all
sudo pip3 install toonapilib -U
Code: Select all
2019-04-12 20:58:27.425 Status: Domoticz V4.10602 (c)2012-2019 GizMoCuz
2019-04-12 20:58:27.426 Status: Build Hash: ce68fa52, Date: 2019-04-04 20:51:02
2019-04-12 20:58:27.426 Status: Startup Path: /home/pi/dev-domoticz/
2019-04-12 20:58:27.713 Status: PluginSystem: Started, Python version '3.5.3'.
(...)
2019-04-12 20:58:30.044 Status: PluginSystem: Entering work loop.
2019-04-12 20:58:32.536 (TestApilib) Using toonapilib version 3.2.3 by Costas Tyfoxylos <[email protected]>
2019-04-12 20:58:32.536 (TestApilib) Debug logging is active
2019-04-12 20:58:32.536 (TestApilib) Creating toonapilib object
2019-04-12 20:58:32.533 Status: (TestApilib) Initialized version 1.0.14, author 'John van de Vrugt'
2019-04-12 20:58:32.534 Status: (TestApilib) Entering work loop.
2019-04-12 20:58:53.700 (TestApilib) Check and create Toon devices
Code: Select all
2019-04-12 21:46:13.754 Status: Domoticz V4.10602 (c)2012-2019 GizMoCuz
2019-04-12 21:46:13.762 Status: Build Hash: ce68fa52, Date: 2019-04-04 20:51:02
2019-04-12 21:46:13.763 Status: Startup Path: /home/pi/domoticz/
2019-04-12 21:46:13.842 Status: EventSystem: reset all events...
2019-04-12 21:46:13.940 Status: PluginSystem: Started, Python version '3.4.2'.
2019-04-12 21:46:13.960 Status: WebServer(HTTP) started on address: :: with port 8080
2019-04-12 21:46:13.970 Status: WebServer(SSL) started on address: :: with port 443
2019-04-12 21:46:13.973 Status: Proxymanager started.
2019-04-12 21:46:14.015 Status: TCPServer: shared server started...
2019-04-12 21:46:14.016 Status: RxQueue: queue worker started...
2019-04-12 21:46:15.024 Status: PROXY: Authenticate result: success.
2019-04-12 21:46:16.016 Status: RFXCOM: Worker started...
2019-04-12 21:46:16.025 Status: ToonThermostat: Worker started...
2019-04-12 21:46:16.026 Status: Kodi: Started
2019-04-12 21:46:16.027 Status: (Toon ) Started.
2019-04-12 21:46:16.027 Status: Darksky: Started...
2019-04-12 21:46:16.027 Status: EventSystem: reset all events...
2019-04-12 21:46:16.032 Status: EventSystem: reset all device statuses...
2019-04-12 21:46:16.351 Status: PluginSystem: Entering work loop.
2019-04-12 21:46:16.408 Status: Python EventSystem: Initalizing event module.
2019-04-12 21:46:16.425 Status: EventSystem: Queue thread started...
2019-04-12 21:46:16.425 Status: EventSystem: Started
Code: Select all
Domoticz.Log("Using toonapilib version " + toonapilib.__version__ + " by " + toonapilib.__author__)
Code: Select all
sudo chown root:root /root
Code: Select all
sudo chown -R root:root /root
sudo apt-get update
sudo apt-get upgrade
sudo apt-get dist-upgrade
sudo apt-get autoremove
sudo apt-get autoclean
"then reboot system"
cd domoticz
./updatebeta
sudo easy_install -U setuptools
sudo pip3 install --upgrade setuptools
sudo pip3 install -U pip
sudo pip3 install --user toonapilib -U
cd /home/pi/domoticz/plugins
git clone https://github.com/JohnvandeVrugt/toonapilib4domoticz
sudo service domoticz restart
The credentials i use are correct. Not shure how to proceed right now2019-04-13 21:04:34.240 Status: (toon) Started.
2019-04-13 21:04:41.770 (toon) Using toonapilib version 3.2.3 by Costas Tyfoxylos <[email protected]>
2019-04-13 21:04:41.765 Status: (toon) Entering work loop.
2019-04-13 21:04:41.766 Status: (toon) Initialized version 1.0.14, author 'John van de Vrugt'
2019-04-13 21:04:42.399 (toon) Could not create a toonapilib object
2019-04-13 21:04:42.401 (toon) Possible solution:
2019-04-13 21:04:42.401 (toon) * Check your credentials
2019-04-13 21:04:42.401 (toon) * Restart Domoticz
2019-04-13 21:04:42.401 (toon) Check and create Toon devices
2019-04-13 21:04:42.401 (toon) Creating Power usage device
2019-04-13 21:04:42.405 (toon) Creating Gas usage device
2019-04-13 21:04:42.408 (toon) Creating Room temperature device
2019-04-13 21:04:42.410 (toon) Creating Set point device
2019-04-13 21:04:42.411 (toon) Creating Heating active device
2019-04-13 21:04:42.414 (toon) Creating Hot water active device
2019-04-13 21:04:42.416 (toon) Creating Preheat active device
2019-04-13 21:04:42.418 (toon) Creating Scene device
2019-04-13 21:04:42.421 (toon) Creating Program state device
2019-04-13 21:04:42.423 (toon) Creating Modulation level device
Hey waspy,waspy wrote: ↑Saturday 13 April 2019 23:02 Yes, that is just fine. Tested with that version last night.
I have added testtoonapilib.py to the repository for testing purposes.
If you run python3.* testtoonapilib.py in the terminal you can test whether a toon object can be created.
That is, if toonapilib is installed correctly and your credentials are correct
Good luck!
I have removed domoticz, removed the toonapilib library and reinstalled everyting again. Installing gives no errors. I have an toon subscription and can use the toonAP on my smartphone with the same credentials i use to configure your plugin.Starting toonapilib test
On success the room temperature will be presented
Trying to create a toon object
An error occurred creating the Toon object
I did something wrong the last time. Now the script works and gives me:
So, i does work. Why it is not working in domoticz i don't know. Installing a VM with stretch to build a test environment.Starting toonapilib test
On success the room temperature will be presented
Trying to create a toon object
Room temperature: 18.5
Users browsing this forum: No registered users and 1 guest