These are chat archives for SmingHub/Sming

8th
Dec 2015
zhivko
@zhivko
Dec 08 2015 00:56
@hreintke: very nice! I will test as soon as you make repo available...
@ystrem:
    char buf1[30];
    dtostrf(floatAnalog, 10, 8, buf1);
zhivko
@zhivko
Dec 08 2015 01:02
@ystrem: thanks for link looks promissing.
Curtis Pope
@piperpilot
Dec 08 2015 04:01
hey guys...I asked a question in the forum about UART1...if anyone has any experience using it, specifically with an ESP-12, can you take a look and respond? Thanks!
alonewolfx2
@alonewolfx2
Dec 08 2015 07:36
@piperpilot i wroted
alon24
@alon24
Dec 08 2015 08:29
@alonewolfx2 this is interesting, the link u sent is 3.5$, in ur language, but if i search for the same thing from the same supplier, its 5.3$ in the english site
same aliexpress
ystrem
@ystrem
Dec 08 2015 08:29
Nope, but only for 3.5 ?? :)
alon24
@alon24
Dec 08 2015 08:32
i bought yesterday for 4.36$
alonewolfx2
@alonewolfx2
Dec 08 2015 08:38
@alon24 propably shipping fee
yes i will buy. maybe its real or aliexpress will refund always :)
ystrem
@ystrem
Dec 08 2015 09:11
That's nice price , I'll order some.
zhivko
@zhivko
Dec 08 2015 09:12
@alonewolfx2 refund what? you mean in case goods are not delivered? Or refund shipment?
alonewolfx2
@alonewolfx2
Dec 08 2015 09:17

you mean in case goods are not delivered?

yes

alon24
@alon24
Dec 08 2015 09:18
same shipping, same supplier, diferent lang, different price :)
alonewolfx2
@alonewolfx2
Dec 08 2015 09:37
@alon24 its possible :D
alonewolfx2
@alonewolfx2
Dec 08 2015 10:57
why stepup?
@ystrem you need min 2aa (good quality) for providing enough power. btw esp8266 can work on direct 2aa battery
ystrem
@ystrem
Dec 08 2015 11:03
ok, I want to use rechargeable, that's only 2x1.2V
alonewolfx2
@alonewolfx2
Dec 08 2015 11:11
if you use rechargable you need 3 aa
alonewolfx2
@alonewolfx2
Dec 08 2015 11:17
3,6+0,6=4.2 max voltage
alon24
@alon24
Dec 08 2015 11:46
or 18650 batt (3.7)
and then no need for step up (battery normally at 4.1v, after use can drop to 3.7, when it gets to 15% dropps belllow 3.7 - and then need to recharge)
alon24
@alon24
Dec 08 2015 11:52
the issue with step up/down (as @robotiko explained to me) is that u LOOSE current due to conversion like get only 80%, and thats not good - needs to be avoided
alonewolfx2
@alonewolfx2
Dec 08 2015 11:59
@alon24 right.
ystrem
@ystrem
Dec 08 2015 12:00
Yes i know but if you used it then you can work up to 1V power supply
How much for it ?
alonewolfx2
@alonewolfx2
Dec 08 2015 13:20
@ystrem actually you cant use 1v battery because it cant provide enough current on 1v
ystrem
@ystrem
Dec 08 2015 13:25
How much ESP draws ? About 200mA on startup ?
alonewolfx2
@alonewolfx2
Dec 08 2015 13:44
peak 300ma but mostly 250ma enough
ystrem
@ystrem
Dec 08 2015 13:45
yep that's not enough :D
Do you use some some home automation system like openHUB or similar ?
alonewolfx2
@alonewolfx2
Dec 08 2015 13:47
no but i am writing my own :)
ystrem
@ystrem
Dec 08 2015 13:48
how far are you ?
alonewolfx2
@alonewolfx2
Dec 08 2015 13:49
%60
alon24
@alon24
Dec 08 2015 14:08
@alonewolfx2 opensource?
alonewolfx2
@alonewolfx2
Dec 08 2015 14:09
maybe, it depend code quality. i wroted many things and gui in my language(Turkish)
crosofg
@crosofg
Dec 08 2015 14:51
has anyone implemented i2c io expander PFC8574 in Sming?
crosofg
@crosofg
Dec 08 2015 14:56
@avr39-ripe Thanks
alon24
@alon24
Dec 08 2015 18:07
is version 2.0 going to be roos based?
rtos
ystrem
@ystrem
Dec 08 2015 18:11
@alonewolfx2 : @Others
The RTOS is what I am experimenting with. Still a (long ?) way to go but promising :
Startup OK, C++ OK, Basic_blink OK, UDP/TCP client/server OK, HTTP in issue fixing (receive OK, but no processing).
Serial and Interrupts need rewriting. Spiffs compiling but issues when running. RTOS tasks OK.
Did not do anything (exept basic blink) with digital
hreintke wrote this ...
hreintke
@hreintke
Dec 08 2015 18:33
@alon24 : NO RTOS based is as I mentioned still a (long ?) way to go !
And you/I can hit walls at any time. The wall now is network response, at the moment they "just don't work"
Also rewriting of other parts needs to start.
So status is : Very, very alpha. As soon I have some basics really working I will push to a repo for further collaboration.
For now : Just use current sming on iot sdk. When (if possible) RTOS based Sming will arrive you need to port your application, hopefully with not to much effort.
Curtis Pope
@piperpilot
Dec 08 2015 18:41
Hey guys, I'm still having problems getting UART1 to work. Anyone have any ideas...thread I have going is here: http://www.esp8266.com/viewtopic.php?f=35&t=7017&p=36004#p36004
hreintke
@hreintke
Dec 08 2015 19:47

@piperpilot
Although there in indeed "HardwareSerial::HardwareSerial(const int uartPort)" in HardwareSerial, the actual implementation does NOT have the required code to use multiple Uarts.

It will need serious adding/rewriting in interrupt/receive and writing code.

It can be placed on the enhancement list for Sming, but then we would also need someone to implement.

May you and @festlv can work together on this. I know festlv has knowledge of uart code as he fixed an out of bounds error in there recently.

Curtis Pope
@piperpilot
Dec 08 2015 19:48
Yeah, I was just looking at that in more detail and see a lot of stuff missing
I'm going to try to use telnet to do my debugging first and see how that works
Curtis Pope
@piperpilot
Dec 08 2015 20:31
@hreintke you still there?
hreintke
@hreintke
Dec 08 2015 20:34
yes I am
ystrem
@ystrem
Dec 08 2015 20:40
@hreintke How many ADC do you need and what precision ?
hreintke
@hreintke
Dec 08 2015 20:49
@ystrem :
I would only need one, not high precision but I need continuous operation.
Have very limited hardware/wiring experience (only started 9 months ago with some arduino trials).
So I have been hesitant to get ADC which is I2C connected. What I could do now is use my arduino as ADC or wait for the esp32 which should be an all-in-on. Then I can do the job with my software experience.
ystrem
@ystrem
Dec 08 2015 20:50
esp32 is long run
look at esp8266 ...
hreintke
@hreintke
Dec 08 2015 20:51
But esp8266 has no "continuous ADC" interferes with wifi. Lots of horror stories on the forums.
ystrem
@ystrem
Dec 08 2015 20:51
You can use for example tiny85 to DAQ and comunicate via i2c as you said
Curtis Pope
@piperpilot
Dec 08 2015 20:51
hey @hreintke did you write the telnet implementation?
hreintke
@hreintke
Dec 08 2015 20:52
@piperpilot : yes I did
ystrem
@ystrem
Dec 08 2015 20:52
I have got the same ideat 5min ago on the toilet :D
Curtis Pope
@piperpilot
Dec 08 2015 20:52
I can't figure out how to send data to a client...I want to use it for some logging...it will respond to the command processor
but I can't just send info to the client in the blind
and I can't get the Debug implementation to work
hreintke
@hreintke
Dec 08 2015 20:54
If you have a telnet client connected and enabled debug on the telnet server, the Debug.printf(..) will go to telnet client.
Curtis Pope
@piperpilot
Dec 08 2015 20:55
yeah, doesn't seem to be
trying to turn off command processing now to see if that fixes it
hreintke
@hreintke
Dec 08 2015 20:56
debug, and commandprocessor are independent functionalities, although underlying using same framework
Curtis Pope
@piperpilot
Dec 08 2015 20:56
I have this:
telnetServer.enableDebug(true);
telnetServer.listen(23);
Debug.printf("Version = %s\r\n", SMOBOTVERSION);
and that debug statement never shows up
hreintke
@hreintke
Dec 08 2015 20:58
If your client connects, do you get the "welcome" message ?
Curtis Pope
@piperpilot
Dec 08 2015 20:58
yes
and command processing works when that is turned on
Curtiss-MBP:~ cpope$ telnet 192.168.1.14
Trying 192.168.1.14...
Connected to esp_fe50cf.home.
Escape character is '^]'.
Welcome to Sming / ESP6266 Telnet
hreintke
@hreintke
Dec 08 2015 20:58
let me check something, wait a moment
Curtis Pope
@piperpilot
Dec 08 2015 20:59
I wonder if this is screwing it up
if (telnetDebug && curClient) /* only setSetDebug when already connected */
{
    Debug.setDebug(DebugPrintCharDelegate(&TelnetServer::wrchar,this));
}
you must set enableDebug AFTER the client is connected
hreintke
@hreintke
Dec 08 2015 21:00
can't be, in my "example" I do all settings in init
when client connects :
        curClient = client;
        curClient->setTimeOut(USHRT_MAX);
        curClient->sendString("Welcome to Sming / ESP6266 Telnet\r\n");
        if (telnetCommand)
        {
            commandExecutor = new  CommandExecutor(client);
        }
        if (telnetDebug)
        {
            Debug.setDebug(DebugPrintCharDelegate(&TelnetServer::wrchar,this));
        }
        Debug.printf("This is debug after telnet start\r\n");
hreintke
@hreintke
Dec 08 2015 21:06
Did you do Debug.start() ?
Curtis Pope
@piperpilot
Dec 08 2015 21:09
nope
hreintke
@hreintke
Dec 08 2015 21:10
with debug.start() and Debug.stop() you can runtime switch debug output. Default = off.
Curtis Pope
@piperpilot
Dec 08 2015 21:10
ok...trying that now
OK...got it...is Debug configurable and can this message be turned off so it isn't sent every time: Dbg 36.303 : Welcome to DebugDelegate
hreintke
@hreintke
Dec 08 2015 21:11
You can also switch with command : debug on (watch the space between)
Curtis Pope
@piperpilot
Dec 08 2015 21:14
this is great! thanks!
hreintke
@hreintke
Dec 08 2015 21:15
your welcome, nice to see there a users for what I made
Curtis Pope
@piperpilot
Dec 08 2015 21:16
so if I ONLY want debug over telnet...whats the best way to do that
ie...don't send the debug to the serial
hreintke
@hreintke
Dec 08 2015 21:23
Can't do that at the moment, if telnet client disconnects, it switches to serial.
Not a difficult addition. Now only "manual by command"
robotiko
@robotiko
Dec 08 2015 22:31
@hreintke I'm also using the great command_processor in serial, telnet and WS it is really nice functionality
robotiko
@robotiko
Dec 08 2015 22:37
Debug on WS is in place?
hreintke
@hreintke
Dec 08 2015 22:52
@robotiko : I know :smile:
WS, requires a small additional implementation detail due to the message handling vs char based handling of serial & telnet