Here is my a picture of my modded version . I used a Sensebender which is perfect for that use case having already a ATSHA204 and temp/humid sensor on board.
Best posts made by tomkxy
-
RE: Multisensor PIR based on IKEA Molgan
-
RE: Signing: no active verification session?
@Anticimex Will do it tomorrow and let you know.
-
RE: Complete Beginner with MySensors - questions about relays, MQTT and OpenHAB
@HenryWhite said:
Can OpenHAB only display the status values or can it actively send commands to the MQTT gateway?
Yes, you can send commands via MQTT. Have a look at the OpenHab MQTT binding doc. https://github.com/openhab/openhab/wiki/MQTT-Binding
-
RE: Multisensor PIR based on IKEA Molgan
@TimO said:
@tomkxy Nice write up! Do you have an idea on the accuracy of the humidity sensor within the case?
I did some comparison measure regarding temp and humidity. I place an open Sensebender just beside the modded Molgan. The humidity measured at the Molgan was about 11% lower than the humidity measured by the open Sensebender. With respect to temp the Molgans temp was about 6% lower than the temp measured by the open Sensebender.
-
RE: Signing: no active verification session?
Ok, I concluded my tests.
The setup I used was as follows:
-
One node running the sketch as listed above. The sketch just send a time request to the controller. The controller send a time response back and depending on the controller state an additional message carrying the new state.
-
A MQTTClientGateway using ATSHA204 signing
-
Gateway and node were either on current deveopment branch (clone from yesterday) or on pull request branch
Summary:
- ATSHA204 signing work
- Signing in pull request code and current development branch seems not to be compatible
- Signing through repeater worked (repeater on old dev branch version)
- Possible issue with soft signing and ATSHA204 signing (will re-run test)
- Signing Code in pull request made by wait statements between sends in controller code obsolete
I need to split the Test Details over several posts due to size restrictions,
Test Details:
TEST 1
- Node is using ATSHA204 signing
- Controller has time delays between time response send and state message
- Only node upgraded - gateway on current development branch
RESULT:
- Message from node did not went through gateway (I would reason that probably signing not compatible between pull request and development branch ?)
Log file from node (Note: that no message "Time value received and updated" occurs)
โโโ LOG file Starting sensor (RNNNAA, 2.0.0-beta) Radio init successful. Signing required Skipping security for command 3 type 15 send: 32-32-24-0 s=255,c=3,t=15,pt=0,l=2,sg=0,st=ok: Waiting for GW to send signing preferences... Skipping security for command 3 type 15 read: 0-24-32 s=255,c=3,t=15,pt=0,l=2,sg=0: Mark node 0 as one that require signed messages Mark node 0 as one that do not require whitelisting Skipping security for command 3 type 16 send: 32-32-24-0 s=255,c=3,t=16,pt=0,l=0,sg=0,st=ok: Nonce requested from 0. Waiting... Skipping security for command 3 type 17 read: 0-24-32 s=255,c=3,t=17,pt=6,l=25,sg=0:5C6D5380AA71742E8676754178E292A5EF45D9AF4AC1DFBDAF Nonce received from 0. Proceeding with signing... Signing backend: ATSHA204 Message to process: 2000560011FF322E302E302D62657461 Current nonce: 5C6D5380AA71742E8676754178E292A5EF45D9AF4AC1DFBDAFAAAAAAAAAAAAAA HMAC: 88E620D12206F54747A0913982E7B536D2FA54B23365E938944D79A7785FA653 Signature in message: 01E620D12206F54747A0913982E7B5 Message signed Message to send has been signed send: 32-32-24-0 s=255,c=0,t=17,pt=0,l=10,sg=1,st=ok:2.0.0-beta Skipping security for command 3 type 16 send: 32-32-24-0 s=255,c=3,t=16,pt=0,l=0,sg=0,st=ok: Nonce requested from 0. Waiting... Skipping security for command 3 type 17 read: 0-24-32 s=255,c=3,t=17,pt=6,l=25,sg=0:E9823769510CC4E9DB319047430608FC46E072E1C85DC1729C Nonce received from 0. Proceeding with signing... Signing backend: ATSHA204 Message to process: 20000E2306FF18 Current nonce: E9823769510CC4E9DB319047430608FC46E072E1C85DC1729CAAAAAAAAAAAAAA HMAC: 3AFE900842CA69B839436A9417E03B7A1B9F56C86947503DA8211384BD380BA8 Signature in message: 01FE900842CA69B839436A9417E03B7A1B9F56C86947503D Message signed Message to send has been signed send: 32-32-24-0 s=255,c=3,t=6,pt=1,l=1,sg=1,st=ok:24 Skipping security for command 3 type 16 send: 32-32-24-0 s=255,c=3,t=16,pt=0,l=0,sg=0,st=ok: Nonce requested from 0. Waiting... Skipping security for command 3 type 17 read: 0-24-32 s=255,c=3,t=17,pt=6,l=25,sg=0:62A476471D816BD32D881C6F0F93EECC6F3D10C30FE36C4034 Nonce received from 0. Proceeding with signing... Signing backend: ATSHA204 Message to process: 20008E030BFF53656E736562656E646572204D6963726F Current nonce: 62A476471D816BD32D881C6F0F93EECC6F3D10C30FE36C4034AAAAAAAAAAAAAA HMAC: DD2922863F989B9FA66A9DCC91C6C68693976C111246A758F2A9D3B35DE4C6C8 Signature in message: 012922863F989B9F Message signed Message to send has been signed send: 32-32-24-0 s=255,c=3,t=11,pt=0,l=17,sg=1,st=ok:Sensebender Micro Skipping security for command 3 type 16 send: 32-32-24-0 s=255,c=3,t=16,pt=0,l=0,sg=0,st=ok: Nonce requested from 0. Waiting... Skipping security for command 3 type 17 read: 0-24-32 s=255,c=3,t=17,pt=6,l=25,sg=0:E5EB28E56178B7A9EA9C6CF6ED4942C7CFCBE36CE8F770E9CD Nonce received from 0. Proceeding with signing... Signing backend: ATSHA204 Message to process: 20001E030CFF312E35 Current nonce: E5EB28E56178B7A9EA9C6CF6ED4942C7CFCBE36CE8F770E9CDAAAAAAAAAAAAAA HMAC: EE80E376A9134A53E582798BE1B82D0626B749A0B3AB40B146ECBD046A704FE7 Signature in message: 0180E376A9134A53E582798BE1B82D0626B749A0B3AB Message signed Message to send has been signed send: 32-32-24-0 s=255,c=3,t=12,pt=0,l=3,sg=1,st=ok:1.5 Skipping security for command 3 type 16 send: 32-32-24-0 s=0,c=3,t=16,pt=0,l=0,sg=0,st=ok: Nonce requested from 0. Waiting... Skipping security for command 3 type 17 read: 0-24-32 s=255,c=3,t=17,pt=6,l=25,sg=0:086BCF8D9E1FCE7E31DBC460DBBDA3F192423DEB1D7AED29B4 Nonce received from 0. Proceeding with signing... Signing backend: ATSHA204 Message to process: 200006001F00 Current nonce: 086BCF8D9E1FCE7E31DBC460DBBDA3F192423DEB1D7AED29B4AAAAAAAAAAAAAA HMAC: B304BBD4ED2EFC5EEE8345711D1FA7D4ED7DDCB433B93902B35E408732F52CE6 Signature in message: 0104BBD4ED2EFC5EEE8345711D1FA7D4ED7DDCB433B93902B3 Message signed Message to send has been signed send: 32-32-24-0 s=0,c=0,t=31,pt=0,l=0,sg=1,st=ok: Init complete, id=32, parent=24, distance=2 ------------- Start request time ------------ Skipping security for command 3 type 16 send: 32-32-24-0 s=255,c=3,t=16,pt=0,l=0,sg=0,st=ok: Nonce requested from 0. Waiting... Skipping security for command 3 type 17 read: 0-24-32 s=255,c=3,t=17,pt=6,l=25,sg=0:05804055A92D47DDECE52E060847E918F2D259E02E53B239DF Nonce received from 0. Proceeding with signing... Signing backend: ATSHA204 Message to process: 2000060301FF Current nonce: 05804055A92D47DDECE52E060847E918F2D259E02E53B239DFAAAAAAAAAAAAAA HMAC: 860F685BD22C9A93712755D7536E6B1192BA7B5F3BA19B36DA4B18EE80A83912 Signature in message: 010F685BD22C9A93712755D7536E6B1192BA7B5F3BA19B36DA Message signed Message to send has been signed send: 32-32-24-0 s=255,c=3,t=1,pt=0,l=0,sg=1,st=ok: ------------- End request time ------------ ------------- Start request time ------------ Skipping security for command 3 type 16 send: 32-32-24-0 s=255,c=3,t=16,pt=0,l=0,sg=0,st=ok: Nonce requested from 0. Waiting... Message to send could not be signed! sign fail send: 32-32-24-0 s=255,c=3,t=1,pt=0,l=0,sg=1,st=ok: ------------- End request time ------------ ------------- Start request time ------------ Skipping security for command 3 type 16 send: 32-32-24-0 s=255,c=3,t=16,pt=0,l=0,sg=0,st=ok: Nonce requested from 0. Waiting... Skipping security for command 3 type 17 read: 0-24-32 s=255,c=3,t=17,pt=6,l=25,sg=0:13F748758F5F525808686913EB32CB1301A347DA71BCEC0E24 Nonce received from 0. Proceeding with signing... Signing backend: ATSHA204 Message to process: 2000060301FF Current nonce: 13F748758F5F525808686913EB32CB1301A347DA71BCEC0E24AAAAAAAAAAAAAA HMAC: DCE1C3919B3F1438EA00F8736994F5BE4EE8FCE197782A006C313B0053B1F4AC Signature in message: 01E1C3919B3F1438EA00F8736994F5BE4EE8FCE197782A006C Message signed Message to send has been signed send: 32-32-24-0 s=255,c=3,t=1,pt=0,l=0,sg=1,st=ok: ------------- End request time ------------ ------------- Start request time ------------ Skipping security for command 3 type 16 send: 32-32-24-0 s=255,c=3,t=16,pt=0,l=0,sg=0,st=ok: Nonce requested from 0. Waiting... Skipping security for command 3 type 17 read: 0-24-32 s=255,c=3,t=17,pt=6,l=25,sg=0:0E77297DB0F5BB24C127F55A7722A26F2B9F5D82CD3527B2C4 Nonce received from 0. Proceeding with signing... Signing backend: ATSHA204 Message to process: 2000060301FF Current nonce: 0E77297DB0F5BB24C127F55A7722A26F2B9F5D82CD3527B2C4AAAAAAAAAAAAAA HMAC: A07FE5FAD14B49598D4D000B1496AFB1B745140C095C7CDB2041B51C3BAF166A Signature in message: 017FE5FAD14B49598D4D000B1496AFB1B745140C095C7CDB20 Message signed Message to send has been signed send: 32-32-24-0 s=255,c=3,t=1,pt=0,l=0,sg=1,st=ok: ------------- End request time ------------ ------------- Start request time ------------ Skipping security for command 3 type 16 send: 32-32-24-0 s=255,c=3,t=16,pt=0,l=0,sg=0,st=ok: Nonce requested from 0. Waiting... Skipping security for command 3 type 17 read: 0-24-32 s=255,c=3,t=17,pt=6,l=25,sg=0:CC2B7F584284438EE577F13911AA5BD6B13F11CF19C072C280 Nonce received from 0. Proceeding with signing... Signing backend: ATSHA204 Message to process: 2000060301FF Current nonce: CC2B7F584284438EE577F13911AA5BD6B13F11CF19C072C280AAAAAAAAAAAAAA HMAC: 1EE99C23EAF302945390304E8DDF21EFEB1509D482E729E94129DDB14DBEFF72 Signature in message: 01E99C23EAF302945390304E8DDF21EFEB1509D482E729E941 Message signed Message to send has been signed send: 32-32-24-0 s=255,c=3,t=1,pt=0,l=0,sg=1,st=ok: ------------- End request time ------------ ------------- Start request time ------------ Skipping security for command 3 type 16 send: 32-32-24-0 s=255,c=3,t=16,pt=0,l=0,sg=0,st=ok: Nonce requested from 0. Waiting... Skipping security for command 3 type 17 read: 0-24-32 s=255,c=3,t=17,pt=6,l=25,sg=0:B3B1641F1EFA3E6AC55BCDD8762BBA30684E2E95B5D360534A Nonce received from 0. Proceeding with signing... Signing backend: ATSHA204 Message to process: 2000060301FF Current nonce: B3B1641F1EFA3E6AC55BCDD8762BBA30684E2E95B5D360534AAAAAAAAAAAAAAA HMAC: 2FBF0526DA75A1730B06B42A114A51D0844A7F5D708ED88CD0BF205367D6436E Signature in message: 01BF0526DA75A1730B06B42A114A51D0844A7F5D708ED88CD0 Message signed Message to send has been signed send: 32-32-24-0 s=255,c=3,t=1,pt=0,l=0,sg=1,st=ok: ------------- End request time ------------ ------------- Start request time ------------ Skipping security for command 3 type 16 send: 32-32-24-0 s=255,c=3,t=16,pt=0,l=0,sg=0,st=ok: Nonce requested from 0. Waiting... Skipping security for command 3 type 17 read: 0-24-32 s=255,c=3,t=17,pt=6,l=25,sg=0:F2F1E9F252998B73BB5ACDFCB5EABD1CCE80FC922B02AD2708 Nonce received from 0. Proceeding with signing... Signing backend: ATSHA204 Message to process: 2000060301FF Current nonce: F2F1E9F252998B73BB5ACDFCB5EABD1CCE80FC922B02AD2708AAAAAAAAAAAAAA HMAC: AF64B1BBCCBA140CC7D888379C5AB5AEEE32A7EF53DCF8E5D381D8BBF10C0EB8 Signature in message: 0164B1BBCCBA140CC7D888379C5AB5AEEE32A7EF53DCF8E5D3 Message signed Message to send has been signed send: 32-32-24-0 s=255,c=3,t=1,pt=0,l=0,sg=1,st=ok: ------------- End request time ------------ ------------- Start request time ------------ Skipping security for command 3 type 16 send: 32-32-24-0 s=255,c=3,t=16,pt=0,l=0,sg=0,st=ok: Nonce requested from 0. Waiting... Skipping security for command 3 type 17 read: 0-24-32 s=255,c=3,t=17,pt=6,l=25,sg=0:70EEB8AB6758247D2BDE15C3E3ECF736A26896507A578451B5 Nonce received from 0. Proceeding with signing... Signing backend: ATSHA204 Message to process: 2000060301FF Current nonce: 70EEB8AB6758247D2BDE15C3E3ECF736A26896507A578451B5AAAAAAAAAAAAAA HMAC: 0188F0C5B3E33EA5F367AC3C8A5147000EEAFBC632221B0A2C68A6E912E6502F Signature in message: 0188F0C5B3E33EA5F367AC3C8A5147000EEAFBC632221B0A2C Message signed Message to send has been signed send: 32-32-24-0 s=255,c=3,t=1,pt=0,l=0,sg=1,st=ok:
-
-
RE: DHT22 lib working on 1Mhz?
So after 2 weeks fiddling around with the different libraries at different clock frequencies, I have some conclusions I would like to share with you.
I tested with a ProMini and two DHT22 sensors, one from Adafruits and one from China.
As I already reported, I had problems with clock frequencies below 8MHz with all different libraries. After switching to 8MHz, I realized another problem. Temperature readings did not change. They stayed the same value, only when I reset the ProMini I had a correct reading.
I had this behaviour with the Adafruit and the library included in the MySensors project.Since yesterday evening I am testing the library from Rob Tillaart (http://arduino.cc/playground/Main/DHTLib) which is working correctly giving me correct readings.
I am presuming that this is related to sleeping the ProMini and may be the low power mode the DHT22 is going into, I don't know...(at least in Rob's lib there is a wakeup delay which seems to address that point)Anyway, it seems I have at least now a working solution. I will re-try to lower the clock frequency with that library.
Apart from that I also realized that the DHT library included in MySensor will perform a sensor read for a call to readTemperature and readHumidity which means that you would need to put a delay of 2s between a readTemperature and readHumidity. Since the sensor delivers the values in a "single" read this is rather unfortunate for battery powered sensor.
-
Sensebender GW no output on serial
After being away for almost one year. I picked up some of my stuff lying around in my cellar Part of that is a Sensebender Gateway which is supposed to replace my current ATMega Gateway. However, I have a really strange behavior (Arduino 1.8.5):
- Uploaded Gateway5100 code -> I can see in my OpenHab controller that it works
- However, I cannot see any output from serial.println. - I tried other MySensor sketches, like SecurityPersonalizer -> doesn't work
I tried it with some of the basic Arduino sketches where no MySensor code is involved: This works.
I tried a re-install of Arduino, also deleting everything under /Users/tom/Library/Arduino15 and installed the boards (MySensors SAMD Boards 1.05) again.
I am really stuck. Any ideas are highly appreciated.
-
RE: MQTTClientGateway broken after upgrade - signature failure
Finally, I have everything working again. Again a big thanks to @hek and @Anticimex .
As lessons learnt, I did the following:
- Solder 4.7uf directly on the radio
- Changed to the 5v power rail from the Mega, utilizing a regulator
- Put a 100 uf between 5v and gnd on the Mega
- Moved both nodes farer away (when I was testing I had same lying side by side which obviously created interferences)
- Switched the RF24 channel utilizing a channel which was not so polluted by all the Wifis around me
-
RE: ClearEprom does not work for Sensebender GW
The changed the sketch as follows:
#define MY_CORE_ONLY #include <MySensors.h> void setup() { unsigned long enter = hwMillis(); while (hwMillis() - enter < (unsigned long)15000); Serial.begin(MY_BAUD_RATE); Serial.print("EEPROM_LOCAL_CONFIG_ADDRESS: "); Serial.println(EEPROM_LOCAL_CONFIG_ADDRESS); Serial.println("Started clearing. Please wait..."); for (int i=0; i<EEPROM_LOCAL_CONFIG_ADDRESS; i++) { hwWriteConfig(i,0xFF); } Serial.println("Clearing done. You're ready to go!"); } void loop() { // Nothing to do here... }
The output is:
EEPROM_LOCAL_CONFIG_ADDRESS: 413
Started clearing. Please wait...I use the following versions:
My Arduino version is: 1.8.5
MySensors Board Version: 1.0.5
Arduino SAMD Board Version: 1.6.11 (M3), 1.6.17 (M0+)Interesting observation which might be hinting at a fundamental problem:
I need to double the baud rate in the serial monitor. So in order to get any output I need to set the baud rate to 230400 -
RE: Battery powered PIR and temp/humid sensor
Around 4 meters. However, this puppy is sitting in my entrance which is rather narrow.
-
RE: Manufacture a custom wristband
@nemik said:
My advice would be to visit Alibaba and try to find someone who sells the product most similar to what you want. Then reach out to them about modifying it and branding it for you.
Some sell iBeacons and such in wristbands already, so it might not be too big of a stretch for them to customize it with some other electronics that you might have in mind.Good luck!
Thanks!
-
RE: Conceptual security question
@mfalkvidd said:
@tomkxy I wouldn't call jamming unrealistic. Jamming a radio signal is pretty easy.
Yes, I am aware that jamming a radio signal is not that difficult. What I wanted to say is that the overall scenario might be doable but it is much too complicated. It would be much easier to jam the whole radio network in which case signing makes no difference.