calaos / calaos_base

Calaos server
https://calaos.fr
GNU General Public License v3.0
162 stars 37 forks source link

WebInputAnalog not updating #56

Closed azertybepo closed 10 years ago

azertybepo commented 10 years ago

when using WebInputAnalog as an input with

        <calaos:input coeff_a="0" coeff_b="1" file_type="json" frequency="100000" id="input_69" max="10000" min="-10000" name="pluie 1" path="rain/1h" step="1" type="WebInputAnalog" unit="mm / 1h" url="http://api.openweathermap.org/data/2.5/weather?q=paris"/> 

the input is not updating, only after a server restart it picks up the new values

the strange thing is

        <calaos:input file_type="json" gui_type="analog_in" id="input_63" name="prises" path="watt" period="10000" type="WebInputAnalog" url="http://10.0.0.2/currentcostdata_30.txt" visible="true"/>

is working

naguirre commented 10 years ago

I didn't fin rain/1h path into http://api.openweathermap.org/data/2.5/weather?q=paris URL. Did i missed something ?

naguirre commented 10 years ago

I can't see the problem, i tried with an unit test in python running a webserver and serving json containing the cpu temperature and a random value and the temperature of the machine cpu, and it works fine.

the config :

And the python script for tests : https://gist.github.com/naguirre/4e34b5e4a6092500538b