@mfalkvidd
Tanks very much
Posts made by mar.conte
-
RE: Rfm95 Awake
@mfalkvidd
Wath is milliseconds smartsleep ideal for little consumption battery? -
Rfm95 Awake
Hello
Itβs possible awake a node in sleep mode with rfm95 from controller ? -
More Input
Its possible have more input sensor like
https://www.mysensors.org/build/binary
Tanks -
RE: NodeManager: plugin for a rapid development of battery-powered sensors
@user2684
For example using text send if i receive state? -
RE: NodeManager: plugin for a rapid development of battery-powered sensors
I need help!!!
I have e mcp23017 Matrix espander i/o in esp nodemecu board, the mcp receive state sensor from my system wired alarm(pir, sismic etc) ; this signal received i want send to my domoticz controller, is the sensor custom the solution? Can i present 16 input sensors from my node to my controller?
Tanks -
RE: NodeManager: plugin for a rapid development of battery-powered sensors
GHi, the rfm95 is compatible with nodemanager?
And the esp32 also? -
Switch selector
How can i present a switch selector in mysensors schetch with option like dummy switch selector?
-
RE: π¬ NodeManager
Hi
I have a led ir emitter can i send to my air contiotioner a code like x0284828 by digital output in nodemanager(with irremote library is simple) -
RE: Requesting value from Domoticz
For send message to child node wich isnt present in device list? In other words i have a node wich is in device list and the child 's node called S_custom with id 200 .... the node id is 101...
-
RE: Requesting value from Domoticz
@tomek_olo
Sorry what is the way for send from domoticz child -node to other node through lua script for example Tanks -
RE: Atmega328+rfm69hw sleep mode consumption
I have now resolved with good results by connecting a simple atmega328 to my rfm69hw, with a pir in sleep mode consumes
About 100 micro, use 8mhz bootloader without
Crystal, use mysensors library and nodemanager -
RE: Requesting value from Domoticz
@tomek_olo
Sorry what is the way for send from domoticz child -node to other node through lua script for example Tanks -
RE: NodeManager: plugin for a rapid development of battery-powered sensors
Hello how can i enter the commands type 254; 200; 2; 0; 48; BATTERY in a lua script of domoticz?
-
RE: NodeManager: plugin for a rapid development of battery-powered sensors
But i'm trying to test a Pir of panasonic EKMB1201113 papirs series cost a bit but they have low power consumption
1 to 100 microampers in sleep mode, just connect a 100 kohm resistance in pulldown and it is very precise up to 12 meters -
RE: SensorMotion to send both tripped and not tripped
@tubby
Like thisNodeManager nodeManager; SensorSwitch swiTch(1,3); // before void before() { // setup the serial port baud rate Serial.begin(MY_BAUD_RATE); /* * Register below your sensors */ swiTch.setDebounce(50); swiTch.setTriggerTime(4000); nodeManager.setSleep(SLEEP,60,MINUTES); nodeManager.registerSensor(SENSOR_MOTION,3);``````
-
RE: SensorMotion to send both tripped and not tripped
@tubby
Hi, i try with parallax pir setdebounce(50) and its very stable no trigger false positive and each our send level battery, i test this for many daysvand its good by -
RE: NodeManager: plugin for a rapid development of battery-powered sensors
Hi, i wanted to know in which section of the sketch I turn on and turn off a led when the node controls the battery because at night the led me starts the pir; Now I've put the digitalwrite after nodemanger.loop
-
RE: NodeManager: plugin for a rapid development of battery-powered sensors
@gohan
User2694 say:"Setup MySensorsSince NodeManager has to communicate with the MySensors gateway on your behalf, it has to know how to do it. Place on top of the config.h file all the MySensors typical directives you are used to set on top of your sketch so both your sketch AND NodeManager will be able to share the same configuration. For example:"
link text -
RE: NodeManager: plugin for a rapid development of battery-powered sensors
@gohan
Should the gateway have the right nodemamager sketch?
Tanks -
RE: NodeManager: plugin for a rapid development of battery-powered sensors
Sorry but the name of the sketch can be different both in the node and in the gateway?
-
RE: NodeManager: plugin for a rapid development of battery-powered sensors
@gohan
Should it be isolated or even without a sheath? -
RE: NodeManager: plugin for a rapid development of battery-powered sensors
@gohan
Normal wire electric 1 mm diameter -
RE: NodeManager: plugin for a rapid development of battery-powered sensors
@gohan
Ok Tanks, but the 86 mm wire for 868 what is Ideal diameter and thread type for simple antenna no dipole e non ground ant? -
RE: NodeManager: plugin for a rapid development of battery-powered sensors
Then solved the problem of the accuracy of the battery report: basically I did not realize that the sleep wait time started from the last pir movement then if i put an hour of sleep and during this active time the pir time resumes; The communication problems I solved them by letting antenna from rfm69 so every hour the battery report does not even send pir moviment
....Very strange my rfm69 modules communicate better without an antenna even at a distance of 10 meters with a wall -
RE: NodeManager: plugin for a rapid development of battery-powered sensors
@user2684
It happens even if i put 6 hours or every 3 hours so in the specified hours it is not regular the report sometimes jumps some report -
RE: NodeManager: plugin for a rapid development of battery-powered sensors
I noticed that the battery report if set to one hour does not happen every hour ...
-
RE: NodeManager: plugin for a rapid development of battery-powered sensors
@user2684
So with version 1.5 do I solve my problem too? -
RE: NodeManager: plugin for a rapid development of battery-powered sensors
@gohan
Definitely, if I put a pir sensor to monitor a security access I will never know if I had an intrusion if I have a false alarm -
RE: NodeManager: plugin for a rapid development of battery-powered sensors
@gohan
The problem is that motion report whenever sleep goes to wake to send me the battery status every 60 minutes ,then every 60 minutes sends me battery status and motion pir -
RE: NodeManager: plugin for a rapid development of battery-powered sensors
@user2684
Yes of course but payload =1 pir movimento detect -
RE: NodeManager: plugin for a rapid development of battery-powered sensors
I have a problem, my node is in sleep for 60 minutes and hourly reads the battery voltage but when you wake the pir is high and in addition to the high volts sends me even then the controller sends me a pir pir movement false; how can I avoid it?
-
RE: NodeManager: plugin for a rapid development of battery-powered sensors
@user2684
Solved
I solved it by putting settriggertime (5000) setdebounce (50); also solved the supply problems because if power is ftdi with the sensor was always high, with batteries the pir is stable and works well
thanks for the supportThis is my reprap printed house for my project
-
RE: NodeManager: plugin for a rapid development of battery-powered sensors
Much easy INFINITE THANKS AND CONGRATULATIONS
-
RE: NodeManager: plugin for a rapid development of battery-powered sensors
THEN MY NODE WILL BE CONNECTED TO A BATTERY 3.6 VOLT AA 2600 MAH, SO I DO NOT RIGHT CONNECTIONS? BUT I HAVE TO CHANGE OTHER PARAMETERS TO BEING 3.6?
TANKS -
RE: NodeManager: plugin for a rapid development of battery-powered sensors
I wanted to know what are the connections to monitor the batteries of my sensor, do I connect the battery V+ to the analog pin A0?
-
RE: NodeManager: plugin for a rapid development of battery-powered sensors
@user2684
ok, I will check first the voltage of the pir and even the power of the MCU, it seems to me that the rfm69 module does not communicate with each other (node-gateway), it seems strange because with the sketch of links that you suggested it all works well ! thanks anyway I'll do my tests and let you know soon ... -
RE: NodeManager: plugin for a rapid development of battery-powered sensors
@user2684
Hi,NODE OUTPUT
0 MCO:BGN:INIT NODE,CP=RRNNA--,VER=2.1.1 40 MCO:BGN:BFR REG I=1 P=3 P=1 T=16 NodeManager v1.4 INT1 M=3 INT2 M=255 59 TSM:INIT 135 TSF:WUR:MS=0 153 TSM:INIT:TSP OK 176 TSM:INIT:STATID=100 200 TSF:SID:OK,ID=100 223 TSM:FPAR 368 TSF:MSG:SEND,100-100-255-255,s=255,c=3,t=7,pt=0,l=0,sg=0,ft=0,st=OK: 641 TSF:MSG:READ,0-0-100,s=255,c=3,t=8,pt=1,l=1,sg=0:0 698 TSF:MSG:FPAR OK,ID=0,D=1 2445 TSM:FPAR:OK 2461 TSM:ID 2476 TSM:ID:OK 2490 TSM:UPL 2512 TSF:MSG:SEND,100-100-0-0,s=255,c=3,t=24,pt=1,l=1,sg=0,ft=0,st=OK:1 2633 TSF:MSG:READ,0-0-100,s=255,c=3,t=25,pt=1,l=1,sg=0:1 2693 TSF:MSG:PONG RECV,HP=1 2721 TSM:UPL:OK 2738 TSM:READY:ID=100,PAR=0,DIS=1 2785 TSF:MSG:SEND,100-100-0-0,s=255,c=3,t=15,pt=6,l=2,sg=0,ft=0,st=OK:0100 2904 TSF:MSG:READ,0-0-100,s=255,c=3,t=15,pt=6,l=2,sg=0:0100 3018 TSF:MSG:SEND,100-100-0-0,s=255,c=0,t=17,pt=0,l=5,sg=0,ft=0,st=OK:2.1.1 3229 !TSF:MSG:SEND,100-100-0-0,s=255,c=3,t=6,pt=1,l=1,sg=0,ft=0,st=NACK:0 5316 TSF:MSG:SEND,100-100-0-0,s=255,c=3,t=11,pt=0,l=19,sg=0,ft=1,st=OK:NodeManagerTemplate 5541 !TSF:MSG:SEND,100-100-0-0,s=255,c=3,t=12,pt=0,l=3,sg=0,ft=0,st=NACK:1.0 RADIO OK PRES I=200, T=23 5715 TSF:MSG:SEND,100-100-0-0,s=200,c=0,t=23,pt=0,l=0,sg=0,ft=1,st=OK: PRES I=201, T=30 5922 !TSF:MSG:SEND,100-100-0-0,s=201,c=0,t=30,pt=0,l=0,sg=0,ft=0,st=NACK: BATT V=3.21 P=86 SEND D=0 I=201 C=0 T=38 S= I=0 F=3.21 6072 !MCO:SND:NODE NOT REG 6164 TSF:MSG:SEND,100-100-0-0,s=255,c=3,t=0,pt=1,l=1,sg=0,ft=1,st=OK:86 PRES I=1 T=1 6371 !TSF:MSG:SEND,100-100-0-0,s=1,c=0,t=1,pt=0,l=0,sg=0,ft=0,st=NACK: READY 6445 MCO:REG:REQ 6531 TSF:MSG:SEND,100-100-0-0,s=255,c=3,t=26,pt=1,l=1,sg=0,ft=1,st=OK:2 6619 TSF:MSG:READ,0-0-100,s=255,c=3,t=27,pt=1,l=1,sg=0:1 6678 MCO:PIM:NODE REG=1 6705 MCO:BGN:STP MY I=100 M=1 6723 MCO:BGN:INIT OK,TSP=1 SWITCH I=1 P=3 V=1 SEND D=0 I=1 C=0 T=16 S= N=1 F=0.00 6817 TSF:MSG:SEND,100-100-0-0,s=1,c=1,t=16,pt=2,l=2,sg=0,ft=0,st=OK:1 SLEEP 3600s 6897 MCO:SLP:MS=3600000,SMS=1,I1=1,M1=3,I2=255,M2=255 7104 !TSF:MSG:SEND,100-100-0-0,s=255,c=3,t=22,pt=5,l=4,sg=0,ft=0,st=NACK:264 7684 MCO:SLP:TPD 7700 MCO:SLP:WUP=1 WAKE P=3, M=3 AWAKE SWITCH I=1 P=3 V=1 SEND D=0 I=1 C=1 T=16 S= N=1 F=0.00 7786 TSF:MSG:SEND,100-100-0-0,s=1,c=1,t=16,pt=2,l=2,sg=0,ft=1,st=OK:1 SLEEP 3600s 7876 MCO:SLP:MS=3600000,SMS=1,I1=1,M1=3,I2=255,M2=255 8087 !TSF:MSG:SEND,100-100-0-0,s=255,c=3,t=22,pt=5,l=4,sg=0,ft=0,st=NACK:1243 8667 MCO:SLP:TPD 8683 MCO:SLP:WUP=1 WAKE P=3, M=3 AWAKE SWITCH I=1 P=3 V=1 SEND D=0 I=1 C=1 T=16 S= N=1 F=0 8757 TSF:MSG:SEND,100-100-0-0,s=1,c=1,t=16,pt=2,l=2,sg=0,ft=1,st=OK:1 SLEEP 3600s 8859 MCO:SLP:MS=3600000,SMS=1,I1=1,M1=3,I2=255,M2=255 8982 TSF:MSG:SEND,100-100-0-0,s=255,c=3,t=22,pt=5,l=4,sg=0,ft=0,st=OK:2226 9562 MCO:SLP:TPD 9578 MCO:SLP:WUP=1 WAKE P=3, M=3 AWAKE SWITCH I=1 P=3 V=1 SEND D=0 I=1 C=1 T=16 S= N=1 F=0.00 9621 TSF:MSG:SEND,100-100-0-0,s=1,c=1,t=16,pt=2,l=2,sg=0,ft=0,st=OK:1 SLEEP 3600s 9754 MCO:SLP:MS=3600000,SMS=1,I1=1,M1=3,I2=255,M2=255 9961 !TSF:MSG:SEND,100-100-0-0,s=255,c=3,t=22,pt=5,l=4,sg=0,ft=0,st=NACK:3121 10541 MCO:SLP:TPD
Tanks
-
RE: NodeManager: plugin for a rapid development of battery-powered sensors
@user2684
hi, I noticed that the zero node has a child called S_Arduino_Repeater with an id equal to 255 child node, called 100 S_Arduino_Node, what do you recommend?
smotion now appears I had mistakenly entered analog 0 on a wire that went to +Power -
RE: NodeManager: plugin for a rapid development of battery-powered sensors
node
0 MCO:BGN:INIT NODE,CP=RRNNA--,VER=2.1.1 40 MCO:BGN:BFR REG I=1 P=3 P=6 T=0 NodeManager v1.4 INT1 M=255 INT2 M=255 59 TSM:INIT 135 TSF:WUR:MS=0 155 TSM:INIT:TSP OK 176 TSM:INIT:STATID=100 202 TSF:SID:OK,ID=100 225 TSM:FPAR 370 TSF:MSG:SEND,100-100-255-255,s=255,c=3,t=7,pt=0,l=0,sg=0,ft=0,st=OK: 2244 TSF:MSG:READ,0-0-100,s=255,c=3,t=8,pt=1,l=1,sg=0:0 2301 TSF:MSG:FPAR OK,ID=0,D=1 2447 TSM:FPAR:OK 2463 TSM:ID 2478 TSM:ID:OK 2492 TSM:UPL 2639 !TSF:MSG:SEND,100-100-0-0,s=255,c=3,t=24,pt=1,l=1,sg=0,ft=0,st=NACK:1 3678 TSF:MSG:READ,0-0-100,s=255,c=3,t=25,pt=1,l=1,sg=0:1 3737 TSF:MSG:PONG RECV,HP=1 3768 TSM:UPL:OK 3784 TSM:READY:ID=100,PAR=0,DIS=1 3883 TSF:MSG:SEND,100-100-0-0,s=255,c=3,t=15,pt=6,l=2,sg=0,ft=0,st=OK:0100 4003 TSF:MSG:READ,0-0-100,s=255,c=3,t=15,pt=6,l=2,sg=0:0100 4202 !TSF:MSG:SEND,100-100-0-0,s=255,c=0,t=17,pt=0,l=5,sg=0,ft=0,st=NACK:2.1.1 4415 !TSF:MSG:SEND,100-100-0-0,s=255,c=3,t=6,pt=1,l=1,sg=0,ft=1,st=NACK:0 6733 !TSF:MSG:SEND,100-100-0-0,s=255,c=3,t=11,pt=0,l=19,sg=0,ft=2,st=NACK:NodeManagerTemplate 6928 TSF:MSG:SEND,100-100-0-0,s=255,c=3,t=12,pt=0,l=3,sg=0,ft=3,st=OK:1.0 RADIO OK PRES I=200, T=23 7137 !TSF:MSG:SEND,100-100-0-0,s=200,c=0,t=23,pt=0,l=0,sg=0,ft=0,st=NACK: PRES I=201, T=30 7321 TSF:MSG:SEND,100-100-0-0,s=201,c=0,t=30,pt=0,l=0,sg=0,ft=1,st=OK: BATT V=3.25 P=93 SEND D=0 I=201 C=0 T=38 S= I=0 F=3.25 7469 !MCO:SND:NODE NOT REG 7587 TSF:MSG:SEND,100-100-0-0,s=255,c=3,t=0,pt=1,l=1,sg=0,ft=0,st=OK:93 PRES I=1 T=6 7794 !TSF:MSG:SEND,100-100-0-0,s=1,c=0,t=6,pt=0,l=0,sg=0,ft=0,st=NACK: READY 7868 MCO:REG:REQ 7933 TSF:MSG:SEND,100-100-0-0,s=255,c=3,t=26,pt=1,l=1,sg=0,ft=1,st=OK:2 9019 TSF:MSG:READ,0-0-100,s=255,c=3,t=27,pt=1,l=1,sg=0:1 9078 MCO:PIM:NODE REG=1 9105 MCO:BGN:STP MY I=100 M=1 9123 MCO:BGN:INIT OK,TSP=1 THER I=1 V=354.00 T=40.05 M=1 SEND D=0 I=1 C=0 T=0 S= N=0 F=40.05 9224 TSF:MSG:SEND,100-100-0-0,s=1,c=1,t=0,pt=7,l=5,sg=0,ft=0,st=OK:40.05 SLEEP 3600s 9316 MCO:SLP:MS=3600000,SMS=1,I1=255,M1=255,I2=255,M2=255 9527 !TSF:MSG:SEND,100-100-0-0,s=255,c=3,t=22,pt=5,l=4,sg=0,ft=0,st=NACK:287 9607 TSF:MSG:READ,0-0-100,s=255,c=3,t=27,pt=1,l=1,sg=0:1 9666 !TSF:MSG:LEN,0!=8 10108 MCO:SLP:TPD```
Gateway
0;255;3;0;9;TSF:MSG:READ,100-100-255,s=255,c=3,t=7,pt=0,l=0,sg=0: 0;255;3;0;9;TSF:MSG:BC 0;255;3;0;9;TSF:MSG:FPAR REQ,ID=100 0;255;3;0;9;TSF:PNG:SEND,TO=0 0;255;3;0;9;TSF:CKU:OK 0;255;3;0;9;TSF:MSG:GWL OK 0;255;3;0;9;TSF:MSG:SEND,0-0-100-100,s=255,c=3,t=8,pt=1,l=1,sg=0,ft=0,st=OK:0 0;255;3;0;9;TSF:MSG:READ,100-100-0,s=255,c=3,t=24,pt=1,l=1,sg=0:1 0;255;3;0;9;TSF:MSG:PINGED,ID=100,HP=1 0;255;3;0;9;TSF:MSG:SEND,0-0-100-100,s=255,c=3,t=25,pt=1,l=1,sg=0,ft=0,st=OK:1 0;255;3;0;9;TSF:MSG:READ,100-100-0,s=255,c=3,t=15,pt=6,l=2,sg=0:0100 0;255;3;0;9;TSF:MSG:SEND,0-0-100-100,s=255,c=3,t=15,pt=6,l=2,sg=0,ft=0,st=OK:0100 0;255;3;0;9;TSF:MSG:READ,100-100-0,s=255,c=0,t=17,pt=0,l=5,sg=0:2.1.1 0;255;3;0;9;Sending message on topic: domoticz/in/MyMQTT/100/255/0/0/17 0;255;3;0;9;TSF:MSG:READ,100-100-0,s=255,c=3,t=11,pt=0,l=19,sg=0:NodeManagerTemplate 0;255;3;0;9;Sending message on topic: domoticz/in/MyMQTT/100/255/3/0/11 0;255;3;0;9;TSF:MSG:READ,100-100-0,s=200,c=0,t=23,pt=0,l=0,sg=0: 0;255;3;0;9;Sending message on topic: domoticz/in/MyMQTT/100/200/0/0/23 0;255;3;0;9;TSF:MSG:READ,100-100-0,s=255,c=3,t=0,pt=1,l=1,sg=0:85 0;255;3;0;9;Sending message on topic: domoticz/in/MyMQTT/100/255/3/0/0 0;255;3;0;9;TSF:MSG:READ,100-100-0,s=255,c=3,t=26,pt=1,l=1,sg=0:2 0;255;3;0;9;TSF:MSG:SEND,0-0-100-100,s=255,c=3,t=27,pt=1,l=1,sg=0,ft=0,st=OK:1 0;255;3;0;9;TSF:MSG:READ,100-100-0,s=1,c=1,t=0,pt=7,l=5,sg=0:36.72 0;255;3;0;9;Sending message on topic: domoticz/in/MyMQTT/100/1/1/0/0 0;255;3;0;9;TSF:MSG:READ,100-100-0,s=255,c=3,t=22,pt=5,l=4,sg=0:286 0;255;3;0;9;Sending message on topic: domoticz/in/MyMQTT/100/255/3/0/22 0;255;3;0;9;Message arrived on topic: domoticz/out/MyMQTT/0/0/3/0/18 0;255;3;0;9;Sending message on topic: domoticz/in/MyMQTT/0/255/3/0/22
-
RE: NodeManager: plugin for a rapid development of battery-powered sensors
Hello, I have a simple pir hcr501 that normally does not send output to pin 3 (so low) but when there is movement becomes HIGH, then my CPU goes to sleep for 60 minutes; the hardware is well configured because this setup I used it with the official mysensors sketches for pir motion; I do not understand why the domoticz controller is always the pir HIGH and does not go into sleep the MCU, thanks
-
RE: NodeManager: plugin for a rapid development of battery-powered sensors
@user2684
it's ok this code?NodeManager nodeManager; SensorSwitch swiTch(1,3); // before void before() { // setup the serial port baud rate Serial.begin(MY_BAUD_RATE); /* * Register below your sensors */ swiTch.setMode(0); swiTch.setInitial(0); swiTch.setTriggerTime(4000); nodeManager.setSleep(SLEEP,60,MINUTES); nodeManager.registerSensor(SENSOR_MOTION,3);```
-
RE: NodeManager: plugin for a rapid development of battery-powered sensors
@user2684
for istance Sensorswitch what is code? -
RE: NodeManager: plugin for a rapid development of battery-powered sensors
@user2684
all ok now is s_motion but is ever tripped high!!!why? -
RE: NodeManager: plugin for a rapid development of battery-powered sensors
node
0 MCO:BGN:INIT NODE,CP=RRNNA--,VER=2.1.1 40 MCO:BGN:BFR REG I=1 P=3 P=6 T=0 NodeManager v1.4 INT1 M=255 INT2 M=255 59 TSM:INIT 135 TSF:WUR:MS=0 155 TSM:INIT:TSP OK 176 TSM:INIT:STATID=100 202 TSF:SID:OK,ID=100 225 TSM:FPAR 370 TSF:MSG:SEND,100-100-255-255,s=255,c=3,t=7,pt=0,l=0,sg=0,ft=0,st=OK: 2244 TSF:MSG:READ,0-0-100,s=255,c=3,t=8,pt=1,l=1,sg=0:0 2301 TSF:MSG:FPAR OK,ID=0,D=1 2447 TSM:FPAR:OK 2463 TSM:ID 2478 TSM:ID:OK 2492 TSM:UPL 2639 !TSF:MSG:SEND,100-100-0-0,s=255,c=3,t=24,pt=1,l=1,sg=0,ft=0,st=NACK:1 3678 TSF:MSG:READ,0-0-100,s=255,c=3,t=25,pt=1,l=1,sg=0:1 3737 TSF:MSG:PONG RECV,HP=1 3768 TSM:UPL:OK 3784 TSM:READY:ID=100,PAR=0,DIS=1 3883 TSF:MSG:SEND,100-100-0-0,s=255,c=3,t=15,pt=6,l=2,sg=0,ft=0,st=OK:0100 4003 TSF:MSG:READ,0-0-100,s=255,c=3,t=15,pt=6,l=2,sg=0:0100 4202 !TSF:MSG:SEND,100-100-0-0,s=255,c=0,t=17,pt=0,l=5,sg=0,ft=0,st=NACK:2.1.1 4415 !TSF:MSG:SEND,100-100-0-0,s=255,c=3,t=6,pt=1,l=1,sg=0,ft=1,st=NACK:0 6733 !TSF:MSG:SEND,100-100-0-0,s=255,c=3,t=11,pt=0,l=19,sg=0,ft=2,st=NACK:NodeManagerTemplate 6928 TSF:MSG:SEND,100-100-0-0,s=255,c=3,t=12,pt=0,l=3,sg=0,ft=3,st=OK:1.0 RADIO OK PRES I=200, T=23 7137 !TSF:MSG:SEND,100-100-0-0,s=200,c=0,t=23,pt=0,l=0,sg=0,ft=0,st=NACK: PRES I=201, T=30 7321 TSF:MSG:SEND,100-100-0-0,s=201,c=0,t=30,pt=0,l=0,sg=0,ft=1,st=OK: BATT V=3.25 P=93 SEND D=0 I=201 C=0 T=38 S= I=0 F=3.25 7469 !MCO:SND:NODE NOT REG 7587 TSF:MSG:SEND,100-100-0-0,s=255,c=3,t=0,pt=1,l=1,sg=0,ft=0,st=OK:93 PRES I=1 T=6 7794 !TSF:MSG:SEND,100-100-0-0,s=1,c=0,t=6,pt=0,l=0,sg=0,ft=0,st=NACK: READY 7868 MCO:REG:REQ 7933 TSF:MSG:SEND,100-100-0-0,s=255,c=3,t=26,pt=1,l=1,sg=0,ft=1,st=OK:2 9019 TSF:MSG:READ,0-0-100,s=255,c=3,t=27,pt=1,l=1,sg=0:1 9078 MCO:PIM:NODE REG=1 9105 MCO:BGN:STP MY I=100 M=1 9123 MCO:BGN:INIT OK,TSP=1 THER I=1 V=354.00 T=40.05 M=1 SEND D=0 I=1 C=0 T=0 S= N=0 F=40.05 9224 TSF:MSG:SEND,100-100-0-0,s=1,c=1,t=0,pt=7,l=5,sg=0,ft=0,st=OK:40.05 SLEEP 3600s 9316 MCO:SLP:MS=3600000,SMS=1,I1=255,M1=255,I2=255,M2=255 9527 !TSF:MSG:SEND,100-100-0-0,s=255,c=3,t=22,pt=5,l=4,sg=0,ft=0,st=NACK:287 9607 TSF:MSG:READ,0-0-100,s=255,c=3,t=27,pt=1,l=1,sg=0:1 9666 !TSF:MSG:LEN,0!=8 10108 MCO:SLP:TPD```
Gateway
0;255;3;0;9;TSF:MSG:READ,100-100-255,s=255,c=3,t=7,pt=0,l=0,sg=0: 0;255;3;0;9;TSF:MSG:BC 0;255;3;0;9;TSF:MSG:FPAR REQ,ID=100 0;255;3;0;9;TSF:PNG:SEND,TO=0 0;255;3;0;9;TSF:CKU:OK 0;255;3;0;9;TSF:MSG:GWL OK 0;255;3;0;9;TSF:MSG:SEND,0-0-100-100,s=255,c=3,t=8,pt=1,l=1,sg=0,ft=0,st=OK:0 0;255;3;0;9;TSF:MSG:READ,100-100-0,s=255,c=3,t=24,pt=1,l=1,sg=0:1 0;255;3;0;9;TSF:MSG:PINGED,ID=100,HP=1 0;255;3;0;9;TSF:MSG:SEND,0-0-100-100,s=255,c=3,t=25,pt=1,l=1,sg=0,ft=0,st=OK:1 0;255;3;0;9;TSF:MSG:READ,100-100-0,s=255,c=3,t=15,pt=6,l=2,sg=0:0100 0;255;3;0;9;TSF:MSG:SEND,0-0-100-100,s=255,c=3,t=15,pt=6,l=2,sg=0,ft=0,st=OK:0100 0;255;3;0;9;TSF:MSG:READ,100-100-0,s=255,c=0,t=17,pt=0,l=5,sg=0:2.1.1 0;255;3;0;9;Sending message on topic: domoticz/in/MyMQTT/100/255/0/0/17 0;255;3;0;9;TSF:MSG:READ,100-100-0,s=255,c=3,t=11,pt=0,l=19,sg=0:NodeManagerTemplate 0;255;3;0;9;Sending message on topic: domoticz/in/MyMQTT/100/255/3/0/11 0;255;3;0;9;TSF:MSG:READ,100-100-0,s=200,c=0,t=23,pt=0,l=0,sg=0: 0;255;3;0;9;Sending message on topic: domoticz/in/MyMQTT/100/200/0/0/23 0;255;3;0;9;TSF:MSG:READ,100-100-0,s=255,c=3,t=0,pt=1,l=1,sg=0:85 0;255;3;0;9;Sending message on topic: domoticz/in/MyMQTT/100/255/3/0/0 0;255;3;0;9;TSF:MSG:READ,100-100-0,s=255,c=3,t=26,pt=1,l=1,sg=0:2 0;255;3;0;9;TSF:MSG:SEND,0-0-100-100,s=255,c=3,t=27,pt=1,l=1,sg=0,ft=0,st=OK:1 0;255;3;0;9;TSF:MSG:READ,100-100-0,s=1,c=1,t=0,pt=7,l=5,sg=0:36.72 0;255;3;0;9;Sending message on topic: domoticz/in/MyMQTT/100/1/1/0/0 0;255;3;0;9;TSF:MSG:READ,100-100-0,s=255,c=3,t=22,pt=5,l=4,sg=0:286 0;255;3;0;9;Sending message on topic: domoticz/in/MyMQTT/100/255/3/0/22 0;255;3;0;9;Message arrived on topic: domoticz/out/MyMQTT/0/0/3/0/18 0;255;3;0;9;Sending message on topic: domoticz/in/MyMQTT/0/255/3/0/22
-
RE: NodeManager: plugin for a rapid development of battery-powered sensors
Hello,
I am trying to sketch a simple PIR motion as an example the official NodeManager but does not appear to me the pir of domoticz
DOMOTICZ OUTPUT1 S_TEMP #1. V_TEMP (56.5) true 1200 2017-04-09 12:11:15 200 S_CUSTOM true 1200 2017-04-09 11:34:45 201 S_MULTIMETER true 1200 2017-04-09 12:11:15 255 S_ARDUINO_NODE 2.1.1```
SKETCH
/* NodeManager is intended to take care on your behalf of all those common tasks a MySensors node has to accomplish, speeding up the development cycle of your projects. NodeManager includes the following main components: - Sleep manager: allows managing automatically the complexity behind battery-powered sensors spending most of their time sleeping - Power manager: allows powering on your sensors only while the node is awake - Battery manager: provides common functionalities to read and report the battery level - Remote configuration: allows configuring remotely the node without the need to have physical access to it - Built-in personalities: for the most common sensors, provide embedded code so to allow their configuration with a single line Documentation available on: https://mynodemanager.sourceforge.io */ // load user settings #include "config.h" // load MySensors library #include <MySensors.h> // load NodeManager library #include "NodeManager.h" // create a NodeManager instance NodeManager nodeManager; // before void before() { // setup the serial port baud rate Serial.begin(MY_BAUD_RATE); /* * Register below your sensors */ nodeManager.setSleep(SLEEP,60,MINUTES); nodeManager.registerSensor(SENSOR_MOTION,3); /* * Register above your sensors */ nodeManager.before(); } // presentation void presentation() { // Send the sketch version information to the gateway and Controller sendSketchInfo(SKETCH_NAME,SKETCH_VERSION); // call NodeManager presentation routine nodeManager.presentation(); } // setup void setup() { // call NodeManager setup routine nodeManager.setup(); } // loop void loop() { // call NodeManager loop routine nodeManager.loop(); } // receive void receive(const MyMessage &message) { // call NodeManager receive routine nodeManager.receive(message); }
-
RE: NodeManager: plugin for a rapid development of battery-powered sensors
@user2684
Tanks i try and report you
By -
RE: NodeManager: plugin for a rapid development of battery-powered sensors
@user2684
a really interesting project, however I would use NodeManager to query each time the battery status of my pir sensor; I would like to know how I can send from domoticz commands to query my node !! thank you -
RE: NodeManager: plugin for a rapid development of battery-powered sensors
Hello everyone, you can send commands to the node by domoticz even if the node is in sleep forever? Or the node must always have a sleep delay?
-
RE: domoticz request battery info to node
@sundberg84
tanks,
smartsleep? example for this? -
RE: domoticz request battery info to node
but if you can create a interrupt for the pir you can create it for rfm69?
Rfm69 can wake by interruopt? -
RE: domoticz request battery info to node
but surely ,my project was to question my sensors to see if they were reached through domoticz.
Domoticz creates interesting algorithms "EVENTS" so I thought to interrogate the sensors and if not responded to do domoticz a series of operations -
domoticz request battery info to node
hi,
i have a sensor node with pir and rfm69 wich sleep forever and send motion to gateway .Its possible for domoticz request level battery each hour to node sensor? -
RE: [SOLVED] Sleep dont run
SOLVED
HI
FOR 3volt power i have insert jumper in the pin H of hcr501 and my project in sleep mode consumption is 30 micro Tanks for you suggesrion
By -
RE: [SOLVED] Sleep dont run
@AWI
But I was thinking if it is true this should not works rather well the system works fine without false alarms and detection pir is precisely why? -
RE: [SOLVED] Sleep dont run
@AWI
I have order 3,6 aa battery 2600 mah and try , i think what you say infact i have imagined this Tanks -
RE: [SOLVED] Sleep dont run
I can not solve the problem !!
I interrupt stabilized with 10k resistor, rewired everything but if my atmga + hcr501 +rfm69 with ftdi sleep in the consumption is 30 micro, if power with aa battery consumption is 420 micro help -
RE: [SOLVED] Sleep dont run
@Yveaux
thanks for the lesson, really complete, tomorrow I will try to put into practice the advice then I put "high" and will default interrupt with a 10k resistor input pir sull'interrupt 1. Thanks'll let you know -
RE: [SOLVED] Sleep dont run
@AWI
Configuration hardware is: arduino without mcu (with usb power) wire(3,3,gnd,reset,txrx)betwin this and breadboard (atmega+pir+rfm69): consumption 30micro; the same configuration with no usb power but with jack 12 volt consumption 420 micro.
If i power breadboard without Arduino mculess but with 2 aa consumption 420 micro -
RE: [SOLVED] Sleep dont run
@AWI
Ok i try with sleep(5000) this afternoon,
One thing i dont say, the difference of consumption (30 micro or 420 micro) is if i power breadboard with atmega with arduino without mcu(usb 30micro); if I power same arduino mcu with jack 12 volt or I power breadboard with only 2 aa 1,5 the consumption is 420 micro -
RE: [SOLVED] Sleep dont run
@gohan
one thing I did not say that I have changed the gateway before it was all right (30 microah) when the gateway
was a esp Olimex evb, now I
downloaded the same sketch "gateway" on
esp8266 nodemecu dev kit and the node consumes me 420 microah !!GATEWAY
/** * The MySensors Arduino library handles the wireless radio link and protocol * between your home built sensors/actuators and HA controller of choice. * The sensors forms a self healing radio network with optional repeaters. Each * repeater and gateway builds a routing tables in EEPROM which keeps track of the * network topology allowing messages to be routed to nodes. * * Created by Henrik Ekblad <henrik.ekblad@mysensors.org> * Copyright (C) 2013-2015 Sensnology AB * Full contributor list: https://github.com/mysensors/Arduino/graphs/contributors * * Documentation: http://www.mysensors.org * Support Forum: http://forum.mysensors.org * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License * version 2 as published by the Free Software Foundation. * ******************************* * * REVISION HISTORY * Version 1.0 - Henrik Ekblad * * DESCRIPTION * The ESP8266 MQTT gateway sends radio network (or locally attached sensors) data to your MQTT broker. * The node also listens to MY_MQTT_TOPIC_PREFIX and sends out those messages to the radio network * * LED purposes: * - To use the feature, uncomment any of the MY_DEFAULT_xx_LED_PINs in your sketch * - RX (green) - blink fast on radio message recieved. In inclusion mode will blink fast only on presentation recieved * - TX (yellow) - blink fast on radio message transmitted. In inclusion mode will blink slowly * - ERR (red) - fast blink on error during transmission error or recieve crc error * * See http://www.mysensors.org/build/esp8266_gateway for wiring instructions. * nRF24L01+ ESP8266 * VCC VCC * CE GPIO4 * CSN/CS GPIO15 * SCK GPIO14 * MISO GPIO12 * MOSI GPIO13 * * Not all ESP8266 modules have all pins available on their external interface. * This code has been tested on an ESP-12 module. * The ESP8266 requires a certain pin configuration to download code, and another one to run code: * - Connect REST (reset) via 10K pullup resistor to VCC, and via switch to GND ('reset switch') * - Connect GPIO15 via 10K pulldown resistor to GND * - Connect CH_PD via 10K resistor to VCC * - Connect GPIO2 via 10K resistor to VCC * - Connect GPIO0 via 10K resistor to VCC, and via switch to GND ('bootload switch') * * Inclusion mode button: * - Connect GPIO5 via switch to GND ('inclusion switch') * * Hardware SHA204 signing is currently not supported! * * Make sure to fill in your ssid and WiFi password below for ssid & pass. */ // Enable debug prints to serial monitor #define MY_DEBUG // Use a bit lower baudrate for serial prints on ESP8266 than default in MyConfig.h #define MY_BAUD_RATE 9600 // Enables and select radio type (if attached) //#define MY_RADIO_NRF24 #define MY_RADIO_RFM69 // Enable repeater functionality for this node //#define MY_REPEATER_FEATURE #ifdef ESP8266 #define MY_RADIO_RFM69 #define MY_RFM69_FREQUENCY RF69_868MHZ // Set your frequency here #define MY_IS_RFM69HW // Omit if your RFM is not "H" #define MY_RF69_IRQ_PIN D1 #define MY_RF69_IRQ_NUM MY_RF69_IRQ_PIN #define MY_RF69_SPI_CS D8 // NSS #endif #define MY_REPEATER_FEATURE #define MY_GATEWAY_MQTT_CLIENT #define MY_GATEWAY_ESP8266 // Set this node's subscribe and publish topic prefix //#define MY_MQTT_PUBLISH_TOPIC_PREFIX "mygateway1-out" //#define MY_MQTT_SUBSCRIBE_TOPIC_PREFIX "mygateway1-in" #define MY_MQTT_PUBLISH_TOPIC_PREFIX "domoticz/in/MyMQTT" #define MY_MQTT_SUBSCRIBE_TOPIC_PREFIX "domoticz/out/MyMQTT" // Set MQTT client id #define MY_MQTT_CLIENT_ID "mysensors-1" // Enable these if your MQTT broker requires usenrame/password //#define MY_MQTT_USER "mosquitto" //#define MY_MQTT_PASSWORD "" // Set WIFI SSID and password #define MY_ESP8266_SSID "TP-LINK_B541" #define MY_ESP8266_PASSWORD "xxxxxx" // Set the hostname for the WiFi Client. This is the hostname // it will pass to the DHCP server if not static. #define MY_ESP8266_HOSTNAME "mqtt-sensor-gateway" // Enable MY_IP_ADDRESS here if you want a static ip address (no DHCP) #define MY_IP_ADDRESS 192,168,1,77 // If using static ip you need to define Gateway and Subnet address as well #define MY_IP_GATEWAY_ADDRESS 192,168,1,1 #define MY_IP_SUBNET_ADDRESS 255,255,255,0 // MQTT broker ip address. #define MY_CONTROLLER_IP_ADDRESS 192, 168, 1,200 // The MQTT broker port to to open #define MY_PORT 1883 /* // Enable inclusion mode #define MY_INCLUSION_MODE_FEATURE // Enable Inclusion mode button on gateway #define MY_INCLUSION_BUTTON_FEATURE // Set inclusion mode duration (in seconds) #define MY_INCLUSION_MODE_DURATION 60 // Digital pin used for inclusion mode button #define MY_INCLUSION_MODE_BUTTON_PIN 3 // Set blinking period #define MY_DEFAULT_LED_BLINK_PERIOD 300 // Flash leds on rx/tx/err #define MY_DEFAULT_ERR_LED_PIN 16 // Error led pin #define MY_DEFAULT_RX_LED_PIN 16 // Receive led pin #define MY_DEFAULT_TX_LED_PIN 16 // the PCB, on board LED */ #include <ESP8266WiFi.h> #include <MySensors.h> #define RELAY_1 5 // Arduino Digital I/O pin number for first relay (second on pin+1 etc) #define NUMBER_OF_RELAYS 1 // Total number of attached relays #define RELAY_ON 1 // GPIO value to write to turn on attached relay #define RELAY_OFF 0 // GPIO value to write to turn off attached relay void before() { for (int sensor=1, pin=RELAY_1; sensor<=NUMBER_OF_RELAYS; sensor++, pin++) { // Then set relay pins in output mode pinMode(pin, OUTPUT); // Set relay to last known state (using eeprom storage) digitalWrite(pin, loadState(sensor)?RELAY_ON:RELAY_OFF); } } void setup() { } void presentation() { // Send the sketch version information to the gateway and Controller sendSketchInfo("Relay", "1.0"); for (int sensor=1, pin=RELAY_1; sensor<=NUMBER_OF_RELAYS; sensor++, pin++) { // Register all sensors to gw (they will be created as child devices) present(sensor, S_BINARY); } } void loop() { // Send locally attech sensors data here } void receive(const MyMessage &message) { // We only expect one type of message from controller. But we better check anyway. if (message.type==V_STATUS) { // Change relay state digitalWrite(message.sensor-1+RELAY_1, message.getBool()?RELAY_ON:RELAY_OFF); // Store state in eeprom saveState(message.sensor, message.getBool()); // Write some debug info Serial.print("Incoming change for sensor:"); Serial.print(message.sensor); Serial.print(", New status: "); Serial.println(message.getBool()); } }
NODE
/** * The MySensors Arduino library handles the wireless radio link and protocol * between your home built sensors/actuators and HA controller of choice. * The sensors forms a self healing radio network with optional repeaters. Each * repeater and gateway builds a routing tables in EEPROM which keeps track of the * network topology allowing messages to be routed to nodes. * * Created by Henrik Ekblad <henrik.ekblad@mysensors.org> * Copyright (C) 2013-2015 Sensnology AB * Full contributor list: https://github.com/mysensors/Arduino/graphs/contributors * * Documentation: http://www.mysensors.org * Support Forum: http://forum.mysensors.org * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License * version 2 as published by the Free Software Foundation. * ******************************* * * REVISION HISTORY * Version 1.0 - Henrik Ekblad * * DESCRIPTION * Motion Sensor example using HC-SR501 * http://www.mysensors.org/build/motion * */ // Enable debug prints #define MY_DEBUG #define MY_NODE_ID 1 // Enable and select radio type attached //#define MY_RADIO_NRF24 #define MY_RADIO_RFM69 #include <MySensors.h> unsigned long SLEEP_TIME = 0; // Sleep time between reports (in milliseconds) #define DIGITAL_INPUT_SENSOR 3 // The digital input you attached your motion sensor. (Only 2 and 3 generates interrupt!) #define CHILD_ID 1 // Id of the sensor child // Initialize motion message MyMessage msg(CHILD_ID, V_TRIPPED); void setup() { pinMode(DIGITAL_INPUT_SENSOR, INPUT); // sets the motion sensor digital pin as input } void presentation() { // Send the sketch version information to the gateway and Controller sendSketchInfo("Motion Sensor", "1.0"); // Register all sensors to gw (they will be created as child devices) present(CHILD_ID, S_MOTION); } void loop() { // Read digital motion value bool tripped = digitalRead(DIGITAL_INPUT_SENSOR) == HIGH; Serial.println(tripped); send(msg.set(tripped?"1":"0")); // Send tripped value to gw // Sleep until interrupt comes in on motion sensor. Send update every two minute. sleep(digitalPinToInterrupt(DIGITAL_INPUT_SENSOR),CHANGE, SLEEP_TIME); }
-
RE: [SOLVED] Sleep dont run
Why the same configuration atmega+pir+rfm69 with ftdi power consumption is 30 microampere and with 2 1,5 AA is 420 microampere?
-
RE: [SOLVED] Sleep dont run
Hello everyone, I do not understand why ATmega328 powered with an Arduino board without MCU with 3v3 volts when ba consumes 30 microamps in sleep imvece atmega if the power is two batteries 1,5 knows when he goes to sleep consumes 420 microamps, I'm not understanding nothing seemed that just consumed my project with pir and ATMEga
-
RE: [SOLVED] Sleep dont run
@gohan
Yes of course, add gateway and the loop end , the node attachinterrupt with pir go to sleep when gateway receive
Tanks -
RE: [SOLVED] Sleep dont run
RESOLVED
I HAVE JUST ONE GATEWAY CONFIGURED WITH RFM69 ON BOARD, THEN I HAVE CONNECTED TO NODE ID MCU WITH PIR AND EVERYTHING WORKS, WHEN THE PIR IS HIGH CURRENT CONSUMED is 2.25 MAH, WHEN IN SLEEP MODE ONLY 30 microamps.
THANKS TO ALL THAT I HAVE HELPEDNODE
/** * The MySensors Arduino library handles the wireless radio link and protocol * between your home built sensors/actuators and HA controller of choice. * The sensors forms a self healing radio network with optional repeaters. Each * repeater and gateway builds a routing tables in EEPROM which keeps track of the * network topology allowing messages to be routed to nodes. * * Created by Henrik Ekblad <henrik.ekblad@mysensors.org> * Copyright (C) 2013-2015 Sensnology AB * Full contributor list: https://github.com/mysensors/Arduino/graphs/contributors * * Documentation: http://www.mysensors.org * Support Forum: http://forum.mysensors.org * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License * version 2 as published by the Free Software Foundation. * ******************************* * * REVISION HISTORY * Version 1.0 - Henrik Ekblad * * DESCRIPTION * Motion Sensor example using HC-SR501 * http://www.mysensors.org/build/motion * */ // Enable debug prints #define MY_DEBUG #define MY_NODE_ID 1 // Enable and select radio type attached //#define MY_RADIO_NRF24 #define MY_RADIO_RFM69 #include <MySensors.h> unsigned long SLEEP_TIME = 0; // Sleep time between reports (in milliseconds) #define DIGITAL_INPUT_SENSOR 3 // The digital input you attached your motion sensor. (Only 2 and 3 generates interrupt!) #define CHILD_ID 1 // Id of the sensor child // Initialize motion message MyMessage msg(CHILD_ID, V_TRIPPED); void setup() { pinMode(DIGITAL_INPUT_SENSOR, INPUT); // sets the motion sensor digital pin as input } void presentation() { // Send the sketch version information to the gateway and Controller sendSketchInfo("Motion Sensor", "1.0"); // Register all sensors to gw (they will be created as child devices) present(CHILD_ID, S_MOTION); } void loop() { // Read digital motion value bool tripped = digitalRead(DIGITAL_INPUT_SENSOR) == HIGH; Serial.println(tripped); send(msg.set(tripped?"1":"0")); // Send tripped value to gw // Sleep until interrupt comes in on motion sensor. Send update every two minute. sleep(digitalPinToInterrupt(DIGITAL_INPUT_SENSOR), CHANGE, SLEEP_TIME); }
GATEWAY
/** * The MySensors Arduino library handles the wireless radio link and protocol * between your home built sensors/actuators and HA controller of choice. * The sensors forms a self healing radio network with optional repeaters. Each * repeater and gateway builds a routing tables in EEPROM which keeps track of the * network topology allowing messages to be routed to nodes. * * Created by Henrik Ekblad <henrik.ekblad@mysensors.org> * Copyright (C) 2013-2015 Sensnology AB * Full contributor list: https://github.com/mysensors/Arduino/graphs/contributors * * Documentation: http://www.mysensors.org * Support Forum: http://forum.mysensors.org * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License * version 2 as published by the Free Software Foundation. * ******************************* * * DESCRIPTION * The ArduinoGateway prints data received from sensors on the serial link. * The gateway accepts input on seral which will be sent out on radio network. * * The GW code is designed for Arduino Nano 328p / 16MHz * * Wire connections (OPTIONAL): * - Inclusion button should be connected between digital pin 3 and GND * - RX/TX/ERR leds need to be connected between +5V (anode) and digital pin 6/5/4 with resistor 270-330R in a series * * LEDs (OPTIONAL): * - To use the feature, uncomment any of the MY_DEFAULT_xx_LED_PINs * - RX (green) - blink fast on radio message recieved. In inclusion mode will blink fast only on presentation recieved * - TX (yellow) - blink fast on radio message transmitted. In inclusion mode will blink slowly * - ERR (red) - fast blink on error during transmission error or recieve crc error * */ // Enable debug prints to serial monitor #define MY_DEBUG // Enable and select radio type attached //#define MY_RADIO_NRF24 #define MY_RADIO_RFM69 // Set LOW transmit power level as default, if you have an amplified NRF-module and // power your radio separately with a good regulator you can turn up PA level. #define MY_RF24_PA_LEVEL RF24_PA_LOW // Enable serial gateway #define MY_GATEWAY_SERIAL // Define a lower baud rate for Arduino's running on 8 MHz (Arduino Pro Mini 3.3V & SenseBender) #if F_CPU == 8000000L #define MY_BAUD_RATE 38400 #endif // Enable inclusion mode #define MY_INCLUSION_MODE_FEATURE // Enable Inclusion mode button on gateway //#define MY_INCLUSION_BUTTON_FEATURE // Inverses behavior of inclusion button (if using external pullup) //#define MY_INCLUSION_BUTTON_EXTERNAL_PULLUP // Set inclusion mode duration (in seconds) #define MY_INCLUSION_MODE_DURATION 60 // Digital pin used for inclusion mode button //#define MY_INCLUSION_MODE_BUTTON_PIN 3 // Set blinking period #define MY_DEFAULT_LED_BLINK_PERIOD 300 // Inverses the behavior of leds //#define MY_WITH_LEDS_BLINKING_INVERSE // Flash leds on rx/tx/err // Uncomment to override default HW configurations //#define MY_DEFAULT_ERR_LED_PIN 4 // Error led pin //#define MY_DEFAULT_RX_LED_PIN 6 // Receive led pin //#define MY_DEFAULT_TX_LED_PIN 5 // the PCB, on board LED #include <MySensors.h> void setup() { // Setup locally attached sensors } void presentation() { // Present locally attached sensors } void loop() { // Send locally attached sensor data here }
SERIAL OUTPUT NODE
0 MCO:BGN:INIT NODE,CP=RRNNA--,VER=2.1.1 4 TSM:INIT 4 TSF:WUR:MS=0 8 TSM:INIT:TSP OK 10 TSM:INIT:STATID=1 12 TSF:SID:OK,ID=1 14 TSM:FPAR 145 TSF:MSG:SEND,1-1-255-255,s=255,c=3,t=7,pt=0,l=0,sg=0,ft=0,st=OK: 1044 TSF:MSG:READ,0-0-1,s=255,c=3,t=8,pt=1,l=1,sg=0:0 1050 TSF:MSG:FPAR OK,ID=0,D=1 2152 TSM:FPAR:OK 2152 TSM:ID 2154 TSM:ID:OK 2156 TSM:UPL 2164 TSF:MSG:SEND,1-1-0-0,s=255,c=3,t=24,pt=1,l=1,sg=0,ft=0,st=OK:1 2199 TSF:MSG:READ,0-0-1,s=255,c=3,t=25,pt=1,l=1,sg=0:1 2205 TSF:MSG:PONG RECV,HP=1 2207 TSM:UPL:OK 2209 TSM:READY:ID=1,PAR=0,DIS=1 2263 TSF:MSG:SEND,1-1-0-0,s=255,c=3,t=15,pt=6,l=2,sg=0,ft=0,st=OK:0100 2287 TSF:MSG:READ,0-0-1,s=255,c=3,t=15,pt=6,l=2,sg=0:0100 2344 TSF:MSG:SEND,1-1-0-0,s=255,c=0,t=17,pt=0,l=5,sg=0,ft=0,st=OK:2.1.1 2404 TSF:MSG:SEND,1-1-0-0,s=255,c=3,t=6,pt=1,l=1,sg=0,ft=0,st=OK:0 4421 TSF:MSG:SEND,1-1-0-0,s=255,c=3,t=11,pt=0,l=13,sg=0,ft=0,st=OK:Motion Sensor 4483 TSF:MSG:SEND,1-1-0-0,s=255,c=3,t=12,pt=0,l=3,sg=0,ft=0,st=OK:1.0 4542 TSF:MSG:SEND,1-1-0-0,s=1,c=0,t=1,pt=0,l=0,sg=0,ft=0,st=OK: 4548 MCO:REG:REQ 4601 TSF:MSG:SEND,1-1-0-0,s=255,c=3,t=26,pt=1,l=1,sg=0,ft=0,st=OK:2 4626 TSF:MSG:READ,0-0-1,s=255,c=3,t=27,pt=1,l=1,sg=0:1 4630 MCO:PIM:NODE REG=1 4634 MCO:BGN:STP 4636 MCO:BGN:INIT OK,TSP=1 1 4689 TSF:MSG:SEND,1-1-0-0,s=1,c=1,t=16,pt=0,l=1,sg=0,ft=0,st=OK:1 4698 MCO:SLP:MS=0,SMS=0,I1=1,M1=1,I2=255,M2=255 4702 MCO:SLP:TPD 4704 MCO:SLP:WUP=1 0 4714 TSF:MSG:SEND,1-1-0-0,s=1,c=1,t=16,pt=0,l=1,sg=0,ft=0,st=OK:0 4722 MCO:SLP:MS=0,SMS=0,I1=1,M1=1,I2=255,M2=255 4726 MCO:SLP:TPD 4728 MCO:SLP:WUP=1 1 4739 TSF:MSG:SEND,1-1-0-0,s=1,c=1,t=16,pt=0,l=1,sg=0,ft=0,st=OK:1 4747 MCO:SLP:MS=0,SMS=0,I1=1,M1=1,I2=255,M2=255 4751 MCO:SLP:TPD 4753 MCO:SLP:WUP=1 0 4763 TSF:MSG:SEND,1-1-0-0,s=1,c=1,t=16,pt=0,l=1,sg=0,ft=0,st=OK:0 4771 MCO:SLP:MS=0,SMS=0,I1=1,M1=1,I2=255,M2=255 4775 MCO:SLP:TPD
SERIAL OUTPUT GATEWAY
0;255;3;0;9;MCO:BGN:INIT GW,CP=RRNGA--,VER=2.1.1 0;255;3;0;9;TSM:INIT 0;255;3;0;9;TSF:WUR:MS=0 0;255;3;0;9;TSM:INIT:TSP OK 0;255;3;0;9;TSM:INIT:GW MODE 0;255;3;0;9;TSM:READY:ID=0,PAR=0,DIS=0 0;255;3;0;9;MCO:REG:NOT NEEDED 0;255;3;0;14;Gateway startup complete. 0;255;0;0;18;2.1.1 0;255;3;0;9;MCO:BGN:STP 0;255;3;0;9;MCO:BGN:INIT OK,TSP=1 0;255;3;0;9;TSF:MSG:READ,1-1-0,s=1,c=1,t=16,pt=0,l=1,sg=0:1 1;1;1;0;16;1
TANKS VERY VERY VERY TO ALL
-
RE: [SOLVED] Sleep dont run
@gohan
one example to set node id in motion sketch? -
RE: [SOLVED] Sleep dont run
@mfalkvidd
what example in mysensors library i try? -
RE: [SOLVED] Sleep dont run
@mfalkvidd
infact i the gw not exist, i try with gw and test again tanks -
RE: [SOLVED] Sleep dont run
0 MCO:BGN:INIT NODE,CP=RRNNA--,VER=2.1.1 4 TSM:INIT 4 TSF:WUR:MS=0 8 TSM:INIT:TSP OK 10 TSM:FPAR 141 TSF:MSG:SEND,255-255-255-255,s=255,c=3,t=7,pt=0,l=0,sg=0,ft=0,st=OK: 2148 !TSM:FPAR:NO REPLY 2150 TSM:FPAR 2281 TSF:MSG:SEND,255-255-255-255,s=255,c=3,t=7,pt=0,l=0,sg=0,ft=0,st=OK: 4288 !TSM:FPAR:NO REPLY 4290 TSM:FPAR 4421 TSF:MSG:SEND,255-255-255-255,s=255,c=3,t=7,pt=0,l=0,sg=0,ft=0,st=OK: 6430 !TSM:FPAR:NO REPLY 6432 TSM:FPAR 6563 TSF:MSG:SEND,255-255-255-255,s=255,c=3,t=7,pt=0,l=0,sg=0,ft=0,st=OK: 8574 !TSM:FPAR:FAIL 8577 TSM:FAIL:CNT=1 8579 TSM:FAIL:PDT
-
RE: [SOLVED] Sleep dont run
@HarryDutch
I have try...
Nothing, the mcu dont sleep -
RE: [SOLVED] Sleep dont run
@tonnerre33
If i want sleep forever and wake only pir is high? -
[SOLVED] Sleep dont run
Hi to all,
Why my atmega328 in breadboard with official bootloader atmega328 (8mhz internal) qnd rfm69 with pir dont go in sleep?
I see in serial wich send every
Tanks/** * The MySensors Arduino library handles the wireless radio link and protocol * between your home built sensors/actuators and HA controller of choice. * The sensors forms a self healing radio network with optional repeaters. Each * repeater and gateway builds a routing tables in EEPROM which keeps track of the * network topology allowing messages to be routed to nodes. * * Created by Henrik Ekblad <henrik.ekblad@mysensors.org> * Copyright (C) 2013-2015 Sensnology AB * Full contributor list: https://github.com/mysensors/Arduino/graphs/contributors * * Documentation: http://www.mysensors.org * Support Forum: http://forum.mysensors.org * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License * version 2 as published by the Free Software Foundation. * ******************************* * * REVISION HISTORY * Version 1.0 - Henrik Ekblad * * DESCRIPTION * Motion Sensor example using HC-SR501 * http://www.mysensors.org/build/motion * */ // Enable debug prints // #define MY_DEBUG // Enable and select radio type attached #define MY_RADIO_RFM69 #include <MySensors.h> unsigned long SLEEP_TIME = 0; // Sleep time between reports (in milliseconds) #define DIGITAL_INPUT_SENSOR 3 // The digital input you attached your motion sensor. (Only 2 and 3 generates interrupt!) #define CHILD_ID 1 // Id of the sensor child // Initialize motion message MyMessage msg(CHILD_ID, V_TRIPPED); void setup() { pinMode(DIGITAL_INPUT_SENSOR, INPUT); // sets the motion sensor digital pin as input } void presentation() { // Send the sketch version information to the gateway and Controller sendSketchInfo("Motion Sensor", "1.0"); // Register all sensors to gw (they will be created as child devices) present(CHILD_ID, S_MOTION); } void loop() { // Read digital motion value bool tripped = digitalRead(DIGITAL_INPUT_SENSOR) == HIGH; Serial.println(tripped); send(msg.set(tripped?"1":"0")); // Send tripped value to gw // Sleep until interrupt comes in on motion sensor. Send update every two minute. sleep(digitalPinToInterrupt(DIGITAL_INPUT_SENSOR), CHANGE, SLEEP_TIME); }
-
RE: What's the best PIR sensor?
@NeverDie
Hi
I just ordered a pir of panasonic Papirs series and even a parallax'll let you know -
RE: π¬ Various bootloader files based on Optiboot 6.2
Thanks anyway, this section introduced me to some very interesting bootloader, at least with these bootloader I can get a few microamperes for my projects, I will take note of your good day and thank you tips
-
RE: π¬ Various bootloader files based on Optiboot 6.2
@Samuel235
I wanted to build my projects with mysensors, first of all I started with bootloader found in this section to try them with examples that I know because I do not know yet mysensors, I wanted to learn it so I took the liberty to insert code in your section. if you can figure out my problem thank you or I apologize for the trouble thanks -
RE: π¬ Various bootloader files based on Optiboot 6.2
@mar.conte
im not sure why pir with simple test like this http://playground.arduino.cc/Code/PIRsense is ok
but with my sketch the cpu reset forever#include <Arduino.h> // assumes Arduino IDE v1.0 or greater #include <avr/sleep.h> #include <avr/wdt.h> #include <avr/power.h> #include <avr/io.h> ISR (PCINT2_vect) { // handle pin change interrupt for D0 to D7 here } // end of PCINT2_vect const unsigned long WAIT_TIME = 4000; const byte LED =8 ; const byte LED2 =9 ; int wakepin =3 ; unsigned long lastSleep; volatile boolean motionDetected=false; float batteryVolts = 5; char BATstr[10]; //longest battery voltage reading message = 9chars char sendBuf[32]; byte sendLen; void checkBattery(void); #include <RFM69.h> //get it here: https://www.github.com/lowpowerlab/rfm69 #include <SPI.h> //********************************************************************************************* // *********** IMPORTANT SETTINGS - YOU MUST CHANGE/ONFIGURE TO FIT YOUR HARDWARE ************* //********************************************************************************************* #define NETWORKID 100 // The same on all nodes that talk to each other #define NODEID 2 // The unique identifier of this node #define RECEIVER 1 // The recipient of packets //Match frequency to the hardware version of the radio on your Feather //#define FREQUENCY RF69_433MHZ //#define FREQUENCY RF69_868MHZ #define FREQUENCY RF69_868MHZ #define ENCRYPTKEY "sampleEncryptKey" //exactly the same 16 characters/bytes on all nodes! #define IS_RFM69HW true // set to 'true' if you are using an RFM69HCW module //********************************************************************************************* #define SERIAL_BAUD 115200 #define RFM69_CS 10 #define RFM69_IRQ 2 #define RFM69_IRQN 0 // Pin 2 is IRQ 0! #define RFM69_RST 9 int16_t packetnum = 0; // packet counter, we increment per xmission RFM69 radio = RFM69(RFM69_CS, RFM69_IRQ, IS_RFM69HW, RFM69_IRQN); void setup () { pinMode (wakepin,INPUT); pinMode(LED, OUTPUT); pinMode(LED2, OUTPUT); digitalWrite(wakepin,HIGH); char buff[50]; Serial.begin(SERIAL_BAUD); Serial.println("Arduino RFM69HCW Transmitter"); // Hard Reset the RFM module pinMode(RFM69_RST, OUTPUT); digitalWrite(RFM69_RST, HIGH); delay(100); digitalWrite(RFM69_RST, LOW); delay(100); // Initialize radio radio.initialize(FREQUENCY,NODEID,NETWORKID); if (IS_RFM69HW) { radio.setHighPower(); // Only for RFM69HCW & HW! } radio.setPowerLevel(31); // power output ranges from 0 (5dBm) to 31 (20dBm) radio.encrypt(ENCRYPTKEY); pinMode(LED, OUTPUT); Serial.print("\nTransmitting at "); Serial.print(FREQUENCY==RF69_433MHZ ? 433 : FREQUENCY==RF69_868MHZ ? 868 : 915); Serial.println(" MHz"); } uint16_t batteryReportCycles=0; void loop () { //rf(); sleepNow(); rf(); //radio.sleep(); // sleep function called here radio.sleep(); } void wake () { // cancel sleep as a precaution //sleep_disable(); // precautionary while we do other stuff detachInterrupt (1); } // end of wake void sleepNow() { if (millis () - lastSleep >= WAIT_TIME) { lastSleep = millis (); byte old_ADCSRA = ADCSRA; // disable ADC ADCSRA = 0; // pin change interrupt (example for D0) PCMSK2 |= bit (PCINT16); // want pin 0 PCIFR |= bit (PCIF2); // clear any outstanding interrupts PCICR |= bit (PCIE2); // enable pin change interrupts for D0 to D7 set_sleep_mode (SLEEP_MODE_PWR_DOWN); power_adc_disable(); power_spi_disable(); power_timer0_disable(); power_timer1_disable(); power_timer2_disable(); power_twi_disable(); //PORTB = 0x00; UCSR0B &= ~bit (RXEN0); // disable receiver UCSR0B &= ~bit (TXEN0); // disable transmitter sleep_enable(); noInterrupts (); attachInterrupt (1, wake,HIGH); digitalWrite (LED, LOW); interrupts (); sleep_cpu (); digitalWrite (LED, HIGH); sleep_disable(); power_all_enable(); ADCSRA = old_ADCSRA; PCICR &= ~bit (PCIE2); // disable pin change interrupts for D0 to D7 UCSR0B |= bit (RXEN0); // enable receiver UCSR0B |= bit (TXEN0); // enable transmitter } // end of time to sleep } void rf() { char radiopacket[20] = "Hello World #"; itoa(packetnum++, radiopacket+13, 10); Serial.print("Sending "); Serial.println(radiopacket); if (!radio.sendWithRetry(RECEIVER, radiopacket, strlen(radiopacket))) { //target node Id, message as string or byte array, message length Serial.println("OK"); } radio.receiveDone(); //put radio in RX mode Serial.flush(); //make sure all serial data is clocked out before sleeping the MCU }
-
RE: π¬ Various bootloader files based on Optiboot 6.2
@Samuel235
Resolved
I have try with sketc j gammon https://www.gammon.com.au/forum/?id=11497
And the problem are pir input (model hrc-501)
Are ever high and the cpu dont go in sleep.
I have remove pir and all ok the atmega run 20 uah very good.
Can you advise a good pir wich run to 3,3 V for my project?
Tanks -
RE: π¬ Various bootloader files based on Optiboot 6.2
@Samuel235
Yes, i want obtain few micro amp but its two month wich i try without result..... -
RE: π¬ Various bootloader files based on Optiboot 6.2
@alexsh1
I have only voltmeter extec, can i mesure ua?
Can you send simple sketch for deep sleep ? -
RE: π¬ Various bootloader files based on Optiboot 6.2
@Samuel235
Hy
My project is simple atmega328 with internal clock 8 mhz in powerdown mode end rfm69 hw which send to gateway when pir motion is high powered all with 2 aa battery.
The First test what i do is in breadboard atmega328 with optiboot 6.2 ( i have upload bootloader 8mhz internal , 38vk, bod 2v7) and simple sketch j gammon: result no microampere but around 2/5 mah in sleep mode; -
RE: π¬ Various bootloader files based on Optiboot 6.2
Help!!!
I have upload bootloader 8mhz 38k bod 2,7 and internal clock with sketch j gammon!!!
Consumption 2 mh!!!
Why?
Tanks -
RE: π¬ Various bootloader files based on Optiboot 6.2
@Samuel235
Sorry for my english, your answer is ok Tanks you -
RE: π¬ Various bootloader files based on Optiboot 6.2
hy,
can anyone tell me what is the word near cpu 8mhz-38k4-d13 etc..??
tanks -
RE: Atmega328+rfm69HW sleep mode problem
Hy,
I have insert into ide board the sensebender micro, it' S possible to use sensebender micro bootloader 8mhz for my project like: atmega328 8mhz internal pir sensor, rfm69 in sleep mode with 2 aa battery for low consumption?
Tanks -
RE: Atmega328+rfm69HW sleep mode problem
@scalz
Can you advise bootloader with internal Clock 8mhz and bod disable?it'same the bootloader in the Arduino ide board like 8mhzinternal for gammon sketch? Tanks -
RE: Atmega328+rfm69HW sleep mode problem
@scalz
Ok i rebuild all and try with gammon low power , what is my sensor library for try with rfm69?
I want try with simple sleep forever and interrupt pin to wake when pir is high
Tanks