@WiktorDIY The ch340 are notorious for being broken. The best I ever achieved was 19200 and flakey..
I purchased a real Nano not a ch knock off eg uses a different uart no problems
@WiktorDIY The ch340 are notorious for being broken. The best I ever achieved was 19200 and flakey..
I purchased a real Nano not a ch knock off eg uses a different uart no problems
I did more investigation played around with sleep outside of mysensors and found a bit of code in a proximity sensor example:
// Reset flag and clear APDS-9960 interrupt (IMPORTANT!)
isr_flag = 0;
if ( !apds.clearProximityInt() ) {
Serial.println("Error clearing interrupt");
}
I then needed to play around with delays to allow the sensor to catchup..
void loop() {
delay(1000);
Recoding back to MySensors
if ( !apds.clearProximityInt() ) {
Serial.println("Error clearing interrupt");
}
wakeupReason = sleep(digitalPinToInterrupt(INT_PIN), FALLING, sleepTime);
setting up the interrupt pin with a pullup forced the FALLING when pin dragged down by the sensor.
void setup() {
pinMode(INT_PIN, INPUT_PULLUP);
All this is on caveat it makes it through some more testing.
@rmalbers Im using webthings controller. It works well and has a good adapter to MySensors written by Candle. The controller is very stable. Im using adapters like mail and kafka as well as webthings adapter for a esp sensor. Seems to have adapters for everything as the framework is easy to code for.
Graphing isnt great. I use an adpter to kafka to stream to Node Red. I really like the secure proxy service, so I can acess from anywhere and not have to do weird activities with my firewall. Data stays in my local network.
I do have the similar concerns re lack of activity on the project. I'm hanging in there as i have invested so much time..
I'm trying to build a gesture sensor switch using adps9960 module that runs on battery and also accommodates temp/humidity via dht11.
Setup works with examples provided with Sparkfun library - so electronics ok. I see the gesture sensor activate interrupt 0 from pro-mini 3.3v. Device works fine in non-sleep mode as MySensors to Webthings.io
Sleep mode using the interrupt and FALLING only wakes after ms sleep, not from interrupt activity.
The difference between example code and MySensor example code https://www.mysensors.org/download/sensor_api_20#sleeping is
Anyone had success with this - the adps 9960 sets off the interrupt - tested by the Sparkfun example code ... device tech specs says it pulls low after an action detected on the proximity sensor engine..
@BearWithBeard thanks for the info.
I see a few different mcus have been tried.
Anyone had success with a nano or is that beyond its capability?
I am looking to extend my nrlf01 Mysensor network using rfm95.
Can this be done at the gateway?
Re: Shared configs/data types for LoRa based radios
I see there was development for multiple radios last year. Has this progressed?
Wishing to add lora to my network
@Westie Testing using a docker image of the gateway... Update looking good - I have dropped the baud rate down to something more compatible with my clone nano.
I found a useful tool to check the incoming serial from a Python point of view (not running the adapter when I do it) - python3 -m serial.tools.miniterm --parity N /dev/ttyUSB0 19200. This prints out the messages from the Serial Gateway in nice text when the speed is correct.
The kind people at Candle have updated the adapter to include a parameter for baud rate. V1.2.0. It should automatically update :). I'll test and report back.
Thanks frits ... my issue is trying to get the arduino or ftdi adapter to talk at 115200 -
Either the FTDI or arduino promini gateway is talking at 57600 so the webthings mysensors adapter is hardcoded at 115200.
I have set #define MY_BAUD_RATE 115200 in the gateway with no joy, I even tried a Seral.begin(115200) in setup(). So Im thinking my FTDI is fixed on 57600 no matter what I send to it
My attempts at customising the python code in the adapter to change to 57600 has been tricky due to the clash of pyserial and serial modules in a webthings docker image etc etc....
Currently running a pro mini as the gateway as the knockoff nano CH340 couldnt achieve better comms better than 19200.. I have ordered another nano perhaps the hardware will resolve it all - fingers crossed.
Mysensors is a great alternative to the commercial networks or even LoraWan as the data stays where it should.
@Westie This Serial Adapter has been a total frustration. Without the control on port speed I am forced to manual change the python code which I dont do very well and am not interested in pursuing - sorry nice effort but gets my no vote. I dont know what controller you test on but it is impossible to get any of the ones I have tried to stick on 115200 which is hard coded into the adapter.
Has anyone had any success in change the port speed that the adapter uses - seems to be stuck on 57600 - I have tried both FTDI and CH340 on Linux Containers using Nano and Pro Mini 5v 16 Mhz.
Hi, Anyway of overriding the Baud Rate for the adapter.
It seems to be 'hardcoded' at 15200 - I'd like to modify to suit the performance of the UART on the Clone Nano
self.GATEWAY = mysensors.SerialGateway(
dev_port, baud=15200,
#timeout=1.0,
#reconnect_timeout=10.0,
event_callback=self.mysensors_message, persistence=True,
persistence_file=self.persistence_file_path, protocol_version='2.2')