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

VD stops work


Question

I got a VD that collects lux for me and put it as global variable, yesterday i received something wrong in the readout as you could see below.
The VD collects data thru json , all code is in mainloop.
When this unexpected answer from the device shows up, the VD stop working, the only way to get it up and running again is to reboot the HC:2, 

is there any other way to get the VD to start again?

 

[DEBUG] 18:03:49: 0.83
[DEBUG] 18:04:49: 0.83
[DEBUG] 18:05:52: 0.83
[ERROR] 18:07:56: line 7: Expected value but found T_END at character 1

 

Code in mainloop

Please login or register to see this code.

 

Link to post
Share on other sites

10 answers to this question

Recommended Posts

  • 0

The topic has been moved from "

Please login or register to see this link.

" to "

Please login or register to see this link.

".

 

Temat został przeniesiony z "

Please login or register to see this link.

" do "

Please login or register to see this link.

".

Link to post
Share on other sites
  • 0

Hi @sonnyboy,

 

My coffee machine VD main loop stopped running recently but there was no any errors in debug window. I just open VD to edit and then pressed save button and it started running again.

Link to post
Share on other sites
  • 0
1 minute ago, sonnyboy said:

@Sankotronic

Thanks for the suggestion, i will trie that if it happens again.

The best would be if it restarted by it self :-)

 

I know that for scenes it is possible to make watchdog that will monitor them and restart if they stop, but for VD main loop I have no clue at the moment how to do it.

Link to post
Share on other sites
  • 0
On 2/27/2017 at 8:11 AM, sonnyboy said:

I got a VD that collects lux for me and put it as global variable, yesterday i received something wrong in the readout as you could see below.
The VD collects data thru json , all code is in mainloop.
When this unexpected answer from the device shows up, the VD stop working, the only way to get it up and running again is to reboot the HC:2, 

is there any other way to get the VD to start again?

 

[DEBUG] 18:03:49: 0.83
[DEBUG] 18:04:49: 0.83
[DEBUG] 18:05:52: 0.83
[ERROR] 18:07:56: line 7: Expected value but found T_END at character 1

 

Code in mainloop

Please login or register to see this code.

 

 

Hi @sonnyboy

 

Would it be possible to validate data/value before storing it in the global variable ?

 

Link to post
Share on other sites
  • 0
40 minutes ago, sonnyboy said:

i use this now for my VD:S

Please login or register to see this link.

 

@sonnyboy,

 

thanks for this link. That is what I meant and I can see there is a way to restart VD main loop using API. Nice!

 

Link to post
Share on other sites
  • 0
On 3/4/2017 at 10:40 AM, Sankotronic said:

Hi @sonnyboy,

 

My coffee machine VD main loop stopped running recently but there was no any errors in debug window. I just open VD to edit and then pressed save button and it started running again.

 

We're 3 years down the road now, on release 4.570, and still this issue has not been fixed by Fibaro. 

I am still using Sankotronic's old tip on a regular basis when my VD derails in a runtime error for no apparent reason. I go in, edit and save. But I should not have to do it at all.

 

 

Link to post
Share on other sites
  • 0

Hi all,

 

Since 4.5xx I don't have anymore problems with VD mail loops stopping. Actually to be more fair and correct, when I had some problems with my home network several VD's that make HTTP calls in main loop I found stopped and without error reported. In general when everything is OK, all my more than 70 VD's are running without any problems.

 

Hi @perjar ,

 

Maybe we can find the reason why you still have problems with VD main loop stop running if you can provide some more details what code is there and if there are any errors in debug windows or they just stop running?

Link to post
Share on other sites
  • 0

Tricky thing this problem.

 

I still have this issue with one of my VDs. There is no error message in the debug window, it just stops executing every now and then.

 

In my case, I can detect that the VD has stopped and can trigger a scene which restarts it. I am using the same prinicple as @sonnyboyuses, adding a line at the end of the LUA code.

 

My code is very simple. It just adds a line with a timestamp at the end so I can trace when it happened:


 

Please login or register to see this code.

 

 

Link to post
Share on other sites

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