bumping the logging and help part:
http://forum.micasaverde.com/index.php/topic,16791.msg189860.html#msg189860
Also;
Is it possible to send commands with LUA to the OTG ?
bumping the logging and help part:
http://forum.micasaverde.com/index.php/topic,16791.msg189860.html#msg189860
Also;
Is it possible to send commands with LUA to the OTG ?
Of course.
Of course.[/quote]
examples?
SendCommand(“PR=A”). Response will be in the variable ‘CommandResponse’.
I tried to run the following commands in the “Test Luup Code(LUA)”:
otgWriteCommand(“TT=27”) – found in code
SendCommand(“TT=27”) – you suggested
otgSendCommand(“TT=27”) – found in code
and all returned “Code failed”. ???
Of course. Use call_action. Please read the documentation first.
I read documentation, but not always everything is documented.
I asked for example code and an incomplete example.
In the time i also tried to call the function in his “namespace”, but that also didn’t work.
Here is some info about the call_action extentions from the MCV wiki:
http://wiki.micasaverde.com/index.php/Luup_Lua_extensions#function:_call_action
parameters: service (string), action (string), arguments (table), device (string or number) returns: error (number), error_msg (string), job (number), arguments (table) Invokes the UPnP service + action, passing in the arguments (table of string->string pairs) to the device. If the invocation could not be made, only error will be returned with a value of -1. Otherwise, all 4 values are returned. error is 0 if the UPnP device reported the action was successful. arguments is a table of string->string pairs with the return arguments from the action. If the action is handled asynchronously by a Luup job, then the job number will be returned as a positive integer.
example code:
Example to dim device #5 to 50%: local lul_arguments = {} lul_arguments["newLoadlevelTarget"] = 50 lul_resultcode, lul_resultstring, lul_job, lul_returnarguments = luup.call_action("urn:upnp-org:serviceId:Dimming1", "SetLoadLevelTarget", lul_arguments, 5)
I don’t see how to call SendCommand and pass the parameters with the call_action you suggested.
Recently i bought 2 thermostats;
T8851M1000
TH8110M1003
This to be sure that i can test properly and all OT commands are send properly.
Ik probeer dit aan de gang te krijgen, alleen gaat het een beetje stroef…
Could ANYBODY help and/or answer my stupid questions :-[
I think its not fair to ask somebody to ready to documentation on a subject if the documentation is really poor and only consists of a few text lines and 1 example line.
[quote=“nlrb, post:153, topic:177124”]@gateway mode: check it works with otmonitor. If it works there, it works with the plugin.
@[edit1]: already answered in post #40.
@[edit2]: child devices are not enabled for these messages.
@[edit3]: see above.
@[edit4]: see above.
To enable child device generation for msg 80-83 you need to add 'child = “TEMP” ’ to the otgMessage_t table in the lua file for these messages. I can take that up in a next release.[/quote]
My two Everspring doorsensors are correctly picked up by OTG but my Fibaro and EON doorsensors not (although they are real doorsensors VERA sees them as motion sensors so I guess that is the reason).
It would also be great if another device but an alarm panel can set OTG in ECO mode. For instance I have a virtual switch for away. Could you also please support that as an input?
[quote=“freemann, post:168, topic:177124”]Could ANYBODY help and/or answer my stupid questions :-[
I think its not fair to ask somebody to ready to documentation on a subject if the documentation is really poor and only consists of a few text lines and 1 example line.[/quote]
After trying a SH*T LOAD of option and scanning hundreds of code lines and several hours i finally found out myself how to send custom command in LUA/LUUP… :‘( :’(
Below is an working example line to send custom command through the plugin to the OTG;
luup.call_action("urn:otgw-tclcode-com:serviceId:OpenThermGateway1","SendCommand", {Command="TC=23"},tonumber(127))
This command set the “Temperature, Constant” to 23?C
The Command argument was not given in the previous posts or documented.
I found this argument when i was scanning the code of the plugin files and investigating the HTML source of the plugin container.
So i found that the input textfield for the customcommand is called;
“CustomCommand”
The send button is called;
“Send”
In “S_OpenThermGateway.xml” i found:
<action>
<name>SendCommand</name>
<argumentList>
<argument>
<name>Command</name>
<direction>in</direction>
</argument>
</argumentList>
</action>
Then I assumed that “SendCommand” is the action behind the custom command “Send” button and “Command” is the argument to send to the plugin.
After more search the “Net”, MCV forum and other mysterious site, i combined the found information to the above Luup code.
Hopefully this information helps and can be used by others.
The best to all and please post your question so we can help each other!!
I’ll just keep on trying as there does not seem to be that much activity here.
My issue: I want my vera schedules to be master and my thermostat act as a Slave (so only to change the temp manually now and then). So I have my heating schedules in Vera. This seems to work partly. The issue is, that the thermostat overwrites the schedule periodically (still not sure when).
I have the thermostaat set a a fixed temp. In the thermostaat I have the choice to either have program A, Program B, Night temp, Day temp, Freez temp or vacation.
When I set the temp with Vera I not only set the temp @x but also set it to ‘heat’ as the open therm wiki says " Pressing the ‘Heat’ button will send a ‘TC=’ command, making the current setpoint constant instead of temporary." [url=http://code.mios.com/trac/mios_opentherm-gateway]http://code.mios.com/trac/mios_opentherm-gateway[/url]. OTG is set in Gateway mode.
How do you guys manage this as this seems a common issue?
It depends on your type of thermostat whether it handles the TT and/or TC commands poperly. Check the equipment matrix on otgw.tclcode.com or post a request for help on domoticaforum.eu.
Do you have any plans to make this plugin ui7 compatible?
Sorry for the late reply (I missed the notification). Yes, I did do some updates for that. Check the files in the trunk.
I’m looking to use OTG as a trigger for a scene.
What I would like is that when the CHmode turned on, the floor temperature in my bathroom is checked. When this temp is below a certain threshold, the floor heating pump is turned on.
The problem is that you can’t use OTG for any triggers in the automation menu and that I’m unable to create a separate device just for the CH-mode.
Any ideas?
Regards,
Willem-Bram
Why would you not be able to use the OTG device for triggers?
Just add a trigger, select the OTG device, select ‘central heating goes on or off’ and ‘Device central heating goes on’. This event is tiggered based on the status of StatusCHMode (just like you want)…
You’re right.
I initially used a trigger that was based on the Temperature sensor, then I changed that to the OTG device. When I did this, I could select the OTG device, but it didn’t give me any type of event to choose from. After you’re reply I created a completly new event and the all events became visible.
Thanks!
Sorry for the late reply (I missed the notification). Yes, I did do some updates for that. Check the files in the trunk.[/quote]
How do you update to this version by the trunk files ??
thanks
[quote=“jeroenvtec, post:178, topic:177124”][/quote]
I have the same problem; I can’t get it working on UI7. But I also had the same problem on UI5 (I updated in hope it would work there). But I am never able to input the ip of the otgw.
[quote=“jeroenvtec, post:178, topic:177124”]How do you update to this version by the trunk files ??
thanks[/quote]
Upload them to your Vera. Apps/Develop apps/Luup files/
Check the ‘Reload luup engine’ option and wit until the engine is loaded. After this. Refresh your screen.
The version number of the device should say 1.2
Best Home Automation shopping experience. Shop at Ezlo!
© 2024 Ezlo Innovation, All Rights Reserved. Terms of Use | Privacy Policy | Forum Rules