Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support of write attribute in Leshan server demo #341

Open
sumanthsss opened this issue May 17, 2017 · 3 comments
Open

Add support of write attribute in Leshan server demo #341

sumanthsss opened this issue May 17, 2017 · 3 comments
Labels
demo Impact our demo (not libraries) new feature New feature from LWM2M specification server Impact LWM2M server

Comments

@sumanthsss
Copy link

It would be good if we can have an option to perform write attribute on the demo server code, with operations Minimum Period, Maximum Period, Greater Than, Less Than, and Step.

@sbernard31 sbernard31 added demo Impact our demo (not libraries) new feature New feature from LWM2M specification server Impact LWM2M server labels May 18, 2017
@sbernard31 sbernard31 changed the title No support to write attribute ? Add support of write attribute in Leshan server demo Nov 24, 2017
@sbernard31 sbernard31 mentioned this issue Nov 5, 2018
@sbernard31
Copy link
Contributor

sbernard31 commented Sep 3, 2019

Thx to @AButenko there is a REST API for this. (see #733)
But still no UI.

To test it you can use :

curl -i  -X PUT  "http://localhost:8080/api/clients/yourendpointname/3/0/0/attributes?pmin=30&pmax=120"   
curl -i  -X PUT  "http://localhost:8080/api/clients/yourendpointname/3/0/attributes?pmin=30&pmax=120"   
curl -i  -X PUT  "http://localhost:8080/api/clients/yourendpointname/3/attributes?pmin=30&pmax=120"   

@Hanningz
Copy link

Thx to @AButenko there is a REST API for this. (see #733) But still no UI.

To test it you can use :

curl -i  -X PUT  "http://localhost:8080/api/clients/yourendpointname/3/0/0/attributes?pmin=30&pmax=120"   
curl -i  -X PUT  "http://localhost:8080/api/clients/yourendpointname/3/0/attributes?pmin=30&pmax=120"   
curl -i  -X PUT  "http://localhost:8080/api/clients/yourendpointname/3/attributes?pmin=30&pmax=120"   

Hello, I have the same issues and I tested the above command with Leshan Server demo but got the "INTERNAL_SERVER_ERROR(500)", also I tired this one”http://localhost:8080/api/clients/epname/3303/0/5700/attributes?pmin=30&pmax=120&gt=8.0&st=1.2”, I got “dquote>” from my terminal. I wonder do I need to modify the Leshan server demo? So what I am trying to achieve is the notify part, for example, if the temperature sensor value is over 8 then I get the obs notification, I already tried the SSEClient python script, it works and show all the obs results, so I wonder any instructions of how I can set to receive the obs result when the value is in certain scope? Thank you so much.

@sbernard31
Copy link
Contributor

I just tested with a leshan-client-demo and I get :

HTTP/1.1 200 OK
Date: Wed, 29 Sep 2021 08:24:47 GMT
Server: Jetty(9.4.34.v20201102)
Content-Type: application/json
Content-Length: 116

{"status":"INTERNAL_SERVER_ERROR(500)","valid":true,"success":false,"failure":true,"errormessage":"not implemented"}

Meaning that all seems to works well at server side but we get a INTERNAL_SERVER_ERROR(not implemented) from the client.

This the expected behavior as Write Attribtues is not implemented for leshan client (see #534)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
demo Impact our demo (not libraries) new feature New feature from LWM2M specification server Impact LWM2M server
Projects
None yet
Development

No branches or pull requests

3 participants