Forum Replies Created
-
AuthorPosts
-
Teza
ParticipantThank you Wolferl.
So Guess for the ‘”voc”:463654,’ value, it need to be divided by 1000 as the range is given from 10ppm to 1000ppm?
Teza
ParticipantI don’t think that is the direction of the project.
I have been trying to implement it in my Fibaro HC2, and have been able to import the json string into the system.
Tho, my unit have no wifi network atm, so I need to get the unit fixed before I can continue.This is the code so far:
--[[ -- %% autostart %% properties %% events %% globals --]] MyId = fibaro:getSelfId() local PI1 = Net.FHttp("192.168.8.106", 80); res, status, errorCode = PI1:GET("/j"); fibaro:debug ("status "..status.."; errorCode ".. errorCode.."; res ".. res); arrData = json.decode(res); function dump(o) if type(o) == 'table' then local s = '{ ' for k,v in pairs(o) do if type(k) ~= 'number' then k = '"'..k..'"' end s = s .. '['..k..'] = ' .. dump(v) .. ',' end return s .. '} ' else return tostring(o) end end local jstr = '{"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}}' local j = json.decode(jstr) print(dump(j))
Teza
ParticipantI have searched the internet for many hours trying to find out how to get the values imported in fibaro, but as I have no knowledge of programming I have not been able to.
The programming language is LUA, and I think all I need is the LUA code to import the json string into a table.
I dont think I can install librarys, but dont know if that is correct.It is easy to set up a viritual devive in the system, but are strugeling with the lua code to get the values.
Teza
ParticipantGood to know,was worried about faulty sensors.
Teza
ParticipantHave had another look at this unit, and it is now online again.
There is one beep, silence and 3 beep coming from it.Do you have a public list over these codes?
Teza
ParticipantHi, any planned schedule for the request in the first post?
-
AuthorPosts