It is possible to get the values from the SolvisRemote by using executeCommandLine that calls a cURL-command:
var results = executeCommandLine("/usr/bin/curl -u user:password --digest -s ip_of_solvisRemote/sc2_val.xml", 500)
You get a large string in the variable results. With the following rule you translate the string to the values of interest from the solvis.
rule "Solvis"
when
Item solvisswitch received update
then
if(solvisswitch.state == ON) {
var results = executeCommandLine("/usr/bin/curl -u user:password --digest -s ip_of_solvisRemote/sc2_val.xml", 500)
solvis_aktuell.sendCommand(results)
solvis_anlagenummer.postUpdate(results.substring(35,37)+results.substring(33,35))
var String temp = ""
if (Integer.parseInt(results.substring(27,29),16)>9) {
temp = Integer.parseInt(results.substring(27,29),16).toString
}
else {
temp = "0" + Integer.parseInt(results.substring(27,29),16).toString
}
if (Integer.parseInt(results.substring(25,27),16)>9) {
temp = Integer.parseInt(results.substring(25,27),16).toString + ":" + temp
}
else {
temp = "0" + Integer.parseInt(results.substring(25,27),16).toString + ":" + temp
}
if (Integer.parseInt(results.substring(23,25),16)>9) {
temp = Integer.parseInt(results.substring(23,25),16).toString + ":" + temp
}
else {
temp = "0" + Integer.parseInt(results.substring(23,25),16).toString + ":" + temp
}
solvis_zeit.postUpdate(temp)
solvis_S1v.postUpdate(Integer.parseInt(results.substring(39,41)+results.substring(37,39),16)/10.floatValue())
solvis_S2v.postUpdate(Integer.parseInt(results.substring(43,45)+results.substring(41,43),16)/10.floatValue())
solvis_S3v.postUpdate(Integer.parseInt(results.substring(47,49)+results.substring(45,47),16)/10.floatValue())
solvis_S4v.postUpdate(Integer.parseInt(results.substring(51,53)+results.substring(49,51),16)/10.floatValue())
solvis_S5v.postUpdate(Integer.parseInt(results.substring(55,57)+results.substring(53,55),16)/10.floatValue())
solvis_S6v.postUpdate(Integer.parseInt(results.substring(59,61)+results.substring(57,59),16)/10.floatValue())
solvis_S7v.postUpdate(Integer.parseInt(results.substring(63,65)+results.substring(61,63),16)/10.floatValue())
solvis_S8v.postUpdate(Integer.parseInt(results.substring(67,69)+results.substring(65,67),16)/10.floatValue())
solvis_S9v.postUpdate(Integer.parseInt(results.substring(71,73)+results.substring(69,71),16)/10.floatValue())
solvis_S10v.postUpdate(Integer.parseInt(results.substring(75,77)+results.substring(73,75),16)/10.floatValue())
solvis_S11v.postUpdate(Integer.parseInt(results.substring(79,81)+results.substring(77,79),16)/10.floatValue())
solvis_S12v.postUpdate(Integer.parseInt(results.substring(83,85)+results.substring(81,83),16)/10.floatValue())
solvis_S18v.postUpdate(Integer.parseInt(results.substring(103,105)+results.substring(101,103),16)/10.floatValue())
solvis_S17v.postUpdate(Integer.parseInt(results.substring(107,109)+results.substring(105,107),16)/10.floatValue())
if (Integer.parseInt(results.substring(141,143),16)==0) {solvis_A1v.sendCommand(OFF)}
else solvis_A1v.sendCommand(ON)
if (Integer.parseInt(results.substring(143,145),16)==0) {solvis_A2v.sendCommand(OFF)}
else solvis_A2v.sendCommand(ON)
if (Integer.parseInt(results.substring(145,147),16)==0) {solvis_A3v.sendCommand(OFF)}
else solvis_A3v.sendCommand(ON)
if (Integer.parseInt(results.substring(149,151),16)==0) {solvis_A5v.sendCommand(OFF)}
else solvis_A5v.sendCommand(ON)
if (Integer.parseInt(results.substring(155,157),16)==0) {solvis_A8v.sendCommand(OFF)}
else solvis_A8v.sendCommand(ON)
if (Integer.parseInt(results.substring(157,159),16)==0) {solvis_A9v.sendCommand(OFF)}
else solvis_A9v.sendCommand(ON)
if (Integer.parseInt(results.substring(163,165),16)==0) {solvis_A12v.sendCommand(OFF)}
else solvis_A12v.sendCommand(ON)
if (Integer.parseInt(results.substring(167,169),16)==0) {solvis_A14v.sendCommand(OFF)}
else solvis_A14v.sendCommand(ON)
solvis_SEv.postUpdate(Integer.parseInt(results.substring(187,189)+results.substring(185,187),16))
solvis_SLv.postUpdate(Integer.parseInt(results.substring(222,224)+results.substring(220,222),16)/10.floatValue())
solvisswitch.sendCommand(OFF)
}
if(solvisswitch.state == OFF) {
// Führe die Anweisung erst aus, wenn die letzte Ausführung vollständig erledigt ist.
}
end
To control the solvis, you had the possibility to call the solvisRemote-URL and simulate the mouse-clicks (as you do it, when you are at keyboard and mouse).
This is a work for the http-binding.
But I don’t know how it ist possible to make a request with the needed authentification “digest”.
Does anyone knows this ?
You can find this solution in the fhem-community-board Ansteuerung SolvisMax/Solvis-Remote
Greetings
Wolfgang