Aller au contenu

Inkew

Membres confirmés
  • Compteur de contenus

    87
  • Inscription

  • Dernière visite

  • Jours gagnés

    1

Tout ce qui a été posté par Inkew

  1. En fait je me suis égaré, la valeur qui m'est retourné (12243) ne correspond pas la valeur souhaitée.. Une idée??
  2. Merci pour cette aide! J'ai essayé ça : success = function(response) local data=string.find(json.encode(response.data), "analog0") local data2 = tonumber(data) local data3 = data2 + "10000000" Ca me retourne bien la valeur désirée : [QUICKAPP313]: onInit [07.01.2021] [10:51:38] [DEBUG] [QUICKAPP313]: data3 = 12243 Mais je n'arrive pas à lui appliquer cette formule : local analog = (((tonumber(data) * 0.000050354) - 0.25) / 0.028) Je me demande si c'est la bonne syntaxe?
  3. En attendant la tant désirée QuickApp en question, je me suis lancé dans un petit morceau de code pour aller chercher une valeur analogique dans l'IPX, mais je coince à un endroit : function QuickApp:onInit() self:debug("onInit") self.http = net.HTTPClient({timeout=3000}) self.http:request("http://user:password@192.168.0.4:80/user/status.xml", { options = { method = 'GET' }, success = function(response) local data=json.encode(response.data) self:debug("data = ", data) end, error = function(error) self:debug('error: ' .. json.encode(error)) end }) end La variable data retournée est la suivante : data = "\n0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0<\/dimper>\n000000000000000000000000<\/dimon>\n\n0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0<\/x010vper>\n0000000000000000<\/x010von>\n\n0<\/led0>\n0<\/led1>\n1<\/led2>\n1<\/led3>\n1<\/led4>\n0<\/led5>\n0<\/led6>\n0<\/led7>\n0<\/led8>\n0<\/led9>\n0<\/led10>\n0<\/led11>\n0<\/led12>\n1<\/led13>\n0<\/led14>\n0<\/led15>\n0<\/led16>\n0<\/led17>\n0<\/led18>\n0<\/led19>\n0<\/led20>\n0<\/led21>\n0<\/led22>\n0<\/led23>\n0<\/led24>\n0<\/led25>\n0<\/led26>\n0<\/led27>\n0<\/led28>\n0<\/led29>\n0<\/led30>\n0<\/led31>\n0<\/led32>\n0<\/led33>\n0<\/led34>\n0<\/led35>\n0<\/led36>\n0<\/led37>\n0<\/led38>\n0<\/led39>\n0<\/led40>\n0<\/led41>\n0<\/led42>\n0<\/led43>\n0<\/led44>\n0<\/led45>\n0<\/led46>\n0<\/led47>\n0<\/led48>\n0<\/led49>\n0<\/led50>\n0<\/led51>\n0<\/led52>\n0<\/led53>\n0<\/led54>\n0<\/led55>\n\n0<\/btn0>\n0<\/btn1>\n0<\/btn2>\n0<\/btn3>\n0<\/btn4>\n0<\/btn5>\n0<\/btn6>\n0<\/btn7>\n0<\/btn8>\n1<\/btn9>\n0<\/btn10>\n0<\/btn11>\n0<\/btn12>\n0<\/btn13>\n0<\/btn14>\n0<\/btn15>\n0<\/btn16>\n0<\/btn17>\n0<\/btn18>\n0<\/btn19>\n0<\/btn20>\n0<\/btn21>\n0<\/btn22>\n0<\/btn23>\n1<\/btn24>\n0<\/btn25>\n1<\/btn26>\n0<\/btn27>\n0<\/btn28>\n0<\/btn29>\n0<\/btn30>\n0<\/btn31>\n0<\/btn32>\n0<\/btn33>\n0<\/btn34>\n0<\/btn35>\n0<\/btn36>\n0<\/btn37>\n0<\/btn38>\n0<\/btn39>\n0<\/btn40>\n0<\/btn41>\n0<\/btn42>\n0<\/btn43>\n0<\/btn44>\n0<\/btn45>\n0<\/btn46>\n0<\/btn47>\n0<\/btn48>\n0<\/btn49>\n0<\/btn50>\n0<\/btn51>\n0<\/btn52>\n0<\/btn53>\n0<\/btn54>\n0<\/btn55>\n\n0<\/outtaon0>\n0<\/outtaon1>\n0<\/outtaon2>\n0<\/outtaon3>\n0<\/outtaon4>\n0<\/outtaon5>\n0<\/outtaon6>\n0<\/outtaon7>\n0<\/outtaon8>\n0<\/outtaon9>\n0<\/outtaon10>\n0<\/outtaon11>\n0<\/outtaon12>\n0<\/outtaon13>\n0<\/outtaon14>\n0<\/outtaon15>\n0<\/outtaon16>\n0<\/outtaon17>\n0<\/outtaon18>\n0<\/outtaon19>\n0<\/outtaon20>\n0<\/outtaon21>\n0<\/outtaon22>\n0<\/outtaon23>\n0<\/outtaon24>\n0<\/outtaon25>\n0<\/outtaon26>\n0<\/outtaon27>\n0<\/outtaon28>\n0<\/outtaon29>\n0<\/outtaon30>\n0<\/outtaon31>\n0<\/outtaon32>\n0<\/outtaon33>\n0<\/outtaon34>\n0<\/outtaon35>\n0<\/outtaon36>\n0<\/outtaon37>\n0<\/outtaon38>\n0<\/outtaon39>\n0<\/outtaon40>\n0<\/outtaon41>\n0<\/outtaon42>\n0<\/outtaon43>\n0<\/outtaon44>\n0<\/outtaon45>\n0<\/outtaon46>\n0<\/outtaon47>\n0<\/outtaon48>\n0<\/outtaon49>\n0<\/outtaon50>\n0<\/outtaon51>\n0<\/outtaon52>\n0<\/outtaon53>\n0<\/outtaon54>\n0<\/outtaon55>\n\n0<\/vin0>\n0<\/vin1>\n0<\/vin2>\n0<\/vin3>\n0<\/vin4>\n0<\/vin5>\n0<\/vin6>\n0<\/vin7>\n0<\/vin8>\n0<\/vin9>\n0<\/vin10>\n0<\/vin11>\n0<\/vin12>\n0<\/vin13>\n0<\/vin14>\n0<\/vin15>\n0<\/vin16>\n0<\/vin17>\n0<\/vin18>\n0<\/vin19>\n0<\/vin20>\n0<\/vin21>\n0<\/vin22>\n0<\/vin23>\n0<\/vin24>\n0<\/vin25>\n0<\/vin26>\n0<\/vin27>\n0<\/vin28>\n0<\/vin29>\n0<\/vin30>\n0<\/vin31>\n0<\/vin32>\n0<\/vin33>\n0<\/vin34>\n0<\/vin35>\n0<\/vin36>\n0<\/vin37>\n0<\/vin38>\n0<\/vin39>\n0<\/vin40>\n0<\/vin41>\n0<\/vin42>\n0<\/vin43>\n0<\/vin44>\n0<\/vin45>\n0<\/vin46>\n0<\/vin47>\n0<\/vin48>\n0<\/vin49>\n0<\/vin50>\n0<\/vin51>\n0<\/vin52>\n0<\/vin53>\n0<\/vin54>\n0<\/vin55>\n0<\/vin56>\n0<\/vin57>\n0<\/vin58>\n0<\/vin59>\n0<\/vin60>\n0<\/vin61>\n0<\/vin62>\n0<\/vin63>\n0<\/vin64>\n0<\/vin65>\n0<\/vin66>\n0<\/vin67>\n0<\/vin68>\n0<\/vin69>\n0<\/vin70>\n0<\/vin71>\n0<\/vin72>\n0<\/vin73>\n0<\/vin74>\n0<\/vin75>\n0<\/vin76>\n0<\/vin77>\n0<\/vin78>\n0<\/vin79>\n0<\/vin80>\n0<\/vin81>\n0<\/vin82>\n0<\/vin83>\n0<\/vin84>\n0<\/vin85>\n0<\/vin86>\n0<\/vin87>\n0<\/vin88>\n0<\/vin89>\n0<\/vin90>\n0<\/vin91>\n0<\/vin92>\n0<\/vin93>\n0<\/vin94>\n0<\/vin95>\n0<\/vin96>\n0<\/vin97>\n0<\/vin98>\n0<\/vin99>\n0<\/vin100>\n0<\/vin101>\n0<\/vin102>\n0<\/vin103>\n0<\/vin104>\n0<\/vin105>\n0<\/vin106>\n0<\/vin107>\n0<\/vin108>\n0<\/vin109>\n0<\/vin110>\n0<\/vin111>\n0<\/vin112>\n0<\/vin113>\n0<\/vin114>\n0<\/vin115>\n0<\/vin116>\n0<\/vin117>\n0<\/vin118>\n0<\/vin119>\n0<\/vin120>\n0<\/vin121>\n0<\/vin122>\n0<\/vin123>\n0<\/vin124>\n0<\/vin125>\n0<\/vin126>\n0<\/vin127>\n\n1<\/vout0>\n0<\/vout1>\n0<\/vout2>\n0<\/vout3>\n0<\/vout4>\n0<\/vout5>\n0<\/vout6>\n0<\/vout7>\n0<\/vout8>\n0<\/vout9>\n0<\/vout10>\n0<\/vout11>\n0<\/vout12>\n0<\/vout13>\n0<\/vout14>\n0<\/vout15>\n0<\/vout16>\n0<\/vout17>\n0<\/vout18>\n0<\/vout19>\n0<\/vout20>\n0<\/vout21>\n0<\/vout22>\n0<\/vout23>\n0<\/vout24>\n0<\/vout25>\n0<\/vout26>\n0<\/vout27>\n0<\/vout28>\n0<\/vout29>\n0<\/vout30>\n0<\/vout31>\n0<\/vout32>\n0<\/vout33>\n0<\/vout34>\n0<\/vout35>\n0<\/vout36>\n0<\/vout37>\n0<\/vout38>\n0<\/vout39>\n0<\/vout40>\n0<\/vout41>\n0<\/vout42>\n0<\/vout43>\n0<\/vout44>\n0<\/vout45>\n0<\/vout46>\n0<\/vout47>\n0<\/vout48>\n0<\/vout49>\n0<\/vout50>\n0<\/vout51>\n0<\/vout52>\n0<\/vout53>\n0<\/vout54>\n0<\/vout55>\n0<\/vout56>\n0<\/vout57>\n0<\/vout58>\n0<\/vout59>\n0<\/vout60>\n0<\/vout61>\n0<\/vout62>\n0<\/vout63>\n0<\/vout64>\n0<\/vout65>\n0<\/vout66>\n0<\/vout67>\n0<\/vout68>\n0<\/vout69>\n0<\/vout70>\n0<\/vout71>\n0<\/vout72>\n0<\/vout73>\n0<\/vout74>\n0<\/vout75>\n0<\/vout76>\n0<\/vout77>\n0<\/vout78>\n0<\/vout79>\n0<\/vout80>\n0<\/vout81>\n0<\/vout82>\n0<\/vout83>\n0<\/vout84>\n0<\/vout85>\n0<\/vout86>\n0<\/vout87>\n0<\/vout88>\n0<\/vout89>\n0<\/vout90>\n0<\/vout91>\n0<\/vout92>\n0<\/vout93>\n0<\/vout94>\n0<\/vout95>\n0<\/vout96>\n0<\/vout97>\n0<\/vout98>\n0<\/vout99>\n0<\/vout100>\n0<\/vout101>\n0<\/vout102>\n0<\/vout103>\n0<\/vout104>\n0<\/vout105>\n0<\/vout106>\n0<\/vout107>\n0<\/vout108>\n0<\/vout109>\n0<\/vout110>\n0<\/vout111>\n0<\/vout112>\n0<\/vout113>\n0<\/vout114>\n0<\/vout115>\n0<\/vout116>\n0<\/vout117>\n0<\/vout118>\n0<\/vout119>\n0<\/vout120>\n0<\/vout121>\n0<\/vout122>\n0<\/vout123>\n0<\/vout124>\n0<\/vout125>\n0<\/vout126>\n0<\/vout127>\n\n\n0<\/votaon0>\n0<\/votaon1>\n0<\/votaon2>\n0<\/votaon3>\n0<\/votaon4>\n0<\/votaon5>\n0<\/votaon6>\n0<\/votaon7>\n0<\/votaon8>\n0<\/votaon9>\n0<\/votaon10>\n0<\/votaon11>\n0<\/votaon12>\n0<\/votaon13>\n0<\/votaon14>\n0<\/votaon15>\n0<\/votaon16>\n0<\/votaon17>\n0<\/votaon18>\n0<\/votaon19>\n0<\/votaon20>\n0<\/votaon21>\n0<\/votaon22>\n0<\/votaon23>\n0<\/votaon24>\n0<\/votaon25>\n0<\/votaon26>\n0<\/votaon27>\n0<\/votaon28>\n0<\/votaon29>\n0<\/votaon30>\n0<\/votaon31>\n0<\/votaon32>\n0<\/votaon33>\n0<\/votaon34>\n0<\/votaon35>\n0<\/votaon36>\n0<\/votaon37>\n0<\/votaon38>\n0<\/votaon39>\n0<\/votaon40>\n0<\/votaon41>\n0<\/votaon42>\n0<\/votaon43>\n0<\/votaon44>\n0<\/votaon45>\n0<\/votaon46>\n0<\/votaon47>\n0<\/votaon48>\n0<\/votaon49>\n0<\/votaon50>\n0<\/votaon51>\n0<\/votaon52>\n0<\/votaon53>\n0<\/votaon54>\n0<\/votaon55>\n0<\/votaon56>\n0<\/votaon57>\n0<\/votaon58>\n0<\/votaon59>\n0<\/votaon60>\n0<\/votaon61>\n0<\/votaon62>\n0<\/votaon63>\n0<\/votaon64>\n0<\/votaon65>\n0<\/votaon66>\n0<\/votaon67>\n0<\/votaon68>\n0<\/votaon69>\n0<\/votaon70>\n0<\/votaon71>\n0<\/votaon72>\n0<\/votaon73>\n0<\/votaon74>\n0<\/votaon75>\n0<\/votaon76>\n0<\/votaon77>\n0<\/votaon78>\n0<\/votaon79>\n0<\/votaon80>\n0<\/votaon81>\n0<\/votaon82>\n0<\/votaon83>\n0<\/votaon84>\n0<\/votaon85>\n0<\/votaon86>\n0<\/votaon87>\n0<\/votaon88>\n0<\/votaon89>\n0<\/votaon90>\n0<\/votaon91>\n0<\/votaon92>\n0<\/votaon93>\n0<\/votaon94>\n0<\/votaon95>\n0<\/votaon96>\n0<\/votaon97>\n0<\/votaon98>\n0<\/votaon99>\n0<\/votaon100>\n0<\/votaon101>\n0<\/votaon102>\n0<\/votaon103>\n0<\/votaon104>\n0<\/votaon105>\n0<\/votaon106>\n0<\/votaon107>\n0<\/votaon108>\n0<\/votaon109>\n0<\/votaon110>\n0<\/votaon111>\n0<\/votaon112>\n0<\/votaon113>\n0<\/votaon114>\n0<\/votaon115>\n0<\/votaon116>\n0<\/votaon117>\n0<\/votaon118>\n0<\/votaon119>\n0<\/votaon120>\n0<\/votaon121>\n0<\/votaon122>\n0<\/votaon123>\n0<\/votaon124>\n0<\/votaon125>\n0<\/votaon126>\n0<\/votaon127>\n\n15872<\/analog0>\n0<\/analog1>\n0<\/analog2>\n0<\/analog3>\n\n0<\/analogV0>\n0<\/analogV1>\n0<\/analogV2>\n0<\/analogV3>\n0<\/analogV4>\n0<\/analogV5>\n0<\/analogV6>\n0<\/analogV7>\n0<\/analogV8>\n0<\/analogV9>\n0<\/analogV10>\n0<\/analogV11>\n0<\/analogV12>\n0<\/analogV13>\n0<\/analogV14>\n0<\/analogV15>\n0<\/analogV16>\n0<\/analogV17>\n0<\/analogV18>\n0<\/analogV19>\n0<\/analogV20>\n0<\/analogV21>\n0<\/analogV22>\n0<\/analogV23>\n0<\/analogV24>\n0<\/analogV25>\n0<\/analogV26>\n0<\/analogV27>\n0<\/analogV28>\n0<\/analogV29>\n0<\/analogV30>\n0<\/analogV31>\n\n0<\/xths01>\n0<\/xths02>\n0<\/xths03>\n0<\/xths11>\n0<\/xths12>\n0<\/xths13>\n0<\/xths21>\n0<\/xths22>\n0<\/xths23>\n0<\/xths31>\n0<\/xths32>\n0<\/xths33>\n0<\/xths41>\n0<\/xths42>\n0<\/xths43>\n0<\/xths51>\n0<\/xths52>\n0<\/xths53>\n0<\/xths61>\n0<\/xths62>\n0<\/xths63>\n0<\/xths71>\n0<\/xths72>\n0<\/xths73>\n0<\/xths81>\n0<\/xths82>\n0<\/xths83>\n0<\/xths91>\n0<\/xths92>\n0<\/xths93>\n0<\/xths101>\n0<\/xths102>\n0<\/xths103>\n0<\/xths111>\n0<\/xths112>\n0<\/xths113>\n0<\/xths121>\n0<\/xths122>\n0<\/xths123>\n0<\/xths131>\n0<\/xths132>\n0<\/xths133>\n\n0<\/cpt0>\n5<\/cpt1>\n0<\/cpt2>\n0<\/cpt3>\n0<\/cpt4>\n0<\/cpt5>\n0<\/cpt6>\n0<\/cpt7>\n0<\/cpt8>\n0<\/cpt9>\n0<\/cpt10>\n0<\/cpt11>\n0<\/cpt12>\n0<\/cpt13>\n0<\/cpt14>\n0<\/cpt15>\n\n0<\/volet0>\n0<\/volet1>\n0<\/volet2>\n0<\/volet3>\n0<\/volet4>\n0<\/volet5>\n0<\/volet6>\n0<\/volet7>\n0<\/volet8>\n0<\/volet9>\n0<\/volet10>\n0<\/volet11>\n0<\/volet12>\n0<\/volet13>\n0<\/volet14>\n0<\/volet15>\n0<\/volet16>\n0<\/volet17>\n0<\/volet18>\n0<\/volet19>\n0<\/volet20>\n0<\/volet21>\n0<\/volet22>\n0<\/volet23>\n0<\/volet24>\n0<\/volet25>\n0<\/volet26>\n0<\/volet27>\n0<\/volet28>\n0<\/volet29>\n0<\/volet30>\n0<\/volet31>\n\n0<\/pw0>\n0<\/pw1>\n0<\/pw2>\n0<\/pw3>\n0<\/pw4>\n0<\/pw5>\n0<\/pw6>\n0<\/pw7>\n0<\/pw8>\n0<\/pw9>\n0<\/pw10>\n0<\/pw11>\n0<\/pw12>\n0<\/pw13>\n0<\/pw14>\n0<\/pw15>\n0<\/pw16>\n0<\/pw17>\n0<\/pw18>\n0<\/pw19>\n0<\/pw20>\n0<\/pw21>\n0<\/pw22>\n0<\/pw23>\n0<\/pw24>\n0<\/pw25>\n0<\/pw26>\n0<\/pw27>\n0<\/pw28>\n0<\/pw29>\n0<\/pw30>\n0<\/pw31>\n\n0<\/eno0>\n0<\/eno1>\n0<\/eno2>\n0<\/eno3>\n0<\/eno4>\n0<\/eno5>\n0<\/eno6>\n0<\/eno7>\n0<\/eno8>\n0<\/eno9>\n0<\/eno10>\n0<\/eno11>\n0<\/eno12>\n0<\/eno13>\n0<\/eno14>\n0<\/eno15>\n0<\/eno16>\n0<\/eno17>\n0<\/eno18>\n0<\/eno19>\n0<\/eno20>\n0<\/eno21>\n0<\/eno22>\n0<\/eno23>\n0<\/eno24>\n0<\/eno25>\n0<\/eno26>\n0<\/eno27>\n0<\/eno28>\n0<\/eno29>\n0<\/eno30>\n0<\/eno31>\n0<\/eno32>\n0<\/eno33>\n0<\/eno34>\n0<\/eno35>\n0<\/eno36>\n0<\/eno37>\n0<\/eno38>\n0<\/eno39>\n0<\/eno40>\n0<\/eno41>\n0<\/eno42>\n0<\/eno43>\n0<\/eno44>\n0<\/eno45>\n0<\/eno46>\n0<\/eno47>\n0<\/eno48>\n0<\/eno49>\n0<\/eno50>\n0<\/eno51>\n0<\/eno52>\n0<\/eno53>\n0<\/eno54>\n0<\/eno55>\n0<\/eno56>\n0<\/eno57>\n0<\/eno58>\n0<\/eno59>\n0<\/eno60>\n0<\/eno61>\n0<\/eno62>\n0<\/eno63>\n0<\/eno64>\n0<\/eno65>\n0<\/eno66>\n0<\/eno67>\n0<\/eno68>\n0<\/eno69>\n0<\/eno70>\n0<\/eno71>\n0<\/eno72>\n0<\/eno73>\n0<\/eno74>\n0<\/eno75>\n0<\/eno76>\n0<\/eno77>\n0<\/eno78>\n0<\/eno79>\n0<\/eno80>\n0<\/eno81>\n0<\/eno82>\n0<\/eno83>\n0<\/eno84>\n0<\/eno85>\n0<\/eno86>\n0<\/eno87>\n0<\/eno88>\n0<\/eno89>\n0<\/eno90>\n0<\/eno91>\n0<\/eno92>\n0<\/eno93>\n0<\/eno94>\n0<\/eno95>\n0<\/eno96>\n0<\/eno97>\n0<\/eno98>\n0<\/eno99>\n0<\/eno100>\n0<\/eno101>\n0<\/eno102>\n0<\/eno103>\n0<\/eno104>\n0<\/eno105>\n0<\/eno106>\n0<\/eno107>\n0<\/eno108>\n0<\/eno109>\n0<\/eno110>\n0<\/eno111>\n0<\/eno112>\n0<\/eno113>\n0<\/eno114>\n0<\/eno115>\n0<\/eno116>\n0<\/eno117>\n0<\/eno118>\n0<\/eno119>\n0<\/eno120>\n0<\/eno121>\n0<\/eno122>\n0<\/eno123>\n0<\/eno124>\n0<\/eno125>\n0<\/eno126>\n0<\/eno127>\n0<\/eno128>\n0<\/eno129>\n0<\/eno130>\n0<\/eno131>\n0<\/eno132>\n0<\/eno133>\n0<\/eno134>\n0<\/eno135>\n0<\/eno136>\n0<\/eno137>\n0<\/eno138>\n0<\/eno139>\n0<\/eno140>\n0<\/eno141>\n0<\/eno142>\n0<\/eno143>\n0<\/eno144>\n0<\/eno145>\n0<\/eno146>\n0<\/eno147>\n0<\/eno148>\n0<\/eno149>\n0<\/eno150>\n0<\/eno151>\n0<\/eno152>\n0<\/eno153>\n0<\/eno154>\n0<\/eno155>\n0<\/eno156>\n0<\/eno157>\n0<\/eno158>\n0<\/eno159>\n0<\/eno160>\n0<\/eno161>\n0<\/eno162>\n0<\/eno163>\n0<\/eno164>\n0<\/eno165>\n0<\/eno166>\n0<\/eno167>\n\n255<\/x4fp10>\n255<\/x4fp11>\n255<\/x4fp12>\n255<\/x4fp13>\n255<\/x4fp14>\n255<\/x4fp20>\n255<\/x4fp21>\n255<\/x4fp22>\n255<\/x4fp23>\n255<\/x4fp24>\n255<\/x4fp30>\n255<\/x4fp31>\n255<\/x4fp32>\n255<\/x4fp33>\n255<\/x4fp34>\n255<\/x4fp40>\n255<\/x4fp41>\n255<\/x4fp42>\n255<\/x4fp43>\n255<\/x4fp44>\n\n54:10:EC:89:E9:60<\/mac>\n\n0<\/enoA0>\n0<\/enoA1>\n0<\/enoA2>\n0<\/enoA3>\n0<\/enoA4>\n0<\/enoA5>\n0<\/enoA6>\n0<\/enoA7>\n0<\/enoA8>\n0<\/enoA9>\n0<\/enoA10>\n0<\/enoA11>\n0<\/enoA12>\n0<\/enoA13>\n0<\/enoA14>\n0<\/enoA15>\n0<\/enoA16>\n0<\/enoA17>\n0<\/enoA18>\n0<\/enoA19>\n0<\/enoA20>\n0<\/enoA21>\n0<\/enoA22>\n0<\/enoA23>\n\n0<\/enoVT0>\n0<\/enoVT1>\n0<\/enoVT2>\n0<\/enoVT3>\n0<\/enoVT4>\n0<\/enoVT5>\n0<\/enoVT6>\n0<\/enoVT7>\n0<\/enoVT8>\n0<\/enoVT9>\n0<\/enoVT10>\n0<\/enoVT11>\n0<\/enoVT12>\n0<\/enoVT13>\n0<\/enoVT14>\n0<\/enoVT15>\n\n0<\/enoVR01>\n0<\/enoVR02>\n0<\/enoVR03>\n0<\/enoVR04>\n0<\/enoVR05>\n0<\/enoVR06>\n0<\/enoVR07>\n0<\/enoVR08>\n0<\/enoVR09>\n0<\/enoVR10>\n0<\/enoVR11>\n0<\/enoVR12>\n0<\/enoVR13>\n0<\/enoVR14>\n0<\/enoVR15>\n0<\/enoVR16>\n0<\/enoVR17>\n0<\/enoVR18>\n0<\/enoVR19>\n0<\/enoVR20>\n0<\/enoVR21>\n0<\/enoVR22>\n0<\/enoVR23>\n0<\/enoVR24>\n\n13172<\/lps0>\n893224<\/wuc0>\n<\/enotype>\n<\/enocode>\n\n06\/01\/2021<\/date>\n22:59:32<\/heure>\n\n<\/response>\n" et je souhaite qu'elle prenne la valeur de analog0 (15872). Peut-on envisager sans trop prendre de ressources faire tourner ce code régulièrement (toutes les secondes voire moins?) Ou peut-on envisager que ce soit plutôt l'IPX qui pousse cette valeur à chaque changement (dans ce cas mon code est déjà obsolète!)? Un peu d'aide serait la bienvenue..
  4. Inkew

    Capteur Http Eedomus -> HC3

    Mais je l'ai vu avant toi ;-) en tout cas merci de ton aide, je n'y serai jamais arrivé sans toi! PS1 : désolé pour la réponse tardive! PS2 : Meilleurs voeux pour cette nouvelle année!
  5. Inkew

    Capteur Http Eedomus -> HC3

    Il fallait juste que que mette le method="put" dans les options de la requête, et non dans les paramètres.. Level Up! Merci infiniment de m'avoir aidé!! Trop content!! Un coup de nettoyage, pour ceux que ça intéresse : local requestBody = { --action = "create", --params = { -- type = "local", scene = "lIHUqzUSmWfiC9n", --method = "PUT", -- description = description -- } } self:debug("requestbody =", json.encode(requestBody)) self.http = net.HTTPClient({timeout=3000}) self.http:request("http://192.168.0.11/api/eedomushue/groups/0/action", { options = { data = json.encode(requestBody), method = "PUT" }, success = function(response) self:debug(response.status) self:debug(response.data) end, error = function(message) self:debug("error:", message) end }) onAction: {"deviceId":275,"actionName":"turnOn","args":[275,"turnOn"]} [26.12.2020] [21:46:46] [DEBUG] [QUICKAPP275]: requestbody = {"scene":"lIHUqzUSmWfiC9n"} [26.12.2020] [21:46:46] [DEBUG] [QUICKAPP275]: 200 [26.12.2020] [21:46:46] [DEBUG] [QUICKAPP275]: [{"success":{"/groups/0/action/scene":"lIHUqzUSmWfiC9n"}}] [26.12.2020] [21:46:46] [DEBUG] [QUICKAPP275]: response status: 200 [26.12.2020] [21:46:46] [DEBUG] [QUICKAPP275]: headers: application/json [26.12.2020] [21:46:46] [DEBUG] [QUICKAPP275]: any_on = true [26.12.2020] [21:46:46] [DEBUG] [QUICKAPP275]: all_on = false C'est à ce moment qu'on doit faire un petit tuto?!?
  6. Inkew

    Capteur Http Eedomus -> HC3

    Oh purée je suis une chèvre!! Ca fonctionne!!
  7. Inkew

    Capteur Http Eedomus -> HC3

    j'avais oublié un /action derrière la requête, je dois zapper quelque chose car quand je lance (avec l'outil développeur Hue) ce genre de commande ça fonctionne : Mon code est le suivant : local requestBody = { --action = "create", --params = { -- type = "local", scene = "lIHUqzUSmWfiC9n", method = "PUT", -- description = description -- } } self:debug("requestbody =", json.encode(requestBody)) self.http = net.HTTPClient({timeout=3000}) self.http:request("http://192.168.0.11/api/eedomushue/groups/0/action", { options = { data = json.encode("requestBody"), }, success = function(response) self:debug(response.status) self:debug(response.data) end, error = function(message) self:debug("error:", message) end }) et mon debug : onAction: {"deviceId":275,"actionName":"turnOn","args":[275,"turnOn"]} [26.12.2020] [21:42:49] [DEBUG] [QUICKAPP275]: requestbody = {"method":"PUT","scene":"lIHUqzUSmWfiC9n"} [26.12.2020] [21:42:49] [DEBUG] [QUICKAPP275]: 200 [26.12.2020] [21:42:49] [DEBUG] [QUICKAPP275]: [{"error":{"type":2,"address":"/groups/0/action","description":"body contains invalid json"}}] [26.12.2020] [21:42:49] [DEBUG] [QUICKAPP275]: response status: 200 [26.12.2020] [21:42:49] [DEBUG] [QUICKAPP275]: headers: application/json [26.12.2020] [21:42:49] [DEBUG] [QUICKAPP275]: any_on = true [26.12.2020] [21:42:49] [DEBUG] [QUICKAPP275]: all_on = false J'ai l'impression de ne plus être très loin!!
  8. Inkew

    Capteur Http Eedomus -> HC3

    C'est pas grave, merci déjà pour tout ton aide. Apparemment c'est le format de ma requête qui ne va pas, je vais essayer de trouver pourquoi: [26.12.2020] [21:26:11] [DEBUG] [QUICKAPP275]: requestbody = {"scene":"lIHUqzUSmWfiC9n","method":"PUT"} [26.12.2020] [21:26:11] [DEBUG] [QUICKAPP275]: 200 [26.12.2020] [21:26:11] [DEBUG] [QUICKAPP275]: {"name":"Lightset 0","lights":["1","13","15","19","20","21","22","25","26","27","28","29","30","31","32","33","34","35","36","46","47","48","49","50","51","52","53","54","55","56","57","58","59","60","61","62"],"sensors":["1","7","8","9","10","13","14","15","16","17","18","19","30","31","32","33","34","35"],"type":"LightGroup","state":{"all_on":false,"any_on":true},"presence":{"state":{"presence":false,"presence_all":false,"lastupdated":"2020-12-26T20:14:16"}},"lightlevel":{"state":{"dark":true,"dark_all":true,"daylight":false,"daylight_any":false,"lightlevel":0,"lightlevel_min":0,"lightlevel_max":0,"lastupdated":"2020-12-26T20:19:16"}},"recycle":false,"action":{"on":false,"bri":127,"hue":54718,"sat":150,"effect":"none","xy":[0.3775,0.2460],"ct":366,"alert":"none","colormode":"ct"}} [26.12.2020] [21:26:11] [DEBUG] [QUICKAPP275]: response status: 200 [26.12.2020] [21:26:11] [DEBUG] [QUICKAPP275]: headers: application/json [26.12.2020] [21:26:11] [DEBUG] [QUICKAPP275]: any_on = false [26.12.2020] [21:26:11] [DEBUG] [QUICKAPP275]: all_on = false
  9. Inkew

    Capteur Http Eedomus -> HC3

    ouais, bon j'ai fait pas mal de test mais je n'arrive pas à grand chose. Je vais essayer de trouver. En tout cas merci de ton aide!
  10. Inkew

    Capteur Http Eedomus -> HC3

    j'ai déjà testé en remplacant "data" par "scene" et j'obtenais cette erreur : [QUICKAPP275]: [{"error":{"type":6,"address":"/groups/0/params","description":"parameter, params, not available"}},{"error":{"type":6,"address":"/groups/0/action","description":"parameter, action, not available"}}]
  11. Inkew

    Capteur Http Eedomus -> HC3

    [{"error":{"type":6,"address":"/groups/0/action/action","description":"parameter, action, not available"}},{"error":{"type":6,"address":"/groups/0/action/params","description":"parameter, params, not available"}}]
  12. Inkew

    Capteur Http Eedomus -> HC3

    Super, merci beaucoup!! Si je peux me permettre (je ne veux pas abuser!), tu aurais une idée sur ce qui ne va pas là-dedans: local requestBody = { action = "create", params = { --type = "local", data = 'lIHUqzUSmWfiC9n', description = description } } self.http = net.HTTPClient({timeout=3000}) self.http:request("http://192.168.0.11/api/eedomushue/groups/0/action", { options = { data = json.encode(requestBody), method = "PUT", }, })
  13. Inkew

    Capteur Http Eedomus -> HC3

    !! En fait c'est une requête qui me permet de connaitre l'état d'une ou plusieurs de mes ampoules connectées dans une pièce, avant de lancer une "scène d'éclairage". Je viens du monde eedomus, et la solution était pré-machée, en gros j'avais ça: avec un paramètre (la scène en question) : Je ne suis pas spécialiste (ça t'avais compris), mais je crois comprendre que c'est du Json, mais je ne sais pas convertir ça en une requête avec paramètres..
  14. Inkew

    Capteur Http Eedomus -> HC3

    Oh Yeah!!
  15. Inkew

    Capteur Http Eedomus -> HC3

    Ca vient bon on dirait!!
  16. Inkew

    Capteur Http Eedomus -> HC3

  17. Inkew

    Capteur Http Eedomus -> HC3

  18. Inkew

    Capteur Http Eedomus -> HC3

    Voici ce que ça me retourne :
  19. Inkew

    Capteur Http Eedomus -> HC3

    En déplaçant comme tu me le proposes, pas d'évolution du côté du LBL, voici ce que j'obtient dans la console :
  20. Inkew

    Capteur Http Eedomus -> HC3

    Alors comme je me suis un peu embrouillé, voici mon code (dans turnOn(), je ne sais pas comment lancer le code sinon..) : function QuickApp:turnOn() -- self:Switch(self:getVariable("IpxOutNumber"),1) self.http = net.HTTPClient({timeout=3000}) self.http:request("http://192.168.0.11/api/eedomushue/groups/2", { options = { -- headers = {['Authorization']='Basic '..self:getVariable("password")}, method = 'GET' }, success = function(response) self:debug("response status:", response.status) self:debug("headers:", response.headers["Content-Type"]) local data = json.decode(response.data) if data.contents and data.contents.quotes and data.contents.quotes[1] then local quote = data.contents.quotes[1].quote self:debug(quote) self:debug(response.data.state) self:updateView("label", "text", quote) end end, error = function(error) self:debug('error: ' .. json.encode(error)) end }) end Dans la console : Et pas de mise à jour dans le label.. Je commence à me demander si je n'attaque pas trop grand pour niveau!!
  21. Inkew

    Capteur Http Eedomus -> HC3

    Bonjour JJacques68, Désolé pour le délai de réponse, j'ai fait des tests entre temps sur autre chose mais je n'arrive à rien. Désolé aussi pour l'éditeur de code, je prend note! J'ai fait ce que tu m'as conseillé, mais ça n'amène pas grand chose: method = 'GET' }, success = function(response) self:updateView("LBL_State", "text", tostring(response.data)) end, self:debug(response.data.state.any_on), error = function(err) self:updateView("LBL_State", "text", tostring(err)) end }) j'ai cette erreur : Si je retire la ligne response.data.state.any_on, le LBL_State me retourne ça : {"name":"Salle de bain","lights":["27","28","29","30"],"sensors":[],"type":"Room","state":{"all_on":false,"any_on":false},"recycle":false,"class":"Bathroom","action":{"on":false,"bri":254,"hue":59969,"sat":205,"effect":"none","xy":[0.4943,0.2638],"ct":443,"alert":"select","colormode":"ct"}} ... une idée?
  22. Inkew

    Capteur Http Eedomus -> HC3

    J'ai créé un QA Binary Switch (je ne sais pas comment lancer ce code sinon!),et mis ce code : function QuickApp:turnOn() self:debug("binary switch turned on") self:updateProperty("value", true) -- An example of a GET inquiry -- self.http must have been previously created by net.HTTPClient local address = "http://192.168.0.11/api/eedomushue/groups/2" self.http:request(address, { options={ headers = { Accept = "application/json" }, checkCertificate = false, method = 'GET' }, success = function(response) self:debug("response status:", response.status) self:debug("headers:", response.headers["Content-Type"]) local data = json.decode(response.data) if data.contents and data.contents.quotes and data.contents.quotes[1] then local quote = data.contents.quotes[1].quote self:debug(quote) self:updateView("label", "text", quote) end end, error = function(error) self:debug('error: ' .. json.encode(error)) end }) end Dans mon navigateur, http://192.168.0.11/api/eedomushue/groups/2 me retourne ça : {"name":"Salle de bain","lights":["27","28","29","30"],"sensors":[],"type":"Room","state":{"all_on":false,"any_on":false},"recycle":fa ... Comment je peux m'y prendre pour aller chercher la valeur de state/any_on, et m'en servir pour changer d'état (0/1) mon QA par exemple? Merci!!
  23. Inkew

    Capteur Http Eedomus -> HC3

    Merci, Le lien que tu me proposes permet d'utiliser le push (ici un IPX) pour envoyer une valeur vers une QA, j'ai testé chez moi et cela fonctionne (grâce à toi d'ailleurs ;-) même si je n'arrive toujours pas à faire l'inverse!) Ce que je souhaite ici, c'est de faire une requête http vers le pont HUE pour qu'il m'active une scène prédéfinie dans ce pont, mais également connaître l'état de certaines lampes :
  24. Bonjour, Nouveau sur la HC3, je souhaite migrer tout doucement ce que j'avais sur l'eedomus sur la HC3, avant d'aller plus loin. Je m'attaque aux éclairage Hue, je sais qu'il existe une QA pour la HC3, mais lorsque je crée une scène, les lumières s'allument les unes après les autres! Sur l'eedomus, je faisais appel aux scènes créées sur l'app Hue au travers ce genre de requêtes. Est-ce que quelqu'un pourrait m'aider à convertir ça pour la HC3 :
  25. Inkew

    Scènes Auto de BSO

    Bonjour, J'ai équipé mes Brise-soleils de Roller Shutter 3 (mode Venitian Blind, je peux monter et descendre, et incliner le lamelles), et j'aimerais automatiser tout cela pour faire de la protection solaire. Je comptais créer un Binary Switch permettant de sélectionner un mode (Auto ou Manu) par ensemble de pièces d'une section de ma maison, et une scène par BSO (avec comme trigger des binary sensor que je renseignerai fonction de la température intérieure, et pourquoi pas des capteurs de présence pour éviter l'éblouissement..) Dès que je commande un store manuellement, je souhaiterai qu'il "sorte" de la scène Auto; pour ce faire je comptais créer un Binary Sensor par BSO (rien d'autre qu'une variable en fin de compte, mais dont la valeur serait visualisable depuis l'interface) qui indiquerait si le BSO a été activé manuellement (par le bouton) : comment puis-je récupérer l'action d'appuyer manuellement sur un bouton de commande afin de renseigner ce sensor en Mode Manu? Est-ce que ce Binary Sensor doit être enfant du store en question? Est-ce que globalement l'approche est bonne (je suis nouveau chez Fibaro!), ou y a-t-il plus simple, plus fiable ou plus fonctionnel? Merci!
×
×
  • Créer...