[quote=“MSW, post:11, topic:190405”][quote=“amg0, post:10, topic:190405”][quote=“MSW, post:9, topic:190405”][quote=“amg0, post:8, topic:190405”][quote=“MSW, post:7, topic:190405”]explain precisely :
- what variable value should represent ON or OFF state? On: ‘AutoChangeOver’ Off: ‘Off’
- what is the action to go from ON to OFF state => SetModeTarget Off
- what is the action to go from OFF to ON state => SetModeTarget AutoChangeOver
- if you want the OFF state to appear red or green? Off should be Red (or no color). On should be green.[/quote]
1/ can you share a print screen of your button configuration dialog.
2/ can you place a simple action button for each action (SetModeTarget Off) and (SetModeTarget AutoChangeOver) and play with them ? does it change the device variable ( mode ? )
3/ also
a) try to go in use page mode,
b) open javascript console log ( Ctrl+Shift+J on chrome )
c) press on the on/off button , see what happens
d) press again a few sec later , see what happens
get me your console log messages.
thx[/quote]
Are you certain your code is using the variables passed in to test state and not hard coded “On” and “Off”? I know that you are sending the variables correctly, but the button itself must reflect the state of the device based on the value and perhaps there you hard coded a check with On and Off?[/quote]
there are many years since I gave up in computer science to be certain of anything. and as I age, even less.
But my example that I shared with IPhone does not uses On Off but uses 1 or 0 and the url called when I press the button is correct so that should not be the problem.
http://192.168.1.16/port_3480/data_request?id=action&output_format=json&DeviceNum=94&serviceId=urn:upnp-org:serviceId:IPhoneLocator1&action=SetMute&[glow=red,2,300]newMuteStatus=1[/glow]
but it is a good point to open Chrome Network page and check the url that is called at the time you press the button. it should start with http://<yourip>/port_3480/data_request?id=action&output_format=json&DeviceNum=
[/quote]
A separate button sending Off works fine.
As I suspected, this combo button is only sending:
http://192.168.0.200/port_3480/data_request?id=action&output_format=json&DeviceNum=9&serviceId=urn:upnp-org:serviceId:HVAC_UserOperatingMode1&action=SetModeTarget&NewModeTarget=AutoChangeOver
It never sends Off. The button never changes state to believe it is on. BTW, the console doesn’t record any messages after I clear away all the junk there from loading the page (I included that page load junk below)
Failed to decode downloaded font: https://maxcdn.bootstrapcdn.com/bootswatch/latest/fonts/glyphicons-halflings-regular.woff2
data_request?id=lr_ALTUI_Handler&command=home:1 OTS parsing error: Failed to convert WOFF 2.0 font to SFNT
data_request?id=lr_ALTUI_Handler&command=home:1 Failed to decode downloaded font: https://maxcdn.bootstrapcdn.com/bootswatch/latest/fonts/glyphicons-halflings-regular.woff
data_request?id=lr_ALTUI_Handler&command=home:1 OTS parsing error: incorrect file size in WOFF header
data_request?id=lr_ALTUI_Handler&command=home:1 Failed to decode downloaded font: https://maxcdn.bootstrapcdn.com/bootswatch/latest/fonts/glyphicons-halflings-regular.ttf
data_request?id=lr_ALTUI_Handler&command=home:1 OTS parsing error: incorrect entrySelector for table directory[/quote]
I see. I did not plan for textual values for the variable. I ll have a look.