on off not displaying correctly for readingsProxy

Begonnen von andyclimb, 15 Mai 2017, 22:47:00

Vorheriges Thema - Nächstes Thema

andyclimb

Another question for the FHEM gurus.

I've defined a readings proxy to take the reading from an MQTT_DEVICE and turn it into its own device, only the on, off only displays as a drop down box, not the two buttons it does for everything else. see photos..

The other screen shot shows the standard webcmd that I would like.

any ideas?
AM

andyclimb

any ideas anyone? I'd like readingsProxy to display  a lightbulb with on off commands instead of a dropdown box.  Everything I've tried does not work! 
AM

LuckyDay


andyclimb

Thanks for the reply... unfortunately that does not work.

I've defined a readings proxy for a reading on an MQTT device.  It has 3 switches and I want three separate switches in them for each one.


define proxy_testswitch_stereo readingsProxy mqtt_testswitch:stereo
attr proxy_testswitch_stereo group Multimedia
attr proxy_testswitch_stereo room mqqt


I can get this to work well, by defining a setList as follows

attr proxy_testswitch_stereo setList stereo:on,off


this gives me access to stereo on/off..   see image1

but there is no link. 

if i then specify a webCmd as on:off

I get this error message: Unknown argument on, choose one of stereo:on,off

If I set webcmd to stereo, then I get a dropdown box and not an on:off link.

so what am I missing? 

AM

andyclimb

OK got it to work:)  finally


defmod proxy_testswitch_stereo readingsProxy mqtt_testswitch:stereo
attr proxy_testswitch_stereo group Multimedia
attr proxy_testswitch_stereo room mqqt
attr proxy_testswitch_stereo setFn {($ CMD eq "on")? "stereo on": "stereo off";;}
attr proxy_testswitch_stereo setList on off
attr proxy_testswitch_stereo valueFn stereo
attr proxy_testswitch_stereo webCmd on:off
AM