jp112sdl / SonoffHMLOX

65 stars 20 forks source link

"Getting Answer" from Sonoff-devices #45

Closed JoeWiseman closed 6 years ago

JoeWiseman commented 6 years ago

Hi up to now I'm using the sonoff-devices along with the tasmota-firmware ... Connecting them to the homatic-system is done in the same way you are doing it - by an http-command.

Is there any possibility that your firmware would talk backward to the CCU by an http-command? Why, here is the scenario: on the CCU there is are programms called PlugStatusON, PlugStatusOFF. When the status of the Sonoff-device is changing it calls the corresponing program via http-command (of course CCU is running the XML-API) and the CCU gets an feedback from the device. That would be a great feature to have and would make the Sonoff-prducts real homatic member.

Of course it is possible to use a program which is getting the device-status via http-command, but this has to be done periodically without knowing if there is any real change ....

Regards Joe

jp112sdl commented 6 years ago

It's implemented by default.

If you configure your CUxD channel as described in the Wiki, you have a callback.

1.) If someone toggles the state on the device (pressing the momentary switch), the state will be set to the CUxD channel.

2.) If you change the state of your sonoff device by http command the state will be set to the CUxD channel (if you append the option ?ts=1 )

The channel always represents the current state of the sonoff device.

XML-API is not needed.

JoeWiseman commented 6 years ago

Thanks a lot for answering so fast ... ... and for bringing such good news. I have bought some S20-devices. If they will arrive, I will test it!

In the tasmota software there is a blink-feature which allows you to set up an on-time like a light in the stairway. Is something like that also possible? Or do I have to implement this by using the CCU?

In the end I like to ask if the following devices are supported:

Regards Joe

jp112sdl commented 6 years ago

The SonoffHMLOX has only a few features. The idea of writing this firmware came up because I needed an active callback or bidirectional communication between the sonoff and the ccu.

The only features are on/off and a timer.

Supported devices are (as mentioned in the README):

For the Dual and Dual R2 as a dual switch, please refer to this repository: SonoffDualHVIOHMLOX

For the Dual and Dual R2 as an shutter actor, please refer to this repository: SonoffDualShutterHMLOX

JoeWiseman commented 6 years ago

THANKS!!!! I'll try your work, as soon as my devices will arrive! Regards Joe