Webui information SM2135

81 views
Skip to first unread message

Sjoerdnld

unread,
Oct 24, 2021, 6:31:23 AM10/24/21
to TasmotaUsers
Can anybody point me to how I can see module information on the webui about a specific module?
I would like to know how Sm2135.model is selected.
This is a snippet from the code from the standard build:
    // See #define MAX_SM2135_DAT 6 in tasmota_template.h
    Sm2135.model = GetPin(Sm2135.data) - AGPIO(GPIO_SM2135_DAT);  // 0 .. 5

    // Legacy support of model selection
    if (PinUsed(GPIO_SWT1)) {
      Sm2135.model = SM2135_WCBGR;
      pinMode(Pin(GPIO_SWT1), INPUT);             // Discard GPIO_SWT functionality
      SetPin(Pin(GPIO_SWT1), AGPIO(GPIO_NONE));
    }
But how can I see what is the resulting Sm2135.model after power on in the webui?

Philip Knowles

unread,
Oct 24, 2021, 8:23:47 AM10/24/21
to Sjoerdnld, TasmotaUsers

Not really sure what you are trying to achieve.

 

How you selected the appropriate module etc?

 

Have you checked templates.blakadder.com

 

There’s some information in the driver

 

Tasmota/xlgt_04_sm2135.ino at development · arendst/Tasmota (github.com)

 

Regards

 

Phil K

 

Sent from Mail for Windows

--
You received this message because you are subscribed to the Google Groups "TasmotaUsers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to sonoffusers...@googlegroups.com.
To view this discussion on the web, visit https://groups.google.com/d/msgid/sonoffusers/d7fe49ef-a085-4d14-8d9d-1acb30bb8156n%40googlegroups.com.

 

Sjoerdnld

unread,
Oct 26, 2021, 2:28:01 AM10/26/21
to TasmotaUsers
Hi Phil,

Thanks for your response.
Yes I selected the appropriate module using the template from the driver.
The code snipped is actually from that  Tasmota/xlgt_04_sm2135.ino as well.

It works ok, but the colors are inverted, and according to code, it should sort out in this line:
Sm2135.model = GetPin(Sm2135.data) - AGPIO(GPIO_SM2135_DAT);  // 0 .. 5   No.186

But my model light is a new version, so I would like to know what is the result of that line.

Regards Sjoerd

Op zondag 24 oktober 2021 om 14:23:47 UTC+2 schreef knowles...@gmail.com:

Sjoerdnld

unread,
Oct 28, 2021, 3:51:37 PM10/28/21
to TasmotaUsers
Can anybody point me to how I can log or printout or show on the webui the result of this lineof code:
Sm2135.model = GetPin(Sm2135.data) - AGPIO(GPIO_SM2135_DAT);  // 0 .. 5

My light doesnt work correct, and I like to understand why.
Op dinsdag 26 oktober 2021 om 08:28:01 UTC+2 schreef Sjoerdnld:

Philip Knowles

unread,
Oct 28, 2021, 5:00:17 PM10/28/21
to Sjoerdnld, TasmotaUsers

Sjoerdnld

unread,
Oct 31, 2021, 4:05:33 AM10/31/21
to TasmotaUsers
Yes, I used it as a starting point.
However, the code changes apply to a older version, the current release uses this line to determine:
Sm2135.model = GetPin(Sm2135.data) - AGPIO(GPIO_SM2135_DAT);

Hence why I would like to log or printout or show on the webui the result of that.
I will start reading more into Tasmota, since this is not so easy to find.

Op donderdag 28 oktober 2021 om 23:00:17 UTC+2 schreef knowles...@gmail.com:


Op donderdag 28 oktober 2021 om 23:00:17 UTC+2 schreef knowles...@gmail.com:
Reply all
Reply to author
Forward
0 new messages