Can't get plugwise Stretch plugin to work on Synology

On various Hardware and OS systems: pi / windows / routers / nas, etc

Moderator: leecollings

Post Reply
WillemV
Posts: 5
Joined: Thursday 03 December 2020 17:42
Target OS: Raspberry Pi / ODroid
Domoticz version: v2024.7
Contact:

Can't get plugwise Stretch plugin to work on Synology

Post by WillemV »

I have a Plugwise Smile and a Stretch which I want to read and log on my Synology NAS.

According to this article that shouldn't be too hard: https://www.domoticz.com/wiki/Plugins/Plugwise
I thought that if I could get this going for the Stretch then that should possibly also work for my wireless P1-Smile.
However I can't get it to work. See the logging below:

2020-12-04 10:31:02.690 Status: Domoticz V2020.1 (c)2012-1970 GizMoCuz
2020-12-04 10:31:02.711 Status: Build Hash: 0, Date: 1970-01-01 01:00:00
2020-12-04 10:31:02.712 Status: Startup Path: /usr/local/domoticz/
2020-12-04 10:31:03.103 Active notification Subsystems: gcm, http (2/13)
2020-12-04 10:31:03.127 Starting shared server on: :::6144
2020-12-04 10:31:03.098 Status: PluginSystem: Started, Python version '3.8.2'.
2020-12-04 10:31:03.121 Status: WebServer(HTTP) started on address: :: with port 8084
2020-12-04 10:31:03.125 Status: WebServer(SSL) started on address: :: with port 8443
2020-12-04 10:31:03.127 Status: TCPServer: shared server started...
2020-12-04 10:31:03.127 Status: RxQueue: queue worker started...
2020-12-04 10:31:05.127 Status: (Stretch) Started.
2020-12-04 10:31:05.128 Status: NotificationSystem: thread started...
2020-12-04 10:31:05.128 Status: EventSystem: reset all events...
2020-12-04 10:31:05.130 Status: EventSystem: reset all device statuses...
2020-12-04 10:31:05.220 Status: Python EventSystem: Initalizing event module.
2020-12-04 10:31:05.220 Status: EventSystem: Started
2020-12-04 10:31:05.220 Status: EventSystem: Queue thread started...
2020-12-04 10:31:05.344 Status: PluginSystem: Entering work loop.
2020-12-04 10:31:05.914 Status: (Stretch) Initialized version 1.0.3, author 'Gerrit Hulleman'
2020-12-04 10:31:05.914 Status: (Stretch) Entering work loop.
2020-12-04 10:31:05.916 Error: (Stretch) 'onStart' failed 'FileNotFoundError'.
2020-12-04 10:31:05.916 Error: (Stretch) ----> Line 352 in '/usr/local/domoticz/var/plugins/Plugwise/plugin.py'
2020-12-04 10:31:05.916 Error: (Stretch) ----> Line 65 in '/usr/local/domoticz/var/plugins/Plugwise/plugin.py'
2020-12-04 10:31:05.916 Error: (Stretch) ----> Line 342 in '/usr/local/domoticz/var/plugins/Plugwise/plugin.py'
2020-12-04 10:31:15.930 Error: (Stretch) 'onHeartbeat' failed 'FileNotFoundError'.
2020-12-04 10:31:15.930 Error: (Stretch) ----> Line 380 in '/usr/local/domoticz/var/plugins/Plugwise/plugin.py'
2020-12-04 10:31:15.930 Error: (Stretch) ----> Line 178 in '/usr/local/domoticz/var/plugins/Plugwise/plugin.py'
2020-12-04 10:31:15.930 Error: (Stretch) ----> Line 342 in '/usr/local/domoticz/var/plugins/Plugwise/plugin.py'


line 352 _plugin.onStart()
line 65 self.logMessage("Loading parameters")
line 342 f= open("plugins/Plugwise/log.txt","a+")

line 380 _plugin.onHeartbeat()
line 178 self.logMessage("onHeartbeat called")
line 342 f= open("plugins/Plugwise/log.txt","a+")


1) From Startup Path: /usr/local/domoticz/ the path "plugins/Plugwise/log.txt" does not appear right. In my eyes it should be: "var/plugins/Plugwise/log.txt"
But after correcting is the results remain the same.

2) It looks like the logfile cannot be created. But after manually creating a log.txt in this location I stil get the same log messages.
Is the code correct? I don't know much about Python but the code seems to be ok.

3) Could it be a rights issue? I assume that on the Synology the script is being executed by the root account. Installation however was done by user 'domoticz'.
I changed the owner of all folders and files to owner 'root' recursively. That also didn't help.

Does anyone have any ideas or even experience with this issue?
I am running out of clues here.

NAS: Synology DS218play, architecture: rtd1296 (armv8)
Domoticz: V2020.1, package: domoticz_rtd1296-6.2_4.0.10717-8
Python version '3.8.2'

Any help would be much appreciated.
WillemV
Posts: 5
Joined: Thursday 03 December 2020 17:42
Target OS: Raspberry Pi / ODroid
Domoticz version: v2024.7
Contact:

Re: Can't get plugwise Stretch plugin to work on Synology

Post by WillemV »

I think my approach hasn't been correct.
Instead of trying to read data from the Plugwise P1-Smile from the Synology NAS I should replace the Smile with a Raspberry Pi altogether.
And run Domoticz from there.

After that I will could figure out a way to use my NAS for backup.
freekdk
Posts: 13
Joined: Monday 01 February 2021 16:33
Target OS: Linux
Domoticz version: V2024.7
Location: Netherlands
Contact:

Re: Can't get plugwise Stretch plugin to work on Synology

Post by freekdk »

I use this plugin on an openSUSE Leap 15.2 Raspberry Pi 4B system and had the same type of error messages. The reason was that domoticz runs as user domotics and group domoticz. I assume that is the same on Synology. Changing file protection on domoticz files to be owned by root does not change the user/group under which domoticz runs. My solution was to change ownership of all files in the folder plugins to domoticz/domoticz. In that case domoticz is able to create log.txt in .../plugins/Plugwise/ etc.
InControl
Posts: 4
Joined: Monday 02 January 2023 0:31
Target OS: Linux
Domoticz version:
Contact:

Re: Can't get plugwise Stretch plugin to work on Synology

Post by InControl »

Hello

I am new to this forum. I use Domoticz from 2013.
I have the plugin wiki/Plugins/Plugwise working in a VM Debian 10 and Raspberry PI.
I can't get it to work in docker.

Other plugins as Buienrader, Somfy Tahoma ,Growat Web plugins do work properly

Jus can't get this one to work

I got the following error messages
Can somebody help?
I can't find any forums about this problem
User avatar
waltervl
Posts: 5149
Joined: Monday 28 January 2019 18:48
Target OS: Linux
Domoticz version: 2024.7
Location: NL
Contact:

Re: Can't get plugwise Stretch plugin to work on Synology

Post by waltervl »

You did not post the error messages.
Are you getting the plugin hardware in the hardware list?
Isa the USB connection correct with Docker Container?
Did you enable debug? Did you get the devices.json file and the debug log.txt file in the plugins/Plugwise folder?
Domoticz running on Udoo X86 (on Ubuntu)
Devices/plugins: ZigbeeforDomoticz (with Xiaomi, Ikea, Tuya devices), Nefit Easy, Midea Airco, Omnik Solar, Goodwe Solar
InControl
Posts: 4
Joined: Monday 02 January 2023 0:31
Target OS: Linux
Domoticz version:
Contact:

Re: Can't get plugwise Stretch plugin to work on Synology

Post by InControl »

Thank You for responding

Yes the plugin is in the hardware list.
There is no USB because it read out the Plugwise stretch with JSON
Debug is on


Error log is as follow

Plugwise stretch V2: Call to function 'onHeartbeat' failed, exception details:
Plugwise stretch V2: Traceback (most recent call last):
Plugwise stretch V2: File "/opt/domoticz/userdata/plugins/Plugwise/plugin. py ", line 380, in onHeartbeat
Plugwise stretch V2: _plugin .onHeartbeat()
Plugwise stretch V2: File "/opt/domoticz/userdata/plugins/Plugwise/plugin. py ", line 178, in onHeartbeat
Plugwise stretch V2: self. logMessage("onHeartbeat called")
Plugwise stretch V2: File "/opt/domoticz/userdata/plugins/Plugwise/plugin. py ", line 342, in logMessage
Plugwise stretch V2: f= open("plugins/Plugwise/log. txt","a+")
Plugwise stretch V2: FileNotFoundError: [Errno 2] No such file or directory: 'plugins/Plugwise/log. txt'
Plugwise stretch V2: Call to function 'onHeartbeat' failed, exception details:
Plugwise stretch V2: Traceback (most recent call last):
Plugwise stretch V2: File "/opt/domoticz/userdata/plugins/Plugwise/plugin. py ", line 380, in onHeartbeat
Plugwise stretch V2: _plugin .onHeartbeat()
Plugwise stretch V2: File "/opt/domoticz/userdata/plugins/Plugwise/plugin. py ", line 178, in onHeartbeat
Plugwise stretch V2: self. logMessage("onHeartbeat called")
Plugwise stretch V2: File "/opt/domoticz/userdata/plugins/Plugwise/plugin. py ", line 342, in logMessage
Plugwise stretch V2: f= open("plugins/Plugwise/log. txt","a+")
Plugwise stretch V2: FileNotFoundError: [Errno 2] No such file or directory: 'plugins/Plugwise/log. txt'
User avatar
waltervl
Posts: 5149
Joined: Monday 28 January 2019 18:48
Target OS: Linux
Domoticz version: 2024.7
Location: NL
Contact:

Re: Can't get plugwise Stretch plugin to work on Synology

Post by waltervl »

Seems that the debug function is causing the issue ;-)
Looks like the plugin is not able to create the log.txt file in the plugins/Plugwise folder.
Perhaps switch off debugging for now.

As the plugin also wants to create a devises.json in the same location perhaps it also gives issues....


Are there also other errors when starting the plugin? Click on update will restart the plugin.
Domoticz running on Udoo X86 (on Ubuntu)
Devices/plugins: ZigbeeforDomoticz (with Xiaomi, Ikea, Tuya devices), Nefit Easy, Midea Airco, Omnik Solar, Goodwe Solar
InControl
Posts: 4
Joined: Monday 02 January 2023 0:31
Target OS: Linux
Domoticz version:
Contact:

Re: Can't get plugwise Stretch plugin to work on Synology

Post by InControl »

Hello

even wen I have the debug funktion off , errors are the same.

I did send a full copy off the error messages, so no more other issues about the plugin.
User avatar
waltervl
Posts: 5149
Joined: Monday 28 January 2019 18:48
Target OS: Linux
Domoticz version: 2024.7
Location: NL
Contact:

Re: Can't get plugwise Stretch plugin to work on Synology

Post by waltervl »

OK. Check the previous comments from the other users about access rights of the plugins/Plugwise folder....
Domoticz running on Udoo X86 (on Ubuntu)
Devices/plugins: ZigbeeforDomoticz (with Xiaomi, Ikea, Tuya devices), Nefit Easy, Midea Airco, Omnik Solar, Goodwe Solar
InControl
Posts: 4
Joined: Monday 02 January 2023 0:31
Target OS: Linux
Domoticz version:
Contact:

Re: Can't get plugwise Stretch plugin to work on Synology

Post by InControl »

Ok

did some check's

First made the userdata accesrights root => this also mentioned in the posts that this does not work

Added a docker user to the filesystem => made this user member of the docker group => set file permissions to Dockeruser => also did not work

What I not do understand is while Domoticz is running in a container, outside the container there is no Domoticz user and group
So how do I set permissions to this user/group?
Do I have to create one at the host machine?
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest