Parameters GUI staircase not work

Hi,

I’m using compilation https://github.com/srg74/WLED-wemos-shield/tree/master/resources/Firmware/WLED_wemos_shield/v0.12.0_2106271

What still doesn’t work is being able to change parameters from the staircase:

  • delay-ms parameters:
  • on-time-s:

via curl not working either

 curl -X POST -H "Content-Type: application/json" -d '{"staircase":{"segment-delay-ms":1000,"on-time":10}}' 192.168.142.63/json/state

{"success":true}

Windows or Linux curl? Sadly, it matters.

Linux, from my raspberry

Try without the ’ around the { json }

Not work,

curl -X POST -H "Content-Type: application/json" -d {"staircase":{"segment-delay-ms":1000,"on-time":10}} 192.168.142.63/json/state
curl: (3) URL using bad/illegal format or missing URL

the triggers simulators do work

curl -X POST -H "Content-Type: application/json" -d '{"staircase":{"bottomsensor":true}}' 192.168.142.63/json/state

I think this is the json for the usermod (from the srg74 fork for the wemos shield:
{
“state”: {
“staircase”: {
“enabled”: true,
“segment-delay-ms”: 150,
“on-time-s”: 5,
“bottom-sensor”: false,
“tops-ensor”: false
},
}
Note the difference with on-time-s?

Nothing, not work

curl -X POST -H "Content-Type: application/json" -d '{"staircase":{"segment-delay-ms":1000,"on-time-s":10}}' 192.168.142.63/json/state

I thing that this fork not work well

Add a comma between the last 2 }’s like in the posted json example showing the full usermod json blob that I posted a few minutes ago.

Nothing

curl -X POST -H "Content-Type: application/json" -d '{"staircase":{"segment-delay-ms":1000,"on-time-s":10},}' 192.168.142.63/json/state
{"error":9}

I definitely think this fork is not working properly

Try this:
curl -X POST -H “Content-Type: application/json” -d ‘{“staircase”: {“segment-delay-ms”: 150,“on-time-s”: 5}}’ 192.168.142.63/json

And if that does not work:
curl -X POST -H “Content-Type: application/json” -d ‘{“staircase”: {“segment-delay-ms”: 150,“on-time-s”: 5},}’ 192.168.142.63/json

References:

I think is the “/json/state” that was causing problems as that returns the current state.

We remain the same, the values ​​do not change:

curl -X POST -H "Content-Type: application/json" -d '{"staircase":{"segment-delay-ms":1000,"on-time-s":10}}' 192.168.142.63/json
{"success":true}
 curl -X POST -H "Content-Type: application/json" -d '{"staircase":{"segment-delay-ms":1000,"on-time-s":10},}' 192.168.142.63/json
{"error":9}

If you noticed (I am sure you did), the first one is the correct syntax.
Run that one again with different time values. Then read it back using the /json/state curl command. Does it show the new values?

The values ​​are always the default, put what you put

I am so sorry I did not think to look there first, but the readme.md file states the json available from the JSON API is this:
{
“state”: {
“staircase”: {
“enabled”: true,
“bottom-sensor”: false,
“top-sensor”: false
},
}
The reason your time values are not being accepted and used is they are calculated from constants set in the usermod programming.
You can manually set the constants, or contact the usermod creator and ask them to add additional json api support, or code it yourself and submit a pull request (so your changes get incorporated for everyone and you can update firmware more easily in the future.

Hi,

Finally I compiled my own version following the instructions of the creator and it works correctly from the GUI.

Therefore the fork offered by the compiled .bin definitely does not work correctly.

Greetings

1 Like

Does this mean the parameters work in the provided usermod, but not in the provided pre-compiled .bin provided by someone else? If so, hopefully you reached out to them to alert them of the outcome of this thread/topic

Sure enough, the precompiled .bin doesn’t work

1 Like