Extend my sensors?


Does anyone have any idea’s or know how to extend my tl2561 and my dht11 sensors are not working properly.
the signal\wires test through perfect but the DHT11 have about 10ft of 22G\4 wire.
Should I just try to solder off the 10k resister off my 3wire DHT and solder on a 2K resister?

I have no idea how to get my tl2561 to be on a 7ft cable so any help there would be awesome.

Everything is powered by a 5v 10amp and is showing 5.0v at the end of the wire ( no voltage drop )
Everything is wired through an ethernet duplicator\copy DIN interface, this works great so I can have ethernet ends on all of the sensors and the same plug for 5-6 diff types of sensors ( +,ground and 6 gpio ) then use 22g wire and just slip it into the right spots in the ethernet end which isnt too hard with thicker wire.


How did you connect DTH11? Are you using agent 2.0?


here is the code I am using ( 2 sensors, works perfect until I extend them )

import paho.mqtt.client as mqtt
import time
import sys
import Adafruit_DHT

username = "XXX"
password = "XXX"
clientid = "XXX"

mqttc = mqtt.Client(client_id=clientid)
mqttc.username_pw_set(username, password=password)
mqttc.connect("mqtt.mydevices.com", port=1883, keepalive=60)

topic_dht11_temp = "v1/" + username + "/things/" + clientid + "/data/1"
topic_dht11_humidity = "v1/" + username + "/things/" + clientid + "/data/2"
topic_dht12_temp = "v1/" + username + "/things/" + clientid + "/data/3"
topic_dht12_humidity = "v1/" + username + "/things/" + clientid + "/data/4"

while True:
        humidity11, temp11 = Adafruit_DHT.read_retry(11, 22) #11 is the sensor type, 17 is the GPIO pin number (not physical pin number)
        humidity12, temp12 = Adafruit_DHT.read_retry(11, 27) #22 is the sensor type, 18 is the GPIO pin number (not physical pin number)

        if temp11 is not None:
            temp11 = "temp,c=" + str(temp11)
            mqttc.publish(topic_dht11_temp, payload=temp11, retain=True)
        if humidity11 is not None:
            humidity11 = "rel_hum,p=" + str(humidity11)
            mqttc.publish(topic_dht11_humidity, payload=humidity11, retain=True)
        if temp12 is not None:
            temp12 = "temp,c=" + str(temp12)
            mqttc.publish(topic_dht12_temp, payload=temp12, retain=True)
        if humidity12 is not None:
            humidity12 = "rel_hum,p=" + str(humidity12)
            mqttc.publish(topic_dht12_humidity, payload=humidity12, retain=True)
    except (EOFError, SystemExit, KeyboardInterrupt):


at a distance of 7ft, it should not cause any problem. i am not sure why you can not get reading. first, try to get TSL256 sensor value with a simple code (without cayenne). You might get a better response on this topic in https://stackoverflow.com/. once you slow this problem you can add the cayenne code and send data.
you can also try our python librrary https://github.com/myDevicesIoT/Cayenne-MQTT-Python


it finally showed up but instead of showing large numbers it shows .25 when lights are off and 53 when lights are on.


can you share the link to the code you are using. For dht11 refer to this https://learn.adafruit.com/dht-humidity-sensing-on-raspberry-pi-with-gdocs-logging/overview and try to get reading without cayenne code. As this issue seems to be with your hardware and code.