Instead of updating existing input values are new input values created

Dears,
I have installed emoncms local on a Raspberry Pi and everything seems to work fine.
I have a python-script to send the data from a DHT22 sensor to this local emoncms. The data appear as input in emoncms. But every time the script runs and send the data, emoncms creates a new input instead updating the existing data. So its not possible to write the data to a feed :frowning: This is looking so in inputs tab:

 Node	Key		    Name	   Process list	   Updated	Value			
emonSZ	Luftfeuchte				           28 mins	        43.8			
emonSZ	Temperatur				           28 mins	        19			
emonSZ	Luftfeuchte				           28 mins	        43.8			
emonSZ	Temperatur				           28 mins	        19			
emonSZ	Temperatur				           13 mins	        19			
emonSZ	Luftfeuchte				           13 mins	        43.8			
emonSZ	Temperatur				            5 mins	        19			
emonSZ	Luftfeuchte				            5 mins	       43.9			
emonSZ	Temperatur				           14s	       19.1			
emonSZ	Luftfeuchte				           14s	       44		

And this is the used python-code to send the data:

def dhtreading_witesql():

     humidity, temperature = Adafruit_DHT.read_retry(22, 17)

     contents = urllib2.urlopen("http://192.168.0.22/emoncms/input/post?node=emonSZ&fulljson={\"Temperatur:\":" + str(temperature) + ",\"Luftfeuchte:\":" + str(humidity) + "}&apikey=8c6xxxxxxxxxx")
     contents.readline()
    
for i in range(1):
     dhtreading_witesql()

What is there the problem and how can the values are updated instead of creating always new input lines?

(Sorry for the not formatting of the code)

Ok, found the problem. The URL in python-script was false formatted, now it works fine! :slight_smile:

1 Like