Displaying an internal value from the display (pwm,state)
Moderators: grovkillen, Stuntteam, TD-er
Displaying an internal value from the display (pwm,state)
• ESP8266 NodeMCU with OLED (64x48) SSD1306.
• Flashed with: ESP_Easy_mega_20221105_display_ESP8266_4M1M.bin
Can an internal value e.g. „PWM, state“ be set see "Status,G,14"?{
"log": "",
"plugin": 1,
"pin": 14,
"mode": "PWM",
"state": 20
}
output via the display? OK this is NOT how it works! ==>"Demo.:[status,G,14#state]"
• Flashed with: ESP_Easy_mega_20221105_display_ESP8266_4M1M.bin
Can an internal value e.g. „PWM, state“ be set see "Status,G,14"?{
"log": "",
"plugin": 1,
"pin": 14,
"mode": "PWM",
"state": 20
}
output via the display? OK this is NOT how it works! ==>"Demo.:[status,G,14#state]"
Re: Displaying an internal value from the display (pwm,state)
THANKS, Almost perfect, for static values 1/0 ok but how can I read the value PWM,state, because with me is displayed only alternately 0 or 1!
{
"log": "GPIO: 14 duty: 300",
"plugin": 1,
"pin": 14,
"mode": "PWM",
"state": 300
}
{
"log": "GPIO: 14 duty: 300",
"plugin": 1,
"pin": 14,
"mode": "PWM",
"state": 300
}
Re: Displaying an internal value from the display (pwm,state)
The PWM state isn't made available yet via this.
Re: Displaying an internal value from the display (pwm,state)
OKAY THANKS,
the consideration with the query was not quite correct, because the 8266 does not calculate this value itself!
I pass the required value to an "Internal variables" and let this be shown on the display -
This works so (PWM [var#1]) but what does not work, is the setting of the value in a "Rules"
not so
and also not so
the consideration with the query was not quite correct, because the 8266 does not calculate this value itself!
I pass the required value to an "Internal variables" and let this be shown on the display -
This works so (PWM [var#1]) but what does not work, is the setting of the value in a "Rules"
not so
Code: Select all
on %v1% do
pwm,14,[var#1]
endon
Code: Select all
on [var#1] do
pwm,14,[var#1]
endon
Re: Displaying an internal value from the display (pwm,state)
Both will not work, as you cannot have variables like that in the on...do line.
You need to act on an event and there is no event with only numeric values in the event name.
also there should be no [] in the on..do line
For example if you want to act on a new task value (e.g. bme#temp), then you should use
And not
When parsing rules lines, all occurences with %....% or [...] will be replaced by their respective numerical values first.
You need to act on an event and there is no event with only numeric values in the event name.
also there should be no [] in the on..do line
For example if you want to act on a new task value (e.g. bme#temp), then you should use
Code: Select all
on bme#temp do
Code: Select all
on [bme#temp] do
Re: Displaying an internal value from the display (pwm,state)
Thanks again for the info
(You need to act on an event and there is no event with only numeric values in the event name.)
This is how it works now: =>
http://192.168.178.xxx/control?cmd=even ... trolset=97
For all =>
https://espeasy.readthedocs.io/en/lates ... eventvalue
(You need to act on an event and there is no event with only numeric values in the event name.)
This is how it works now: =>
http://192.168.178.xxx/control?cmd=even ... trolset=97
Code: Select all
On pwmcontrolset do
pwm,14,%eventvalue% // for the GPIO PIN
let,1,%eventvalue% // for the Display
endon
https://espeasy.readthedocs.io/en/lates ... eventvalue
Who is online
Users browsing this forum: Bing [Bot] and 14 guests