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

Http Request URL Encoding fails after update to 0.126.6 #14175

Closed
funnyfrish opened this issue Jun 4, 2024 · 4 comments
Closed

Http Request URL Encoding fails after update to 0.126.6 #14175

funnyfrish opened this issue Jun 4, 2024 · 4 comments
Labels
bug Something isn't working

Comments

@funnyfrish
Copy link

Describe the bug

0.126.5 is working fine with the same configuration. But in the latest release the
URL Encoding does not work.
Configured is http://192.168.0.107/cm?cmnd=Status%208

But EVCC does not add the Space. It requests only http://192.168.0.107/cm?cmnd=Status
without Space and 8 at the end

The Answer should look like this when requesting http://192.168.0.107/cm?cmnd=Status%208
{
"StatusSNS":{
"Time":"2024-06-04T09:12:14",
"Total":{
"consumed":12791.299,
"delivered":119179.919,
"power":1
},
"PV":{
"Consumed":4.493,
"Delivered":145193.808,
"Power":5187,
"Eigenverbrauch":26013.886,
"Aktueller Verbrauch":5262
}
}
}

But EVCC calls this URL http://192.168.0.107/cm?cmnd=Status
{
"Status":{
"Module":1,
"DeviceName":"SML Meters",
"FriendlyName":[
"Tasmota"
],
"Topic":"tasmota_DFFA50",
"ButtonTopic":"0",
"Power":0,
"PowerOnState":3,
"LedState":1,
"LedMask":"FFFF",
"SaveData":1,
"SaveState":1,
"SwitchTopic":"0",
"ButtonRetain":0,
"SwitchRetain":0,
"SensorRetain":0,
"PowerRetain":0,
"InfoRetain":0,
"StateRetain":0,
"StatusRetain":0
}
}

Steps to reproduce

1.Just configure a new source in meters sections with type custom and source http
2. Configure a new Tasmota URL with "Status 8" in the request
3. check the trace
...

Configuration details

meters:
  - name: grid_tasmota
    type: custom
    power:
        source: http
        uri: http://192.168.0.107/cm?cmnd=Status%208
        jq: .StatusSNS.Total.power
        scale: 1
        timeout: 10s
  - name: pv_tasmota
    type: custom
    power:
        source: http
        uri: http://192.168.0.107/cm?cmnd=Status%208
        jq: .StatusSNS.PV.Power
        scale: 1 
        timeout: 10s
  - name: battery
    type: template
    template: victron-energy
    usage: battery
    host: 192.168.1.205
    port: 502

Log details

grid_tasmota
------------
[http  ] TRACE 2024/06/04 09:43:57 GET http://192.168.0.107/cm?cmnd=Status 8
[http  ] TRACE 2024/06/04 09:43:57 {"Status":{"Module":1,"DeviceName":"SML Meters","FriendlyName":["Tasmota"],"Topic":"tasmota_DFFA50","ButtonTopic":"0","Power":0,"PowerOnState":3,"LedState":1,"LedMask":"FFFF","SaveData":1,"SaveState":1,"SwitchTopic":"0","SwitchMode":[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],"ButtonRetain":0,"SwitchRetain":0,"SensorRetain":0,"PowerRetain":0,"InfoRetain":0,"StateRetain":0,"StatusRetain":0}}
Power: strconv.ParseFloat: parsing "<nil>": invalid syntax

What type of operating system are you running?

Linux

Version

0.126.6

@GrimmiMeloni
Copy link
Collaborator

Maybe a side effect of #14146

cc @andig

@andig
Copy link
Member

andig commented Jun 4, 2024

http://192.168.0.107/cm?cmnd=Status%208

Ist erstmal falsch. M.E. müsste das http://192.168.0.107/cm?cmnd=Status+8 heissen. Könntest Du das nochmal kurz probieren?

@andig andig added the bug Something isn't working label Jun 4, 2024
@andig
Copy link
Member

andig commented Jun 4, 2024

Fixed per #14146 (comment)

@andig andig closed this as completed Jun 4, 2024
@Neisi
Copy link

Neisi commented Jun 4, 2024

http://192.168.0.107/cm?cmnd=Status%208

Ist erstmal falsch. M.E. müsste das http://192.168.0.107/cm?cmnd=Status+8 heissen. Könntest Du das nochmal kurz probieren?

Hatte ich gestern schon getestet, Ergebnis ist das gleiche.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

4 participants