Page 1 of 1
Domoticz support for SenseBender as the serial gateway
Posted: Sunday 07 February 2016 15:57
by Toni
I've been looking at using the SenseBender as the MySensors Serial Gateway. The reason is that fits nicely inside the Raspberry Pi case, and you get the latest MySensors for it (the Raspberry NRF24 gateway is at MySensors 1.4 at the moment).
The problem is that this does not work on the default 115200 baud rate, due to the fact that SenseBender is not running on a 16 MHz external crystal.
Please make the MySensors USB gateway baud rate configurable, so that it's possible to choose between 115200 (default) and 38400 (for Arduinos running on 8 MHz crystal). And of course the MySensors serial gateway would also need to be recompiled for 38400 bps.
Re: Domoticz support for SenseBender as the serial gateway
Posted: Sunday 07 February 2016 16:43
by gizmocuz
Do you expect the same reception/performance then with a normal Arduio and nRF024 ?
Better then mounting an external antenna on the gateway (... well it is the gateway right?) or making a ethernet gateway that you can place anywhere ?
Do you expect the same performance then an arduino that can handle communication/data @ 16Mhz then with 8Mhz ?
Re: Domoticz support for SenseBender as the serial gateway
Posted: Sunday 07 February 2016 17:07
by Toni
I have no idea if there are any performance considerations, but I asked about this on the MySensors forum. Anyway, any 8 MHz Arduino won't probably work at all, as the 115200 baud rate is so much off when using the 8 MHz frequency as the base frequency.
The whole reason I'm asking is because I'd like to have a nice and clean Raspberry box, with no extra wires. The SenseBender fits entirely into the Raspberry case, and only needs 4 DuPont wires into the GPIO connector. For Arduino Nano, I'd need to add a USB Mini cable + 8 DuPont wires between the Arduino and the radio. And it doesn't fit in the box.
This is going to a summer cottage. Domoticz would control a heat pump (normal heating / maintenance heating at +10 C / off) though MySensors 'HeatpumpIRController' node (another SenseBender), electric heaters through MySensors 'RelayActuator' node (ITEAD Studio 'Mini Rboard'), and it would also measure temperatures / humidity and send alerts as push notifications.
Re: Domoticz support for SenseBender as the serial gateway
Posted: Monday 08 February 2016 17:36
by Toni
OK, I made a pull request on this.
Re: Domoticz support for SenseBender as the serial gateway
Posted: Monday 08 February 2016 18:50
by gizmocuz
You will get a nice clean raspberry pi box, with a poor/bad mysensors transceiver/gateway, running at half capacity
sure i know this is possible, but maye not desired and it might confuse other/new users
If you make a pull request, please let it be configured 'as is now', but in the setup have the option to choose half the baudrate
Re: Domoticz support for SenseBender as the serial gateway
Posted: Monday 08 February 2016 18:58
by Toni
The 38400 vs. 115200 baud rate is hardly a problem. Also, the baud rate must be the same at both ends, or it will not work at all. By default the MySensors serial gateway is built with 115200. In the pull request the default is 115200, and it very explicitly says the other alternative is only for SenseBender and Pro Mini 3.3V.
The question really is 'should ATmega328 running at 8 MHz be supported or not?'. I believe it should.
Re: Domoticz support for SenseBender as the serial gateway
Posted: Monday 08 February 2016 19:05
by gizmocuz
Its pulled... but i would not advice to use your setup.... for instance i have an external mysensots ethernet gateway with a nRF24 with antenna
Re: Domoticz support for SenseBender as the serial gateway
Posted: Monday 08 February 2016 19:12
by Toni
For example the author of MySensors wasn't that concerned at all:
http://forum.mysensors.org/topic/3064/p ... -pi-case/5
This change really is only for making it work. If the Arduino's internal clock is 8 MHz, the serial speed on 115200 bps is about 7.8% off, and it causes transmissions errors.
I can still use the external antenna version of the nRF24 module, it is compatible with the SenseBender.
Re: Domoticz support for SenseBender as the serial gateway
Posted: Monday 08 February 2016 19:28
by gizmocuz
dont think the sensebender has an SMA connector

Re: Domoticz support for SenseBender as the serial gateway
Posted: Tuesday 09 February 2016 7:07
by Toni
That's true. The SenseBender is just a special Arduino, it does not include a radio. But it has headers for the nRF24 radio, and you can choose between the PCB antenna and 'real' antenna versions. Very convenient, no extra wires needed.
https://www.mysensors.org/hardware/micro (the site says it runs on 1 MHz, but it actually boots on 8 MHz, and within the sketch you have an option to lower the clock speed to 1 MHz).