Sonoff BasicR3/mini/RFR3 Domoticz integration development

Topics (not sure which fora)
when not sure where to post, post here and mods will move it to right forum.

Moderators: leecollings, remb0

Post Reply
danielzhan
Posts: 3
Joined: Tuesday 06 August 2019 13:40
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Sonoff BasicR3/mini/RFR3 Domoticz integration development

Post by danielzhan »

Hi All,

My name is Daniel from Sonoff Marketing, Sonoff has released new products Basic R3, mini and RFR3 which support DIY MODE to integrate into third party open source platform, we have published the API protocol and a demo tool for users to develop LAN control for the devices.

Who should I contact to talk about Domoticz integration, anybody help?

Or is there any volunteer would like to develop the binding for Domoticz, I can provide the free samples.

API protocol you can access from below link

https://github.com/itead/Sonoff_Devices_DIY_Tools

Thanks very much

Daniel
MikeF
Posts: 350
Joined: Sunday 19 April 2015 0:36
Target OS: Raspberry Pi / ODroid
Domoticz version: V2022.2
Location: UK
Contact:

Re: Sonoff BasicR3/mini/RFR3 Domoticz integration development

Post by MikeF »

Hi Daniel, I have several Sonoff Basics and S20s currently controlling lights (hardwired and sockets) linked to Domoticz, and I am particularly interested in the Sonoff Mini as a wife-acceptable solution if it can sit behind - and be controlled by - an ordinary rocker-type light switch.

You can contact me on mjf <dot> sw <at> btinternet <dot> com (please edit).

Mike
danielzhan
Posts: 3
Joined: Tuesday 06 August 2019 13:40
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: Sonoff BasicR3/mini/RFR3 Domoticz integration development

Post by danielzhan »

Hi MikeF,

I have sent you the mail, look forward to hearing from you.

Daniel
lwolf
Posts: 216
Joined: Saturday 10 November 2018 18:29
Target OS: Raspberry Pi / ODroid
Domoticz version:
Location: Hungary
Contact:

Re: Sonoff BasicR3/mini/RFR3 Domoticz integration development

Post by lwolf »

I am wondering how this ZeroConf idea popped up at Sonoff programming division?
MQTT is an ISO standard and not a coincidence that is used by the Shelly devices and by a lot of DIY solutions, it is far more better than anything i've seen from other manufacturers...
By the way Python zeroconf is using threading which, as i know, is not really Domoticz-Python-Plugin friendly. (correct me devs if i am wrong)

FYI I have created a SonoffDiy To MQTT external translator for Domoticz.
viewtopic.php?f=51&t=27589&p=221237&hil ... r3#p221237
stecom
Posts: 1
Joined: Wednesday 18 September 2019 22:14
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: Sonoff BasicR3/mini/RFR3 Domoticz integration development

Post by stecom »

hi Daniel
what are the spec for the integration?

i have installed few mini using python DIY tool.
- after fixing few issues, my mini Diy is managed by domoticz.

cheers
xeonpj
Posts: 10
Joined: Sunday 11 September 2016 13:00
Target OS: NAS (Synology & others)
Domoticz version:
Contact:

Re: Sonoff BasicR3/mini/RFR3 Domoticz integration development

Post by xeonpj »

stecom wrote: Wednesday 18 September 2019 22:42 hi Daniel
what are the spec for the integration?

i have installed few mini using python DIY tool.
- after fixing few issues, my mini Diy is managed by domoticz.

cheers
I am very interested in this too, somewhere to find how to act from 0 to connect a mini to domoticz?
jasujonas
Posts: 1
Joined: Sunday 03 November 2019 23:23
Target OS: -
Domoticz version:
Contact:

Re: Sonoff BasicR3/mini/RFR3 Domoticz integration development

Post by jasujonas »

.
acaonweb
Posts: 78
Joined: Thursday 23 March 2017 14:18
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: Sonoff BasicR3/mini/RFR3 Domoticz integration development

Post by acaonweb »

stecom wrote: Wednesday 18 September 2019 22:42 hi Daniel
what are the spec for the integration?

i have installed few mini using python DIY tool.
- after fixing few issues, my mini Diy is managed by domoticz.

cheers
Can you tell me how did you integrate mini into domoticz? Ive flashed it with Tasmota but I can’t find domoticz configuration

Thanx in advance.
xeonpj
Posts: 10
Joined: Sunday 11 September 2016 13:00
Target OS: NAS (Synology & others)
Domoticz version:
Contact:

Re: Sonoff BasicR3/mini/RFR3 Domoticz integration development

Post by xeonpj »

Actualiza tasmota desde el dispositivo.
sammyke007
Posts: 204
Joined: Monday 08 May 2017 20:48
Target OS: Raspberry Pi / ODroid
Domoticz version: 2022.1
Location: Belgium
Contact:

Re: Sonoff BasicR3/mini/RFR3 Domoticz integration development

Post by sammyke007 »

acaonweb wrote: Saturday 18 January 2020 7:05
stecom wrote: Wednesday 18 September 2019 22:42 hi Daniel
what are the spec for the integration?

i have installed few mini using python DIY tool.
- after fixing few issues, my mini Diy is managed by domoticz.

cheers
Can you tell me how did you integrate mini into domoticz? Ive flashed it with Tasmota but I can’t find domoticz configuration

Thanx in advance.
In the Tasmota configuration there is a section "configure Domoticz". There you can fill in the correct IDX (device from Domoticz) to toggle. Tasmota will reboot and voila!
(Choose IDX and not Key IDX).

By default the onboard button (GPIO0) will toggle the relay and so the IDX you configured. You can attach an external switch to the Sonoff Basic R3 on the DIY pin (GPIO16) and GND, but that's a little bit more advanced...
acaonweb
Posts: 78
Joined: Thursday 23 March 2017 14:18
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: Sonoff BasicR3/mini/RFR3 Domoticz integration development

Post by acaonweb »

sammyke007 wrote: Saturday 18 January 2020 10:16
acaonweb wrote: Saturday 18 January 2020 7:05
stecom wrote: Wednesday 18 September 2019 22:42 hi Daniel
what are the spec for the integration?

i have installed few mini using python DIY tool.
- after fixing few issues, my mini Diy is managed by domoticz.

cheers
Can you tell me how did you integrate mini into domoticz? Ive flashed it with Tasmota but I can’t find domoticz configuration

Thanx in advance.
In the Tasmota configuration there is a section "configure Domoticz". There you can fill in the correct IDX (device from Domoticz) to toggle. Tasmota will reboot and voila!
(Choose IDX and not Key IDX).

By default the onboard button (GPIO0) will toggle the relay and so the IDX you configured. You can attach an external switch to the Sonoff Basic R3 on the DIY pin (GPIO16) and GND, but that's a little bit more advanced...
Unfortunately not in the last firmware-wifiman.bin where this configuration is missing.

Which bin you flashed? Which Tasmota version?
xeonpj
Posts: 10
Joined: Sunday 11 September 2016 13:00
Target OS: NAS (Synology & others)
Domoticz version:
Contact:

Re: Sonoff BasicR3/mini/RFR3 Domoticz integration development

Post by xeonpj »

Actualiza desde el mismo firmware de tasmota, y la versión que instala ya trae domoticz
acaonweb
Posts: 78
Joined: Thursday 23 March 2017 14:18
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: Sonoff BasicR3/mini/RFR3 Domoticz integration development

Post by acaonweb »

xeonpj wrote: Saturday 18 January 2020 14:02 Actualiza desde el mismo firmware de tasmota, y la versión que instala ya trae domoticz
solved!!!!
Thanx to everyone
JanGil
Posts: 3
Joined: Wednesday 11 March 2020 15:55
Target OS: Raspberry Pi / ODroid
Domoticz version: 4.10717
Contact:

Re: Sonoff BasicR3/mini/RFR3 Domoticz integration development

Post by JanGil »

Dear acaonweb,

can you please explain how you have solved this problem?

Thanks in advance.
Ulthar
Posts: 2
Joined: Tuesday 28 January 2020 13:30
Target OS: Windows
Domoticz version:
Contact:

Re: Sonoff BasicR3/mini/RFR3 Domoticz integration development

Post by Ulthar »

Put device in pairing mode, 2x press reset for at least 5sec, the led diode will start blinking fast
Connect to the device's wifi
Open page http://10.10.7.1/device
You will get something like this
deviceid":"10007055xx","apikey":"xxabcdef-xxxx-4db7-abcd-xxabcdefxx","accept":"post","chipid":"00DDxxxx
deviceid/apikey is what you need (In DIY MODE you don't need apikey)

then download pysonofflanr3 https://pypi.org/project/pysonofflanr3/

In the domoticz virtual device on/off
script://pysonofflanr3.exe --device_id deviceid --api_key apikey on/off

There is no two-way communication but should be fine for enabling/disabling basic or sonoff g1 (gate controller)

PS.
Check via cmd/shell first
JanGil
Posts: 3
Joined: Wednesday 11 March 2020 15:55
Target OS: Raspberry Pi / ODroid
Domoticz version: 4.10717
Contact:

Re: Sonoff BasicR3/mini/RFR3 Domoticz integration development

Post by JanGil »

Thanks for your response.

I already flashed the Tasmota firmware, is your solution compatible with the Tasmota firmware or only with the original firmware?
JanGil
Posts: 3
Joined: Wednesday 11 March 2020 15:55
Target OS: Raspberry Pi / ODroid
Domoticz version: 4.10717
Contact:

Re: Sonoff BasicR3/mini/RFR3 Domoticz integration development

Post by JanGil »

I solved it by compiling the tasmota firmware from the source code where I enabled the "USE_DOMOTICZ".
This should normally work with the standard Tasmota firmware ( https://github.com/arendst/Tasmota/blob ... /BUILDS.md ), but for me it didn't.
Ulthar
Posts: 2
Joined: Tuesday 28 January 2020 13:30
Target OS: Windows
Domoticz version:
Contact:

Re: Sonoff BasicR3/mini/RFR3 Domoticz integration development

Post by Ulthar »

My solution works without any flashing, it's not perfect, but well.. :)

For Tasmosa, I guess you can use http/json in the scipt:// section of the virtual switch.

Maybe something like this:

deviceip/json.htm?status=on
wired
Posts: 1
Joined: Tuesday 28 April 2020 19:01
Target OS: NAS (Synology & others)
Domoticz version:
Contact:

Re: Sonoff BasicR3/mini/RFR3 Domoticz integration development

Post by wired »

Hey Daniel

I think you have published on various sites about Sonoff integrations.

I am keen to link my Synology NAS Surveillance Station cameras to a Sonoff switch so that my floodlights come on when movement is detected.

Have you managed any such integration?
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest