@jesse said:
I found the solution on this page: http://mathertel.blogspot.com/2013/04/using-spi-bus-with-ethernet-sd-card-and.html
The key is setting the Chip Select (CS) line to be different for each module.
For the CC3000...
"#define ADAFRUIT_CC3000_CS 7"
Pin 7 is being used exclusively to select the Wifi module.
https://learn.adafruit.com/adafruit-cc3000-wifi/cc3000-breakout
For the NRF24L01+...
"RF24 radio(9,10);"
Pin 9 is being used for Chip Enable (CE) and Pin 10 is Chip Select (CS).
http://arduino-info.wikispaces.com/Nrf24L01-2.4GHz-HowTo
http://maniacbug.github.io/RF24/classRF24.html
The other SPI pins: CLK, MISO, MOSI, are shared by the two modules and get wired in parallel.
Hi do you still have a Gateway code when using CC3000 and arduino Mega or UNO(if it fits)?
@GLAB No worries, was in a similar situation.. My perspective was on what the Node could be made to provide, not what could be done within Domoticz to address the requirement - eg Had heard of Dummy counters but had no experience nor understood their purpose, nor had ever used scripts.
I had been sending a logical ON/OFF as well as a cumulative total from the Node and hit the same hair-pulling scenario as yourself.
Now only the ON/OFF is sent and the short script makes the transposition within Domoticz to a dummy meter (I think kWhr) using the internal clock in Domoticz.
Have fun
@legeantvert said:
On the same way, i dont understand how and where are stored the values inside the gateway if not used on each reception, are they stored somewhere to be able to answer them when serial request arrive?
You could bypass this on some kind of events obviously !
Actually my perl gateway is acting as the server Vera is for the arduino gateway. So from there I can trigger external URL, store data in a sqlite3 database... and so on !
Thanks for your fast reply.
That sounds easy.
And you think that the communication between sensor nodes and Gateway are still possible via wired RS485?
I tried to find an example on this site for sending Information from Gateway to sensor nodes. (via SendMessage ?)
For example I like to Switch on/off an light that is connected to an relay board at my sensor node.
Communcation Flow:
OpenHab2 --> MQTT --> Gateway --> RS485 --> Sensor Node --> Relay Board
Currently I have an working RS485 Connection between my Arduino Uno's with the use from SoftwareSerial library.
During my testings I realized, that the message that I triy to send "Hello" will be sent to the other arduino char by char. Is that true?
Because I tried to raise up an pin on HIGH with "if(msg == "Hello")..." But it doesn't worked.
Will the sendMsg method from the MySensor library handle this out of the box?
Regards,
Simon