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!



Smart Home Forum by FIBARO Team

Search the Community

Showing results for tags 'json'.

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


  • 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


  • Scenes
  • Virtual Devices
  • Quick Apps
  • Icons

Find results in...

Find results that contain...

Date Created

  • Start


Last Updated

  • Start


Filter by number of...


  • Start






Website URL





Found 21 results

  1. I'm not sure how important it is, but I jump into this hole "lastWorkingRoute and neighborList shemas are changed from HC2 to HC3 HC2 /api/devices/id produces JSON wtih following: "lastWorkingRoute": "[1,422,59]" HC3 /api/devices/ID produces a bit changed JSON: "lastWorkingRoute": [1,422,59] What is difference - HC2 gives me string representation of array but HC3 gives me array. For developer perspective this is quite big difference (agree - important only for tech apps) Is there SOMEWHERE some kind of DOCUMENTATION of that kind things, changes, schemas Both HC2 /docs
  2. I want to use a construction in my hometable like for example local HT = { light1 = { fib_id = 211, hue_id = 7 }, light2 = { fib_id = 227, hue_id = 12 }, } HT.ftoh = { [ HT.light1.fib_id ] = HT.light1.hue_id, [ HT.light2.fib_id ] = HT.light2.hue_id, } When i test fibaro:debug( HT.ftoh[ 227 ] ) it gives the expected value 12. I want to use this in a couple of VD's with generic code for hue lights, but when i test local HT2 = fibaro.decode( fibaro.encode( HT ) ) then f
  3. Posiadam miernik energii firmy ZAMEL z zainstalowaną Supla. Przy wykorzystaniu linku bezpośredniego: https://svr24.supla.org/direct/642/VUNZmkZTGJD/read otrzymuję odpowiedź w formacie HTML z informacją żeby odczytać w formacie JSON trzeba dodać odpowiedni nagłówek. Kiedy wpisuję jako scenę poniższy skrypt: --[[ %% properties %% events %% globals --]] local http = net.HTTPClient() local url="https://svr24.supla.org/direct/642/VUNZmkZTGJD/read" http:request(url, { options = { method='GET' },
  4. 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 se
  5. Newbie scripting question. Thanks to all the posts here I have learnt a lot in the last few weeks ... so thank you for all your knowledge and insights and generosity for sharing. I am adapting Yamaha MusicCast QA. I have worked out how to query the Yamaha depending on what it is playing eg Tuner or Spotify etc. My query as per below code local queryinfo = "/YamahaExtendedControl/v1/tuner/getPlayInfo" urlinfo = url .. "" .. queryinfo self.httpClient:request(urlinfo, {
  6. **MAJOR UPDATE TO THIS TUTORIAL** Hi, This tutorial has been going through a major update and expansion since the first release. Special thanks deserved to @petergebruers and others for helping me understand many of the underlying table concepts and for also contributing a lot to this tutorial. It may be a good idea to paste some of the code in this tutorial into a test scene to understand how they work by reviewing the output Topics covered with lots of sample code and expected outputs Table basics Creating tables and printing (ordered, non-ordered, numeric
  7. Hi all, The wife and I have done some work on getting json data from a Raspberry PI, running PI1Monitor. The Pi is reading the data from a smart meter P1 port and we built a virtual device that shows the meter readings in a VD screen. I included the VD and LUA-code. It's not pretty, but it works. We would like to take this to the next level, but here is where we need help. - Would it be possible to change the VD so it delivers the current usage to the power metering of the HC2. Right now, we have only some switches and dimmers that are counted in
  8. Version 1.0.0


    This function can come in handy if you want to print a json structure in readable form for debugging or inspection. It takes a json string as input and returns a HTML formatted string which can be printed in the debug window using fibaro:debug(); Example Input: "{\"api_data\":{\"status\":\"online\",\"timestamp\":\"2019-01-18-18:01:32\",\"sensor_1\":[\"value_1\":125,\"value_2\":35],\"sensor_2\":[\"value_a\":34.5,\"value_b\":45]}}" Output: { "api_data" : { "status" : "online", "timestamp" : "2019-01-18-18:01:32", "sensor_1" : [ "value_
  9. Hello, i'm trying to get status updates from my Roomba980 cleaner in to a global. I've been able to get the status information from te roomba in a string (as shown on attachment), but I don't know how to get a specifiek value ("phase" for example) in a global. Is there anyone with some more experience who can help me? Thanks
  10. Hello Can somebody help me with a JSON POST command ? Simple Idea I need to press a VD button when there is a POST command made -- 'mode': '0' = Disarm should be like {'area': '1', 'mode': '0'} -- 'mode': '1' = Full Arm schould be {'area': '1', 'mode': '1'} I tried several thing but only get " " to send in debug And when I change the code to send ' ' the scripts fails SOLVED: seems that the github forum reactions and phyton code where misleading. with httpPost:post and other raw data was the trick
  11. Hi, I'm no fan of the build-in alarm in HC2 so I'd like to create my own scenes/VD's for this. . @Sankotronic is working on a very promising UHAS system but his plans are pushed out (no offence, he released real nice things already, I'm fan) so I decided to move on, writing some code myself with hopefully some help of you ;-)! What do I use in my alarm; > Lights (selected regular lights in the house to switch to 100% when alarm is breached) > Door/window sensors > PIRs > Sirenes (for acoustic alarm) > flashlight (for
  12. I get the following JSON string from my device in a browser by typing the IP of my device: {"data":{ "id":"8200007A","type":"8","detector":"SI29BG","voltage":382,"cpm":14,"temperature":9.45,"humidity":48.29,"pressure":100281,"voc":12800000,"co2":399,"noise":39,"ch2o":0.00,"pm25":3,"uptime": 107787}} is it possible to import these values into a virtual device in HC2? The closest I have found is: local urad = Net.FHttp("") local urad = Net.FHttp("{{}}",80) local urad = assert(io.popen('curl'))
  13. Hi, I retrieved all data of the devices from my HCL with and they are written in one file. Now I am want to retrieve temperature, lux etc from different devices, but I can't seem to find the right way to do it. If I just retrieve data from one device for instance 172 with call it works: json.properties.value will do the trick But I don't want to sent commands for each device to retrieve data. Is there a way to retrieve specific values from the all devices json table? I
  14. Good Morning Guys, I need to create a Virtual Device in order to enable/disable some functionality of my devices. Shortly in need to extract the XML, modify a tag value, re-upload the xml. I have understood that using "Net.FHttp" and GET/PUT command im able to RETRIEVE and PUT the XML.... Example: response,status,errorcode = device:GET('URL') Example: response,status,errorcode = device:PUT('URL',XML) But how the entire process can be writed in LUA? 1) How to store in a variable the entire XML extracted using teh GET command? 2) How to repl
  15. My Virtual Device (VD) get stuck after a while trying to decode json data. The error is: expected value but found t_end at character 1 Is there any solution to fix that? I've tried to add more seconds with fibaro:sleep but no results. Thanks for your help, Tomax
  16. I need some help with json decoding. I'm succesfully got the data in HC2 from Rasspery/Pyton but I'm not able to decode that data in HC2. Any advice, please?! --starting LUA code here local smartmeter= Net.FHttp(''); response = smartmeter:GET("/index.py") fibaro:debug('Answer: ' ..response) --this is the data response coming from Rasppery/Pyton: {"Amp": 13.29, "Volt": 98.01} if (tonumber(status)==200 and tonumber(errorCode)==0) and response~=nil then fibaro:debug('Decoding...') local harduino = json.deco
  17. Hi Look at this code below: Its just for understanding/testing purpouses/ With these lines of code I can extract the values... fibaro:debug(dTblZones.Living.StopAt) fibaro:debug(dTblZones.SlaapkamerKM.StopAt) ... but what if I want to extract them all one by one so Living.StopAt, SlaapkamerKM.StopAt, Dressing.StopAt, ......etc So I want to iterate over every main Key. Any help would be great thx. TblZones = { Living = { Temp = 22, SetTemp = 23, Demand = 0, StopAt = 10000.345, Predict
  18. Hi I'm having a little hard time for whatever reason on getting JSON string into local variables in a VD. The JSON string is: [{"sensorTemp": "23.68", "sensorHumidity": "25.50", "sensorPressure": "1014.22", "sensorBattery": "3145"}] my code for this: jsonTable = json.decode(response) fibaro:debug("response: " .. response) local temperature = jsonTable.sensorTemp local humidity = response.sensorHumidity local pressure = response.sensorPressure local battery = response.sensorBattery I have also tried printing the key value pairs but I never go
  19. Hi, I have implemented @cag014 HomeTable to track the device ID's of my HC2 the table structure is like this office = { Light=33,Temp=1186,Motion=1251,Lamp=720,rcSonos=1 }, Landing_Stairs = { stairsLight=92,landingLight=168,rcSonos=1 }, scene = { MainScene=614,AlarmControl=598,rebootHC2=593,goodMorning=463,goodNight=331,LeavingHome=483,welcomeHome=488,quietMorning=499,kidsToBed=490,plaroomTvOn=580,firstFloorMusicOn=579,firstFloorAllOff=578, hallSceneControl=519,StairsLight30=556,GateOpen5=526,GateOpenHold=361,GateOpenClose=425,DumpEventLog=565,P
  20. Hi all, I want to send commands to my Rotel amplifier from my HC2, using lua in a virtual device. The service I want to connect to is a websockets service on an RPi2 connected to the Rotel over USB. It's the json-serial-port-server by John Lauer, https://github.com/chilipeppr/serial-port-json-server. I did find connections using tcpsockets in lua, but tcpsockets and websockets are different things. All other (http) connections don't work. If I get something like a connection from lua, an additional window opens on top of my browser connection to my HC2. This is not useful. Anyone any idea how
  21. Dear Fibaro team, In my HC2 I use many global variables which offer me full flexibility with this great controller :-> Lately I noticed that if you change a global variable on HC2 through a HTTP command then the global variable on HC2 will change, but Scenes that are dependent of this global variable change (.. trigger) are not being executed. For testing purpose I then created a new scene within HC2 which changes the same global variable, and now I notice that the other Scenes (.. that are dependent of this global variable change by trigger) are being executed. So it looks lik
  • Create New...