FHEM Forum

FHEM => fhem-users => Thema gestartet von: Guest am 03 August 2012, 22:26:35

Titel: slider with KlikAaanKlikUit dimmer?
Beitrag von: Guest am 03 August 2012, 22:26:35
Originally posted by: <email address deleted>

Hi

For my KlikAanKlikUit dimmer I managed to be able to use the dimmer from
the webpage with
define KaKu_Dim1 TRX_LIGHT AC 010A0B0C01 light
attr KaKu_Dim1 room KaKu
attr KaKu_Dim1 webCmd on:off:level 0:level 2:level 4:level 6:level 8:level
10:level 12:level 15

However I would prefer a slider and not 16 level values. Anybody an idea
how to do that.
The slider example on http://fhem.de/commandref.html didn´t worl for me.

{HT}

--
To unsubscribe from this group, send email to
fhem-users+unsubscribe@googlegroups.com
Titel: Re: slider with KlikAaanKlikUit dimmer?
Beitrag von: rudolfkoenig am 04 August 2012, 08:45:42
                                                   

> However I would prefer a slider and not 16 level values. Anybody an idea
> how to do that.

Up till now slider will only work if the fhem-module itself offers it as such,
this is right now the case with FS20,HM and dummy (the latter with the setCmd
attribute).

The "correct" way for the enduser to modify the module behaviour would be to
add this functionality with eventMap, but eventMap is currently limited as the
separator between the pairs of the elements ist : (colon), the same as used for
specifying slider or list attributes.

It would be possible to extend eventMap to handle this, but right now we have a
feature freeze on global stuff until 5.3 comes out, so please remind me again
after it is out.

Until then you have to change TRX_LIGHT.pm, replace
  my $error = "Unknown command $command, choose one of " .
        join(" ", sort @$rec);
with
  my $l = join(" ", sort @$rec);
  $l =~ s/ level / level:slider,0,1,15 /;
  my $error = "Unknown command $command, choose one of $l";
 
and in the config set
  attr KaKu_Dim1 webCmd level

--
To unsubscribe from this group, send email to
fhem-users+unsubscribe@googlegroups.com
Titel: Re: Re: slider with KlikAaanKlikUit dimmer?
Beitrag von: Guest am 04 August 2012, 14:28:30
Originally posted by: <email address deleted>

Thanx for the answer Rudolf

I tried it. And it works almost :-)
After the patch I don´t have an on/off anymore. And 0 is not the same
as off (at least on KlikAanKlikUit).
When I use
   attr KaKu_Dim1 webCmd on:off:level
level doesn´t work anymore.
Besides on the room page the slider works. On the details page not. Is
that as espected?

I don´f fully understand your ideas behind the patch. Is it a bad idea
to have it permanently inserted in the TRX_light module? It sounds as
a good solution to me. Of course a generic solution would even be
better.

{HT}

--
To unsubscribe from this group, send email to
fhem-users+unsubscribe@googlegroups.com
Titel: Re: Re: slider with KlikAaanKlikUit dimmer?
Beitrag von: Guest am 04 August 2012, 21:15:01
Originally posted by: <email address deleted>

Unfortunately I do not have a device that supports dimming to test with my
RFXtrx433.
The next 7 days I am also on a trip without appropriate internet access to
make changes to my TRX code.

Am Samstag, 4. August 2012 14:28:30 UTC+2 schrieb dudler:
>
> Thanx for the answer Rudolf
>
> I tried it. And it works almost :-)
> After the patch I don´t have an on/off anymore. And 0 is not the same
> as off (at least on KlikAanKlikUit).
>

I can look into this after I am back from my trip.
 

> I don´f fully understand your ideas behind the patch. Is it a bad idea
> to have it permanently inserted in the TRX_light module? It sounds as
> a good solution to me. Of course a generic solution would even be
> better.
>
>
I would not suggest to put the patch permanently into FHEMs SVN without
futher tests and adoptions.
It will be good for you (if it works), but is not a general solution for
all users.

There are several devices supported by RFXtrx433. They do have different
level values.
AC, HomeEasy EU, ANSLUT use level values from 0 to 15. LightwaveRF uses
level from 0 to 31.
There may be other devices in the future with different levels......

Thus before I can put this permanently into 46_TRX_LIGHT.pm I propose to
change the level value to percentage levels: 0% to 100%. These percentage
values could be calculated into the absoule values. This way it will be
indepenend from the RFXtrx433 firmware.

I would suggest that you do further tests in the meantime (before I am back
from my trip) and also give us more information about the on/off issue.

--
To unsubscribe from this group, send email to
fhem-users+unsubscribe@googlegroups.com
Titel: Re: Re: slider with KlikAaanKlikUit dimmer?
Beitrag von: Guest am 06 August 2012, 13:58:11
Originally posted by: <email address deleted>

> Unfortunately I do not have a device that supports dimming to test with my
> RFXtrx433.

I have I am willing to do all the test needed.

> The next 7 days I am also on a trip without appropriate internet access to
> make changes to my TRX code.

No problem at all. I am not in a hurry.

> I can look into this after I am back from my trip.

Nice

>> I don´f fully understand your ideas behind the patch. Is it a bad idea
>> to have it permanently inserted in the TRX_light module? It sounds as
>> a good solution to me. Of course a generic solution would even be
>> better.
>>
>
> I would not suggest to put the patch permanently into FHEMs SVN without
> futher tests and adoptions.

Sure. I was just an option for the situation when it is tested and works fine.

> It will be good for you (if it works), but is not a general solution for all
> users.

ok

> Thus before I can put this permanently into 46_TRX_LIGHT.pm I propose to
> change the level value to percentage levels: 0% to 100%. These percentage
> values could be calculated into the absoule values. This way it will be
> indepenend from the RFXtrx433 firmware.

A percentage will be easier to understand for users I guess so this is
even better, but maybe incompatible with current usage.

> I would suggest that you do further tests in the meantime (before I am back
> from my trip) and also give us more information about the on/off issue.

I will do my best, but if I will be able to find anything.....

{HT}

--
To unsubscribe from this group, send email to
fhem-users+unsubscribe@googlegroups.com
Titel: Re: Re: slider with KlikAaanKlikUit dimmer?
Beitrag von: Guest am 12 August 2012, 16:48:21
Originally posted by: <email address deleted>

Am Samstag, 4. August 2012 14:28:30 UTC+2 schrieb dudler:
>
> I tried it. And it works almost :-)
> After the patch I don´t have an on/off anymore. And 0 is not the same
> as off (at least on KlikAanKlikUit).
> When I use
>    attr KaKu_Dim1 webCmd on:off:level
> level doesn´t work anymore.
>
>
I have looked into this.

When I use
"
attr KaKu_Dim1 webCmd level:on:off
"

everything works as expected. Please try this and tell me.

For an FS20-Device I got the same problem that appeared to you when I have
defined:
"
attr FS20_c7d000 webCmd on:off:dim
"

For me it seems that a slider do only work on webCmd if they are listed as
the first item.


--
To unsubscribe from this group, send email to
fhem-users+unsubscribe@googlegroups.com
Titel: Re: Re: slider with KlikAaanKlikUit dimmer?
Beitrag von: Guest am 12 August 2012, 17:33:48
Originally posted by: <email address deleted>

I have now added a patch for 46_TRX_LIGHT.pm into SVN to add the changes
proposed by Rudi. Should be usable for FHEMs updatefhem tomorrow.

Setting the sliders is done depending on the device-type so that it will be
no problem for later device-types that use different levels. This also
means that I do no have to change the level values to percentage values as
this would be not be compatible with the existing implementation.

--
To unsubscribe from this group, send email to
fhem-users+unsubscribe@googlegroups.com
Titel: Re: Re: slider with KlikAaanKlikUit dimmer?
Beitrag von: Guest am 13 August 2012, 18:28:33
Originally posted by: <email address deleted>

zondag 12 augustus 2012 23:55:30 UTC+2 schreef dudler het volgende:
>
>
> Just an, I think unsolvable, issue. When I switch the light off, it
> sets the level on the webpage to 0. When I switch it on again it
> remains zero until I change the level. The dimmer keeps his history so
> it has a higher level.
> It might be possible/an idea to remember the level set by the FHEM
> software? Not 100 % accurate as it can be changed by a handset too,
> but might be better as setting it to zero.
> i know, 100% acurate can only be done with a device which reports its
> level back
>
> I just found out that the previous level is available in the xmllist so it
must be possible to use it.
 
{HT}

--
To unsubscribe from this group, send email to
fhem-users+unsubscribe@googlegroups.com
Titel: Re: Re: slider with KlikAaanKlikUit dimmer?
Beitrag von: Guest am 13 August 2012, 19:05:53
Originally posted by: <email address deleted>

>>
> I just found out that the previous level is available in the xmllist so it
> must be possible to use it.

But just as long as the light is on :-(. Maybe it is possible to
remember the last setting in the xml??

{HT}

--
To unsubscribe from this group, send email to
fhem-users+unsubscribe@googlegroups.com
Titel: Re: Re: slider with KlikAaanKlikUit dimmer?
Beitrag von: Guest am 13 August 2012, 20:38:13
Originally posted by: <email address deleted>

Am Montag, 13. August 2012 19:05:53 UTC+2 schrieb dudler:
>
> >>
> > I just found out that the previous level is available in the xmllist so
> it
> > must be possible to use it.
>
>
Sorry. I have no idea what to do for this. I am not familiar how FHEMWEB
has implemented this.

--
To unsubscribe from this group, send email to
fhem-users+unsubscribe@googlegroups.com
Titel: Re: Re: slider with KlikAaanKlikUit dimmer?
Beitrag von: Guest am 12 August 2012, 23:55:30
Originally posted by: <email address deleted>

2012/8/12 Willi :

> I have looked into this.
>
> When I use
> "
> attr KaKu_Dim1 webCmd level:on:off
> "
>
> everything works as expected. Please try this and tell me.

It works. Thanx

Just an, I think unsolvable, issue. When I switch the light off, it
sets the level on the webpage to 0. When I switch it on again it
remains zero until I change the level. The dimmer keeps his history so
it has a higher level.
It might be possible/an idea to remember the level set by the FHEM
software? Not 100 % accurate as it can be changed by a handset too,
but might be better as setting it to zero.
i know, 100% acurate can only be done with a device which reports its level back

{HT}

--
To unsubscribe from this group, send email to
fhem-users+unsubscribe@googlegroups.com