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


All Activity

This stream auto-updates

  1. Today
  2. EventHandlers themselves don't use timers - they are just a pattern and function stored in a table. When we post events a timer is started (even when time is 0) but they terminate when the eventHandler is invoked. cronJobs, the last version, only have one timer that every minute check if any con_string is up for execution. No, the listTimers approach I posted yesterday is not compatible with fibaroExtra, but it gave me the idea to maybe rewrite that part of fibaroExtra....
  3. JOW

    Routing Info

    With the HC3 support for ZigBee that well know for routing issues it might be cool to have this related to used protocol ,
  4. Yesterday
  5. Hi @SmartHomeEddy , Thanks for reminding me. I didn't check French Fibaro forum for long time. Now when I try I get error. Will try again later.
  6. Well, I appreciate your explanation, I've learned some again. * One cogitation: the time someone spent doing something for you, you can refund with money. But engagement, availability and will to share of knowledge cannot be simply paid - a gratitude for all this you do for us, Jan.
  7. @jgab Jan, i have seen your answer on other topic regarding timers. There is a long lasting concern of mine, when i dynamically create events, cronjobs or some other timer related stuff, It seems to me that my system is getting day by day using more and more memory. So i always take care when I re-post and event, or re-set some cronjob to first delete the old ones, but seems to me still, that timers numbers are increasing all the time. Using this approach, to keep track of timers do local fmt = string.format local settime = fibaro.setTimeout local cleartime = fibaro.clearTimeout local timers = {} function fibaro.setTimeout(ms,fun,doc) local ref local wrap = function(...) local stat,err = pcall(fun,...) timers[ref] = nil if not stat then error(err,2) end end ref = settime(ms,wrap) local secs = os.time() + ms//1000 local ms = ms % 1000 timers[ref] = {secs=secs, ms=ms, fun=fun, doc=doc or ""} return ref end function fibaro.clearTimeout(ref) timers[ref] = nil cleartime(ref) end function fibaro.timers() return timers end function fibaro.listTimers() for k,v in pairs(timers) do print(fmt("Timer:%s Expires:%s:%03d '%s'",k,os.date("%X",v.secs),v.ms,v.doc)) end end function fibaro.clearAllTimers() for ref,_ in pairs(timers) do fibaro.clearTimeout(ref) end end end -- Test fibaro.setTimeout(10*1000, function() print("10 seconds") end, "10 seconds") fibaro.listTimers() will keep track of fibaroExtra timers too? Usually i follow this approach to first remove existing events if it needs to be recreated dynamically with some changed ids or whatever --This apporach i am using when dynamically create and event -- So first I always remove the event then recreate it (on some user UI action) function pirEventHandler(env) ..some stuff here end fibaro.event({type='device', id = id, property = 'value'}, pirEventHandler) fibaro.removeEvent({ type = 'device', id = id, property = 'value' }, pirEventHandler) --and this i do with cronjobs fibaro.removeCronJob(cron_string) fibaro.cron(cron_string, function() ..some stuff here end So using the listTimers apporach will list all running timers. even the ones created by fibaroExtra?
  8. Just to be sure, did you looked at the French Fibaro forum? https://www.domotique-fibaro.fr/topic/16244-quick-app-enphase-envoy-fork-from-titixsi and https://www.domotique-fibaro.fr/topic/16126-quick-app-enphase-envoy/ They have a lost of postings around the Enphase Envoy. Don’t know if that quickapp is compatible with your setup and wishes.
  9. Hello, I just updated the Yubii Home Center app to version 1.22.0 and the yubii home center app appeared again in the shortcuts.
  10. Hi MArtin555 i would like to try the Goodwe QA you have created. Ik have a DT version. Where can i find it? Greetings, Leon
  11. Hello all, Enphase Envoy S I have installed Enphase solar plant that has 15 micro-inverters IQ7+ with 15 solar panels LONGI Solar model LR4-72HIH-430M with power rating at STC: 430W and Enphase Envoy S metered EU with firmware D7.6.177. Currently no batteries are installed since are not available here in Croatia. I know that Enphase changed local API with new firmware and token is needed to read measurements from Envoy S. I checked and found that is possible to make Quick App that can communicate with Envoy S and show data in HC3, HC3Lite and Yubii home. There are two ways how to generate token: Get token through web UI at https://entrez.enphaseenergy.com and this token is valid for 1 year for owners of the system. Disadvantage with this solution is that user must be reminded to get new token before current one expires. Advantage is that during this one year internet connection is not needed for QA to function properly. Get token programmatically through making call to https://enlighten.enphaseenergy.com/entrez-auth-token?serial_num=<IQ Gateway_serial_number> where Enphase Envoy S serial number is needed. Envoy S serial number is easy to find in Enlighten app. This token is valid only for short time, didn't really test, but not more than 5 minutes so it must be regenerated before each request send to Envoy. Disadvantage with this solution is that internet connection is needed to get new valid token, but on the other hand no user involvement is needed since new token is automatically generated by QA. My question is: Which of the above solutions do you prefer? Enphase IQ Battery pack Since I still do not have batteries installed, part of the data for battery state, charging and discharging I do not have in JSON response from Enovy S and therefore I do not know what to code for this part. Is out there anyone with complete system with batteries? Let me know so you can generate one complete JSON response and sent to me on PM so I can do a complete job. Enphase IQ EV Charger If there is also anyone with installed Enphase IQ EV charger even better, then maybe I can also include support for it. THANK YOU!
  12. expectations from Fibaro may be high, but it's essential to consider industry standards and technological advancements. Assess their progress, customer feedback, and competition to determine if they're lagging behind. Providing constructive feedback can also prompt improvements.
  13. Hi @rss , Sorry I didn't mention, but code can be executed from Virtual device button or from scene. Above code is enough, no other code is needed.
  14. Thank you @Sankotronic thank you very much and I appreciate your very quick answer, but I don't know anything about the script, not even where I can apply that "code", but I find a solution that I will leave here for those who are in my situation. It is now possible to execute this setting from the scene with logical blocks: devince name = local protection on/off
  15. In this post I started a million setTimeout - it took 41s for the last the finish. There is no standard way to see how many timers you have. You can redefine setTmeout and clearTimeout to keep track of timers. Ex. do local fmt = string.format local settime = fibaro.setTimeout local cleartime = fibaro.clearTimeout local timers = {} function fibaro.setTimeout(ms,fun,doc) local ref local wrap = function(...) local stat,err = pcall(fun,...) timers[ref] = nil if not stat then error(err,2) end end ref = settime(ms,wrap) local secs = os.time() + ms//1000 local ms = ms % 1000 timers[ref] = {secs=secs, ms=ms, fun=fun, doc=doc or ""} return ref end function fibaro.clearTimeout(ref) timers[ref] = nil cleartime(ref) end function fibaro.timers() return timers end function fibaro.listTimers() for k,v in pairs(timers) do print(fmt("Timer:%s Expires:%s:%03d '%s'",k,os.date("%X",v.secs),v.ms,v.doc)) end end function fibaro.clearAllTimers() for ref,_ in pairs(timers) do fibaro.clearTimeout(ref) end end end -- Test fibaro.setTimeout(10*1000, function() print("10 seconds") end, "10 seconds") fibaro.listTimers() getValue is synhronous. In general only setTimeout, setInterval and the various callbacks from net.* functions are asynchronous. When you press a button and your QuickApp:button() function is called or when someone call your QA with fibaro.call(YourQAid,...) it is an "asynchronous" callback into your code/QA. We can argue then if fibaro.call is asynchronous as it doesn't wait for the call to complete before continuing (except sometimes checking if it is a valid call) - but that is part of a bigger discussion (ex. this post) I'm saying "asynchronous" as the Lua model is cooperative multitasking (https://en.wikipedia.org/wiki/Cooperative_multitasking). No, hub = fibaro As the example stands, local v1 is declared as a local variable in the QA fil, on top-level. self.v2 gives and error, as self is not defined on top-level. 'self' is only defined inside metods (object:method(...)) self.v3 creates a new key-value pair (v3 = 3) in the QuickApp object. You can think about self as a Lua table where you can lookup keys where some are bound to values and other to methods... It's much faster to access a local variable (v1) than it is to access a key in a Lua table (v3)
  16. 1. Working on a quiet large quickapp (>1000 lines of code, HC3) I've make a stupid mistake: some functions has at his end setTimeout command. This functions are used to update interface, registering some operations and so on. At the other hand - I invoke some of the functions to update interface "on demand". As a result more and more timers was set by setTimeout, and a "timer leak" occurs... Nothing bad happened, I correct this mistake. My question is: how many timers can be set? Is there a limit of them? And is it possible to retrieve in QA information about already "ticking" timers (how many, time remaining, code to execute etc). 2. As I know in general Fibaro is asynchronous. But maybe some built-in function is and other is not?... if on example we have the following: local a = hub.getValue(PowerOutlet, "value") and in the next few lines we test the value 'a'. After few millisecond, there's no guarantee that hub.getValue() answers until tested. Is such test unreliable? And to what value 'a' is initialised? If correct how to protect from such situations - when I need to do something with received value at once? Of course getValue is only an example. It can be also hub.call(....) and then test some property and many more. 3. Is there any differences between calling hub.function() and fibaro.function()? For me it working the same way... 4. What is the difference with scope of the variable in QA: local v1 = 1 self.v2 = 3 function QuickApp:onInit() self.v3 = 3 end For me the scope of v1, v2, v3 is the same. Can someone explain a practical difference between those three definitions? Thank you in advance.
  17. There had been an update of the (airrohr) firmware of the Sensor Community Air Quality Sensor: NRX-2024-135. (The QuickApp still works fine)
  18. Last week
  19. Eddy and All The 2 devices that were invisible were part of a working Group. By opening up that Group and tapping on these 2 devices, they suddenly became Visible and I DON'T know why this happened. In any event, perhaps this may help others who get in the same bind Regards Ron H.
  20. Eddy Thanks for your reply but - 1. The devices were visible and working - all ok 2. Suddenly not visible via Device list, but still visible and working via Block and Lua mode, so HC3 knows they are there 3. If they unknowingly became Hidden, how can I Unhide them if they cannot be accessed via Device List 4. Forgive my ignorance on this point of Authorisation. If they were registered, working and visible, what does Authorisation mean, and if this is a problem, how do I get around it Regards Ron H.
  21. Hi @Jiri Dobsovic , You can check this one: It does require additional installation of jishi/node-sonos-http-api on e.g. raspberry PI or docker, but it is worth the effort. I have tested it with the latest Sonos S2 update and is working fine.
  22. Hi @rss , If you can't see this on dimmer 2 Advanced tab: You can still use this code to reset (disable) local protection: fibaro:call([dimmer_ID],"setProtection", 0, 0) Just replace [dimmer_ID] with your dimmer 2 ID number.
  23. At the moment, it is the only working way i know for gettin datas from my shelly pro 3 em... Not sure if Kwh count is correct or multiplied for 100x...i'm testing it a bit. One more thing, i've found that if shelly is not sending datas (disconnected), datas remains the last sent and it is not going to 0.
  24. Hello, Five years ago I had to deactivate the local control for the dimmer 2 light switches, so that children would not play with them. Now I want to reactivate local control, but I can't. In advanced settings, from the "zone" - control protection, I switched from locally protected to unprotected, but there was no change. After several unsuccessful attempts, I did SOFT reconfigure device and now I can't find anywhere in the advanced settings the "zone" where the protected/unprotected switch used to be. Can someone help me with some advice how I can restore access from the buttons for dimmer 2? Thank you I have HC2 with dimmer 2 v3.5
  25. There was a warning on this forum, to get the RGBW controller close to the HC3 for updating and some other tips. So not without any risk.
  26. Kage

    RGB updates

    Yes indeed necessary for me. HC3 was terrible with the pre firmware. after 5.1 no problem annymore
  1. Load more activity
×
×
  • Create New...