NOT WORKING: DHT and RELAYS on Ethernet GW
-
@zachflem said in NOT WORKING: DHT and RELAYS on Ethernet GW:
I'm also only getting the humidity presented to MyController
This also indicates some trouble in the communication between GW and Controller. For debugging, you may also add some wait()-time in between the presentation of the individual child-ID's.
-
So I've moved inside (it was bloody hot in the shed) and I'm working on my development board (it's a mirror of the setup in the shed, minus the external power supply for the sensors)
But with the shed sketch loaded into this MEGA, I'm getting the DHT values in the Serial Monitor, I'll hook it up proper to the network and see how we go.
-
DHT sensors are quite lazy so they need their time, try adding a wait(1000) before the
float temperature = dht.getTemperature();
@gohan said in NOT WORKING: DHT and RELAYS on Ethernet GW:
DHT sensors are quite lazy so they need their time, try adding a wait(1000) before the
float temperature = dht.getTemperature();
So far I've done this, and I have a value coming from the GW for humidity, and I'm seeing a presentation for the temp sensor in the logs, but nothing comes up when I discover the GW...
-
@gohan said in NOT WORKING: DHT and RELAYS on Ethernet GW:
What kind of gateway are you running?
An arduino mega clone with a w5100 based ethernet shield.
I think I might have found the problem, the humidity sensor reports as ID 0, the 2 relays as 1 and 2, and the temp sensor is showing up as 1, but before the relay.
So I think i need to add something to the sketch so that each type of sensor has a different prefix.
i.e. relays are 1XX, temp are 2XX etc
any thoughts?
-
@gohan said in NOT WORKING: DHT and RELAYS on Ethernet GW:
What kind of gateway are you running?
An arduino mega clone with a w5100 based ethernet shield.
I think I might have found the problem, the humidity sensor reports as ID 0, the 2 relays as 1 and 2, and the temp sensor is showing up as 1, but before the relay.
So I think i need to add something to the sketch so that each type of sensor has a different prefix.
i.e. relays are 1XX, temp are 2XX etc
any thoughts?
@zachflem said in NOT WORKING: DHT and RELAYS on Ethernet GW:
any thoughts?
Not sure about if that's still valid, but there had been the recommendation to use ChildID 1 for the first relay. So you may use 3+4 for temp/hum or start with 10, 20 (or whatever you like) as proposed to have room for further relays or other type of switches.
-
@zachflem said in NOT WORKING: DHT and RELAYS on Ethernet GW:
any thoughts?
Not sure about if that's still valid, but there had been the recommendation to use ChildID 1 for the first relay. So you may use 3+4 for temp/hum or start with 10, 20 (or whatever you like) as proposed to have room for further relays or other type of switches.
@rejoe2 said in NOT WORKING: DHT and RELAYS on Ethernet GW:
@zachflem said in NOT WORKING: DHT and RELAYS on Ethernet GW:
any thoughts?
Not sure about if that's still valid, but there had been the recommendation to use ChildID 1 for the first relay. So you may use 3+4 for temp/hum or start with 10, 20 (or whatever you like) as proposed to have room for further relays or other type of switches.
Yeah, just re-read it and found the hard define for the IDs of those, and set them to 100 and 101.
Now I have the 2 relays defined as 1 & 2 and the Humidity as 100 and Temp as 101.
Can see all 4 sensors but only getting a value from the temp sensor.