lokonli / slide-domoticz Goto Github PK
View Code? Open in Web Editor NEWDomoticz plugin for Slide by Innovation in Motion
License: GNU General Public License v3.0
Domoticz plugin for Slide by Innovation in Motion
License: GNU General Public License v3.0
Looks like the patch didn't work. After having debug on for a couple of days, I noticed the plugin still dies multiple connects even though I check for connecting(). Suspect that multiple parallel requests lead to these multiple connects and they in turn lead to a crash on the next disconnect.
Implemented my own semaphore and testing that now but it depends on how these requests are executed. Will report later.
Done a little digging and found the following:
crash happens when I switch a group of slides together
just before the crash, the connection is disconnected
the plugin then does an onCommand for every slide (6 in my case) leading to 6x slideRequest which calls self.myConn.Connect() 6x (all onCommands are handled in parallel).
All of that seems to be handled fine (6x IIM connected succesfully). Then a few messages received (onMessage with good content) and then a "Disconnect event received" from the plugin framework followed by an onDisconnect called.
Normally, that message is followed straight by an onMessage with a message ("Connection": 'close') but this doesn't happen and domoticz crashes. My suspicion is that the 6 parallel connects mess something up...
Hey Lokonli,
Many thanks for the plugin. I had been watching these guys and now I can finally add them to domoticz -). I have 1 Slide (ordered 4 more) and am on one of the latest domoticz beta's.
I do get a couple of errors in the log:
2019-12-12 13:07:38.276 Error: (Slide): Async Secure Read Exception: 1, stream truncated
(many of these ) and
2019-12-12 13:23:51.733 Error: (Slide) IIM returned a status: 424
(less but also a bunch)
Any idea?
Row 296 the datetime.now() needs a timezone.
I've replaced the entire row with:
diff = self._expiretoken - datetime.now(timezone.utc)
Error in domoticz log is gone!
Cause: missing check for self.connecting() before both self.connect()'s .
Hey lokonli,
I was contacted by the Slide guys the other day where we were discussing all sorts of things. One of them was my wish to not be dependent on external web services and control the slides locally. They mentioned that there is a beta API that allows you to do that over http. They will send me the info.
Would it be an option to build support for that? Supposedly, the interface is quite simple (uses simple http without security which is fine for me as my home network is completely secured)?
Thanks!
H
Old construction was:
% Command
0: Off
1: Set Level
99: Set Level
100: On
New situation is:
% Command
0: Close
1: Set Level
99: Set Level
100: Open
Proposed change in plugin.py to be compatible with old and new situation could be:
Line Code
219: if (Command == 'Off' or Command == 'Close'):
221: if (Command == 'On' or Command == 'Open'):
Since updating to Domoticz version 2022.2 en slide-domoticz 1.01, the open and close status are reversed. The percentage bar is correct. I allready removed and re-added the slide but that did not fix it. Nor stopping and starting domoticz.
I also tried removing the plugin from the plugins folder and instaling it again.
Is there a way to fix this?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.