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


Search the Community

Showing results for tags 'fronius'.

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • FIBARO Community
    • FIBARO Portal and Forum policy
    • FIBARO
    • Say hello!
    • Off-topics
  • FIBARO Update
    • FIBARO System Update
    • FIBARO Mobile Update
  • FIBARO Community Support
    • Scenes and Interface
    • FIBARO Products
    • FIBARO Mobile
    • FIBARO HomeKit
    • FIBARO Assistant Integrations
    • Other Devices / Third-party devices
    • Tutorials and Guides
    • Home Automation
    • Suggestions
  • FIBARO Społeczność
    • FIBARO
    • Przywitaj się!
    • Off-topic
  • FIBARO Aktualizacja
    • FIBARO System Aktualizacja
    • FIBARO Mobile Aktualizacja
  • FIBARO Wsparcie Społeczności
    • Sceny i Interfejs
    • FIBARO Urządzenia
    • FIBARO Mobilnie
    • FIBARO HomeKit
    • Integracja z Amazon Alexa i Google Home
    • Urządzenia Firm Trzecich
    • Poradniki
    • Automatyka Domowa
    • Sugestie

Categories

  • Scenes
  • Virtual Devices
  • Quick Apps
  • Icons

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


Facebook


Google+


Skype


Website URL


WhatsApp


Country


Gateway/s


Interests

Found 1 result

  1. Brom

    Fronius

    Hey everyone, I haven't coded for 20+ years but I figured I would give this strange LUA language a go on my new HC2 and see if I can get my fronius inverter working. With the help of the mountain of code on this forum I was surprised to get basics working in an hour or so. Im a bit stuck so hopefully someone can help with questions. My plan is to make this a fully functional Fronius VD. Just going to be a bit slow going learning LUA. Here is the code as it stands. It basically works and is displaying usage on the icon. function round(x, n) n = math.pow(10, n or 0) x = x * n if x >= 0 then x = math.floor(x + 0.5) else x = math.ceil(x - 0.5) end return x / n end --SMARTMETER 538d72d9 local smartmeter= Net.FHttp('192.168.0.37'); response,status,errorCode = smartmeter:POST("/solar_api/v1/GetPowerFlowRealtimeData.fcgi", '{"seq":1,"method":"object_list_props_values","arguments":{"oid":"538d72d9"}}') fibaro:debug(response) if tonumber(status)==200 then local fronius = json.decode(response) usage = fronius.Body.Data.Site.P_Load grid = fronius.Body.Data.Site.P_Grid solar = fronius.Body.Data.Site.P_PV if fronius.Body.Data.Site.P_Load == json.null then usage = 0 end if fronius.Body.Data.Site.P_Grid == json.null then grid = 0 end if fronius.Body.Data.Site.P_PV == json.null then solar = 0 end usage = math.abs(usage) usage = round(usage,1) grid = round(grid,1) solar = round(solar,1) fibaro:debug(usage) fibaro:debug(grid) fibaro:debug(solar) fibaro:call(24, "setProperty", "ui.usage.value", usage.." kWh") fibaro:call(24, "setProperty", "ui.grid.value", grid.." kWh") fibaro:call(24, "setProperty", "ui.solar.value", solar.." kWh") else fibaro:debug("error Smart Meter:"..errorCode) end fibaro:sleep(60000) 1) If anyone has recommendations on bettering the code.. feel free to post 2) In the post line. I'm not sure what the OID does. Anyone have a link to some good ULA resources that can help with how this function works. I don't actually need to pass any additional values to the fronius. Not sure if im passing rubbish to it for no reason. 3) How do I put a newline after a debug message? 4) So i figured how to make the usage numbers appear in the icon for VD. The main number I get is the houses energy consumption. So how do I push this number into the main Fibaro consumption page so it gets graphed etc. 5) Is it possible to use the values in the VD in scenes in any way? eg When I'm generating a heap of extra power then turn a hue light red. 6) How do I pull the IP address from the Vdevice instead of manually adding it to the script? 7) Is there a way to graph all of this data easily? Thanks for the help!! Brom
×
×
  • Create New...