@strixx actually a have a similar problem but my OpenHab sends random notifications maybe every 2 days that motion was detected but i didnt debug yet. Whatever .. do you power your PIR with 5v ? With 3.3v for sure this will happen.

Posts made by ahmedadelhosni
-
RE: PIR started reporting motion every 20 minutes [SOLVED]
-
RE: ESP8266 WiFi gateway port for MySensors
Is it normal to use GPIO15 ? Isn't it used for booting mode ?
-
RE: Unknown battery drain
Thanks all.
Actually @tbowmo i was asking about bootloader because I have opened another thread reagrding a problem where my node stops working sometimes when i use 1 Mhz. So i was asking what would it be the problem ? And what booloader + power supply technique do people use.
-
RE: Door Sensor hangs up after some time (bootloader issue)
Any updates here please ?
-
RE: Unknown battery drain
@tbowmo Thanks for the info.
So here I have two questions. How do you power your node/radio ? how much days did it survive till now ?
-
RE: Unknown battery drain
@tbowmo wow 2.5 years !! Which bootloader are you using for your sleeping node ? It is Sensebender or did you modify it ?
-
Door Sensor hangs up after some time (bootloader issue)
Hello,
I recently was testing different boatloaders for Door sensor. I use 2x AAA batteries for my test.
First one which caused the problem was : APM Optiboot internal 1MHz noBOD 9600baud
apm96.name=APM Optiboot internal 1MHz noBOD 9600baud apm96.upload.tool=avrdude apm96.upload.protocol=arduino apm96.upload.maximum_size=32256 apm96.upload.speed=9600 apm96.bootloader.tool=avrdude apm96.bootloader.low_fuses=0x62 apm96.bootloader.high_fuses=0xde apm96.bootloader.extended_fuses=0x07 apm96.bootloader.path=optiboot_v50 apm96.bootloader.file=atmega328_1a.hex apm96.bootloader.unlock_bits=0x3F apm96.bootloader.lock_bits=0x2F apm96.build.mcu=atmega328p apm96.build.f_cpu=1000000L apm96.build.core=arduino apm96.build.variant=standard
Then I changed to :- ATmega328 on a breadboard (8 MHz internal clock)
atmega328bb.name=ATmega328 on a breadboard (8 MHz internal clock) atmega328bb.upload.protocol=arduino atmega328bb.upload.maximum_size=30720 atmega328bb.upload.speed=57600 atmega328bb.bootloader.low_fuses=0xE2 atmega328bb.bootloader.high_fuses=0xDA atmega328bb.bootloader.extended_fuses=0x05 atmega328bb.bootloader.file=ATmegaBOOT_168_atmega328_pro_8MHz.hex atmega328bb.bootloader.unlock_bits=0x3F atmega328bb.bootloader.lock_bits=0x0F atmega328bb.build.mcu=atmega328p atmega328bb.build.f_cpu=8000000L atmega328bb.build.core=arduino:arduino atmega328bb.build.variant=arduino:standard atmega328bb.bootloader.tool=arduino:avrdude atmega328bb.upload.tool=arduino:avrdude
The first one has BOD at 1.8, and I read here in the forum that Atmega328p behaves strange when set to this value, although I read also that lots of people sees this a good practice to increase node life time.
Problem till now is solved when I used the second bootloader.
My question is:
- Did anyone face this issue ?
- Which bootloader fuses do you use for sleeping nodes ? WDT disabled ? No BOD ? or do you enable them ?
- What battery types do you use ?
Please share your experience.
Thanks.
-
RE: 💬 Multi-Sensor: Temp/Humidity/PIR/ Leak/Magnet/Light/Accel
@neverdie how do you connect thr two Cr batteries ?
Another question ? I read in another comments that you need 100-200 uF capacitor so that the radio can work since thr CR battery wont be strong enough. Did you add this ?
-
RE: 3V battery for door sensor node.
Good topic. I have been lazy since a month to ask the same question regarding best batteries do people use for battery powered nodes ?
I have thought of using AAA batteries but I really do not know which categories do I go with. Lithuim or Alkaline ?
If you check this link https://d2ei442zrkqy2u.cloudfront.net/wp-content/uploads/2016/03/MN2400_US_CT1.pdf
You find that the Alkaline battery can operate till it reaches 1.0 v for more than 1200 service hours. So two in Series will give me 2v which are still above 1.9 for the atmega and nrf to run.
But also if you check lithuim batteries.
http://data.energizer.com/pdfs/l92.pdfIt also operates for 1200 service hours at 1.4v before the battery dies quickly.
My question. Why would I choose a more expensive option (which is Lithuim) although I can use the Alkaline which is much cheaper and may be half the price ? Will the performance is better with steady voltage using lithuim ?
Thanks.
-
RE: Alternatives for nRF24L01+ ?
@nca78 Thanks.
so the same define for nrf24 works for nrf52 ?
-
RE: Alternatives for nRF24L01+ ?
@Nca78 So you are using nrf52 ebyte with antenna and you enable the pa/lna in the project ? Can you guide me to the code for this please ?
Thanks.
-
RE: nRF5 action!
Is signing soft supported or not yet ?
The personalizer sketch do not have hash define for the NRF52.
-
RE: nRF5 action!
Yes I read this from the datasheet but I thought maybe MySensors defines some Pins for debugging.
How can I set them ? Any ApI refrences ?
-
RE: nRF5 action!
I dont have access to the source code now. Can someone please tell which pins are configured as Tx and Rx for serial communication ?
-
RE: Noob : Cant get Sensor talking to gateway
@mfalkvidd That's what I know but as I have said, I have been facing the same error to assign an ID for my node and it was solved when I change it to static ID... strange !
-
RE: Noob : Cant get Sensor talking to gateway
I have been facing the same problem all day today. Actually as far as I remember my old nodes used to setup the node assignation to AUTO by default.
Was that changed during the last month ? because I was busy at that period.
-
RE: 💬 Multi-Sensor: Temp/Humidity/PIR/ Leak/Magnet/Light/Accel
@NeverDie Please report your results when you do.
Do you have any idea who to know the fixed hw from the non fixed ones ?
-
RE: 💬 BT832X Power Amplified nRF52832 Remote Control with LNA
@NeverDie Does the BT832 or BT832X contains the DCDC circuit ? I am asking this because I didn't see the 2 inductors included in your pdf schematics as you have done for the eByte.
Thanks.
-
RE: 💬 Multi-Sensor: Temp/Humidity/PIR/ Leak/Magnet/Light/Accel
@NeverDie You have a typo in the description. It shall be nrf51 not nrf52.
My question please : Can you tell me the power consumption during deep sleep and wake up vs your results with nrf52 ?
Also I read that the nrf51 has some hw issues, is this true ?
-
RE: Best method to measure power consumption for smart plug / light switch etc..
@gohan sonoff does power measurements ?
I need DIY for my projects. I don't want to use already manufactured products.
-
RE: Best method to measure power consumption for smart plug / light switch etc..
@Yveaux said in Best method to measure power consumption for smart plug / light switch etc..:
INA219
Is this for AC loads ? I guess this is for DC
-
RE: 💬 Ebyte nRF52832 Prototyping Board
Can you please propose what type of inductors and capacitors did you use ?
A BOM will be great.Actually I am asking because I knew there is something called SRF from this topic https://devzone.nordicsemi.com/question/171472/filter-inductor-requirement-for-nrf52832-in-dcdc-mode/
Thanks.
-
Best method to measure power consumption for smart plug / light switch etc..
Hello,
What do you use to measure the power consumption ? accurate, easy, cheap and don't break down easily.
I know about the ACS712 but the reviews in sparkfun are not so good : https://www.sparkfun.com/products/8883
What do you think ?
-
RE: Sensebender Micro - Abnormal power consumption
@qqlapraline so bad soldering caused this ?!
-
RE: [security] Introducing signing support to MySensors
@Anticimex Great. Thanks for your time.
-
RE: [security] Introducing signing support to MySensors
@Anticimex aha so you mean that since our message frame contains the payload (not encrypted ) + signature so it is not applicable to send it OTA ?
So do you have any documentation for tracking 3.0 progress ?
-
RE: [security] Introducing signing support to MySensors
@Anticimex Actually something now came to my mind. Can't the attacker flash a gateway sketch easier and control all nodes now ?
He has a trusted ATSHA with HMAC.
Am I missing something ? -
RE: [security] Introducing signing support to MySensors
@Anticimex Second : Don't you think that the whitelisting need to be more robust ?
I mean that I don't like the idea of reflashing. Why don't you implement an API that can be used to securely add or revoke serials during run time ?
Also another idea which I would like to discuss. Maybe when a node is started, it sends it's serial number securely to the gateway and it is added to the whitelist for example.
The whole idea is that I don't really know how do other commerial products handle security for private and public nodes. All I know is usually you scan a QR code which is on the box. Do you have any idea ?
-
RE: [security] Introducing signing support to MySensors
@Anticimex This seems a good solution.
I have to points to discuss here please.
First : I know that we have an API to specify that node 4 shall send this message to node 7 for example. In our library, does this communication happens without passing by the gateway ?
If for example in order to reach node 7, a repeater node 6 shall be used in between. Thus node 4, send to the gateway then to node 6 then to node 7 ?In our case when we revoke our stolen node from the Gateway which is now node 4. will the message pass first to the gateway or if the attacker knows node's 7 serial, then node 4 sends it directly to 7 ?
Actually I guess it may pass by the gateway but I am not famailar how is the look up table implemented.
-
RE: [security] Introducing signing support to MySensors
@Anticimex The documentation is great regarding how to enable the signing and make the nodes work. My questions were related more to technical stuff.
Actually I still have a problem that I shall only use the hardware in private places. I know we have whitelist but I don't like the idea of having to re program node to add or revoke other stolen nodes.
If I need to put a motion sensor outside then I will have to make sure that all other nodes inside my house accept messages from only my gateway for example. Because if this node is stolen I don't want someone to send same commands to my private nodes.
What do you suggest to solve this ?
Do I have to set all private nodes to accept signed data from gateway only ? -
RE: [security] Introducing signing support to MySensors
@Anticimex finally I understood it. Actually I don't like using just the code without fully understanding the implementation. Thanks for support.
I will come with more questions maybe
-
RE: [security] Introducing signing support to MySensors
@Anticimex Yeah actually I have read this post like 20 times before but I guess I begun to really understand the "technical" stuff today.
So basically what I understood is that we have a HMAC Key, which is generated and is saved in all devices, this is when we do step 1 'generate key' and step 2 'personalize'. Thus when the gateway needs to send to node X, it send to node X asking for a nonce from the ATSHA on Node 2 board. Then node 2 sends the nonce over the air. THe gateway then uses this nonce to produce signed message by first applying SHA then use the HMAC key to produce the signed data. Then the signed data is transmitted over the air to the node X again which does the same operations again and verify that the nonce produces the same signed message in small period of time ( to avoid replay block attacks)
Is my understanding correct
?
-
RE: nRF5 action!
@Nca78 Yeah actually this makes sense. I forgot about the licence thing. Actually I didn't bug the boards and I want to get everything at once without missing anything. I am in a hurry
it is strange that this clone can do the work as @Uhrheber mentioned.
-
RE: nRF5 action!
@Uhrheber Great. Thanks for the help.
So if I understand well. If I have a TIVA board like TM4C123G Launchpad and it is ARM Mx also, then I can use it to program my nRF ?
This is the datasheet for the board : http://www.ti.com/lit/ug/spmu296/spmu296.pdf
I searched and found those links describing how to use the Launchad but I am not sure whether this will work for nRF also or not.
http://processors.wiki.ti.com/index.php/Stellaris_LM4F120_LaunchPad_Debug_How_To
http://ucsolutions.blogspot.com.eg/2014/08/ti-launchpad-as-external-debugger-with.htmlThanks.
-
RE: nRF5 action!
@Uhrheber I am a bit confused. To program the nRF52 from eByte I need a special programmer but they are expensive. So you mean you used a clone StLink V2 and it worked fine ?
I found this.
-
RE: nRF5 action!
@NeverDie Did you manage to get more than 10m ? maybe by another modules.
I thought the nrf52 will have better range !
-
RE: [security] Introducing signing support to MySensors
@Anticimex yeah I know. I have already managed to use Siging in my network and it works.
I just wanted to understand more about how the code works and the technical stuff.
Thanks.
-
RE: [security] Introducing signing support to MySensors
@Anticimex yeah I read it several times before but maybe didnt pay attention to tge technical stuff
-
RE: [security] Introducing signing support to MySensors
@Anticimex aha okay I understand a bit now. So we put s special hmac that does all cryptography jobs then it gives us something that is used for transmision?
Looks like i have to read the datasheet also
-
RE: [security] Introducing signing support to MySensors
@Anticimex Sorry but I didn't understand the benefit of locking the ATSHA to be unreadable ?
I know we do not lock it so that we can read the HMAC and use it during verification, but what is the usage of a locked ATSHA ? -
RE: [security] Introducing signing support to MySensors
1- So if we have a microcontroller that supports locking the memory then the problem is solved ? I know that SAM is being introduced now, Does it support this ?
2- what is then the purpose of locking the ATSHA if we can't extract the HMAC which we depend on it ?
Thanks.
-
RE: [security] Introducing signing support to MySensors
Hi @Anticimex Actually there is something that I can not understand regarding cryptograhpy. I want to know how other products like Fibaro, Smartthings, etc handles the security ?
Here in our library the SW is not a good idea, why ? I thought beacuse someone can dump the memory .. but is it that easy ? Can't we lock the code and memory ? Also in the hardware ATSHA solution, someone can easily take the chip and intercept our network and sniff it or even send commands as it is explained in the documentation and that's why we don't use security for public nodes as it usualy reports states. But can't we lock the chip ? and by some way only the atmega can communicate with it to get the key by some way ?
I read online that some people are using private and public keys .. if this is the case, then the private key is offcourse saved in the memory. How do they handle this problem ?
Do they use AES , SHA ? which encyption way ?
Also the nRF52, I tried to read a lot and they use private and public keys i guess.
lots of questions and I am confused but I want to know how do they handle protection for public nodes.
Can you please explain this to me ?
Thanks.
-
RE: Asus tinker board
What about PINE64 ? Did anyone try it ?
Actually I ordered it from kickstarter when it was launched in April 2016 ( I guess ) but I didn't have the enough time to run it.
-
RE: [security] Introducing signing support to MySensors
@Anticimex sorry for lots of questions but can u explain in more details what you meant by " that either you have had your personalized data altered between the time of personalization and usage" ?
-
RE: [security] Introducing signing support to MySensors
@Anticimex thanks a lot.
I have another question please. I use atsha hw, do this setup save anything in the eeprom ?
-
RE: [security] Introducing signing support to MySensors
@Anticimex Okay I managed to get it working .. I guess
After I posted here I decided to go through the code to see when this TAMPERED is printed, so I thought from debugging that this is related to hwReadConfigBlock so I decided to clear the EEPROM, re personilize the gateway and reflash the GW sketch ... Now I get SGN:PER:OK
I then reflashed my sensor node again and I guess it is working now .. I tried sending 1;1;1;1;2;1 through serial and this is the result
0;255;3;0;9;429250 SGN:SKP:MSG CMD=3,TYPE=16 0;255;3;0;9;429266 TSF:MSG:SEND,0-0-1-1,s=1,c=3,t=16,pt=0,l=0,sg=1,ft=0,st=OK: 0;255;3;0;9;429287 SGN:SGN:NCE REQ,TO=1 0;255;3;0;9;429391 TSF:MSG:READ,1-1-0,s=255,c=3,t=17,pt=6,l=25,sg=0:<NONCE> 0;255;3;0;9;429412 SGN:NCE:FROM=1 0;255;3;0;9;429422 SGN:BND:NONCE=882805C056A850AF00469170FEB702EB5B09EC1FEE51D2F22DAAAAAAAAAAAAAA 0;255;3;0;9;429557 SGN:BND:HMAC=6DB4F3CF2F17E42A5508B4A411CA1478582D052A249A278689D26A7A0B96FBA2 0;255;3;0;9;429584 SGN:SGN:SGN 0;255;3;0;9;429594 TSF:MSG:SEND,0-0-1-1,s=1,c=1,t=2,pt=0,l=1,sg=1,ft=0,st=OK:1 0;255;3;0;9;429740 TSF:MSG:READ,1-1-0,s=1,c=1,t=2,pt=0,l=1,sg=0:1 0;255;3;0;9;429758 TSF:MSG:ACK 1;1;1;1;2;1
I guess this means that signing is working .. I did try also to add another gateway with no signing and it only discovered my node (1) but I got NACK when trying to send to it.
Am I correct in my analysis ?
Thanks for the help.
-
RE: [security] Introducing signing support to MySensors
Hello @Anticimex
I was testing HW signing using latest dev and I got the following
My setup > GW : 8 Mhz internal clock
My node > : 8 Mhz internal clock ( with MySysBootloader OTA)From Gateway debug:
0;255;3;0;9;53 MCO:BGN:INIT GW,CP=RNNGAA--,VER=2.2.0-beta 0;255;3;0;9;129 !SGN:PER:TAMPERED 0;255;3;0;9;161 SGN:INI:BND OK 0;255;3;0;9;169 TSM:INIT 0;255;3;0;9;178 TSF:WUR:MS=0 0;255;3;0;9;190 TSM:INIT:TSP OK 0;255;3;0;9;198 TSM:INIT:GW MODE 0;255;3;0;9;208 TSM:READY:ID=0,PAR=0,DIS=0 0;255;3;0;9;221 MCO:REG:NOT NEEDED 0;255;3;0;14;Gateway startup complete. 0;255;0;0;18;2.2.0-beta 0;255;3;0;9;231 MCO:BGN:STP 0;255;3;0;9;253 MCO:BGN:INIT OK,TSP=1
When I try to add node 4 : This happens
0;255;3;0;9;180430 TSF:MSG:READ,4-4-255,s=255,c=3,t=7,pt=1,l=0,sg=0:0 0;255;3;0;9;180449 TSF:MSG:BC 0;255;3;0;9;180457 TSF:MSG:FPAR REQ,ID=4 0;255;3;0;9;180469 TSF:PNG:SEND,TO=0 0;255;3;0;9;180480 TSF:CKU:OK 0;255;3;0;9;180488 TSF:MSG:GWL OK 0;255;3;0;9;180768 SGN:SKP:MSG CMD=3,TYPE=8 0;255;3;0;9;180783 TSF:MSG:SEND,0-0-4-4,s=255,c=3,t=8,pt=1,l=1,sg=0,ft=0,st=OK:0 0;255;3;0;9;187224 TSF:MSG:READ,4-4-0,s=255,c=3,t=15,pt=6,l=2,sg=0:0100 0;255;3;0;9;187244 !SGN:PRE:SGN NREQ,FROM=4 REJ 0;255;3;0;9;187256 SGN:PRE:SGN NREQ,TO=4 0;255;3;0;9;187269 SGN:PRE:WHI NREQ,TO=4 0;255;3;0;9;187279 SGN:SKP:MSG CMD=3,TYPE=15 0;255;3;0;9;187293 TSF:MSG:SEND,0-0-4-4,s=255,c=3,t=15,pt=6,l=2,sg=0,ft=0,st=OK:0100 0;255;3;0;9;187316 SGN:PRE:XMT,TO=4 0;255;3;0;9;187576 TSF:MSG:READ,4-4-0,s=255,c=4,t=0,pt=6,l=10,sg=0:1E000100B0031E310102 4;255;4;0;0;1E000100B0031E310102 0;255;3;0;9;194334 TSF:MSG:READ,4-4-0,s=255,c=4,t=0,pt=6,l=10,sg=0:1E000100B0031E310102 4;255;4;0;0;1E000100B0031E310102 0;255;3;0;9;201091 TSF:MSG:READ,4-4-0,s=255,c=4,t=0,pt=6,l=10,sg=0:1E000100B0031E310102 4;255;4;0;0;1E000100B0031E310102 0;255;3;0;9;208238 TSF:MSG:READ,4-4-255,s=255,c=3,t=7,pt=0,l=0,sg=0: 0;255;3;0;9;208257 TSF:MSG:BC 0;255;3;0;9;208265 TSF:MSG:FPAR REQ,ID=4 0;255;3;0;9;208275 TSF:PNG:SEND,TO=0 0;255;3;0;9;208285 TSF:CKU:OK 0;255;3;0;9;208293 TSF:MSG:GWL OK 0;255;3;0;9;208736 SGN:SKP:MSG CMD=3,TYPE=8 0;255;3;0;9;208750 TSF:MSG:SEND,0-0-4-4,s=255,c=3,t=8,pt=1,l=1,sg=0,ft=0,st=OK:0 0;255;3;0;9;210298 TSF:MSG:READ,4-4-0,s=255,c=3,t=24,pt=1,l=1,sg=0:1 0;255;3;0;9;210317 TSF:MSG:PINGED,ID=4,HP=1 0;255;3;0;9;210329 SGN:SKP:MSG CMD=3,TYPE=25 0;255;3;0;9;210343 TSF:MSG:SEND,0-0-4-4,s=255,c=3,t=25,pt=1,l=1,sg=0,ft=0,st=OK:1 0;255;3;0;9;210364 TSF:MSG:READ,4-4-0,s=255,c=3,t=15,pt=6,l=2,sg=0:0101 0;255;3;0;9;210384 SGN:PRE:SGN REQ,FROM=4 0;255;3;0;9;210397 SGN:PRE:SGN NREQ,TO=4 0;255;3;0;9;210407 SGN:PRE:WHI NREQ,TO=4 0;255;3;0;9;210417 SGN:SKP:MSG CMD=3,TYPE=15 0;255;3;0;9;210432 TSF:MSG:SEND,0-0-4-4,s=255,c=3,t=15,pt=6,l=2,sg=0,ft=0,st=OK:0100 0;255;3;0;9;210454 SGN:PRE:XMT,TO=4 0;255;3;0;9;210464 TSF:MSG:READ,4-4-0,s=255,c=0,t=18,pt=0,l=10,sg=0:2.2.0-beta 4;255;0;0;18;2.2.0-beta 0;255;3;0;9;210487 TSF:MSG:READ,4-4-0,s=255,c=3,t=6,pt=1,l=1,sg=0:0 4;255;3;0;6;0 0;255;3;0;9;212459 TSF:MSG:READ,4-4-0,s=255,c=3,t=11,pt=0,l=13,sg=0:Relay Signing 4;255;3;0;11;Relay Signing 0;255;3;0;9;212484 TSF:MSG:READ,4-4-0,s=255,c=3,t=12,pt=0,l=5,sg=0:1.2.1 4;255;3;0;12;1.2.1 0;255;3;0;9;212510 TSF:MSG:READ,4-4-0,s=3,c=0,t=3,pt=0,l=0,sg=0: 4;3;0;0;3; 0;255;3;0;9;212531 TSF:MSG:READ,4-4-0,s=255,c=3,t=26,pt=1,l=1,sg=0:2 0;255;3;0;9;212551 !SGN:SGN:STATE 0;255;3;0;9;212561 !TSF:MSG:SIGN FAIL 0;255;3;0;9;214489 TSF:MSG:READ,4-4-0,s=255,c=3,t=26,pt=1,l=1,sg=0:2 0;255;3;0;9;214507 !SGN:SGN:STATE 0;255;3;0;9;214517 !TSF:MSG:SIGN FAIL 0;255;3;0;9;216510 TSF:MSG:READ,4-4-0,s=255,c=3,t=26,pt=1,l=1,sg=0:2 0;255;3;0;9;216528 !SGN:SGN:STATE 0;255;3;0;9;216539 !TSF:MSG:SIGN FAIL 0;255;3;0;9;218533 TSF:MSG:READ,4-4-0,s=255,c=3,t=26,pt=1,l=1,sg=0:2 0;255;3;0;9;218552 !SGN:SGN:STATE 0;255;3;0;9;218560 !TSF:MSG:SIGN FAIL
My gateway sketch ::
// Enable debug prints to serial monitor #define MY_DEBUG #define MY_DEBUG_VERBOSE_SIGNING #define MY_RADIO_NRF24 #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 #define MY_SIGNING_ATSHA204 // SETTINGS FOR MY_SIGNING_ATSHA204 #ifndef MY_SIGNING_ATSHA204_PIN #define MY_SIGNING_ATSHA204_PIN 17 //!< A3 - pin where ATSHA204 is attached #endif #include <MySensors.h> void setup() { // Setup locally attached sensors } void presentation() { // Present locally attached sensors } void loop() { // Send locally attached sensor data here }
Node code :
// Enable debug prints to serial monitor //#define MY_DEBUG // Enable and select radio type attached #define MY_RADIO_NRF24 //#define MY_RADIO_NRF5_ESB //#define MY_RADIO_RFM69 //#define MY_RADIO_RFM95 // Enable repeater functionality for this node #define MY_REPEATER_FEATURE #define MY_SIGNING_ATSHA204 #define MY_SIGNING_REQUEST_SIGNATURES // SETTINGS FOR MY_SIGNING_ATSHA204 #ifndef MY_SIGNING_ATSHA204_PIN #define MY_SIGNING_ATSHA204_PIN 17 //!< A3 - pin where ATSHA204 is attached #endif #include <MySensors.h> // normal function call is here
I do personalized my nodes with the same HMAC as described in the docs.
I got this and I run the same sketch on all node including the gateway :| This device has now been personalized. Run this sketch with its current settings | | on all the devices in your network that have security enabled.
First question :
I have searched for similar issues for 0;255;3;0;9;129 !SGN:PER:TAMPERED but I couldn't find.Second one : Was signing tested recently with the latest dev branch ? because I guess I read in one of the posts that it has not been tested since a while.
THanks for the help.
-
RE: Car Aux Battery Monitor
What is the distance between your car and master gateway ? Do you use any repeater nodes ?
-
RE: MYSBootloader 1.3 pre-release & MYSController 1.0.0beta
@tekka I just thought that if I flashed a bootloader on a new hardware IC then I can decide whether to flash GW or sensor node when connected to the serial computer.
-
RE: MYSBootloader 1.3 pre-release & MYSController 1.0.0beta
@Nicolas-Charrier
Hello @tekka , I have the same problem.I am trying to set up my Serial Gateway. I flashed the OTA bootloader but how can I upload the Gateway sketch through Serial ?
I tried to use the MySysController but the node is not presented so that I can flash new firware with the Gateway sketch. It only worked when I flashed normal Optiboot bootloader and then flashed the Serial Gateway sketch through Serial, then I connected the Gateway to the Controller and the presentation worked well. Thus I now have a Gateway which I can flash other nodes with through OTA.
Is there another way to flash a gateway sketch other than this ?
Thanks.
-
RE: MySensors capabilities deciphering
@mfalkvidd Yes ofcourse
It works very well
-
RE: MySensors capabilities deciphering
@mfalkvidd yes excatly. I did not know that this exists to pare log like this
0;255;3;0;9;MCO:BGN:INIT GW,CP=RNNGA--,VER=2.0.1-beta
0;255;3;0;9;TSM:INIT
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
IP: 192.168.10.80
0;255;3;0;9;MCO:REG:NOT NEEDED
0;255;3;0;9;MCO:BGN:STPThanks
-
RE: MySensors capabilities deciphering
@mfalkvidd aha I thought they are just for reference. I tested it now.
But is there a same sheet/tool for debugging info shown in serial monitor ?
-
RE: MySensors capabilities deciphering
Great. Did anyone managed to implement a parser for all those letters rather that checking the documentation ?
-
RE: [security] Introducing signing support to MySensors
@Magnus-Pernemark I have also a modified version of Mysensebender node and the issue happened with some of the pcbs, not all of them. In your case I understood that it was a problem in all your pcbs. So maybe pcb quality from dirtypcbs was not that good with some of mine due to small width of lines.
Thanks. -
RE: [security] Introducing signing support to MySensors
@Anticimex so this has nothing to do with the quality of my overall node ? I mean as a reference that this node will be stable or not during operation.
I ordered my atmega smd from mouser and all passive componets too. Only pcbs are from dirtypcbs. I thought getting high quality from mouser would be better.
Thanks.
-
RE: [security] Introducing signing support to MySensors
Hello @Anticimex
Sometimes it happens that the Serial printing is not correct and it is okay when the baud rate is lower to 57600. I guess the default is 115200 when this error happens.
+------------------------------------------------------------------------------------+
⸮ M⸮Se⸮so⸮s security p⸮r⸮o⸮alizer ⸮
+------------------------------------------------------------------------------------++------------------------------------------------------------------------------------+
⸮ C⸮n⸮igur⸮t⸮on set⸮i⸮g⸮ ⸮
+------------------------------------------------------------------------------------+
| * G⸮i⸮e⸮ ⸮e⸮s⸮nali⸮ation/⸮t⸮ra⸮e of key⸮ ⸮n AT⸮H⸮204A |
| * ⸮T⸮HA204A based ⸮e⸮s⸮n⸮l⸮z⸮t⸮o⸮ ⸮
⸮ * Will l⸮ck ATSH⸮204⸮ c⸮n⸮i⸮u⸮atio⸮ |
⸮ * W⸮ll no⸮ req⸮i⸮e any UA⸮T co⸮fi⸮m⸮ti⸮ns ⸮
| * ⸮i⸮l ⸮to⸮e ⸮MA⸮ key to A⸮SH⸮204A |
| * Will store ⸮ES ke⸮ to ⸮E⸮R⸮M ⸮
+------------------------------------------------------------------------------------+ -
RE: Can other sensors send data to my mysensors?
@mfalkvidd yeah right. I didn't read the whole replies again.
I guess this changing the base_id is a good solution as it has large scale. Changing the Fre may be needed if there was radio interference between the two nodes.
Thanks all.
-
RE: Can other sensors send data to my mysensors?
@tbowmo said in Can other sensors send data to my mysensors?:
can also change the base address of your sensor network, by setting MY_RF24_BASE_RADIO_ID in your co
That's really cool .. When was this implemented ?
I asked the same question 1.5 years ago before I got busy and stopped following up with MySensors community. I am glad I am back
https://forum.mysensors.org/topic/3327/mixing-sensors-in-two-houses
-
RE: WISP computer has no battery, gets power wirelessly from radio waves
Yeah that's a weak point. This technolgy seems to grow fast and will save a lot of effort in industry and IOT applications.
-
WISP computer has no battery, gets power wirelessly from radio waves
Hello guys,
Check this out.
http://www.geek.com/news/wisp-computer-has-no-battery-gets-power-wirelessly-from-radio-waves-1653269/The WISP (or Wireless Identification and Sensing Platform) sidesteps all the issues with finding wired power and adding bulky batteries to smart objects by harvesting power from radio waves. It doesn’t even need any special wireless power equipment; just a regular off-the-shelf RFID transmitter. The WISP can pull enough power out of thin air to power a modest processor, but it’s not going to compete with your computer or even your smartphone. The creators say it’s got about as much processing power as the Fitbit — enough to run sensors and transmit data.
The WISP (or Wireless Identification and Sensing Platform) sidesteps all the issues with finding wired power and adding bulky batteries to smart objects by harvesting power from radio waves. It doesn’t even need any special wireless power equipment; just a regular off-the-shelf RFID transmitter. The WISP can pull enough power out of thin air to power a modest processor, but it’s not going to compete with your computer or even your smartphone. The creators say it’s got about as much processing power as the Fitbit — enough to run sensors and transmit data. -
RE: PCB surface finish. HASL .. ENIG .. Immersion Silver .. etc
@bjacobse Clear enough and detailed. Thanks very much for your help.
-
RE: What is the difference between those hot air stations ?
Thanks guys. Probably I'll get the first one as you have advised me.
-
RE: PCB surface finish. HASL .. ENIG .. Immersion Silver .. etc
@bjacobse Thanks for the answer. I still have two questions please.
How did my friend tell me that immersive silver doesn't not need extra solder ? He told me that it comes with solder paste on it and just by putting the components and heating , then it will be soldered.
Is this true ? Is this with ENIG ? or only immersive silver ?I didn't get what you mean by "shelf life up" ? Can you rexplain further in more details.
Thanks for your help.
-
What is the difference between those hot air stations ?
Hello all,
Locally I didn't find except two hot air stations sold here but I don't really find a difference.
First one costs 45$ after convering to $
http://ram-e-shop.com/oscmax/catalog/product_info.php?cPath=128_164&products_id=2689Second one costs 110$
http://ram-e-shop.com/oscmax/catalog/product_info.php?cPath=128_164&products_id=2831Thanks.
-
RE: PCB surface finish. HASL .. ENIG .. Immersion Silver .. etc
@bjacobse Thanks for the links.
You have any idea whether the immesrion silver put a layer of solder paster like my friend told me ? -
RE: Battery reporting keeps increasing not decreasing
Impressive and annoying
So is there any workaround to solve this ? looks like it is a normal behavior and reproducible.
-
Battery reporting keeps increasing not decreasing
Hello,
I have a normal door sensor based on My Slim node design. It has been running for around 3 months till now but the battery percentage is abnormal.
At the beginning I remember that the percentage begun as 72% so I thought maybe this is because my max voltage is defined as 3.3v not 3v. After some time, maybe 2 weeks it was 75%. It has been like this for like 2 months. Then I switched my gateway OFF for 3 weeks and switched it back ON now to see the battery voltage percentage and found it to be 80%
The batteries are two AAA 1.5v each.
Sketch:
/** * 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 * */ #define MY_BAUD_RATE 9600 // For 1 MHz // Enable debug prints #define MY_DEBUG #ifdef MY_DEBUG #define DEBUG #endif #ifdef DEBUG #define DEBUG_SERIAL(x) Serial.begin(x) #define DEBUG_PRINT(x) Serial.print(x) #define DEBUG_PRINTLN(x) Serial.println(x) #else #define DEBUG_SERIAL(x) #define DEBUG_PRINT(x) #define DEBUG_PRINTLN(x) #endif // Enable and select radio type attached #define MY_RADIO_NRF24 //#define MY_RADIO_RFM69 #if 0 // Select soft/hardware signing method #define MY_SIGNING_SOFT //!< Software signing //#define MY_SIGNING_ATSHA204 //!< Hardware signing using ATSHA204A // Enable node whitelisting //#define MY_SIGNING_NODE_WHITELISTING {{.nodeId = GATEWAY_ADDRESS,.serial = {0x09,0x08,0x07,0x06,0x05,0x04,0x03,0x02,0x01}}} // Enable this if you want destination node to sign all messages sent to this node. #define MY_SIGNING_REQUEST_SIGNATURES // SETTINGS FOR MY_SIGNING_SOFT /// Set the soft_serial value to an arbitrary value for proper security (9 bytes) #define MY_SIGNING_SOFT_SERIAL 0x11,0x02,0x03,0x04,0x05,0x06,0x07,0x08,0x09 /// Key to use for HMAC calculation in soft signing (32 bytes) #define MY_SIGNING_SOFT_HMAC_KEY 0x10,0x20,0x30,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 #define MY_SIGNING_SOFT_RANDOMSEED_PIN A7 //!< Unconnected analog pin for random seed #endif #include <SPI.h> #include <MySensor.h> unsigned long SLEEP_TIME = 120000; // 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 INTERRUPT DIGITAL_INPUT_SENSOR-2 // Usually the interrupt = pin -2 (on uno/nano anyway) #define CHILD_ID 0 // Id of the sensor child #define CHILD_ID_BATTERY 1 //#define BATTERY_FULL 3000 // 3,000 millivolts for 2xAA (DOLA - changed to 5000 as it was tested on a laptop) //#define BATTERY_ZERO 1900 // 1,900 millivolts (1.9V, limit for nrf24l01 without step-up. 2.8V limit for Atmega328 without BOD disabled)) #define VMIN 1900 #define VMAX 3300 long readVcc(); // Initialize motion message MyMessage msg(CHILD_ID, V_TRIPPED); unsigned int ADCValue; double Voltage; double Vcc; long oldvoltage = 0; 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("Door Sensor", "1.0"); // Register all sensors to gw (they will be created as child devices) present(CHILD_ID, S_MOTION); } void loop() { wait(25); // Short delay to allow switch to properly settle // Read digital motion value boolean tripped = digitalRead(DIGITAL_INPUT_SENSOR) == HIGH; // Serial.println(tripped); // send(msg.set(tripped?"OPEN":"CLOSED")); // Send tripped value to gw (OPENHAB) send(msg.set(tripped?"1":"0")); // Send tripped value to gw (Domoticz) /* Vcc = readVcc()/1000.0; ADCValue = analogRead(0); Voltage = (ADCValue / 1023.0) * Vcc; */ long voltage = readVcc(); //Serial.println(voltage); if (oldvoltage != voltage) { // Only send battery information if voltage has changed, to conserve battery. long batteryVolt = readVcc(); DEBUG_PRINT("Battery voltage: "); DEBUG_PRINT(batteryVolt); DEBUG_PRINTLN(" mV"); uint8_t batteryPcnt = constrain(map(batteryVolt,VMIN,VMAX,0,100),0,255); DEBUG_PRINT("Battery percent: "); DEBUG_PRINT(batteryPcnt); DEBUG_PRINTLN(" %"); sendBatteryLevel(batteryPcnt); // sendBatteryLevel(round((voltage - BATTERY_ZERO) * 100.0 / (BATTERY_FULL - BATTERY_ZERO))); oldvoltage = voltage; } // Serial.print(Vcc); // Serial.print ( " " ); // Serial.println(Voltage); // Sleep until interrupt comes in on motion sensor. Send update every two minute. sleep(INTERRUPT,CHANGE); } long readVcc() { // From http://provideyourown.com/2012/secret-arduino-voltmeter-measure-battery-voltage/ // Read 1.1V reference against AVcc // set the reference to Vcc and the measurement to the internal 1.1V reference #if defined(__AVR_ATmega32U4__) || defined(__AVR_ATmega1280__) || defined(__AVR_ATmega2560__) ADMUX = _BV(REFS0) | _BV(MUX4) | _BV(MUX3) | _BV(MUX2) | _BV(MUX1); #elif defined (__AVR_ATtiny24__) || defined(__AVR_ATtiny44__) || defined(__AVR_ATtiny84__) ADMUX = _BV(MUX5) | _BV(MUX0); #elif defined (__AVR_ATtiny25__) || defined(__AVR_ATtiny45__) || defined(__AVR_ATtiny85__) ADMUX = _BV(MUX3) | _BV(MUX2); #else ADMUX = _BV(REFS0) | _BV(MUX3) | _BV(MUX2) | _BV(MUX1); #endif delay(2); // Wait for Vref to settle ADCSRA |= _BV(ADSC); // Start conversion while (bit_is_set(ADCSRA, ADSC)); // measuring uint8_t low = ADCL; // must read ADCL first - it then locks ADCH uint8_t high = ADCH; // unlocks both long result = (high << 8) | low; result = 1125300L / result; // Calculate Vcc (in mV); 1125300 = 1.1*1023*1000 return result; // Vcc in millivolts }
Code has lots of unused variables and commented lines and the signing is not compiled in the project. a bit messy and needs to be cleaned up.
Thanks. -
RE: Slim Node 5V-Mod
I was also going to refer to the thin pcb traces in the design. I haven't used KiCad yet so I don't know the default, but 10 mils is enough in our designs for a normal signal, and maybe 16 mils for Vcc and Gnd ( which is also a lot in my opinion as we don't draw a lot of current in our designs)
-
RE: Slim Node 5V-Mod
@Soloam said:
w I'm asking for your help to see it an
Great design and idea.
I was replying that everything is okay until I decided to have another look. Did you switch the regulator Input and the Output ? from this reference :
The L in your layout shall be PIN3 which is Vin according to the above picture, and vice versa.
Can you please post your schemtatic. Maybe I am confused.
-
RE: PCB surface finish. HASL .. ENIG .. Immersion Silver .. etc
@scalz Thanks for the info. Yes the minimum options on pcbcart are more expensive than dirtypcbs. But actually the quality is really great and impressive.
-
PCB surface finish. HASL .. ENIG .. Immersion Silver .. etc
Hello all,
One of my friends told me that when he orders from pcbcart.com he choose the surface finish to be Immersion Silver. See here. That option adds solder paste on top of the pads and with only hot air the components are soldered easily at once.
Is this option included in dirtypcb ?
There are only HASL and ENIG which I didn't understand there definitions when I googled them.This link for example explains it all but I can't find any word related to solder paste.
Thanks.
-
RE: What is the minimum distance between main voltages (PCB)
@sundberg84 creepege differs from clearance. I guess if I add creepege then clearance can be decreased.
I just cant find online which values are the minimum. Most of the search results requests to buy the certificates.
-
What is the minimum distance between main voltages (PCB)
Hello,
I am trying to design my own power supply and I am a bit worry about the minimum distance between hot and neutral lines ? I read in this link that according to EN61010, it shall be 3mm.
Lots of people here do design there boards and I guess they have faced this issue before.
Thanks.
-
RE: 2 channel in wall dimmer
If I am not mistaken, isn't this the bleeding resistor in parallel with the cap ?
Why is there a reverse diode ? Won't this block the current from passing from the + terminal of the capacitor to the resistor then to gnd ? -
RE: MYSBootloader 1.3 pre-release & MYSController 1.0.0beta
@scalz great.
This means that MYSBootloader can handle this problem and enter the bootloader mode even if the MCU freezes.@tekka you state that the current version can handle a freeze SW. Also if the new code is corrupted during programming by unverified CRC or whatever, it will also handle that problem and resets and wait for a new flashing order.
Is this new in this version ? I am some how sure that MYSBootloader previously had a problem handling thoses types of failures, and that's why I was going to use DualOptiboot as I read before that it can handle those failuresSorry for lots of questions but I am trying to reorganise my info.
-
RE: MYSBootloader 1.3 pre-release & MYSController 1.0.0beta
Sorry but I dont really get what you mean by freezy ?
You mean a code is compiled but it enters an infinite loop for example ? -
RE: MYSBootloader 1.3 pre-release & MYSController 1.0.0beta
Actually I thought that DualOptiboot can be recovered over the air since it copies in the external flash. Thus if a faulty FW occurred because of CRC is not verified for example, then the bootloader won't copy the faulty FW to the MCU.
-
RE: MYSBootloader 1.3 pre-release & MYSController 1.0.0beta
@tekka Please post this important info in the main thread. This really makes things clear for me.
-
RE: OTA flash types for MySensors
@GertSanders Yeah write
Just forgot the title of the topic during our discussions
-
RE: OTA flash types for MySensors
The other topic which I guess is important to be included here is using Signing with OTA.
Do both bootloaders support Signing during flashing ? The answer is in the below link.http://forum.mysensors.org/topic/2997/signing-or-encrypting-the-data/27
This discussion worth to be read. Originally it talks about signing vs encryption but I have asked the question regarding Signing in bootloader and that was the answer of Anticimex
NB: tekka has released MYSBootloader 1.3pre (1.3NS) and it states also that upcoming release (1.3S) will have Signing support. Link to topic
-
RE: OTA flash types for MySensors
Summary: MYSContoller is used for OTA updates regarding the bootloader used. The bootloader is responsible to handle the packets sent by copying it to an external EEPROM and then doing a reset, this is DualOptiboot. The other scenario is using MYSBootloader where the bootloader resets the Atmega and the bootloader handles the received packets with the new firmware.
Correct me please if I am mistaken.
-
RE: AC light dimmer with 2x TRIAC
@Oitzu i cant find the price of them on the site. Are they listed ?
-
RE: OTA flash types for MySensors
I read @scalz new post. It answers my above questions.
Thanks everyone for the help.
-
RE: Sensebender/Dualoptiboot OTA HowTo in Mysensors
Great tutorial. It is now more clear for me.
I'll update you with my results within 2 weeks... i hope -
RE: OTA flash types for MySensors
Thanks guys for the help.
So in conclusion, any OTA application shall work. The bootloader is responsible for flashing. Whether to copy my code to flash then after that copy to my atmega if I am using DualOptiboot or just use MyScontroller which as far as I remember does not copy to extenal flash.
Am I write ?
-
RE: OTA flash types for MySensors
Good topic as I actually can't find documents related to OTA.
I want to flash dualoptiboot bootloader as I am using an eeprom but which application do I use to flash my nodes ?
-
RE: The Awesome Electric Range (Stove) Monitoring Device
Which controller are you using please ?
-
RE: 2 channel in wall dimmer
@Denke Nice
I am really excited to see your results.
Regarding the resistor which is in parallel to act as a bleeder. What value do you think the most suitable ? 100K ? 1M ? and howa much watt ?Thanks.
-
RE: Sensebender Micro
@Anticimex Yeah I could just connect my device to the atmega pin directly as I can see/find any pin header to route the interrupt pin 2. They are all used.
Thanks guys.
-
RE: 💬 Homini In-Wall Battery Powered Light Switch Module
Nice. I am doing something similar to this.
Can you post more photos from the front view?