FORUM FIBARO
Forum systemu FIBARO

Home Center, software versions - Update 3.571

A.Socha - 2013-11-04, 13:07
Post subject: Update 3.571
WARNING! In case of update from old version, v1.x, after that update all users will be deleted. Admin password will be reset. Also all devices will be automatically reconfigured to work with new system architecture. Reconfiguration progress will be shown in pop-up window.
This update can last longer than previous. If this update lasts longer than 30 minutes, please go to main HC2 address (e.g. 192.168.0.1).
If "System temporarily unavailable" text will appear during update, please wait - you will be redirected to the main page when all services start.

3.571
- Minor bug fixes.

3.570:
- New json library in LUA.
- User icons in remote access.
- Z-Wave bug fixes.
- Fibaro FGFS101 Flood Sensor support.
- Importing devices from other HC2 gateways (gateway connections).
- New virtual devices with support for iPad and Android apps.
- Changes dedicated to iPad v1.1 application and new Android application.
- Support for new Fibaro FGR221 Roller Shutter module.
- Other minor bug fixes.

Bugtracker tickets:
- 0000899: Can't turn off potential fire and freeze notifications
- 0000511: SP814 template (broken)
- 0000142: Everspring ST814
- 0000782: After HC2 restart/upgrade the RGBW module is shown as 'On' in GUI
- 0000882: Virtual Device popup
- 0000890: When setting new value for ID of a slider(not tested for other controls) the old ui.<xxid>.value tag in JSON is not removed

ardillon - 2013-11-04, 13:34

weird ... once installed, I have a dozen of (ghost) unassigned movement sensors that appeared on the interface ... What's going on ? :shock:
JURIS_S - 2013-11-04, 13:49

Now you can see real Z-wave device list what are sometimes added and deleted or not correct added to the system. I think is some improvement for real data execution to optimize system and otimize non existing Device - exclude or delete... Maybe i'm wrong...
A.Socha - 2013-11-04, 13:54

ardillon, after restart is ok? if not please contact with support@fibaro.com or send me remote access for example from teamviever
ardillon - 2013-11-04, 14:14

A.Socha, after restart the unknown unassigned sensors are still here. The IDs of those sensors are IDs of zwave modules I have removed few weeks ago. I'm sending you my HC2 remote access via pm.

EDIT : Issue solved thanks to Fibaro great support ! Thanks A. Socha !

deanrparry - 2013-11-04, 15:35

I see nothing different at all?
A.Socha - 2013-11-04, 15:41

deanrparry, you are waiting for beta 3.572 (all new stuffs are there) 3.571 that is only minor bugs fix before we release new beta
stevenvd - 2013-11-04, 15:57

Any news on when the 3.572 will be released? :D looking forward to it :)
A.Socha - 2013-11-04, 16:02

stevenvd, hard to say, we still testing it
TANE - 2013-11-04, 16:26

also some old removed devices popup again.
After removing them again zwave stack was dead.
After restart all is working again.
Hope this will solve the delays in my network.

A.Socha - 2013-11-04, 16:40

TANE, Zwave is that same like in 3.570
TANE - 2013-11-04, 16:41

Still some delays in my network sometimes no response for few minutes..
How can i solve this problem?

fuuss - 2013-11-04, 16:42

@Socha , is it possible to get in the beta testing Team ?
A.Socha - 2013-11-04, 16:48

TANE, hard to say, try do less traffic in zwave, bigger wake up time, turn off pooling, bigger time to reports

fuuss, we release beta always for everyone when we will check that what we releasing is working and will not destroy your home installation

fuuss - 2013-11-04, 16:54

Ok sounds great :-) thank you
richo - 2013-11-04, 17:08

TANE wrote:
Still some delays in my network sometimes no response for few minutes..


Have you tried restoring the latest backup - it helped in my case to stabilize the system and make it more prompt.

candrea77 - 2013-11-04, 17:43

Hello to all ......

Quote:
3.571
- Minor bug fixes.

3.70:
- New json library in LUA.


In the post 3.70 is an errata and should be 3.570 ?
Or I need to search for the 3.70 update ?

Bye

Shad - 2013-11-04, 17:44

So if I understand, in this update nothing new in interface.
Just update in the backend.

A.Socha - 2013-11-04, 18:46

candrea77, fixed now you got 3.570
Shad, yes

deanrparry - 2013-11-04, 19:14

Sorry but what exactly is 3.571 supposed to fix? I assume another 2 months before 3.752 now!
petergebruers - 2013-11-04, 20:38

Running 3.571 for a few hours now. So far, so good.
candrea77 - 2013-11-04, 21:05

Is 3.571 supposed to fix the problem with the inclusion of DSA22 ? I don't want to spend time to retry the inclusion of this device : can you confirm that this fix is for that ......
A.Socha - 2013-11-04, 21:28

candrea77, nope - zwave is that same like in 3.570
TANE - 2013-11-04, 22:34

richo wrote:
TANE wrote:
Still some delays in my network sometimes no response for few minutes..


Have you tried restoring the latest backup - it helped in my case to stabilize the system and make it more prompt.


Andrew found the problem...
To bad no direct solution for my problem...I have exclude some devices...:(

cedriclocqueneu - 2013-11-05, 09:41

I can't always include my EZmotion :( I can exclude them, but i can't include them, nothing appends in the log.
TANE - 2013-11-05, 09:46

cedriclocqueneu wrote:
I can't always include my EZmotion :( I can exclude them, but i can't include them, nothing appends in the log.



for including ezmotion you have to push the blue button only once.
triple push will rest the zwave chip in the ezmotion

Only the Pir will work with firmware >3.3

fuuss - 2013-11-05, 10:50

Works great for me
kiwi - 2013-11-05, 15:32

Works great for me :)
Krikroff - 2013-11-06, 11:33

Net.FHttp seems not to be very stable, i had the same problems with the beta version and not with 3.570 stable. The problem is reintroduced with 3.571 :-( .

Otherwize works great for me :-D

A.Socha - 2013-11-06, 11:51

Krikroff, 3.562 beta === 3.570 and 3.570 = 3.571 for Net.FHttp
Krikroff - 2013-11-06, 12:10

A.Socha, very strange, fhttp problems with 3.570 beta, works very well with 3.570 stable, problems with 3.571 ;-) I have a ghost in my box :mrgreen:
TANE - 2013-11-07, 22:28

richo wrote:
TANE wrote:
Still some delays in my network sometimes no response for few minutes..


Have you tried restoring the latest backup - it helped in my case to stabilize the system and make it more prompt.


After making a new backup an restoring it back looks like my systeem is also running a bit more stabile.
Still getting some errors that some devices are not found.


@Richo thanks for the tips

@Andrew can a backup/restore clean the system?

A.Socha - 2013-11-07, 22:50

TANE, Nope that will only reset all wakeup in system
Fade2Gray - 2013-11-11, 09:29
Post subject: Obtaining the 3.571 update
Hi,
Could someone please advise as to where l could obtain the 3.571 software update for my new HC2 controller?

I thought there might have been an attachment to download but l couldn't see it.

Thanks in advance

Shad - 2013-11-11, 09:33

Just go in setup panel.
Fade2Gray - 2013-11-11, 09:59

Shad wrote:
Just go in setup panel.


Ahh urr you mean in the HC2 controller? - I can only see the Configuration panel which doesn't have any about software updates. Can you please send me a screen-shot showing what you are describing.

Thanks

Krikroff - 2013-11-11, 10:20

Fade2Gray, Shad's right: go to "Home Center Configuration" in "General Information" tab at the bottom of the page you must see the update... If not, try to force the update but (make a manual backup before ;-) )...
Fade2Gray - 2013-11-11, 15:36

Krikroff wrote:
Fade2Gray, Shad's right: go to "Home Center Configuration" in "General Information" tab at the bottom of the page you must see the update... If not, try to force the update but (make a manual backup before ;-) )...


I have gone into these settings and the update is not displaying. I also noticed that the internet blue led is (third led) is not lit. This is odd as l am connected onto my network which has internet at each data point around the home.

I've tried swapping DHCP to Static IP address but this had not made any different. I've tried removing the gateway and dns address but it would not save the configuration unless all IP addressing is present. I've also other non-used static ip addresses.

I think once the 3 led (internet) is lit then l suspect l will then see the missing Update option.

I'm out of ideas on getting the internet led to light up.

Shad - 2013-11-11, 16:11

check your firewall. May be it block your HC2.
Fade2Gray - 2013-11-12, 00:39

Shad wrote:
check your firewall. May be it block your HC2.


I've plugged the HC2 directly into the ISP Cable Modem bypassing the PC firwall and the internet blue led is still not displaying.. very frustrating grrr

Shad - 2013-11-12, 00:53

When I say firewall, I was speaking about firewall of your Modem.

[ Added: 2013-11-12, 21:04 ]
Happy birthday fibaro https://www.facebook.com/fibaro.global

Maybe update surprise today ^^

maxxar - 2013-11-12, 22:41

Fade2Gray wrote:
Krikroff wrote:
Fade2Gray, Shad's right: go to "Home Center Configuration" in "General Information" tab at the bottom of the page you must see the update... If not, try to force the update but (make a manual backup before ;-) )...


I have gone into these settings and the update is not displaying. I also noticed that the internet blue led is (third led) is not lit. This is odd as l am connected onto my network which has internet at each data point around the home.

I've tried swapping DHCP to Static IP address but this had not made any different. I've tried removing the gateway and dns address but it would not save the configuration unless all IP addressing is present. I've also other non-used static ip addresses.

I think once the 3 led (internet) is lit then l suspect l will then see the missing Update option.

I'm out of ideas on getting the internet led to light up.


I had similar problems earlier, in my case the problem was that hc2 could not ping out thru firewall to internet.
It was solved just to allow it in my firewall.

But it sounds like it's something else in your case...

Fade2Gray - 2013-11-13, 01:23

Hi everyone,

I have solved the problem by adding 8.8.8.8 into the DNS field within the HC2 LAN configuration screen. This then lit up the internet led and then the updates led lit which then allowd me to view the update screen and continue with the update process.

HC2 picked up the DNS from my IPS provided router, my supplier requested l change the DNS to 8.8.8.8 which has fixed the problem

Thanks everyone for your replies.

lolomail - 2013-11-13, 20:23

I did the update to 3.571 and I lost all my backup, I'm also not able to perform a backup, any idea from where this is coming?

Thx

wasil - 2013-11-13, 23:17

lolomail wrote:
I did the update to 3.571 and I lost all my backup, I'm also not able to perform a backup, any idea from where this is coming?

Thx


From which version have You made update?

lolomail - 2013-11-14, 07:01

From version 3.570.
The iPad app is answerin really slow when I move from a room to another one or when I come back to main screen. That with version 3.570 and 3.571 :-( .

piotr.janiak - 2013-11-14, 10:46

I have the same problem with aplication. I was record a movie and send to support but not answer.
Shad - 2013-11-14, 13:40

Would be great in the Tab device for the column room ID to have exemple:
Bathroom (0)
bedroom (1).

Not easy to remember all the ID ^^

[ Added: 2013-11-14, 16:22 ]
Does some people have problem with stability of HC2 because I must reboot it almost everyday or two since this version.

Does I am alone ????

lolomail - 2013-11-15, 06:34

The inclusion of new module also is more difficult, for wallplu installation process was not fully done by add module, I closed the windows and afer I saw "module not configured" it was needed to turn on / off the wallplug in order to complete the configuration. Will see if Fibato technician will find something through the teamviewer session.
hvb83 - 2013-11-15, 07:26

On mine it is working ok Shad. Dead nodes every now and then, but I have a script that one of the people on this forum provided to correct that.

Which of course makes it even more annoying for you, since it usually takes manufacturers longer to solve individual errors...

robmac - 2013-11-15, 18:39

Shad wrote:
Would be great in the Tab device for the column room ID to have exemple:
Bathroom (0)
bedroom (1).

Not easy to remember all the ID ^^

[ Added: 2013-11-14, 16:22 ]
Does some people have problem with stability of HC2 because I must reboot it almost everyday or two since this version.

Does I am alone ????


Not alone but that does not make it better either. :-?

Lauri - 2013-11-15, 18:53

If you have stability issues, then I am 99% sure, that this is something to do with your devices and their settings or scenes/virtiual devices that you have created.

I have a customer who has random HC2 freez issues, and when I installed brand new HC2 then it made same thing. This means problem is not with HC2 but instead there is something wrong with settings.

Shad - do you use danfoss thermostats? What is wake up interval there? Do you use polling time? Have you some devices which needs reconfiguring ( blue text below device)?

robmac - 2013-11-15, 20:04

Lauri wrote:
If you have stability issues, then I am 99% sure, that this is something to do with your devices and their settings or scenes/virtiual devices that you have created.

I have a customer who has random HC2 freez issues, and when I installed brand new HC2 then it made same thing. This means problem is not with HC2 but instead there is something wrong with settings.

Shad - do you use danfoss thermostats? What is wake up interval there? Do you use polling time? Have you some devices which needs reconfiguring ( blue text below device)?


In my case I would agree if issue was not confirmed by Fibaro and all devices work perfectly most of the time.

The state is transient, 1 to 3 mins long, during that time incoming z-wave reports are logged by HC2 so the z-wave network is working but all outgoing requests are queued in HC2.

You can even switch one of the units that refuses to respond to HC2 and HC2 logs the state change message while still refusing to control the same device.

Then with no reason most of the events emerge in a rush.

I have no code in main loops and have seen the issue with no scenes running.

Andrew confirmed he has also seen the same on his HC2 but reproducing and tracking is very hard so no fix date yet.

http://bugzilla.fibaro.com/view.php?id=790

One thing I have noticed is that if you have a lot of scenes running or many main loops the occurrence increases.

I only have one scheduler scene that sleeps most of the day, some simple scenes that respond to global and device value changes so run occasionally and some occasional api calls from other systems.

No polling and do not mark nodes as dead on.

all very simple... and back in June it was all working very well.

Shad has been around this forum a while and I am sure he has a good configuration also so would suspect many more have the issue but just don't notice due to the intermittent nature or the different way they use.

Kuuno - 2013-11-15, 21:36

Swapping hc2 has nothing to do here. It is 100% software related which leaves it to hc2 software or custom written lua solutions...
Shad - 2013-11-15, 21:42

So all my device is ok. My polling device is 300 (I have 45 devices) and I don't have danfoss.

All scene and everything work perfectly, but I don't why, sometines after some hours or 2 days, the web interface not respond you can do what you want clic on for light nothing working. So the day ok I reboot, but 2 days ago I didn't listen the alarm clock, and the blind stay shut down, light stay off nothing happen, so I wake up at 9h.

Also I put fibaro's system in my first customer who is my best friend. So that was working perfectly with 3.570. When I put this firmware and the first roller blind, the HC2 freeze 2 days after and no problem for 3 weeks before.

So now I want to try to find why.


I want to know if a scene which it have a bad code can do that, but for than fibaro must check for a good debugging system. Next time that happen, I will check in file log if I have something.

Edit: maybe fibaro must choice some good users who know very well the system and linux, give acces to people not have it and work with them to have many system in production and find much easier this strange bug.

robmac - 2013-11-15, 21:53

Kuuno wrote:
Swapping hc2 has nothing to do here. It is 100% software related which leaves it to hc2 software or custom written lua solutions...


I think Fibaro have agreed they have an issue just can't find the cause of it.

lolomail - 2013-11-15, 22:43

Good news with a teamviewer session, Fibaro support sloved all my problems (iPad slow reaction, backup not working) thx a lot to them :-D
Krikroff - 2013-11-15, 23:57

Shad, I had exactly the same problems before 3.570, a problem with my RGBW device ... 3.570 worked very well for me but I noticed some strange things with 3.571 :-? : dead nodes, Http request failure... (i have added some workarounds and now all work well)
kiwi - 2013-11-16, 18:53

Krikroff wrote:
(...) but I noticed some strange things with 3.571 :-?

I have found some strange things ont 3.571 too.

One of them is a Fibaro Dimmer association that stopped to work...

Krikroff - 2013-11-17, 19:35

Today my HC2 has freezed during i was playing with iPad and RGBW, another time yet :!: Only one way: REBOOT :-|
robmac - 2013-11-17, 21:04

Krikroff wrote:
Today my HC2 has freezed during i was playing with iPad and RGBW, another time yet :!: Only one way: REBOOT :-|


Fancy contributing to a thread to record what was in use when the issue occurs ?

Try to see if there is anything common to help Fibaro pinpoint the issue/issues.

Krikroff - 2013-11-17, 21:15

robmac wrote:
Fancy contributing to a thread to record what was in use when the issue occurs ?
I already opened a ticket on bugzilla for it, but yes...

For me always the same scheme: i play with color wheel on my ipad to change my RGBW color, and after my HC2 freeze :roll:

lolomail - 2013-11-24, 08:54

Again I'm not able to perform backup of my HC2 only one week after support intervention.
Additionnaly Z-wave communication is like "freeze" during 2-3min. If I restart my HC2, after the startup z-wave led is not flashing to is like the 3 other for 2-3 min :-?

[ Added: 2013-11-24, 08:56 ]
Additionnal info: yesterday I added a virtual device which show me the status of various variable trough label and LUA codes which check the status of the variable

robmac - 2013-11-24, 09:20

lolomail wrote:
Again I'm not able to perform backup of my HC2 only one week after support intervention.
Additionnaly Z-wave communication is like "freeze" during 2-3min. If I restart my HC2, after the startup z-wave led is not flashing to is like the 3 other for 2-3 min :-?

[ Added: 2013-11-24, 08:56 ]
Additionnal info: yesterday I added a virtual device which show me the status of various variable trough label and LUA codes which check the status of the variable


I noticed a while back that if you put code in main loops that updates labels in a virtual device it stops the backups working.

Suggest remove main loop code and try backup.

lolomail - 2013-11-24, 09:26

Thx for the tip, will try that now and will keep you posted.
If this is that, it's sad b/c it's a nice feature :roll:
Do you think this can explain also my issue with z-wave LED?

Lauri - 2013-11-24, 09:51

How many back-ups do you have? It might be that the disk is full - delete previous version backups as they are never needed and then try again.
lolomail - 2013-11-24, 09:54

Robmac you are right, all my issue came from main loop code :evil:

Now I have removed all codes in main loop of 2-3 virtuals devices and the result is:
- Backup work properly,
- Z-wave LED don't stays on for 2-3 minutes,

I will update the ticket that I open on bugzilla

[ Added: 2013-11-24, 09:55 ]
Lauri wrote:
How many back-ups do you have? It might be that the disk is full - delete previous version backups as they are never needed and then try again.
Last week I lost all my backup with update to V3.571 :evil: , now with the backup that I did few min before I have only 3 backups
kiwi - 2013-11-24, 10:12

lolomail wrote:
Robmac you are right, all my issue came from main loop code :evil:
(...)


On the main loop did you forget to add something like
Code:

fibaro:sleep(5*1000)


If you didn't, you should add it, otherwise you will kill the CPU of HC2.

lolomail - 2013-11-24, 10:17

kiwi wrote:
On the main loop did you forget to add something like
Code:

fibaro:sleep(5*1000)


If you didn't, you should add it, otherwise you will kill the CPU of HC2.
I didn't, does this will solve the issue? The main loop is not run every second?
Shad - 2013-11-24, 10:53

If you don't put a sleep, code will run all time.
robmac - 2013-11-24, 11:47

lolomail wrote:
kiwi wrote:
On the main loop did you forget to add something like
Code:

fibaro:sleep(5*1000)


If you didn't, you should add it, otherwise you will kill the CPU of HC2.
I didn't, does this will solve the issue? The main loop is not run every second?


As to the sleep it alleviates the problem so do it or remove some of the main loops. If you are updating labels in the loop you may still get the backup issue occasionally. I would guess backup can't lock database?

CPU?? try running TOP through SSH-- the CPU on HC2 is never under stress :-/ loads of power available that is never used. HC2 is a great bit of kit with more than enough power for home automation.

Currently put enough main loops in and you are back in the mess but CPU is still not very busy.

Sleep gets you going but not exactly useful if you need good timing in the code as now it is a bit random. I do not use them as the only use I have for main loop is time critical.


The 3 s delay is totally separate as I use no main loops and I know it is there.

I know the following:

It is influenced badly by poling and the frequency of reporting of thermometers or power etc. Reduce polling frequency (increase setting) and reduce reporting frequency helps.

It is always there even when no scenes running but at times only shows as a temporary slowdown.

As you increase poling frequency or reports from sensors it becomes more often and pronounced eventually showing as temporary blocks with lost events.

CPU is not busy when blocked and inbound reports are still logged to event panel.

When the block clears most events come through but not all. A couple go missing.

If you update a lot of sleeping devices at the same time the slow downs are more pronounced. Increase sleep time helps hide the problem.

If you have a system with only a few sensors I doubt you would see it unless you have some very busy code or very chatty sensors. My system with over 80 devices and power and temperature sensors and a lot of sleeping sensors seems to be more sensitive than some others.

If you want to test this increase the reporting interval on power and temperature sensors and make your sleeping devices busy.

Mine got a lot more sensitive to the issue when the battery check functionality was introduced. This is when I noticed the issue again having had what I thought was a good system for a few months.

If you want to help pinpoint the root cause I am going to build an analytics database of any data dumped using the HC2 toolkit so we can understand more about the issue.

Volunteers welcome.

Shad - 2013-11-24, 12:44

robmac,

Sorry, but you are wrong. Some month ago, fibaro found a bug on my box and make a release the same night.

I didn't put a fibaro:sleep at the end. So the scene turn around and use ALL my CPU. We can do nothing except kill process. Reboot do nothing because scene start again. They add the option to kill scene for debug after that.

lolomail - 2013-11-24, 13:07

Ok will try to add sleep and will let you know the result

[ Added: 2013-11-24, 14:05 ]
I did the check, I setup again my virtual device and at the end I added
Code:
fibaro:sleep(600*1000)
end


The result is the same, backup function not working at all, as soon as I remove code from main loop backup work again.

My last code look like:
Code:
--[[
%% properties
%% globals
--]]

--Vérification Statut Protection Jardin--
if (fibaro:getGlobalValue("Jardin_Neutralisat") == "Oui")
then
fibaro:call(138, "setProperty", "ui.Label6.value", "Neutralisée");
end

if (fibaro:getGlobalValue("Jardin_Neutralisat") == "Non")
then
fibaro:call(138, "setProperty", "ui.Label6.value", "Engagée");
end

--Vérification Statut Videos--
if (tonumber(fibaro:getGlobalValue("Videos")) == tonumber("1") )
then
fibaro:call(138, "setProperty", "ui.Label7.value", "Armées");
end

if (tonumber(fibaro:getGlobalValue("Videos")) == tonumber("0") )
then
fibaro:call(138, "setProperty", "ui.Label7.value", "Desarmées");
end

--Vérification Statut Volets--
if (
 ( tonumber(fibaro:getValue(78, "value")) > 0 )
or
 ( tonumber(fibaro:getValue(80, "value")) > 0 )
or
 ( tonumber(fibaro:getValue(83, "value")) > 0 )
or
 ( tonumber(fibaro:getValue(82, "value")) > 0 )
or
 ( tonumber(fibaro:getValue(120, "value")) > 0 )
)
then
fibaro:call(138, "setProperty", "ui.Label8.value", "Ouverts");
end

if (
 ( tonumber(fibaro:getValue(78, "value")) == 0 )
and
 ( tonumber(fibaro:getValue(80, "value")) == 0 )
and
 ( tonumber(fibaro:getValue(83, "value")) == 0 )
and
 ( tonumber(fibaro:getValue(82, "value")) == 0 )
and
 ( tonumber(fibaro:getValue(120, "value")) == 0 )
)
then
fibaro:call(138, "setProperty", "ui.Label8.value", "Fermés");
fibaro:sleep(600*1000)
end


Did I make a mistake in the code?

If not there is an issue with mainloop functionnality.

richo - 2013-11-24, 14:12

lolomail wrote:
The result is the same, backup function not working at all, as soon as I remove code from main loop backup work again.


fibaro:sleep is in the wrong place, put it as the last line in the loop behind the end.

Anyway, the main loop is very dangerous to use and I used to have problems with backup when I was using it as well. I have decided not to use main loop just lua code in the button windows and use scenes instead of main loop.

lolomail - 2013-11-24, 14:20

richo wrote:
Anyway, the main loop is very dangerous to use and I used to have problems with backup when I was using it as well. I have decided not to use main loop just lua code in the button windows and use scenes instead of main loop.
I was thinking exactly the same and so create a scne just to update label of my virtual device.

richo wrote:
fibaro:sleep is in the wrong place, put it as the last line in the loop behind the end.

So the correct code will be?:
Code:
--[[
%% properties
%% globals
--]]

--Vérification Statut Protection Jardin--
if (fibaro:getGlobalValue("Jardin_Neutralisat") == "Oui")
then
fibaro:call(138, "setProperty", "ui.Label6.value", "Neutralisée");
end

if (fibaro:getGlobalValue("Jardin_Neutralisat") == "Non")
then
fibaro:call(138, "setProperty", "ui.Label6.value", "Engagée");
end

--Vérification Statut Videos--
if (tonumber(fibaro:getGlobalValue("Videos")) == tonumber("1") )
then
fibaro:call(138, "setProperty", "ui.Label7.value", "Armées");
end

if (tonumber(fibaro:getGlobalValue("Videos")) == tonumber("0") )
then
fibaro:call(138, "setProperty", "ui.Label7.value", "Desarmées");
end

--Vérification Statut Volets--
if (
 ( tonumber(fibaro:getValue(78, "value")) > 0 )
or
 ( tonumber(fibaro:getValue(80, "value")) > 0 )
or
 ( tonumber(fibaro:getValue(83, "value")) > 0 )
or
 ( tonumber(fibaro:getValue(82, "value")) > 0 )
or
 ( tonumber(fibaro:getValue(120, "value")) > 0 )
)
then
fibaro:call(138, "setProperty", "ui.Label8.value", "Ouverts");
end

if (
 ( tonumber(fibaro:getValue(78, "value")) == 0 )
and
 ( tonumber(fibaro:getValue(80, "value")) == 0 )
and
 ( tonumber(fibaro:getValue(83, "value")) == 0 )
and
 ( tonumber(fibaro:getValue(82, "value")) == 0 )
and
 ( tonumber(fibaro:getValue(120, "value")) == 0 )
)
then
fibaro:call(138, "setProperty", "ui.Label8.value", "Fermés");
end
fibaro:sleep(600*1000)

richo - 2013-11-24, 14:20

robmac,

I agree with you 100% as have very similar observations. i.ex. have decided to remove polling of Danfoss at all - it helped a bit with dead devices but not to much. On the other hand it is saving Danfoss batteries!

I hope Fibaro will realese some z-wave analysis tool otherwise we are like blind people unless of course you jailbreak your HC - still don't get all the answers anyway.

robmac - 2013-11-24, 15:31

Shad wrote:
robmac,

Sorry, but you are wrong. Some month ago, fibaro found a bug on my box and make a release the same night.

I didn't put a fibaro:sleep at the end. So the scene turn around and use ALL my CPU. We can do nothing except kill process. Reboot do nothing because scene start again. They add the option to kill scene for debug after that.


In a scene, yes you can achieve with bad code that runs a while loop constantly and kills cpu.


I don't think this is what we have here though so I stand by what I have said. I tend not to write bad code... often scruffy because I am lazy but never bad.

The main loop runs every second so a bit different to a while loop with no sleep. A while loop unconstrained by sleep or slow synchronous actions will run many thousands of times a second and absorb CPU. As most calls to fibaro api are async, a while loop with no sleep will kill cpu.

Shad - 2013-11-24, 18:47

Ok didn't check with that about main loop. I didn't know the main loop run every second.
Krikroff - 2013-11-24, 19:36

Hi everyone, i do not know if this is the fault of "virtual devices".

I just made a backup, i have more than 20 on the usb key and no problems. I have 18 virtual device including some with more than 1500 lines of code in main loop. I think the problem is something else! :-/

robmac - 2013-11-24, 21:05

Krikroff wrote:
Hi everyone, i do not know if this is the fault of "virtual devices".

I just made a backup, i have more than 20 on the usb key and no problems. I have 18 virtual device including some with more than 1500 lines of code in main loop. I think the problem is something else! :-/


Do your main loops change the values of labels and sliders and nothing else?

This is when I find backup issues. If no other code to slow execution like external synchronous calls to other systems. Just update labels with small sleep setting or even worse every second.


Could you try with a main loop like that?
Code:

timer =  timer  or 1

time = os.date("%S")

fibaro:call(269,"setProperty","ui.Label1.value", timer)


fibaro:call(269,"setProperty","ui.Label2.value", time)


fibaro:call(269,"setProperty","ui.Label3.value", timer)

timer = timer + 1

fibaro:debug(timer)

--with no sleep backup fails

-- regular fail
--fibaro:sleep(1000 * 5)

-- sometimes fails with 10 s
--fibaro:sleep(1000 * 10)

-- almost always works if sleep 20
--fibaro:sleep(1000 * 20)

Krikroff - 2013-11-24, 22:30

robmac wrote:
Do your main loops change the values of labels and sliders and nothing else?
yes ;-)

Here are two advanced example:

1- A control panel ...

Code:
local _maxRetryProcess = 5;

-- update Mode label
local mode = fibaro:getGlobalValue("Calendrier");
fibaro:call(362, "setProperty", "ui.lblCalandar.value", mode);

-- update Public IP label
httpClient = Net.FHttp("checkip.dyndns.com");

-- recursive function to ping device
function checkIP(retry)
  retry = retry or 0;
  -- call domaine to check
  response, status, errorCode = httpClient:GET("/");
  -- check for error
  if errorCode == 0 then
    -- Internet connection is alive :-)
    fibaro:setGlobal("NetworkStatus", 1);
    if tonumber(status) == 200 then
      local ip = response:match("(%d%d?%d?.%d%d?%d?.%d%d?%d?.%d%d?%d?)");
      fibaro:call(362, "setProperty", "ui.lblPublicIP.value", ip);
    else
      fibaro:call(362, "setProperty", "ui.lblPublicIP.value", "Error!");
    end
  else
    if retry < _maxRetryProcess then
      fibaro:debug("Retry #"..retry.."process, please wait...");
      --[[fibaro:call(2, "sendEmail",
      "Check Network Status failed !",
      "Unable to check network status, retry #"..retry.."process.");]]--
      fibaro:sleep(1000);
      return checkIP(tonumber(retry+1));
    end
    -- Internet seems down, check connection...
    fibaro:setGlobal("NetworkStatus", 0);
    fibaro:call(362, "setProperty", "ui.PublicIPLabel.value", "Unknown");
    -- send mail     
    fibaro:call(2, "sendEmail",
      "Check Network Status failed !",
      "Unable to check network status, error code is "..errorCode..
      ", response is ["..response.."]");
  end
end

checkIP();

fibaro:call(362, "setProperty", "ui.lblUpdate.value", os.date());

-- clean memory, destroy object
httpClient = nil;

-- refresh each 60 minutes
fibaro:sleep(60*60*1000);
-- EOF


2 - main loop for my pioneer "plugin", all fonction monitoring etc...

Code:
--Plugin for Pioneer VSX-2020, VSX-2021, VSX-1120 Amplifier and many VSX model
--Pioneer VSX-822, VSX-42, use port 8102 instead of 23
local _deviceIp = "xxx.xxx.xxx.xxx";
local _devicePort = xx;
local _maxRetryProcess = 5;
-- Polling time (value in milliseconds)
local _polling = 5*60*1000;
local _trace = true;

local _volumeTable = {
  "-80.0", "-79.5", "-79.0", "-78.5", "-78.0", "-77.5", "-77.0", "-76.5", "-76.0", "-75.5",
  "-75.0", "-74.5", "-74.0", "-73.5", "-73.0", "-72.5", "-72.0", "-71.5", "-71.0", "-70.5",
  "-70.0", "-69.5", "-69.0", "-68.5", "-68.0", "-67.5", "-67.0", "-66.5", "-66.0", "-65.5",
  "-65.0", "-64.5", "-64.0", "-63.5", "-63.0", "-62.5", "-62.0", "-61.5", "-61.0", "-60.5",
  "-60.0", "-59.5", "-59.0", "-58.5", "-58.0", "-57.5", "-57.0", "-56.5", "-56.0", "-55.5",
  "-55.0", "-54.5", "-54.0", "-53.5", "-53.0", "-52.5", "-52.0", "-51.5", "-51.0", "-50.5",
  "-50.0", "-49.5", "-49.0", "-48.5", "-48.0", "-47.5", "-47.0", "-46.5", "-46.0", "-45.5",
  "-45.0", "-44.5", "-44.0", "-43.5", "-43.0", "-42.5", "-42.0", "-41.5", "-41.0", "-40.5",
  "-40.0", "-39.5", "-39.0", "-38.5", "-38.0", "-37.5", "-37.0", "-36.5", "-36.0", "-35.5",
  "-35.0", "-34.5", "-34.0", "-33.5", "-33.0", "-32.5", "-32.0", "-31.5", "-31.0", "-30.5",
  "-30.0", "-29.5", "-29.0", "-28.5", "-28.0", "-27.5", "-27.0", "-26.5", "-26.0", "-25.5",
  "-25.0", "-24.5", "-24.0", "-23.5", "-23.0", "-22.5", "-22.0", "-21.5", "-21.0", "-20.5",
  "-20.0", "-19.5", "-19.0", "-18.5", "-18.0", "-17.5", "-17.0", "-16.5", "-16.0", "-15.5",
  "-15.0", "-14.5", "-14.0", "-13.5", "-13.0", "-12.5", "-12.0", "-11.5", "-11.0", "-10.5",
  "-10.0", "-9.5", "-9.0", "-8.5", "-8.0", "-7.5", "-7.0", "-6.5", "-6.0", "-5.5", "-5.0",
  "-4.5", "-4.0", "-3.5", "-3.0", "-2.5", "-2.0", "-1.5", "-1.0", "-0.5", "+0.0", "+0.5",
  "+1.0", "+1.5", "+2.0", "+2.5", "+3.0", "+3.5", "+4.0", "+4.5", "+5.0", "+5.5", "+6.0",
  "+6.5", "+7.0", "+7.5", "+8.0", "+8.5", "+9.0", "+9.5", "+10.0", "+10.5", "+11.0",
  "+11.5", "+12.0"};

device = device or {
  id = 31,
  name = "Pioneer VSX-2021K",
  online = false,
  zones = {
    {
      power = false,
      volume = 0,
      mode = 0,
      modeInfos = "unknown",
      input = 0,
      inputInfos = {number = "", default = "", name = ""}
    },
    {
      power = false,
      volume = 0,
      mode = 0,
      modeInfos = "unknown",
      input = 0,
      inputInfos = {number = "", default = "", name = ""}
    }
  }
};

function interceptErrorCode(msg)
  if (msg:match("B00")) then
    fibaro:debug("Now AV Receiver is Busy. Please wait few seconds.");
    fibaro:sleep(2000);
    return true;
  elseif (msg:match("E04")) then
    fibaro:debug("Detect inappropriate Command line.");
    return true;
  elseif (msg:match("E06")) then
    fibaro:debug("Detect inappropriate Parameter.");
    return true;
  else
    return false;
  end 
end

function trim(s)
  return (string.gsub(s, "^%s*(.-)%s*$", "%1"))
end

function trace(value)
  if (_trace) then
    return fibaro:debug(tostring(value));
  end
end
 
function getPower(zone, retry) 
  zone = zone or 1;
  retry = retry or 0;
  --write socket
  fibaro:sleep(150);
  bytes, errorCode = _tcpSocket:write("\r");
  fibaro:sleep(150);
  bytes, errorCode = _tcpSocket:write("\r?P\r");
  fibaro:sleep(150);
  if errorCode == 0 then
    trace("?P cmd successufully transmited.");
    local result = string.upper(_tcpSocket:read() or string.char());
    -- look for Error message
    interceptErrorCode(result);
    -- parse response
    local response = result:match("PWR(%d)");
    if (response ~= nil) then
      return tonumber(response);
    else
      return 0;
    end
  else
    if retry < _maxRetryProcess then
      trace("Retry process, please wait...");
      fibaro:sleep(2000);
      return getPower(zone, retry + 1);
    end
    return nil;
  end
end

function getVolume(zone, retry)
  zone = zone or 1;
  retry = retry or 0;
  --write socket
  fibaro:sleep(300);
  bytes, errorCode = _tcpSocket:write("\r");
  fibaro:sleep(150);
  bytes, errorCode = _tcpSocket:write("\r?V\r");
  fibaro:sleep(150);
  if errorCode == 0 then
    trace("?V cmd successufully transmited.");
    -- Should return VOL160<CR+LF> egg. if success
    local result = string.upper(_tcpSocket:read() or string.char());
    -- Look for Error message
    interceptErrorCode(result);
    -- Parse response...
    local response = result:match("VOL(%d+)");
    if (response ~= nil) then
      return tonumber(response);
    else
      return 0;
    end   
  else
    if retry < _maxRetryProcess then
      trace("Retry process, please wait...");
      fibaro:sleep(2000);
      return getVolume(zone, retry + 1);
    end
    return nil;   
  end
end
--Request Input Name information (?RGB**)
function getInputName(number, retry)
  number = number or 1;
  retry = retry or 0;
  local response = {number = "", default = "", name = ""};
  --write socket
  fibaro:sleep(300);
  bytes, errorCode = _tcpSocket:write("\r");
  fibaro:sleep(150);
  local command = string.format("?RGB%02d", number);
  bytes, errorCode = _tcpSocket:write("\r"..command.."\r");
  fibaro:sleep(150);
  if errorCode == 0 then
    trace(command.." command successufully transmited.");
    -- Should return RGB**0<CR+LF> egg. if success
    local result = string.upper(_tcpSocket:read() or string.char());
    -- Look for Error message
    local err = interceptErrorCode(result);
    -- Parse response
    if (err == false) then
      response.number = result:match("RGB(%d%d)%d");
      response.default = result:match("RGB%d%d(%d)");
      response.name = result:match("RGB%d%d%d([%w_%s\/\\-]*)");
    end
    return response;
  else
    if retry < _maxRetryProcess then
      trace("Retry process, please wait...");
      fibaro:sleep(2000);
      return getInputName(number, retry + 1);
    end
    return nil;
  end
end

function getInput(zone, retry)
  zone = zone or 1;
  retry = retry or 0;
  --write socket
  fibaro:sleep(300);
  bytes, errorCode = _tcpSocket:write("\r");
  fibaro:sleep(150);
  bytes, errorCode = _tcpSocket:write("\r?F\r");
  fibaro:sleep(150);
  if errorCode == 0 then
    trace("?F cmd successufully transmited.");
    -- Should return FN10<CR+LF> egg. if success
    local result = string.upper(_tcpSocket:read() or string.char());
    -- Look for Error message
    interceptErrorCode(result);
    -- Parse response...
    local response = result:match("FN(%d+)");   
    if (tonumber(response) >= 0) then
      return tonumber(response);
    else     
      trace("Unable to decode response!");
      return nil;
    end
   
  else
    if retry < _maxRetryProcess then
      trace("Retry process, please wait...");
      fibaro:sleep(2000);
      return getInput(zone, retry + 1);
    end
    return nil;   
  end
end

function refreshInterface()
  if (device.zones[1].power == true) then   
    fibaro:call(device.id, "setProperty", "ui.lblPowerStatus.value", "ON");
    -- update ui volume
    if (device.zones[1].volume ~= nil) then
      local label = string.format("%s dB", _volumeTable[device.zones[1].volume]);
      local sliderValue = tonumber(math.floor(device.zones[1].volume/1.85));
      fibaro:call(device.id, "setProperty", "ui.lblVolume.value", label);   
      fibaro:call(device.id, "setProperty", "ui.VolumeSlider.value", sliderValue);
    end
    -- update ui input
    if (device.zones[1].input ~= nil) then   
      fibaro:call(device.id, "setProperty", "ui.lblInput.value", device.zones[1].inputInfos.number .. " - " .. device.zones[1].inputInfos.name);
    end
  else
    fibaro:call(device.id, "setProperty", "ui.lblPowerStatus.value", "OFF");
    fibaro:call(device.id, "setProperty", "ui.lblVolume.value", "---.- dB");
    fibaro:call(device.id, "setProperty", "ui.VolumeSlider.value", "0");
    fibaro:call(device.id, "setProperty", "ui.lblInput.value", "unknown");
  end
  if (device.online) then   
    fibaro:call(device.id, "setProperty", "ui.OnlineStatusLabel.value", "Online");
  else
    fibaro:call(device.id, "setProperty", "ui.OnlineStatusLabel.value", "Offline");
  end
  return true;
end

function main()
  -- prepare a global counter
  if (_count == nil) then
    trace("HC2 start script at " .. os.date());
    _count = 0;
  end
  --notify begin of process
  trace("Start process #".._count..", please wait...");
  --open the socket
  if (_tcpSocket == nil) then
    _tcpSocket = Net.FTcpSocket(_deviceIp, _devicePort);
    --set the read timeout
    _tcpSocket:setReadTimeout(500);
  end
  -- Query power status
  local power = getPower(1);
  if (power ~= nil) then
    -- flag as online
    device.online = true;
    if (power == 0) then
      device.zones[1].power = true;
      trace("Z1 Power is ON");
      -- Query volume
      device.zones[1].volume = getVolume(1);
      trace("Z1 Volume is "..device.zones[1].volume);
      -- Query input
      device.zones[1].input = getInput(1);
      trace("Z1 Input selected is "..device.zones[1].input);
      -- Query input informations
      device.zones[1].inputInfos = getInputName(device.zones[1].input);     
      trace("Z1 Input selected infor are "..device.zones[1].inputInfos.number .. " - " .. device.zones[1].inputInfos.name);
    elseif (power == 1) then
      device.zones[1].power = false;
      trace("Z1 Power is OFF");
    end
  else   
    device.online = false;
  end
  -- call refresh interface to repaint UI
  refreshInterface();
  -- dispose socket
  if (_tcpSocket ~= nil) then
    -- close socket
    _tcpSocket:disconnect();
    -- destroy object
    _tcpSocket = nil;
  end
  --notify end of process
  trace("Process #".._count.." is finish!");
  -- increment global counter
  _count = _count + 1;
end

-- Start main loop process
main();

-- Sleep
fibaro:sleep(_polling);

-- EOF Main loop


and i have others with UI update and 5 seconds sleep ... that's why I think the problem is elsewhere

robmac - 2013-11-24, 22:43

yes they will not cause problem

fibaro:sleep(60*60*1000);


local _polling = 5*60*1000;

with 60 mins and 5 mins between runs + the time to return call and retry...


It is an issue if you want something that updates every few seconds like updating the progress of the play of a music track. That is how I discovered the issue.

Do you never get a fail?

How log does a backup take on your HC2?

Krikroff - 2013-11-24, 22:44

robmac wrote:
yes they will not cause problem

fibaro:sleep(60*60*1000);


local _polling = 5*60*1000;

with 60 mins and 5 mins between runs + the time to return call and retry...


It is an issue if you want something that updates every few seconds like updating the progress of the play of a music track. That is how I discovered the issue.


and i have others with UI update and 5 seconds sleep, 2 seconds ... that's why I think the problem is elsewhere

robmac - 2013-11-24, 22:51

It is interesting. I can add that one main loop and I get the backup problem.

I remove it and it is fine.


How many devices do you have?

I have 133 z-wave devices could it be as you get a bigger + busier database it becomes an issue?

Krikroff - 2013-11-24, 23:05

robmac wrote:
It is interesting. I can add that one main loop and I get the backup problem.

I remove it and it is fine.


How many devices do you have?


I have 36 "real devices", 350 devices including virtual SATEL sensor, inputs, outputs etc.
Real devices are, Fibaro, Everspring, Aeonlabs, battery operated or not, with sensible devices like Danfoss, ST814, 4 in 1 sensor etc. The only issue i have is with RGBW device with ipad remote app, work great with ios app, android app, web app...


Ps: I noticed problems with the main loop when I do not use function to separate some code! ?

It might be interesting to compare the serial numbers of our HC2. Mine is HC2-000930

robmac - 2013-11-24, 23:18

I have only 172 devices overall as I have been removing items to find what the issue is. Was over 250 at one point.

I don't use the main loop as i have not found a use other than calculating the played of a track. Other than that I tend to push to HC2 rather then poll

It is interesting that wrapping functions around some code makes it better? Something odd there. Notice your refresh interface. Without that do you get issue?


serial is

HC2-005559

Will get that database built to do the compare more.

Krikroff - 2013-11-24, 23:28

I made a function "refresh" to push the update almost all at the same time, otherwise the "labels" are not all updated ... I thought it had just the poor regularity of "refreshstate" but perhaps not finally, "database" may also the cause ...
robmac - 2013-11-25, 21:33

So wrapping the functions makes no impact for me. Anything less than 3s sleep and the backup fails.

Code:

timer =  timer  or 1

function refreshInterface(ltimer, ltime)
    fibaro:call(270,"setProperty","ui.Label1.value", ltimer)
    fibaro:call(270,"setProperty","ui.Label2.value", ltime)
    fibaro:call(270,"setProperty","ui.Label3.value", ltimer)
end
 

function main()
      time = os.date("%S")
    timer = timer + 1
      refreshInterface(timer, time)
    --fibaro:debug(timer)   
end
   
main()
 
--with no sleep backup fails

-- regular fail less than 3000 on my HC2
fibaro:sleep(3000)


Anyone willing to test this on their HC2 + share device config. I am putting a database together to analyse the data report from HC2 toolkit.

richo - 2013-11-25, 22:40

robmac wrote:
Anyone willing to test this on their HC2 + share device config. I am putting a database together to analyse the data report from HC2 toolkit.


Here are my results:

- backup fails if the loop is less then 6 seconds, however

- when I have deactivated all 10 regular scenes (with loops) backup fails below 2 seconds

Any other results?

stevenvd - 2013-11-25, 22:46

I just tested without changing anything and the back-up failed. When I turned of my Scene that runs a button of the virtual devices (almost same as the Main Loops) the back-up runs without any problems. So probably got something todo with the http / net library activaty
robmac - 2013-11-25, 23:01

This does not ever make my backup fail even with no sleep. All it is missing is the ui update.

Code:
timer =  timer  or 1

function refreshInterface(ltimer, ltime)
    fibaro:call(270,"setProperty","ui.Label1.value", ltimer)
    fibaro:call(270,"setProperty","ui.Label2.value", ltime)
    fibaro:call(270,"setProperty","ui.Label3.value", ltimer)
end
 

function main()
      time = os.date("%S")
    timer = timer + 1
      --refreshInterface(timer, time)
    --fibaro:debug(timer)   
end
   
main()
 
--with no sleep backup fails

-- regular fail less than 3000 on my HC2
--fibaro:sleep(3000)

Krikroff - 2013-11-25, 23:46

I just tested with no sleep and the back-up failed. with sleep(3000) it's ok for me... RefreshState is constantly updated, every second it seems. the update should block database...

if Andrew can do a similar test :?:

robmac - 2013-11-26, 07:13

Not just when code is in main loop in virtual device. This causes backup to fail when in scene.

Code:

timer =  timer  or 1

function refreshInterface(ltimer, ltime)
    fibaro:call(270,"setProperty","ui.Label1.value", ltimer)
    fibaro:call(270,"setProperty","ui.Label2.value", ltime)
    fibaro:call(270,"setProperty","ui.Label3.value", ltimer)
end
 

function main()
      time = os.date("%S")
    timer = timer + 1
      refreshInterface(timer, time)
    --fibaro:debug(timer)   
end
 
while true do   
main()
 
--with sleep 1s backup fails

-- regular fail less than 3000 on my HC2
fibaro:sleep(1000)

end



[ Added: 2013-11-26, 07:19 ]
and

if I increase the number of sensors reporting power and temperature the backup now fails at 5s on my system OK at 6 but than I got the lock up....

hot table in database or other limited resource?

jompa68 - 2013-11-26, 08:14

Can confirm that after removing the main loop code from my vDevices my box is running ok again and backup works.
robmac - 2013-11-26, 09:33

OK if it was a general issue then updating any value would cause it so this would make it fail...

Code:
--[[
%% properties

%% globals
--]]

timer =  timer  or 1

function refreshInterface(ltimer, ltime)
    fibaro:call(271,"setProperty","ui.Label1.value", ltimer)
    fibaro:call(271,"setProperty","ui.Label2.value", ltime)
    fibaro:call(271,"setProperty","ui.Label3.value", ltimer)
end

function refreshStatus(ltimer, ltime)
    fibaro:call(167,"setValue", ltimer)
    fibaro:call(168,"setValue", ltimer)
    fibaro:call(169,"setValue", ltimer)
    fibaro:call(170,"setValue", ltimer)
end
 

function main()
      time = os.date("%S")
  if timer == 100 then timer = 0 end
   
    timer = timer + 1
     --refreshInterface(timer, time)
      refreshStatus(timer, time)
    fibaro:debug(timer)   
end
 
while true do   
main()
 
--with sleep 1s backup fails

-- regular fail less than 3000 on my HC2
fibaro:sleep(1000)

end


but there is no issue and the value is updated

but as soon as you add the virtual device setproperty calls backup fails.

Code:

--[[
%% properties

%% globals
--]]

timer =  timer  or 1

function refreshInterface(ltimer, ltime)
    fibaro:call(271,"setProperty","ui.Label1.value", ltimer)
    fibaro:call(271,"setProperty","ui.Label2.value", ltime)
    fibaro:call(271,"setProperty","ui.Label3.value", ltimer)
end

function refreshStatus(ltimer, ltime)
    fibaro:call(167,"setValue", ltimer)
    fibaro:call(168,"setValue", ltimer)
    fibaro:call(169,"setValue", ltimer)
    fibaro:call(170,"setValue", ltimer)
end
 

function main()
      time = os.date("%S")
  if timer == 100 then timer = 0 end
   
    timer = timer + 1
     refreshInterface(timer, time)
      refreshStatus(timer, time)
    fibaro:debug(timer)   
end
 
while true do   
main()
 
--with sleep 1s backup fails

-- regular fail less than 3000 on my HC2
fibaro:sleep(1000)

end


so one issue is with setProperty of virtual device.

Krikroff - 2013-11-26, 10:19

robmac, Another thing really strange: After the test with the script in main loop my HC2 became completely unstable, web server ok but z-wave out of service, the z-wave blue LED remains active 5 seconds and then went out and active 5 seconds.... Only one way: Reboot the box :shock:

Strange, because the script not use z-wave :roll:

robmac - 2013-11-26, 10:33

Yes very odd. Same here.

[ Added: 2013-11-26, 12:43 ]
You know sometimes I get a zwave freeze but many times not.

Might be two underlying issues that when they coincide causes a bigger issue.

[ Added: 2013-11-26, 12:55 ]
http://bugzilla.fibaro.com/view.php?id=1048


Powered by phpBB modified by Przemo © 2003 phpBB Group