You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Jan 27, 2023. It is now read-only.
fritz-thermostat:
if i set setTemperatur the uri looks like
{"uri":{"protocol":"http:","slashes":true,"auth":null,"host":"192.168.140.10","port":80,"hostname":"192.168.140.10","hash":null,"search":"?0=0&sid=c3843a9310cb5902&switchcmd=sethkrtsoll¶m=NaN&ain=109710417528","query":"0=0&sid=c3843a9310cb5902&switchcmd=sethkrtsoll¶m=..."
So the NaN for param in the uri is my problem.
msg.payload is a Number and msg.ain is set (ain works in the uri) switchcmd=sethkrtsoll¶m=NaN&ain=1097104
checked the script at temp2api but unable to find a error:
/*
* Temperature conversion
*/
const MIN_TEMP = 8;
const MAX_TEMP = 28;
function temp2api(temp)
{
var res;
if (temp == 'on' || temp === true)
res = 254;
else if (temp == 'off' || temp === false)
res = 253;
else {
// 0.5C accuracy
res = Math.round((Math.min(Math.max(temp, MIN_TEMP), MAX_TEMP) - 8) * 2) + 16;
}
return res;
}
Any ideas? Answer in English or German is ok ;-)
The text was updated successfully, but these errors were encountered:
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Hi, i am using
https://flows.nodered.org/node/node-red-contrib-fritzapi
fritz-thermostat:
if i set setTemperatur the uri looks like
{"uri":{"protocol":"http:","slashes":true,"auth":null,"host":"192.168.140.10","port":80,"hostname":"192.168.140.10","hash":null,"search":"?0=0&sid=c3843a9310cb5902&switchcmd=sethkrtsoll¶m=NaN&ain=109710417528","query":"0=0&sid=c3843a9310cb5902&switchcmd=sethkrtsoll¶m=..."
So the NaN for param in the uri is my problem.
msg.payload is a Number and msg.ain is set (ain works in the uri)
switchcmd=sethkrtsoll¶m=NaN&ain=1097104
checked the script at temp2api but unable to find a error:
Any ideas? Answer in English or German is ok ;-)
The text was updated successfully, but these errors were encountered: