Using a dimmer to emulate a cover control, isn’t really the nicest way to do so.
You would normally have an up, down (and stop button) and a position slider that moves with the position and can set the position.
But lets first get the emulator working.
-
Release pimatic-raspbee@0.1.6
-
With this error you probably created a variable name in the variablesDevice with a space in it (or other non supported character->see error message)
@pedder said in Release pimatic-raspbee@0.1.6:
To make it maybe a bit more convenient to understand how it works currently, from pimatic’s gui side
The ‘Open+Close’ device switches the ‘Window covering device’ directly to 0 and 100% - that works;
‘Interesting’ is, that if you do the same with the switch of the ‘Window covering device’, you always need to switch twice, before the dimmer slides to 0 or 100%
I tested then with an VariableInputDevice ‘ShutterPercent’ with steps of 25 to get the dimmer, by having the respective variable in the device ($raspbee_l1a73e9557e6ac5552ae871702960c9b13.dimlevel) to 50.
But that fails with an error message, which seems outlining, that something has gone wrong with the format (I tested string, as well as number):
After waiting then until the shutter device (physical switch) resets himself again to stop, or simply pressing stop on it, then both variable devices in the frontend show ‘50’ and the dimmer is in the middle position:
Maybe that helps better for further thoughts
PS. If you need whatever details about the device from the deconz-gui, that’s no problem. I can fetch them.
-
@bertreb said in Release pimatic-raspbee@0.1.6:
I made a small change to test whats going to happen.
If you can update the file raspbee.coffee?Hi again, sorry it became late today:
Tested the new coffee (simply by stopping / exchanging / start pimatic)
But got a ‘bad request’ message when switching from 50 to 100%.
Switching from 50% to 0% works.Log file shows as following:
21:10:15.553 [pimatic-raspbee] debug: new message received 21:10:15.559 [pimatic-raspbee] debug: { attr: 21:10:15.559 [pimatic-raspbee] debug:> { id: '1', 21:10:15.559 [pimatic-raspbee] debug:> lastannounced: null, 21:10:15.559 [pimatic-raspbee] debug:> lastseen: '2021-02-15T20:10Z', 21:10:15.559 [pimatic-raspbee] debug:> manufacturername: 'dresden elektronik', 21:10:15.559 [pimatic-raspbee] debug:> modelid: 'ConBee II', 21:10:15.559 [pimatic-raspbee] debug:> name: 'Configuration tool 1', 21:10:15.559 [pimatic-raspbee] debug:> swversion: null, 21:10:15.559 [pimatic-raspbee] debug:> type: 'Configuration tool', 21:10:15.559 [pimatic-raspbee] debug:> uniqueid: '00:21:2e:ff:ff:06:15:e6-01' }, 21:10:15.559 [pimatic-raspbee] debug:> e: 'changed', 21:10:15.559 [pimatic-raspbee] debug:> id: '1', 21:10:15.559 [pimatic-raspbee] debug:> r: 'lights', 21:10:15.559 [pimatic-raspbee] debug:> t: 'event', 21:10:15.559 [pimatic-raspbee] debug:> uniqueid: '00:21:2e:ff:ff:06:15:e6-01' } 21:10:20.719 [pimatic-raspbee] debug: new message received 21:10:20.723 [pimatic-raspbee] debug: { attr: 21:10:20.723 [pimatic-raspbee] debug:> { id: '3', 21:10:20.723 [pimatic-raspbee] debug:> lastannounced: null, 21:10:20.723 [pimatic-raspbee] debug:> lastseen: '2021-02-15T20:10Z', 21:10:20.723 [pimatic-raspbee] debug:> manufacturername: '_TYZB01_dazsid15', 21:10:20.723 [pimatic-raspbee] debug:> modelid: 'TS0302', 21:10:20.723 [pimatic-raspbee] debug:> name: 'Window covering device 1', 21:10:20.723 [pimatic-raspbee] debug:> powerup: 7, 21:10:20.723 [pimatic-raspbee] debug:> swversion: null, 21:10:20.723 [pimatic-raspbee] debug:> type: 'Window covering device', 21:10:20.723 [pimatic-raspbee] debug:> uniqueid: 'ec:1b:bd:ff:fe:8f:10:92-01' }, 21:10:20.723 [pimatic-raspbee] debug:> e: 'changed', 21:10:20.723 [pimatic-raspbee] debug:> id: '3', 21:10:20.723 [pimatic-raspbee] debug:> r: 'lights', 21:10:20.723 [pimatic-raspbee] debug:> t: 'event', 21:10:20.723 [pimatic-raspbee] debug:> uniqueid: 'ec:1b:bd:ff:fe:8f:10:92-01' } 21:10:53.025 [pimatic-raspbee] debug: New value send to device Window covering device 1 21:10:53.033 [pimatic-raspbee] debug: { on: false } 21:10:53.056 [pimatic-raspbee] debug: new message received 21:10:53.062 [pimatic-raspbee] debug: { e: 'changed', 21:10:53.062 [pimatic-raspbee] debug:> id: '3', 21:10:53.062 [pimatic-raspbee] debug:> r: 'lights', 21:10:53.062 [pimatic-raspbee] debug:> state: 21:10:53.062 [pimatic-raspbee] debug:> { bri: 254, lift: 100, on: true, open: false, reachable: true }, 21:10:53.062 [pimatic-raspbee] debug:> t: 'event', 21:10:53.062 [pimatic-raspbee] debug:> uniqueid: 'ec:1b:bd:ff:fe:8f:10:92-01' } 21:10:53.063 [pimatic-raspbee] debug: Received values: { 21:10:53.063 [pimatic-raspbee] debug:> "id": 3, 21:10:53.063 [pimatic-raspbee] debug:> "type": "event", 21:10:53.063 [pimatic-raspbee] debug:> "event": "changed", 21:10:53.063 [pimatic-raspbee] debug:> "resource": "lights", 21:10:53.063 [pimatic-raspbee] debug:> "state": { 21:10:53.063 [pimatic-raspbee] debug:> "bri": 254, 21:10:53.063 [pimatic-raspbee] debug:> "lift": 100, 21:10:53.063 [pimatic-raspbee] debug:> "on": true, 21:10:53.063 [pimatic-raspbee] debug:> "open": false, 21:10:53.063 [pimatic-raspbee] debug:> "reachable": true 21:10:53.063 [pimatic-raspbee] debug:> }, 21:10:53.063 [pimatic-raspbee] debug:> "uniqueid": "ec:1b:bd:ff:fe:8f:10:92-01" 21:10:53.063 [pimatic-raspbee] debug:>} 21:10:55.867 [pimatic-raspbee] debug: New value send to device Window covering device 1 21:10:55.872 [pimatic-raspbee] debug: { on: false } 21:10:57.659 [pimatic] error: Bad request
-
@bertreb said in Release pimatic-raspbee@0.1.6:
sudo node_modules/pimatic/pimatic.js
OK, that works now!
Did additionally a ‘trick’ with the variablesDevice by using an addtionally defined variable, on which the dimmer-percentage is set, when this variable is changed. That works without errors message now, but only partly - a bit cruical behavior, but it is possible to move the slider of the dimmer.With regard to your statement about (miss-)using a dimmer device here, I’m completely with you.
Having kind of three ‘toggle’ button (down/stop/up), would be sufficient enough for a first version.
Sure a dimmer would be comfortabel, but one can also set half-opened shutter by moving it for a couple of seconds, as I’m currently doing it also with all of my 433Mhz shutters … -
I additionally defined a variable called $shutterstatus (number) which is in- or de-creased by the variables device
Each change of this variable now triggers (by rule) that my shutter device (raspbee_l1a73e9557e6ac5552ae871702960c9b13) is set to the value of $shutterstatus, but the behavior is a bit cruical as that doesn’t always work and also th value is not always taken over to the raspbee device… -
The plugin is sending this command when you move the slider.
With the variablesDevice/rule you created a second way to set the position?That the slider is set to 50% on a stop is just a way to handle the stop command.
Better would be to use the slider to set the cover position (0-100%) and 3 buttons (open, stop, close). The on/off switch is obsolete in that case.
In this scenario the slider can’t be used to show the actual position, because that is different from the slider position. For the actual position a value/attribute in the gui can be used. -
With the variablesDevice/rule you created a second way to set the position?
Yes, that was my idea, as one is not able to position the slider in the gui exactly on 50% at once.
But yes, got your point, that the 50% position is currently not the way as it should be.Having a raspbee shutter device with some more buttons would be much more convenient
-
@bertreb said in Release pimatic-raspbee@0.1.6:
Better would be to use the slider to set the cover position (0-100%) and 3 buttons (open, stop, close). The on/off switch is obsolete in that case.
You mean ‘Better would be to use the slider to set the cover position (0-100%) and 3 buttons (open, stop, close). The on/off switch is obsolete in that case.’ ?
Yes definitely! That way a shutter from my side could be steered in a meaningful manner. -
… ‘see’ you tomorrow and thanks for now
-
You mean which button slides the dimmer to which position?
Open => 100%
Close => 0%
That’s how the physical device buttons trigger the raspbee device.(… and Stop => 50%)
-
Ahh, now got your point.
But I cannot answer, as the device currently is not installed at a real shutter… and that at least also depends on the length of the shutter (window / door)
-
Ok, because that is determining if a slider is usefull.
The alternative is that you calculate the position, based on the time the shutter needs to close/open.
It is possible to measure the time to fully open and then calculate the position.
The time to fully shut/open will be a parameter in the device config. But then it’s useful to have an end or begin stop, to keep calibrated.
If you can find out what your shutter is supporting? -
Sorry, shortly checked if there was some docu, but didn’t find it and if I remember right there was more or less nothing.
It is this one here: http://jinvoosmart.com.cn/zigbee-devices/sm-sw101-cz-curtain-switch.htmlUsing it with timeframes would work for me.
What do you mean with ‘end/begin stop is build-in’?
After staying a while in the open or close position it switches itself back to stop.Additional technical info (deconz-gui) you might find here, as I took care to let it beeing implemented for Deconz usage:
https://github.com/dresden-elektronik/deconz-rest-plugin/issues/2999 -
Your info is about the controller, I was talking about the physical shutter device (the motor, etc).
The end/start switch is something to protect the motor/cover when the cover reaches its end/begin point.