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

Moderator: leecollings

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

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

Post by DutchHans »

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: 272
Joined: Sunday 11 May 2014 11:09
Target OS: Windows
Domoticz version: 2023.1+
Location: NL
Contact:

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

Post by zicht »

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,RFXCom, LaCrosse, RFY, HuE, google, standard Lua, Tasker, Waze traveltime, NLAlert&grip2+,curtains, vacuum, audioreceiver, smart-heating&cooling + many more (= automate all repetitive simple tasks)
D3LTA
Posts: 24
Joined: Monday 15 July 2013 2:37
Target OS: Raspberry Pi / ODroid
Domoticz version: 3.8153
Location: Twente
Contact:

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

Post by D3LTA »

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 1 guest