Page 2 of 3
Re: Handling HNAP - DLink DSP-W215 example
Posted: Monday 13 March 2017 11:40
by dramich
Hi, version 6943 - working well - thank You
Re: Handling HNAP - DLink DSP-W215 example
Posted: Thursday 01 June 2017 13:12
by elgiampo
after the last beta upgrade, 3.7602, my DSP W 215 is disappeared from domoticz menu... what's happened?
Re: Handling HNAP - DLink DSP-W215 example
Posted: Thursday 01 June 2017 16:10
by Dnpwwo
As warned, the latest beta broke some plugins. Try upgrading to the new plugin for this device in the examples folder.
If you still have issues, turn on debugging for the plugin and post the log output.
Re: Handling HNAP - DLink DSP-W215 example
Posted: Thursday 08 June 2017 18:09
by dezde29
Hi,
I was using the 1.1 plugin,no problems, then i decided to upgrade domoticz (3.7690 beta) then not be able to communicate with my plugs, now im getting this error :
2017-06-08 18:06:06.243 Error: (Dlink Hallway) 'onHeartbeat' failed 'AttributeError':''module' object has no attribute 'Connect''.
2017-06-08 18:06:06.243 Error: (Dlink Hallway) ----> Line 281 in /home/pi/domoticz/plugins/DSP215/plugin.py, function onHeartbeat
2017-06-08 18:06:06.243 Error: (Dlink Hallway) ----> Line 191 in /home/pi/domoticz/plugins/DSP215/plugin.py, function onHeartbeat
Any idea?
Thanks in advance.
Re: Handling HNAP - DLink DSP-W215 example
Posted: Thursday 08 June 2017 23:33
by Dnpwwo
@dezde29,
As warned, the latest beta broke some plugins. Try upgrading to the new plugin for this device in the examples folder.
If you still have issues, turn on debugging for the plugin and post the log output.
I never heard back from elgiampo so I assume that will fix it
Re: Handling HNAP - DLink DSP-W215 example
Posted: Friday 09 June 2017 18:03
by dezde29
Hello,
Thanks for your quick reply, unfortunatly Im still struggling:
The script is consider by domoticz but still fail to initialize the plugs, here a complete log :
2017-06-09 17:48:16.404 (Dlink Hallway) Plugin is stopping.
2017-06-09 17:48:16.612 (Dlink Hallway) Exiting work loop...
2017-06-09 17:48:16.612 (Dlink Hallway) Stopped.
2017-06-09 17:48:16.710 (Dlink Hallway) Initialized version 1.0.0, author 'Dnpwwo'
2017-06-09 17:48:16.713 (Dlink Hallway) Debug log level set to: 'true'.
2017-06-09 17:48:16.713 (Dlink Hallway) 'HomeFolder':'/home/pi/domoticz/plugins/DSP-W215/'
2017-06-09 17:48:16.713 (Dlink Hallway) 'Name':'Dlink Hallway'
2017-06-09 17:48:16.713 (Dlink Hallway) 'Port':'80'
2017-06-09 17:48:16.713 (Dlink Hallway) 'Version':'1.0.0'
2017-06-09 17:48:16.713 (Dlink Hallway) 'Author':'Dnpwwo'
2017-06-09 17:48:16.713 (Dlink Hallway) 'Mode6':'Debug'
2017-06-09 17:48:16.713 (Dlink Hallway) 'Mode1':'admin'
2017-06-09 17:48:16.713 (Dlink Hallway) 'Key':'DSP-W215'
2017-06-09 17:48:16.713 (Dlink Hallway) 'Address':'192.168.0.14'
2017-06-09 17:48:16.713 (Dlink Hallway) 'HardwareID':'9'
2017-06-09 17:48:16.713 (Dlink Hallway) 'Mode2':'XXX'
2017-06-09 17:48:16.713 (Dlink Hallway) Device count: 3
2017-06-09 17:48:16.713 (Dlink Hallway) Device: 1 - ID: 41, Name: 'Dlink Hallway - Socket', nValue: 1, sValue: '100'
2017-06-09 17:48:16.713 (Dlink Hallway) Device ID: '41'
2017-06-09 17:48:16.713 (Dlink Hallway) Device Name: 'Dlink Hallway - Socket'
2017-06-09 17:48:16.714 (Dlink Hallway) Device nValue: 1
2017-06-09 17:48:16.714 (Dlink Hallway) Device sValue: '100'
2017-06-09 17:48:16.714 (Dlink Hallway) Device LastLevel: 100
2017-06-09 17:48:16.714 (Dlink Hallway) Device: 2 - ID: 42, Name: 'Dlink Hallway - Usage', nValue: 1, sValue: '1.14'
2017-06-09 17:48:16.714 (Dlink Hallway) Device ID: '42'
2017-06-09 17:48:16.714 (Dlink Hallway) Device Name: 'Dlink Hallway - Usage'
2017-06-09 17:48:16.714 (Dlink Hallway) Device nValue: 1
2017-06-09 17:48:16.714 (Dlink Hallway) Device sValue: '1.14'
2017-06-09 17:48:16.714 (Dlink Hallway) Device LastLevel: 0
2017-06-09 17:48:16.714 (Dlink Hallway) Device: 3 - ID: 43, Name: 'Dlink Hallway - Temperature', nValue: 1, sValue: '50'
2017-06-09 17:48:16.714 (Dlink Hallway) Device ID: '43'
2017-06-09 17:48:16.714 (Dlink Hallway) Device Name: 'Dlink Hallway - Temperature'
2017-06-09 17:48:16.714 (Dlink Hallway) Device nValue: 1
2017-06-09 17:48:16.714 (Dlink Hallway) Device sValue: '50'
2017-06-09 17:48:16.714 (Dlink Hallway) Device LastLevel: 0
2017-06-09 17:48:16.714 Error: (Dlink Hallway) 'onStart' failed 'AttributeError':'module 'Domoticz' has no attribute 'Transport''.
2017-06-09 17:48:16.714 Error: (Dlink Hallway) ----> Line 246 in /home/pi/domoticz/plugins/DSP-W215/plugin.py, function onStart
2017-06-09 17:48:16.714 Error: (Dlink Hallway) ----> Line 43 in /home/pi/domoticz/plugins/DSP-W215/plugin.py, function onStart
I've tried different plugins 1 and 1.1, reinstall the server but I dont get it back to work.
If you can think of anything.
Thanks in advance.
Re: Handling HNAP - DLink DSP-W215 example
Posted: Saturday 10 June 2017 0:55
by Dnpwwo
@dezde29,
Thanks for taking the time to post a debug log of what you are seeing, it makes things much easier to troubleshoot.
For some reason you still don't have the new version running which works with the current beta. You could try pulling it directly from
https://github.com/domoticz/domoticz/bl ... SP-W215.py to make sure you have the right one.
To tell the difference, the old one looked like this at around line 43:
Code: Select all
Domoticz.Transport(Transport="TCP/IP", Address=Parameters["Address"], Port=Parameters["Port"])
Domoticz.Protocol("HTTP")
Domoticz.Heartbeat(8)
Domoticz.Connect()
the new one has this:
Code: Select all
self.httpConn = Domoticz.Connection(Name="DLink", Transport="TCP/IP", Protocol="HTTP", Address=Parameters["Address"], Port=Parameters["Port"])
self.httpConn.Connect()
if you put the new version in your directory and name it plugin.py it should work.
Let me know if you still have issues because, although I updated the plugin, I don't have one of these so couldn't test it
Re: Handling HNAP - DLink DSP-W215 example
Posted: Friday 16 June 2017 4:44
by dezde29
Hi,
Thanks for you help, unfortunatly, after replacing the script, the Dlink in the hardware list has disappear.
Hard to get any logs.
Re: Handling HNAP - DLink DSP-W215 example
Posted: Friday 16 June 2017 6:34
by Dnpwwo
@dezde29,
If it is not in the hardware list that normally means that Domoticz can't access it.
If you are sure that you put it in the right directory I would suggest checking the permissions. If you are on Linux you could use a command like
to make sure Domoticz can read and execute the file
Re: Handling HNAP - DLink DSP-W215 example
Posted: Friday 16 June 2017 15:43
by dezde29
root@raspberrypi:/home/pi/domoticz/plugins/DSP-W215# ls -l
total 144
-rwxrwxr-x 1 root root 143678 Jun 16 04:37 plugin.py
root@raspberrypi:/home/pi/domoticz/plugins/DSP-W215# /etc/init.d/domoticz.sh restart
then init 6, no luck, if I put back the previous script, it get back in the list but with the previous errors.
Is there a way to combine the 1.1 and the latest version.
I'll try to get back with more infos, need to remember how to enable the domoticz logs.
Re: Handling HNAP - DLink DSP-W215 example
Posted: Saturday 17 June 2017 21:05
by dezde29
Hi,
I previously made a mistake and did "save as" on the new plug-in link wich didn't copy the script correctly.
Since i made sure to have the right code and rights on the file, i also change my wifi SSID ans reset my plugs but still get this error :
2017-06-16 18:17:22.615 Error: (DSP-W215) failed to load 'plugin.py', Python Path used was '/home/pi/domoticz/plugins/DSP-W215/:/usr/local/lib/python35.zip:/usr/local/lib/python3.5/:/usr/local/lib/python3.5/plat-linux:/usr/local/lib/python3.5/lib-dynload'.
2017-06-16 18:17:22.615 Error: (Dlink Fan) Module Import failed, exception: 'TabError'
2017-06-16 18:17:22.615 Error: (Dlink Fan) Import detail: File: /home/pi/domoticz/plugins/DSP-W215/plugin.py, Line: 1768736992, offset: 32
2017-06-16 18:17:22.615 Error: (Dlink Fan) Error Line ' httpConn = None
'
2017-06-16 18:18:30.306 Error: Dlink Fan hardware (13) thread seems to have ended unexpectedly
Re: Handling HNAP - DLink DSP-W215 example
Posted: Sunday 18 June 2017 4:10
by Dnpwwo
@dezde29,
I have pushed a fix for this which will be merged into the beta channel soon but if you want to fix yours now it is pretty easy:
- Open the plugin.py file and go to line 32.
- Replace the tab character at the start of the line with 4 spaces
That should do it.
Re: Handling HNAP - DLink DSP-W215 example
Posted: Sunday 18 June 2017 13:11
by pawels72
Hello,
I've tried to do that fix but after some minutes domoticz is crashing - example log:
2017-06-18 12:25:29.192 Error: Domoticz received fatal signal 11 !...
2017-06-18 12:25:29.196 Error: /home/pawel/domoticz/domoticz() [0x1cca74]
2017-06-18 12:25:29.197 Error: /home/pawel/domoticz/domoticz(_Z14signal_handleri+0x58) [0x1ccb2c]
2017-06-18 12:25:29.197 Error: /lib/arm-linux-gnueabihf/libc.so.6(+0x25260) [0x76be5260]
removing file plugin.py solving crashing problem. I'm using v3.7976 beta.
Re: Handling HNAP - DLink DSP-W215 example
Posted: Sunday 18 June 2017 16:13
by dezde29
Hello,
After correcting the tab, here is the new log :
2017-06-17 13:26:51.480 Error: (DSP-W215) failed to load 'plugin.py', Python Path used was '/home/pi/domoticz/plugins/DSP-W215/:/usr/local/lib/python35.zip:/usr/local/lib/python3.5/:/usr/local/lib/python3.5/plat-linux:/usr/local/lib/python3.5/lib-dynload'.
2017-06-17 13:26:51.480 Error: (Dlink Fan) Call to import module '' failed, unable to decode exception.
Re: Handling HNAP - DLink DSP-W215 example
Posted: Tuesday 20 June 2017 23:31
by dezde29
@Dnpwwo
A big thanks for your work and perseverance.
Its all back in order with the latest script and beta update 8000.
Thanks again.
Re: Handling HNAP - DLink DSP-W215 example
Posted: Thursday 22 June 2017 22:46
by dezde29
Im sorry, but im back in the dog house. At first the script worked, but after a few minutes the domoticz interface kept going offline, then after copying the script again, i have this:
2017-06-22 22:36:33.669 Error: (DSP-W215) failed to load 'plugin.py', Python Path used was '/home/pi/domoticz/plugins/DSP-W215/:/usr/local/lib/python35.zip:/usr/local/lib/python3.5/:/usr/local/lib/python3.5/plat-linux:/usr/local/lib/python3.5/lib-dynload'.
2017-06-22 22:36:33.669 Error: (Dlink Fan) Module Import failed, exception: 'SyntaxError'
2017-06-22 22:36:33.669 Error: (Dlink Fan) Import detail: File: /home/pi/domoticz/plugins/DSP-W215/plugin.py, Line: 1760650400, offset: 291
2017-06-22 22:36:33.669 Error: (Dlink Fan) Error Line 'return
Re: Handling HNAP - DLink DSP-W215 example
Posted: Saturday 24 June 2017 7:23
by Dnpwwo
@dezde29,
I just copied the file from the examples folder again and it loaded and started. Can you try that one?
@pawels72,
If it crashes after a few minutes, turn debug on for the plugin in the Hardware page than post the log. Just posting the error dosen't help trouble shoot.
Re: Handling HNAP - DLink DSP-W215 example
Posted: Monday 31 July 2017 21:06
by mozo78
New update, new problem.
2017-07-31 21:04:29.607 Error: (Dlink konnektor) 'onMessage' failed 'AttributeError':''dict' object has no attribute 'decode''.
2017-07-31 21:04:29.607 Error: (Dlink konnektor) ----> Line 257 in /home/pi/domoticz/plugins/DSPW215/plugin.py, function onMessage
2017-07-31 21:04:29.607 Error: (Dlink konnektor) ----> Line 82 in /home/pi/domoticz/plugins/DSPW215/plugin.py, function onMessage
Re: Handling HNAP - DLink DSP-W215 example
Posted: Tuesday 08 August 2017 20:06
by tkald
mozo78 wrote:New update, new problem.
2017-07-31 21:04:29.607 Error: (Dlink konnektor) 'onMessage' failed 'AttributeError':''dict' object has no attribute 'decode''.
2017-07-31 21:04:29.607 Error: (Dlink konnektor) ----> Line 257 in /home/pi/domoticz/plugins/DSPW215/plugin.py, function onMessage
2017-07-31 21:04:29.607 Error: (Dlink konnektor) ----> Line 82 in /home/pi/domoticz/plugins/DSPW215/plugin.py, function onMessage
I have the same problem with version 1.2.0
How to temporaly solve it:
line 82: strData = str(Data)
new line under 82: Status = int(Data['Status'])
Everything is temporaly fix! But it works for me
Re: Handling HNAP - DLink DSP-W215 example
Posted: Wednesday 09 August 2017 9:56
by mozo78
tkald wrote:mozo78 wrote:New update, new problem.
2017-07-31 21:04:29.607 Error: (Dlink konnektor) 'onMessage' failed 'AttributeError':''dict' object has no attribute 'decode''.
2017-07-31 21:04:29.607 Error: (Dlink konnektor) ----> Line 257 in /home/pi/domoticz/plugins/DSPW215/plugin.py, function onMessage
2017-07-31 21:04:29.607 Error: (Dlink konnektor) ----> Line 82 in /home/pi/domoticz/plugins/DSPW215/plugin.py, function onMessage
I have the same problem with version 1.2.0
How to temporaly solve it:
line 82: strData = str(Data)
new line under 82: Status = int(Data['Status'])
Everything is temporaly fix! But it works for me
Big THX! It is working now.
A previous version could log the temperature and power consumption as well. Have you got a solution for these values?