This is what I use for 2 of my lux sensors:
id : Lux_Sensor
name : Lux Sensor
class : MySensorsLux
nodeid : 4
batterySensor : true
sensorid : 0
And this works perfectly in pimatic.
Maybe your sensorid is wrong?
What do you use in the sketch?
How to Mysensors.
This is what I use for 2 of my lux sensors:
id : Lux_Sensor
name : Lux Sensor
class : MySensorsLux
nodeid : 4
batterySensor : true
sensorid : 0
And this works perfectly in pimatic.
Maybe your sensorid is wrong?
What do you use in the sketch?
Thanks a lot, its works.
I think the sensor id is not correct. Is this the child- id in the sketch of arduino?
It should be, indeed
do you have experience with the communication range of the NRF-Chips??
i use a standart NRF24L01+ for the serial gateway and it seems to be i got an maximum range about 8 meters to my mini NRF-contact-Devices without wall between them. with an soldered wire as antenna it gets one meter more but the antenna have to look in the right position. i need a little bit more range.
could you say something about your NRF24L01+PA gives that more range as the standart one?? whats your receiving quality and device-range? i dont want to use an range extender for 2 devices. i think its not indispensable for 2 contactsensors
@xCite86 I have a LNA PA on the gateway, this improves sending and receiving, so always use that one on the gateway. But 8m range without walls is not good. I get around 50m with the LNA PA (through 3 walls), with the standard NRF you should also get around 30m atleast.
Which nrfs dit you buy? There are “fake” ones that are terrible.
i read it above there are also fake nrfs are sold by some sellers but i have ordered “original-high-quality-made-in-china-nrf-modules” with 16.000 oscillator and a square NRF-Chip
http://www.ebay.com/itm/170819069271
now i ordert this one for the gateway… i hope it gets a better range
@xCite86 alice is most of the time fine yes. Made a new sensor today with a original smd nrf but this one was acting strange. I replaced it and it worked fine. So also originals can be bad sometimes.
Maybe you can try to replace the nrf on the gateway and a sensor, than you know if a NRF is broken.
@sweebee have done it before… but I still having a bad range.
yes, maybe the smd-nrf was faulty but i have to wait for more nrf`s and pro-micros from china now…
I also had the problem of low range (~4m) and now changed to nRF+PA+LNA with great success. I can receive a sensor in the other end of my flat one floor higher without problems. But you maybe need to shield the module and give a seperate 3V3 power suply.
Hello,
I have some sensors working on pimatic. THANKS for all information.
I have a question about the mysensors pulse sensor. I use it for measuring the energy and water. Is there a easy way to reset it to zero.
thanks gerrit.
i have no experience in pulsesensoring but if the sensor saves your measuring you could try to upload the sketch again and if this wont work clearing the eeprom could help.
edit: I’ve just written a tutorial for logging variables, i think this could be a help for you
https://forum.pimatic.org/topic/1744/monthly-logging-in-external-file
@Anduril, @sweebee, thanks for your feedback, i’ve ordered a nRF+PA+LNA too
@ghv its saved in the db of pimatic. Why do you want to reset it? For once or every week or so?
Yes, to use for reset ones a week or month but i see now you can see it from all date.
Thanks for the answers.
@ghv I use a separate variables device which shows the week usage. Use a variable that you reset every monday.
Example
create a variable weekUsage.
when trigger: its monday then $weekUsage = $kwh-meter.kWh
and a variables device:
{
"id": "kwh-vandaag",
"name": "Vandaag",
"class": "VariablesDevice",
"variables": [
{
"name": "Week",
"expression": "$kwh-meter.kWh - $weekUsage",
"acronym": "This week",
"type": "number",
"unit": "kWh"
}
]
},
Thanks sweebee,
I will try.
when trigger: its monday then $weekUsage = $kwh-meter.kWh
Is this a rule for the variable?
@ghv yes, it puts the value of the kwh sensor in the variable. The variables devices removes the new value off this value so you know the week usage.
Example:
This week I used 1000 kwh. at monday it sets the weekUsage variable at 1000 kwh. So the variable devices shows at monday 1000kwh (week usage) minus the current total usage (1000 kwh) which is total usage of this week 0 kwh. If the kwh total value changes to 1100 kwh, the variable device shows 100 kwh of that week.
now I replaced the standard NRF with an nRF+PA+LNA but the range didn’t get better. very curious… my new contact-switch in my sleeping room can’t reach the gateway…
you write something about Shielding the nrf and get external Power from a seperately power supply. i use 3,3V of my RPi 3…
how did you do that?
edit, tried it with editing MyConfig.h
#define RF24_PA_LEVEL_GW RF24_PA_LOW
to
#define RF24_PA_LEVEL_GW RF24_PA_HIGH
but get only ver mismatch-errors
0;0;3;0;9;gateway started, id=0, parent=0, distance=0
0;0;3;0;14;Gateway startup complete.
0;0;3;0;9;read: 0-0-0 s=0,c=0,t=0,pt=0,l=0,sg=0:
0;0;3;0;9;ver mismatch
0;0;3;0;9;read: 0-0-0 s=0,c=0,t=0,pt=0,l=0,sg=0:
0;0;3;0;9;ver mismatch
0;0;3;0;9;read: 4-4-0 s=4,c=1,t=16,pt=2,l=2,sg=0:0
4;4;1;0;16;0
with #define RF24_PA_LEVEL_GW RF24_PA_MAX
there was generally no receiving.
@n3ro, any suggestions?
@xCite86 I used @Oitzu guide to shielding. He discribed it very well in his blog (http://blog.blackoise.de/2016/02/fixing-your-cheap-nrf24l01-palna-module/). Simply wrap your module in foil to prevent shorts (I used selfadhesive kitchen foil). Then add a layer of al-foil. There were serveral discussions about whether to ground this or not in the MySensors forum. I did not do that (so its only a layer of insulated metal). At last I wrapped it in selfadhesive foil to have it all sticked together well. Thats it.
For the supply of 3V3 I used the 5V of the mcu and connected a 662K voltage regulator. The output is fed to the nrf+pa+lna. I don’t know if the 5V of the rpi is very good. I know that 3V3 is not very stable. As far as I know the 5V can be directly connected to your input power supply (depending on how you power your RPi). Maybe it would be nice to add a capacitor to smooth the current peaks the nrf+pa+lna might create.
Hope this helps.
@xCite86 the 3V3 power supply of the RPi will not work with the RF24_PA_MAX setting.
About the grounding: I got slightly better results with the shield grounded, but both grounded and ungrounded will result in much better results.
thanks for our help but cleaning the eeprom and reflash the gateway with
#define MY_BAUD_RATE 9600
in MyConfig.h works for me now fine, no Problem with transmitting about 15 meters.
hmm… but anyway… don’t know how it was possible with my “old” gateway baudrate-setup of 115200 and the underclocked 1mhz nodes setupped with 9600…