-
Notifications
You must be signed in to change notification settings - Fork 23
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
Error after updating #132
Comments
Sorry for the late reply! This is a ongoing plague with imports on raspbian, domoticz can't find the same modules as the command line. Try switching to the debug branch, it is the same version as master (0.10.6) with import error handling disabled. It will fail just like the regular master, but should provide a bit more information and context, hopefully this will enable us to find out why it fails... |
I have a similar issue it seems: In my case, it turns out that domoticz is running as root despite being started with Anyway, I do see my Tradfri devices in Domoticz now. |
Hi people, I installed Tradfricoap local:
Now i got the error that Tradfricoap is 2 times on my machine. So uninstall it
And restarted the plugin in Domoticz and my IKEA-Tradfri plugin is running again :) |
I'm working on a fresh install of domoticz in an proxmox VM with debian, and experience the same error. python3 plugin.py list does indeed list my devices. But Domoticz cannot communicatie with coap. I use the py3coap module. I noticed the following:
So my conclusion would be something like: Tradfri-coap should be run as Root. What are your thoughts on this? Any idea how to check this? |
Update: all previous suggestions didn't work for me, but I found te following sollution: Follow the install manual exactly as described, but everything with sudo. |
You should not run domoticz as root. On most linux systems, including debian, adding the user to the plugdev group allows that user's processes to access the USB-devices:
will add your current user to this group, and allow domoticz started as that user to access the UBS zwave stick. Remember to log out and log in again to activate the membership in the group. So if you're able to get tradfri to work when running domoticz as user Zatarra, i really recommend going this route! As a general rule, nothing in userspace should be run as root. Bad code in such a program, malicious or unintended, could really wreck havoc on your system, or present a serious security threat! I try to make py3coap, tradfricoap and the plugin, as safe as possible, but I really would not recommend running either as root, so no, tradfri-coap should definitely not be run as root! If you really want to, installing py3coap with the root user should solve the issue you're having:
|
The issue that I ran into may be the same one that @ZatarraNL ran in to: the init.d script that comes with domoticz does try to start domoticz as a non-root user with start-stop-daemon --chuid $USERNAME, but for some reason the chuid is ignored. This may well be a limitation of systemd. I have not yet come around to rewriting the startup script to a native systemd unit, which I expect would solve my issue. |
Perhaps you could use my systemd unit-file as a starting point?
With this, installing py3coap and tradfricoap as moroen, and using the --user option of pip3, domoticz finds py3coap and tradfricoap. |
Ooh, lovely! I do not have a separate ikea-tradfri.service, but this is an excellent starting point. How did you solve using port 443 under a non-root user? I was planning to put nginx or lighttpd in front of domoticz for that reason. |
I agree, but the /etc/init.d/domoticz.sh seems to runs domoticz as root. This is despite that the domoticz.sh describes Zatarra as user. I find it surprizing that domoticz runs in root out of the box... The systemd solution does run domoticz as Zatarra. But somehow adding the user Zatarra to the dialout group still gives me problems with the zwave-stick. I'll try to find a solution some other day. Thanks for your effort with this plugin. I've used it so far for over a year. |
I didn't... I don't expose domoticz (or anything on my network) to the outside, so I don't care that SSL is not working... But I would imagine it should be possible to use a non-privileged port for SSL, by changing the following line in the unit file:
|
Hello I have errors after updating the plugin
Raspbian GNU/Linux 10 (buster)
Domoticz V2020.2 (c)2012-2020 GizMoCuz
Build Hash: b63341bc0, Date: 2020-04-26 13:47:55
(IKEA TRADFRI) Initialized version 0.10.6, author 'moroen'
Already tried https://github.com/moroen/IKEA-Tradfri-plugin/wiki/Common-errors
but no improvement, still have the errors...
Then I've checked the version :
but coapcmd was alreday installed (under sudo I guess)...
so I uninstalled it
to re install it (with the -U option)
then to be sure to use py3coap
pi@domoticz:~/domoticz/plugins/IKEA-Tradfri $ python3 plugin.py config api py3coap
So I made a test
Everything seems to be OK but I still have the errors in Domoticz logs...
The text was updated successfully, but these errors were encountered: