Jump to content

Welcome to Smart Home Forum by FIBARO

Dear Guest,

 

as you can notice parts of Smart Home Forum by FIBARO is not available for you. You have to register in order to view all content and post in our community. Don't worry! Registration is a simple free process that requires minimal information for you to sign up. Become a part of of Smart Home Forum by FIBARO by creating an account.

 

As a member you can:

  •     Start new topics and reply to others
  •     Follow topics and users to get email updates
  •     Get your own profile page and make new friends
  •     Send personal messages
  •     ... and learn a lot about our system!

 

Regards,

Smart Home Forum by FIBARO Team


  • 0

Controlling Domoticz from HC2


Question

Posted

Hi, I'm a new user of HC2 and since I still use some switches controlled with a Rfxtrx433 and Domoticz I'm now trying to create virtual devices in HC2 to control them, but whenever I create a LUA code containing the text "&param" some characters gets deleted and only the character "m" remains, because of this the script don't seem to work

I have only tested this in the newly released version 3.570 so I don't know if this is a new issue or not, or if it's only me having this problem.

Example of the LUA code I use:

Please login or register to see this code.

And this is how the code looks when I have saved it in HC2

Please login or register to see this code.

Edit: I have now gotten the script to work but the code still looks the same after saving so it seems to be more of a cosmetical issue than a real problem

Please login or register to see this image.

/emoticons/default_icon_smile.gif" alt=":-)" />

6 answers to this question

Recommended Posts

  • 0
Posted

Samen problem here...

But it's also not working..

Please login or register to see this image.

/emoticons/default_sad.png" alt=":(" srcset="https://forum.fibaro.com/uploads/emoticons/[email protected] 2x" width="20" height="20" />

I have disabled authentication for the local access.

  • 0
Posted

The problem is that the homecenter interprets the ¶ part of the string as a character entity. If you save it once and leave it alone it works. When you need to edit the url you need to fix the &param part again.

  • 0
Posted

Can somebody export a setup for a on and off setup connected to xid 8 and server 192.168.1.13 8080 because I can't get my to work and what should I us in Fibaro link global or what?

  • 0
Guest Hakanos
Posted

Hi,

I am using this lua in virtual device to control my somfy blinds which is controlled with a rfxcom unit connected with domoticz and it's working great.

Domoticz = Net.FHttp("192.168.2.38",8080)

Domoticz:setBasicAuthentication("username", "password")

response, status, errorCode = Domoticz:GET("/json.htm?type=command&dparam=switchlight&idx=9&switchcmd=Off&level=0")

fibaro:log(response)

fibaro:sleep(3000)

if errorCode == 0

then

fibaro:log(status)

else

fibaro:log(errorCode)

end

  • 0
Posted

I want to control some Nexa Dimmers that i have. I´ve managed to set up Domoticz on a Raspberry Pi, with a Rfxtrx433e

 

The following LUA-code for on and off(change "on" to "off") works great:

Domoticz = Net.FHttp("IP.Raspberry",8080) 

Domoticz:setBasicAuthentication("Usr", "Pwd") 
response, status, errorCode = Domoticz:GET("/json.htm?type=command&dparam=switchlight&idx=12&switchcmd=On&level=1") 
fibaro:log(response) 
fibaro:sleep(3000) 
if errorCode == 0 
then 
fibaro:log(status) 
else 
fibaro:log(errorCode) 
end 
 
Any tip on code to have a slider-button?
  • 0
Posted

Hello, i use this example (in a scene)and i got an error:

 

Domoticz = Net.FHttp("192.168.0.122",8080)  
response, status, errorCode = Domoticz:GET("/json.htm?type=command&dparam=switchlight&idx=8&switchcmd=On&level=1") 
fibaro:log(response) 
fibaro:sleep(3000) 
if errorCode == 0 
then 
fibaro:log(status) 
else 
fibaro:log(errorCode) 
end 

 

 

[DEBUG] 11:44:19: [1;31m2015-10-16 11:44:19.801726 [ fatal] Runtime error: /opt/fibaro/scenes/420.lua:1: attempt to index global 'Net' (a nil value)[0m

 

anyone an idea?

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...