If you use Set to send your temp/hum you can define how many decimals you want:
MyMessage& set(float value, uint8_t decimals);
For example:
gw.send(msgTemp.set(temperature, 1));
will send you the value with 1 decimal.
Reference: here
If you use Set to send your temp/hum you can define how many decimals you want:
MyMessage& set(float value, uint8_t decimals);
For example:
gw.send(msgTemp.set(temperature, 1));
will send you the value with 1 decimal.
Reference: here
I have it working only need to play with the debounce value
mfalkvidd means:
gw.wait(dht.getMinimumSamplingPeriod());
In the first sketch change
gw.begin (msg, NODE_ID) ;
to
gw.begin (NULL, NODE_ID) ;
Another way is to track the amount of people that enters the room. This can be done with a double IR beam horizontally placed next to each-other (IR-A and IR-B). Now when a person walks into the room, you know that IR-A triggers before IR-B, and you increment the room-occupants-counter with 1. If the person leaves the room, IR-B will trigger before IR-A and you decrease the counter.
The IR barrier can be installed inside the door casing.
Using this technique you don't need a PIR sensor, unless the room has a window and you want to detect movement without someone passed the IR beams (a burglar maybe?)
Combine the IR beams with a lightsensor and you can also define that the light should go on only below a certain light level.
My 2 cents...
Is your controller setup to hand out ID's to the sensor nodes?
What if you set a fixed ID?
I'm developing a controller and I reset my sensor nodes all the time and the ethernet gateway keeps working as expected.
My advice: do not power your nRF from the arduino 3.3V pin, instead, take power from the 5V pin and step that down to 3.3V using a voltage regulator. (like LM1777 including caps)
Just took the time to shoot a pic of my Step-Up consumption, including a Voltage regulator MCP1702-3.3
As you can see, it's consuming 54uA with nothing connected.
Step-Up module: link
The capacitors are really important, one on the input of the step-up module, the other on the output of the MCP1702-3.3, both are 22uF. Without them, consumption is 2.20mA
MySensors = node --> gateway --> HA Controller
If you want to use ESP8266 it is as easy as: ESP8266 node --> MQTT broker --> HA Controller
The MQTT broker can run on a RPi (mosquitto for example)
Regarding the ID assignment that will be DHCP if you want
Just my 2c
@Grubstake if you build a MQTT MySensors gateway, there's no OpenHab binding needed. Disadvantage is that you need to configure your nodes in OpenHab manually.
@gohan said in N00b + MQTT gw + openHAB2:
but anyway ethernet is the best solution for beginners because you can use myscontroller to debug messages while connected to controller.
With MQTT you can also debug using MQTT-Spy or MQTTLens or various other MQTT apps.
MQTT is easy in interconnecting various systems without they have to know about each-other.
As long as you have a MQTT broker (RabbitMQ, Mosquitto, ActiveMQ, ...) you're all set.
In OpenHab in conf/services create a file called mqtt.cfg, and past the following:
mqtt:broker.url=tcp://ip-address-of-mqttbroker:1883
mqtt:broker.clientId=openhab
mqtt:broker.retain=true
mqtt:broker.async=false
Then in your items file you can do:
Switch Light_GV_Hall "Ceiling" (GV_Hall, Lights) {mqtt=">[broker:myhome/room/switch1:command:ON:1],>[broker:myhome/room/switch1:command:OFF:0],<[broker:myhome/room/switch1:state:ON:1],<[broker:myhome/room/switch1:state:OFF:0"}
And now you can turn on/off the light from OpenHab as wel as from any other device that publishes to the same toppic (yes, even from MQTT-Spy and MQTTLens)
@Boots33 no, it's not the FS1000 type, but a regular cheap RF433 transmitter.
The problem is that when powered with 12V, the transmitter does not see the 5V on the data pin as high.
Hi guys,
who can help choosing a component.
I'm building a RF433Mhz node to control wireless powerplugs. The transmitter works fine at 5V but the range is not that great.
The transmitter can handle up to 12V, but I have no clue what transitor/fet i can use for both the power line and the data line.
Yesterday I tried to use a opto-coupler but that is not fast enough, I clearly see on the scope the signal fading out when going from high to low.
I also have some BC547 laying around, but that is inverting the signal, not what i want.
Anyone can make some suggestions?
Thanks in advance.
Eric
Dunno about that one but I bought a Rigol 1054z 50Mhz which you can freely upgrade to 100Mhz
When running as a service, is there a way to watch the debug log?