Something new

Do you have questions about writing plugins or scripts in Python? Meet the coders here.
User avatar
kgschlosser
Site Admin
Posts: 5020
Joined: Fri Jun 05, 2015 5:43 am
Location: Rocky Mountains, Colorado USA

Re: Something new

Post by kgschlosser » Tue Jun 20, 2017 12:04 pm

and in order to make micropython work properly you would have to map out the pins on the ESP. would need to know what pin goes to where in order to write the firmware properly. I am sure someone has probably already done this and you can find it on the internet tho.
If you like the work I have been doing then feel free to Image

Foune
Experienced User
Posts: 96
Joined: Sun Jul 03, 2011 7:08 pm

Re: Something new

Post by Foune » Tue Jun 20, 2017 12:57 pm

From my point of view, leaving tasmota would be an error as it manages a ton of features around the esp with a lot of tuning : LED, relay management, DS18B20, sensors, scenarios, etc.
Another big feature of tasmota is that it works with most sonoff modules : basic, dual, quad, touch, pow, et., and the list will grow. Tasmota can be updated via OTA.
Finally, tasmota was designed to work with several protocols, why not simply creating an eventghost.ino library in the original tasmota project?

On another side, I think it would be a good move to add MQTT features in EG, as it is becoming a crossroad between smart things : domoticz, jeedom, sonoff, smartphones, EG.

pearbear
Experienced User
Posts: 150
Joined: Mon Apr 02, 2012 10:28 pm
Contact:

Re: Something new

Post by pearbear » Tue Jun 20, 2017 9:21 pm

There are some MQTT plugins for EventGhost here:
http://krambriw.net/
I see there are now 3 of them so I don't know what's what, but I know I used a MQTT plugin by krambriw years ago and it worked fine. I guess it was probably the "MQTT Client (Old using mosquitto)" one.

User avatar
kgschlosser
Site Admin
Posts: 5020
Joined: Fri Jun 05, 2015 5:43 am
Location: Rocky Mountains, Colorado USA

Re: Something new

Post by kgschlosser » Wed Jun 21, 2017 8:45 am

the biggest issue with MQTT is that it has to be the most non user friendly means of communicating between 2 devices. I have yet to see something that has any kind of a working GUI for it. as an example because it seems to be the most popular is mosquitto and this you have to set the whole thing up using a conf file. that is far from user friendly in this point and click world we live in. and it is simply another man in the middle type of communication. if you need to have some kind of a central point for housing information EG can do this without the use of a middle man application. local network can be handled via broadcasts and anything remote would make the connection to eg and EG could send out the broadcast for whatever it is you want to do.

but with broadcasting on your local network there would be no need to involve EG if ya really didn't want to. a device could populate whatever it needs to from the broadcast directly. EG would be more like a proxy or a firewall if you will only handling stuff form the outside. or commands for a device if the device is directly connected to the computer EG is running on. I have not done much reading on the device ya have there. but I do know that accessing the pins to do various things whether you use CPP or Python to do it pretty simple. since the ESP only has one input pin so if there is more then one input then it is using an output pin to activate the input to read from and using diodes to isolate the inputs from one another.

I am honestly not sure It could have some kind of a controller that handles all of the various inputs and outputs and communicates via SPI or I2C. but most of these inexpensive ESP based devices usually keep it very simple and I have not seen one that uses anything like that to date.

Just keep an open mind because the ESP is a very powerful tool and things can be added to it if there are open GPIO's so if you wanted to add something like a temp/humidity sensor you could expand the capabilities of it.
If you like the work I have been doing then feel free to Image

Foune
Experienced User
Posts: 96
Joined: Sun Jul 03, 2011 7:08 pm

Re: Something new

Post by Foune » Wed Jun 21, 2017 10:27 am

That's a very interesting analysis but something is wrong. Tasmota is not focused on MQTT, it manages several protocols, so it is definitively open-minded. I don't know any good reason to ignore tasmota, it is well designed, compatible with 16 home automation devices and talking with 4 home automation software.

About the MQTT service, it is only a stupid message router, I don't know why you expect a GUI from it. It's much like XPL, it just needs a third party service on the machine to route the messages.

On the same idea, a new zigbee gateway is coming, coming with an open-source firmware that will use a protocol for broadcasting. Whatever the protocol chosed, I can't imagine saying "all right, that piece of software is bullshit, I don't like the protocol, let's write a custom firmware for E.G.".

All in all, I'm not asking for the moon, I was just suggesting to improve the MQTT message parsing in E.G., or make an eventghost connector on the tasmota project. Initially I was enthousiast for writing a custom firmware for the basic sonoff, but I realize that tasmota adresses a lot of needs that go far beyond what I expected. Adding functionnalities using the available esp gpios is possible in tasmota : DHT11,DS18B20,WS2812, IR remote, or almost any basic 3.3v sensor.
Last edited by Foune on Wed Jun 21, 2017 12:42 pm, edited 1 time in total.

pearbear
Experienced User
Posts: 150
Joined: Mon Apr 02, 2012 10:28 pm
Contact:

Re: Something new

Post by pearbear » Wed Jun 21, 2017 10:45 am

Foune wrote: I was just suggesting to improve the MQTT message parsing in E.G.
Have you tried krambriw's plugins? If so, what specific improvements would you suggest?

Foune
Experienced User
Posts: 96
Joined: Sun Jul 03, 2011 7:08 pm

Re: Something new

Post by Foune » Wed Jun 21, 2017 11:14 am

Yes. The krambriw's plugins return MQTT messages as is. But the message formating can be different from one subscription to another. For instance, domoticz don't talk like sonoff. At least it would be good to propose some formating rules for each subscription, in order to generate more usable eg events. Character replacement would be a first step (/ -> .)

This is not a blocking point, il would just be a step forward to improve MQTT integration in E.G
I'm still not much familiar with MQTT, but I need to improve my E.G on this point as I still want E.G to be the main event manager among all other software.

Going further towards tasmota's MQTT management would be interesting as it allows some tuning : for any device, there is :

- A specific Topic
- A group Topic
- A fallback Topic

Everything is explained here : https://github.com/arendst/Sonoff-Tasmota/wiki/Tips

User avatar
kgschlosser
Site Admin
Posts: 5020
Joined: Fri Jun 05, 2015 5:43 am
Location: Rocky Mountains, Colorado USA

Re: Something new

Post by kgschlosser » Wed Jun 21, 2017 12:09 pm

as I stated I had not done any reading on it. and You are the one that focused Tasmota on MQTT specifically. and I gave a point of view that I have on MQTT. and I have now done some reading up on it. and Tasmota is an arduino flash onto the thing.

and I bet if you asked pearbear (who is somewhat of an arduino guru). he might be able to adapt his etherevents to library which was made to talk directly to EGto Tasmota . and it doesn't look all that difficult to add to it. and it does seem like it has been a very well through out firmware for those devices.
If you like the work I have been doing then feel free to Image

Foune
Experienced User
Posts: 96
Joined: Sun Jul 03, 2011 7:08 pm

Re: Something new

Post by Foune » Wed Aug 30, 2017 11:00 am

All right,

I've been playing with sonoff+tasmota for several months. I have flashed 15 sonoff with Tasmota, including :

- Basic
- S20 = plug socket
- Touch = wall switch (touch)

Some of them are working daily. They showed an excellent reliability until now. Response time is neglictible. I use MQTT, it is very convenient for the commands as well as for the status. Using one status request I can get a status response from each sonoff. The fallback mode is working : if the network connection is lost, the wall switch keeps trigerring its local relay. Of course, all communication with other stuff is lost (contrary to Zwave).

The Domoticz integration is easy, I can control them using domoticz together with Eg without headaches.
Using the Tasmota firmware, I can fine tune the switches :

- standard switch / push button
- Single click, multiple, long press : each time a different event is triggered.

Post Reply