Hello,
Im running a script wich read's out my yamaha reciever. it update's the switch perfectly. Only when i want to read the status in blocky to make events. ist not doing anything. please help.
Blocky Virtual Text input
Moderator: leecollings
-
- Posts: 14
- Joined: Monday 31 March 2014 16:28
- Target OS: Raspberry Pi / ODroid
- Domoticz version: 2020.2
- Location: (52.557965, 5.914462)
- Contact:
Blocky Virtual Text input
- Attachments
-
- overzicht2.jpg (212.84 KiB) Viewed 1576 times
-
- overzicht.jpg (220.21 KiB) Viewed 1576 times
-
- blocky.jpg (163.02 KiB) Viewed 1576 times
-
- Posts: 81
- Joined: Thursday 10 December 2015 0:21
- Target OS: Raspberry Pi / ODroid
- Domoticz version: 3.4834
- Location: Netherlands
- Contact:
Re: Blocky Virtual Text input
That's because "Radio" is not the state of your switch. It's more something like a property. It's hard for me to give a solution for this right away, but maybe you can get some more info if you look at the properties using /json.htm?type=devices&rid=IDX
Maybe you can add a json command to your script that also updates the state of the switch itself to "Radio"
Maybe you can add a json command to your script that also updates the state of the switch itself to "Radio"
-
- Posts: 14
- Joined: Monday 31 March 2014 16:28
- Target OS: Raspberry Pi / ODroid
- Domoticz version: 2020.2
- Location: (52.557965, 5.914462)
- Contact:
Re: Blocky Virtual Text input
Hello slinkos,
Any idea how to get the data into some useful position?
Any idea how to get the data into some useful position?
Code: Select all
{
"ActTime" : 1508950630,
"ServerTime" : "2017-10-25 18:57:10",
"Sunrise" : "08:21",
"Sunset" : "18:19",
"result" : [
{
"AddjMulti" : 1.0,
"AddjMulti2" : 1.0,
"AddjValue" : 0.0,
"AddjValue2" : 0.0,
"BatteryLevel" : 255,
"CustomImage" : 0,
"Data" : "HDMI1",
"Description" : "",
"Favorite" : 1,
"HardwareID" : 8,
"HardwareName" : "Virtual switch ",
"HardwareType" : "Dummy (Does nothing, use for virtual switches only)",
"HardwareTypeVal" : 15,
"HaveTimeout" : false,
"ID" : "00082124",
"LastUpdate" : "2017-10-25 18:57:06",
"Name" : "Versterker input",
"Notifications" : "false",
"PlanID" : "0",
"PlanIDs" : [ 0 ],
"Protected" : false,
"ShowNotifications" : false,
"SignalLevel" : "-",
"SubType" : "Text",
"Timers" : "false",
"Type" : "General",
"TypeImg" : "text",
"Unit" : 1,
"Used" : 1,
"XOffset" : "0",
"YOffset" : "0",
"idx" : "124"
}
],
"status" : "OK",
"title" : "Devices"
}
-
- Posts: 81
- Joined: Thursday 10 December 2015 0:21
- Target OS: Raspberry Pi / ODroid
- Domoticz version: 3.4834
- Location: Netherlands
- Contact:
Re: Blocky Virtual Text input
Actually I did not look at it good enough. It's not a switch but text utilty as you say in your subject. Maybe we can think of another way to achieve what you want? Do you really need this kind of switch? Maybe you can fill a variable, or use a selector switch or whatever. It all depends on your goal.
-
- Posts: 81
- Joined: Thursday 10 December 2015 0:21
- Target OS: Raspberry Pi / ODroid
- Domoticz version: 3.4834
- Location: Netherlands
- Contact:
Re: Blocky Virtual Text input
So i did some testing myself with virtual text sensor. Blocky doesn't seem to be triggered by a new svalue, but it can be achieved in LUA. Use the following script:
I added a print as you did a Write-Log in your blocky. I also did added a command that switches a Dummy switch to 'On'. That's because I don't know what your goal is in the end. If you need any more help with that let me know.
Code: Select all
commandArray = {}
if (devicechanged['Versterker input']) then
if (otherdevices_svalues['Versterker input'] == 'Radio') then
commandArray['Dummy']='On'
print ("Versterker input");
end
end
return commandArray
Who is online
Users browsing this forum: No registered users and 1 guest