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


Recommended Posts

Posted
Just now, AutoFrank said:

 @amurray85

@Jamie mccrostie

 

Great to hear it's to working.

 

PS - will I send on the api call code or are you okay now ?

 

 Im keen to follow up with code and curiour about debug

jamie

Posted

Thanks for following up:

can you confirm the code is all correct?

i think its sending the right command but wouldn't mind someone checking out the debug message and confirming my suspicions as it might be buggy

Posted
1 minute ago, Jamie mccrostie said:

 Im keen to follow up with code and curiour about debug

jamie

@Jamie mccrostie

 

Cool.  I'll send something on later nut itll be a bit rough  ;-)

Posted

Hi @amurray85,

 

Just try this code it should work:

Please login or register to see this code.

You don't need to put complete table when it is sufficient to just change rainDelay in your case. You need to refresh sprinkler panel to see result!

 

Posted
26 minutes ago, amurray85 said:

Thanks for following up:

can you confirm the code is all correct?

i think its sending the right command but wouldn't mind someone checking out the debug message and confirming my suspicions as it might be buggy

 

@amurray85

 

Do you want to send on want you have ?

Posted
11 minutes ago, Sankotronic said:

Hi @amurray85,

 

Just try this code it should work:

Please login or register to see this code.

You don't need to put complete table when it is sufficient to just change rainDelay in your case. You need to refresh sprinkler panel to see result!

 

@Sankotronic you're the man... thanks to everyone for helping out..

 

Love some short and sweet code which is to the point. The above worked a treat. I even used it to adjust the AdjustWater function.

 

I've created a simple block scene to get the the weather status and adjust accordingly.

 

 

Posted
2 minutes ago, amurray85 said:

@Sankotronic you're the man... thanks to everyone for helping out..

 

Love some short and sweet code which is to the point. The above worked a treat. I even used it to adjust the AdjustWater function.

 

I've created a simple block scene to get the the weather status and adjust accordingly.

 

 

 

@amurray85,

 

I'm glad it is working! Enjoy coding! :) 

Posted
19 hours ago, AutoFrank said:

@Jamie mccrostie

 

Cool.  I'll send something on later nut itll be a bit rough  ;-)

 

So the autopsey on this?

Was it just the ip address and port settings that were the issue ?Just trying to turn it into a learning experience.

Posted
59 minutes ago, Jamie mccrostie said:

 

So the autopsey on this?

Was it just the ip address and port settings that were the issue ?Just trying to turn it into a learning experience.

 

Hi @Jamie mccrostie

 

Here is code that works:

Please login or register to see this code.

I changed IP address and port, but it would work with original code and basic authentication. There is something else I have to change that code doesn't break. Can you find it? :) 

 

 

Posted
Just now, Jamie mccrostie said:

@Sankotronic your've changed reference  json to mini_me.

 

 

Correct! This word 'json' is part of the table functions json.decode, json.encode and cannot be used as variable name! Json, jSon can be used since LUA is case sensitive. If it is used in code then you get this error:

Please login or register to see this code.

I recommend to use short names like jT, jW, jL... for tables since to get some data from table can require lot of typing like this example:

Please login or register to see this code.

 

 

 

 

Posted

@Sankotronic Cool, just goes to show you cant believe everything you read on the internet I think amurry89 got this code off vesternet resources site

Posted
1 minute ago, Jamie mccrostie said:

@Sankotronic Cool, just goes to show you cant believe everything you read on the internet I think amurry89 got this code off vesternet resources site

 

That code is copy/pasted from Vesternet site and it actually does what it is made for, it just breaks at the end. So if you don't check debugging window you will not notice this problem.

Posted
2 minutes ago, Sankotronic said:

 

That code is copy/pasted from Vesternet site and it actually does what it is made for, it just breaks at the end. So if you don't check debugging window you will not notice this problem.

But doesnt it break at the important part where its updating panel?

Posted
2 minutes ago, Jamie mccrostie said:

But doesnt it break at the important part where its updating panel?

 

No, it breaks after sprinkler panel is updated so only last two lines to display log and debug info are not executed.

Posted

@Sankotronic Thanks for that, was having trouble getting my head around API's but this little exercise has helped

 Going back to #30 is the new  ip address and port more robust than hc2 ip and 80? Why is it better?

Posted
59 minutes ago, Jamie mccrostie said:

@Sankotronic Thanks for that, was having trouble getting my head around API's but this little exercise has helped

 Going back to #30 is the new  ip address and port more robust than hc2 ip and 80? Why is it better?

 

Hi @Jamie mccrostie,

 

Using localhost (127.0.0.1) is bypassing any local network interface hardware and that is advantage. More about localhost you can find here: 

Please login or register to see this link.

 

Posted
1 minute ago, Sankotronic said:

 

Hi @Jamie mccrostie,

 

Using localhost (127.0.0.1) is bypassing any local network interface hardware and that is advantage. More about localhost you can find here: 

Please login or register to see this link.

 

 

A direct pipe, thanks

Posted
23 hours ago, Jamie mccrostie said:

 

A direct pipe, thanks

Thanks to @Jamie mccrostie and @Sankotronic.. you guys knocked this one out of the park.. like Jamie said - this is a lesson to us all on LUA programming and like all good programmers, take pride in our code and have no bugs ;) 

Join the conversation

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

Guest
Reply to this topic...

×   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...