I am stuck - Multiselector and LUA - parsing variable in URL

Post Reply
DutchHans
Posts: 248
Joined: Friday 03 April 2015 20:44
Target OS: Raspberry Pi
Domoticz version:
Location: Germany (near dutch border)
Contact:

I am stuck - Multiselector and LUA - parsing variable in URL

Post by DutchHans » Wednesday 30 August 2017 11:04

Hello all,
I am trying to add a multiselector with favorite radiochannels.
I can switch an activity on with my Harmony: Amplifier and Satreceiver switch on.

I can select a channel with the API from the sat-receiver

With the multiselector I would like to call the script switch on the harmony activity and than the selected channel.
I think I need to parse a variable (radiochannel) to the script and extract it there to create the API to switch the satreceiver.

Has anyonyone an idea how to achieve this?
Regards, Hans

zicht
Posts: 162
Joined: Sunday 11 May 2014 11:09
Target OS: Windows
Domoticz version: 3.8xxx
Location: NL
Contact:

Re: I am stuck - Multiselector and LUA - parsing variable in URL

Post by zicht » Thursday 31 August 2017 19:57

Hi

Just create the selector switch and do the actions on Lua (leave action empty on the selector switch gui)

Code: Select all

yourvar="radio1blabla"
if devicechanged['selectorswitch']=="Radio 1" then openurl("your url"..yourvar) end
or something like the above (you get the idea)
I have no harmony, but i do the same on enigma.
Rpi & Win x64. Using : cam's,Nest,RFXCom,Kaku,LaCrosse,RFY,IsAlive,Dummy,Wether Underground, standard Lua, Curl on windows,Domoticz Android App & Tasker,

"The only source of knowledge is experience (A.Einstein)"

D3LTA
Posts: 34
Joined: Monday 15 July 2013 2:37
Target OS: Raspberry Pi
Domoticz version: 3.8153
Location: Twente
Contact:

Re: I am stuck - Multiselector and LUA - parsing variable in URL

Post by D3LTA » Saturday 23 September 2017 22:33

i can help you with this one, give me some more info like url and api details

Post Reply

Who is online

Users browsing this forum: No registered users and 2 guests