Skip to content

Fenix TFT Wifi Thermostat API reverse engineering for Home Assistant with Node Red

By 2022, I’m starting to assume that IOT devices you buy like this will have a reasonably accessible API to operate them without the in-house apps.

Unfortunately, I was faced with the problem of my new heating control from Fenix, the “Fenix TFT Wifi” can only operate via the manufacturer’s own app.

A smart heating control system should listen to environmental influences such as the weather forecast, should react when solar excess capacity is available in the house or when the occupants are 200km away. In 2022, I don’t want to have to deal with heating in everyday life. Let that take care of itself, please.

I take a closer look at the software of my heating thermostat and show you here my result how you can read out your own Fenix TFT thermostat and change the temperature. It’s not a simple copy&paste, I’m sorry for that but I hope I can spare you all the reverse engineering a friend of mine and I had to do for a long time. See it more as a small workshop and of course I’m happy about feedback and cooperation on the flow.

What you need:

At the bottom you will find the Node-Red export, which you can import.

Small update:
We use a feature in the flow that has not been maintained for some time, but is essential to the function. Unfortunately, Node Red has decided to no longer support the package. So you have to import the package node-red-contrib-http-request manually into Node Red


Go to Manage Palette in the Burger menu and search for the package and install it manually.

Here we go. I refer to the numbers before the Node Red entries.

Read out JWT token

Only with the JWT token you can get the data from the thermostat. I fetch the token with the Inject Node, which fires regularly and write the token into the Node Red own Context store. At the end, the process for reading out the data and writing the SET temperature values uses this.

With Proxyman, you first record a login process. Before that, log off the app and close it. Now let Proxyman run and listen to what happens.

You can delete all proxyman entries that have anything to do with this for the sake of clarity.

  • *.css
  • *.js
  • consent.google.com
  • *visualstudio*
  • *in.appcenter.ms*
  • *.google.com*

What should remain is something like this:

NR Point 1

Probably you don’t have to change anything here if the query structure hasn’t changed but at NR point 1 the URL comes in from my proxyman no.93. This is the last redirect that is done and looks something like this:

https://vs2-fe-identity-prod.azurewebsites.net/Account/Login?ReturnUrl=%2Fconnect%2Fauthorize%2Fcallback%3Fclient_id%3Db1760b2e-69f1-4e89-8233-5840a9accdf8%26client_secret%.......

This is the login form and you can open this page in the browser without the app 🙂 The form is important because of the “Request Verification Token”. So that no bots fill out the form, Lol!

NR Point 2

For the sake of clarity, delete the proxyman again and fill out the form in the app and listen again. Now we have to record the form fields. The first POST that is made now contains the ReturnURL in the body. We copy the complete body where further down also our mail address and the password are in it but ATTENTION! At the very end you will find again the “RequestVerificationToken”. We don’t want to take the part behind the “=” statically. Our script will append it as a variable.

So insert the complete “ReturnURL=” but without the actual token into the “CHANGEME” at the “msg.payload”. This is actually the “secret” part where the credentials are inside. The request verification token is appended as a variable.

NR Point 8

Check at the end behind the debug node 8 if you get the JWT token regext.

NR Point 9

Check if the token has been inserted into the context store of your NR. This always starts with “eyJ…”.

The token is the basis for the next steps. If you got the token: Congratulations, the most difficult part is done 🙂

Read temperature

Now we need the device ID from our Fenix and tell the backend that we are there and want values. When you are logged into the Fenix app, delete the proxyman again, start the recording and press the reload button in the Fenix app to get new, more current data.

NR 1 “user connected”

I think this is a bug in the app but the last request made here should actually be the first. This is to tell the Fenix Cloud backend that we are “there” and want new values. But it can also be the intention that the user can see values faster when logging in (but they are old). Current values are only available after this request. It is about the ID 1013 in my example. We need the complete body, which we copy (as RAW) and paste into msg.payload.

Take a closer look at the response of the request (feel free to press reload a few times if nothing comes back. Sometimes you don’t get anything back because the backend is a bit buggy. Here you get the device ID or sensor ID of the Fenixes back. For me it is two pieces, for you it can be more or less. We also have to remember these ID(s).

NR 3 “read Fenix”

Whenever we press reload on one of the devices while logged in (or in the overview) we see a request to /v1/configuration and then with a deviceID and sensorID (which seems to be the same). This is also the ID of NR1 “user connected”.

For me, it’s two requests again, because of my two devices.

You now adjust the msg.url in NR3 “read Fenix” accordingly and enter the deviceID/sensorID here twice.

The rest of the nodes are doing forwarding, picking up the data at another endpoint, getting the temperature values of the devices from the return, etc. I don’t understand the effort. But hopefully at the end you have the room temperature and the set temperature. In my example i write the data away in variables prepared for it, that I can display it in the frontend right away.

Set a new temperature

Now we still want to set the temperature that we would like to have. Sorry, I’m not ready to present a “nice” flow here yet. But with the snippet here you should at least be able to start running.

NR 1 Inject

In the payload of the Inject Node is the body, which you can also observe when changing the temperature in the app, if you listen with Proxyman. What you have to change here:

Device ID: “Id_deviceId”

and the

Sensor ID: “S1” (both the same for me)

The temperature you want to set is the “MA” wattsTypeValue “. In this case “689” it is 68.9°F, that is 20.5°C. So you have to convert the temperature to °F and multiply it by 10 without decimal places. You can then send this value away.

What the “Dm = 6” does I have unfortunately not found out but I guess it is the mode in which the thermostat should run. The “6” could be the manual mode.

Trigger the node and see if your temperature has changed. If yes: Congratulations!

Conclusion

Respect if you have made it this far and sorry that I could not prepare it better. The process is simply hacky and I have also thrown up when creating because much was simply not comprehensible to me. But I am also not a professional in this area. This is the first time I have had to talk raw with APIs. Also, that an important function, such as the “user connected” in the app is done at the very end and but is essential to get current data has not made it easier for me.

One request in conclusion

If you can do this better (the process, the documentation, etc.) please contact me. I would like to enable as many people as possible to read their Fenix thermostats. At the moment there is nothing for this out there. Rewrite this for other systems, document, translate, write to Fenix or Watts (who probably built this for Fenix) and ask for a long-lived token to feed robots with or/and a proper API. This is just reverse engineered and probably buggy and if Fenix ever changes something in the API we sit together again for nights trying to fix it. A home control system without a local API, with cloud constraints and undocumented is simply an absurdity. Home automation does not live from a properitarian bad app. Home automation responds to external influences, regulates itself, listens to any external system.

The Node-Red Flow

[{"id":"8227d0add2657df9","type":"tab","label":"Thermostat Fenix Example","disabled":false,"info":"","env":[]},{"id":"79e3ce33d2d730fd","type":"inject","z":"8227d0add2657df9","name":"Inject every 10 minutes","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"600","crontab":"","once":true,"onceDelay":"60","topic":"","payload":"","payloadType":"date","x":190,"y":560,"wires":[["eba52c33bf2535eb"]]},{"id":"a46c6199e293ad83","type":"http request","z":"8227d0add2657df9","name":"","method":"use","ret":"obj","paytoqs":"ignore","url":"","tls":"","persist":false,"proxy":"","authType":"","senderr":false,"x":430,"y":860,"wires":[["fe7658b8f30516a8"]]},{"id":"fe7658b8f30516a8","type":"function","z":"8227d0add2657df9","name":"","func":"let ambient = msg.payload.types.find( item => item.wattsType == \"At\")\nlet setpoint = msg.payload.types.find( item => item.wattsType == \"Sp\")\n\n\nmsg = {}\n\nvar ambient_c = ((ambient.value /10 ) - 32) * 5 / 9;\nvar ambient_c = ambient_c.toFixed(2); // 2 decimals\n\nvar setpoint_c = ((setpoint.value /10 ) - 32) * 5 / 9;\nvar setpoint_c = setpoint_c.toFixed(2); // 2 decimals\n\nmsg.location = \"Wohnzimmer\"\nmsg.ambient_c = ambient_c;\nmsg.setpoint_c = setpoint_c;\n\nreturn msg;\n\n\n\n\n","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":460,"y":900,"wires":[["f5bd460a81ec381d","2cc5a06c953d0a62"]]},{"id":"0abf5c81067e9d95","type":"inject","z":"8227d0add2657df9","name":"Inject NR Start + 1h","props":[],"repeat":"3600","crontab":"","once":true,"onceDelay":"30","topic":"","x":140,"y":80,"wires":[["780df9407280a16d"]]},{"id":"780df9407280a16d","type":"http request","z":"8227d0add2657df9","name":"","method":"GET","ret":"txt","paytoqs":"ignore","url":"https://vs2-fe-identity-prod.azurewebsites.net/Account/Login?ReturnUrl=%2Fconnect%2Fauthorize%2Fcallback%3Fclient_id%3Db1760b2e-69f1-4e89-8233-5840a9accdf8%26client_secret%3D76A55CCDD7C04848B2FCD4A17B540E814748FB05EE42706211CE7C52FF372A66%26response_type%3Dcode%2520id_token%26scope%3Dhttps%253A%252F%252Fvisionsystem2.com%252Foperations%252Fuser_impersonation%2520https%253A%252F%252Fvisionsystem2.com%252Fbusinessmodule%252Fuser_impersonation%2520https%253A%252F%252Fvisionsystem2.com%252Fdataprocessing%252Fuser_impersonation%2520https%253A%252F%252Fvisionsystem2.com%252Ffirmware%252Fuser_impersonation%2520https%253A%252F%252Fvisionsystem2.com%252Fiotmanagement%252Fuser_impersonation%2520https%253A%252F%252Fvisionsystem2.com%252Fschemas%252Fuser_impersonation%2520https%253A%252F%252Fvisionsystem2.com%252Ftou%252Fuser_impersonation%2520profile%2520openid%2520offline_access%26redirect_uri%3Dfenix%253A%252F%252Fcallback%26nonce%3D28eac9d903e8457b98bb13f2997d39fc%26code_challenge%3Dbo2lN-izi94_HwuI_1ggk79LYciCI_7VSmQltjtbrns%26code_challenge_method%3DS256%26state%3D3f2285e295f54c08a4dc3f55da76bcd5","tls":"","persist":false,"proxy":"","authType":"","senderr":false,"x":190,"y":120,"wires":[["71a426ff24ccb6a0"]]},{"id":"817e703631c97bd5","type":"debug","z":"8227d0add2657df9","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","targetType":"full","statusVal":"","statusType":"auto","x":670,"y":200,"wires":[]},{"id":"71a426ff24ccb6a0","type":"function","z":"8227d0add2657df9","name":"","func":"let cookie = msg.headers[\"set-cookie\"]\n\n\n\nvar parts = /__RequestVerificationToken\" type=\"hidden\" value=\"(?<token>.*)\"/;\nconst {groups: {token}} = parts.exec(msg.payload)\n\n\nmsg = {};\n\nmsg.method = \"POST\";\nmsg.url = \"https://vs2-fe-identity-prod.azurewebsites.net/Account/Login?ReturnUrl=/connect/authorize/callback?client_id=b1760b2e-69f1-4e89-8233-5840a9accdf8%26client_secret=76A55CCDD7C04848B2FCD4A17B540E814748FB05EE42706211CE7C52FF372A66%26response_type=code%20id_token%26scope=https%3A%2F%2Fvisionsystem2.com%2Foperations%2Fuser_impersonation%20https%3A%2F%2Fvisionsystem2.com%2Fbusinessmodule%2Fuser_impersonation%20https%3A%2F%2Fvisionsystem2.com%2Fdataprocessing%2Fuser_impersonation%20https%3A%2F%2Fvisionsystem2.com%2Ffirmware%2Fuser_impersonation%20https%3A%2F%2Fvisionsystem2.com%2Fiotmanagement%2Fuser_impersonation%20https%3A%2F%2Fvisionsystem2.com%2Fschemas%2Fuser_impersonation%20https%3A%2F%2Fvisionsystem2.com%2Ftou%2Fuser_impersonation%20profile%20openid%20offline_access%26redirect_uri=fenix%3A%2F%2Fcallback%26nonce=4a12316b271d4e308ecf3fa0d9ad0a0e%26code_challenge=oY4eRli8LhJ05Zp0H4Coq4aTIIof2q4dr7fBCXM_Dlk%26code_challenge_method=S256%26state=bbda076fc32e4f40b395462540c4d69c\";\nmsg.payload =\"CHANGEME\"+token;\n\nmsg.headers = {};\nmsg.headers[\"Host\"] = \"vs2-fe-identity-prod.azurewebsites.net\";\nmsg.headers[\"Content-Type\"] = \"application/x-www-form-urlencoded\";\nmsg.headers[\"Origin\"] = \"\";\nmsg.headers[\"Cookie\"] = cookie;\nmsg.headers[\"Accept\"] = \"text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8\";\nmsg.headers[\"User-Agent\"] = \"Mozilla/5.0 (iPad; CPU OS 15_2 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148\";\n\n\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":220,"y":160,"wires":[["eb8a7df09b8241f1","a0c74cc5f607dc6d"]]},{"id":"eb8a7df09b8241f1","type":"http request","z":"8227d0add2657df9","name":"","method":"use","ret":"txt","paytoqs":"ignore","url":"","tls":"","persist":false,"proxy":"","authType":"","senderr":false,"x":230,"y":200,"wires":[["f3f596423b3a436f","a0c74cc5f607dc6d"]]},{"id":"f3f596423b3a436f","type":"function","z":"8227d0add2657df9","name":"","func":"msg.headers[\"Cookie\"] = [];\nmsg.headers[\"Cookie\"].push(\"idsrv.session=\"+msg.redirectList[0].cookies[\"idsrv.session\"].value+\"; Path=/; Secure;\")\nmsg.headers[\"Cookie\"].push(\".AspNetCore.Identity.Application=\"+msg.redirectList[0].cookies[\".AspNetCore.Identity.Application\"].value+\"; Path=/; Secure; HttpOnly;\")\n\n\nlet redirect = msg.redirectList[0].location;\n//msg = {};\n\nmsg.method = \"GET\";\nmsg.url = \"https://vs2-fe-identity-prod.azurewebsites.net\"+redirect;\n\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":260,"y":240,"wires":[["a03aa7e3e708cbf1","a0c74cc5f607dc6d"]]},{"id":"a03aa7e3e708cbf1","type":"www-request","z":"8227d0add2657df9","name":"","method":"use","ret":"txt","url":"","follow-redirects":false,"persistent-http":false,"tls":"","x":270,"y":280,"wires":[["73fb4217791dc70b","a0c74cc5f607dc6d"]]},{"id":"73fb4217791dc70b","type":"function","z":"8227d0add2657df9","name":"","func":"let cookie = msg.headers[\"set-cookie\"]\n\nvar parts = /callback#code=(?<token>.*)&id_token=/;\nconst {groups: {token}} = parts.exec(msg.headers.location)\n\n\nmsg = {};\n\nmsg.method = \"POST\";\nmsg.url = \"https://vs2-fe-identity-prod.azurewebsites.net/connect/token\";\nmsg.payload =\"grant_type=authorization_code&code=\"+token+\"&redirect_uri=fenix%3A%2F%2Fcallback&code_verifier=dBjftJeZ4CVP-mB92K27uhbUJU1p1r_wW1gFWFOEjXk\";\n\nmsg.headers = {};\n\nmsg.headers[\"Content-Type\"] = \"application/x-www-form-urlencoded\";\n\nmsg.headers[\"Cookie\"] = cookie;\nmsg.headers[\"Accept\"] = \"application/json\";\nmsg.headers[\"User-Agent\"] = \"Watts.VisionSystem.Mobile/2101281503 CFNetwork/1327.0.4 Darwin/21.2.0\";\nmsg.headers[\"Accept-Language\"] = \"de-de\";\n//msg.headers[\"Accept-Encoding\"] = \"gzip, deflate, br\";\nmsg.headers[\"Authorization\"] = \"Basic YjE3NjBiMmUtNjlmMS00ZTg5LTgyMzMtNTg0MGE5YWNjZGY4Ojc2QTU1Q0NERDdDMDQ4NDhCMkZDRDRBMTdCNTQwRTgxNDc0OEZCMDVFRTQyNzA2MjExQ0U3QzUyRkYzNzJBNjY=\";\nmsg.headers[\"Ocp-Apim-Subscription-Key\"] = \"73a25a3ade354b04a5431d60ce23024b,73a25a3ade354b04a5431d60ce23024b\";\n\n\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":300,"y":320,"wires":[["35fb71ccbd39ceca","a0c74cc5f607dc6d"]]},{"id":"35fb71ccbd39ceca","type":"http request","z":"8227d0add2657df9","name":"","method":"use","ret":"txt","paytoqs":"ignore","url":"","tls":"","persist":false,"proxy":"","authType":"","senderr":false,"x":310,"y":360,"wires":[["da8e8feb178aa615","a0c74cc5f607dc6d"]]},{"id":"da8e8feb178aa615","type":"function","z":"8227d0add2657df9","name":"","func":"var parts = /access_token\":\"(?<token>.*)\",\"expires_in/;\nconst {groups: {token}} = parts.exec(msg.payload)\n\nmsg = {};\nmsg.token = token;\n\n\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":340,"y":400,"wires":[["7d4f91f82213a8e4","a0c74cc5f607dc6d"]]},{"id":"7d4f91f82213a8e4","type":"change","z":"8227d0add2657df9","name":"set JWTtoken","rules":[{"t":"set","p":"JWTtoken","pt":"flow","to":"token","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":340,"y":440,"wires":[["a0c74cc5f607dc6d"]]},{"id":"525569f81953469f","type":"function","z":"8227d0add2657df9","name":"Read Fenix","func":"\nmsg.method = \"GET\";\nmsg.url = \"https://vs2-fe-apim-prod.azure-api.net/iotmanagement/v1/configuration/AC67B253AE90/AC67B253AE90/v1.0\";\n\nmsg.headers = {};\nmsg.headers[\"Authorization\"] = \"Bearer \"+msg.token;\n\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":350,"y":740,"wires":[["9ab5798c268ccb7d"]]},{"id":"eba52c33bf2535eb","type":"change","z":"8227d0add2657df9","name":"Read JWT Token from the Context Flow Store","rules":[{"t":"set","p":"token","pt":"msg","to":"JWTtoken","tot":"flow"}],"action":"","property":"","from":"","to":"","reg":false,"x":280,"y":600,"wires":[["d984e66b53de21d2"]]},{"id":"9ab5798c268ccb7d","type":"http request","z":"8227d0add2657df9","name":"","method":"use","ret":"txt","paytoqs":"ignore","url":"","tls":"","persist":false,"proxy":"","authType":"","senderr":false,"x":370,"y":780,"wires":[["5de39fc5f13b846d"]]},{"id":"5de39fc5f13b846d","type":"function","z":"8227d0add2657df9","name":"","func":"var parts = /json\",\"url\":\"(?<token>.*)\\\"}/;\nconst {groups: {token}} = parts.exec(msg.payload)\n\n\nmsg = {}\n\nmsg.method = \"GET\";\nmsg.url = token;\n\n\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":400,"y":820,"wires":[["a46c6199e293ad83"]]},{"id":"f5bd460a81ec381d","type":"api-call-service","z":"8227d0add2657df9","name":"","server":"86110a77.f6e448","version":3,"debugenabled":false,"service_domain":"input_number","service":"set_value","entityId":"input_number.fenix_wohnzimmer_ambient_temperature","data":"{\"value\":msg.ambient_c}","dataType":"jsonata","mergecontext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":700,"y":880,"wires":[[]]},{"id":"2cc5a06c953d0a62","type":"api-call-service","z":"8227d0add2657df9","name":"","server":"86110a77.f6e448","version":3,"debugenabled":false,"service_domain":"input_number","service":"set_value","entityId":"input_number.fenix_wohnzimmer_setpoint_temperature","data":"{\"value\":msg.setpoint_c}","dataType":"jsonata","mergecontext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":700,"y":920,"wires":[[]]},{"id":"a47fe63d8c58ee55","type":"comment","z":"8227d0add2657df9","name":"Read the temperature variables from Fenix and write them to the HA variables","info":"","x":330,"y":520,"wires":[]},{"id":"bcdf3de35644eb58","type":"comment","z":"8227d0add2657df9","name":"Periodically get a new JWT token and write it to the context store","info":"","x":250,"y":40,"wires":[]},{"id":"a0c74cc5f607dc6d","type":"change","z":"8227d0add2657df9","name":"","rules":[{"t":"set","p":"payload","pt":"msg","to":"payload","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":490,"y":200,"wires":[[]]},{"id":"cd74f3a645950dfc","type":"http request","z":"8227d0add2657df9","name":"","method":"use","ret":"txt","paytoqs":"ignore","url":"","tls":"","persist":false,"proxy":"","authType":"","senderr":false,"x":330,"y":700,"wires":[["525569f81953469f"]]},{"id":"d984e66b53de21d2","type":"function","z":"8227d0add2657df9","name":"\"user connected\"","func":"\nmsg.method = \"PUT\";\nmsg.url = \"https://vs2-fe-apim-prod.azure-api.net/iotmanagement/v1/devices/userconnected\";\nmsg.payload ={\"A1\":\"XXXXX\",\"In\":\"XXXXXXX\",\"S1\":\"XXXXX\"};\n\nmsg.headers = {};\nmsg.headers[\"Authorization\"] = \"Bearer \"+msg.token;\n\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":330,"y":660,"wires":[["cd74f3a645950dfc"]]},{"id":"4f567402a510b5f6","type":"comment","z":"8227d0add2657df9","name":"1","info":"","x":50,"y":120,"wires":[]},{"id":"ab3ba204b7f28030","type":"comment","z":"8227d0add2657df9","name":"2","info":"","x":50,"y":160,"wires":[]},{"id":"e55bd38cf279b999","type":"comment","z":"8227d0add2657df9","name":"3","info":"","x":50,"y":200,"wires":[]},{"id":"bc17571d92500980","type":"comment","z":"8227d0add2657df9","name":"4","info":"","x":50,"y":240,"wires":[]},{"id":"646d5b654b8cd010","type":"comment","z":"8227d0add2657df9","name":"5","info":"","x":50,"y":280,"wires":[]},{"id":"47ec46cf37d74777","type":"comment","z":"8227d0add2657df9","name":"6","info":"","x":50,"y":320,"wires":[]},{"id":"5eddf14c5df563f0","type":"comment","z":"8227d0add2657df9","name":"7","info":"","x":50,"y":360,"wires":[]},{"id":"0e21babe7837c3b5","type":"comment","z":"8227d0add2657df9","name":"8","info":"","x":50,"y":400,"wires":[]},{"id":"407bc2ef9379f774","type":"comment","z":"8227d0add2657df9","name":"9","info":"","x":50,"y":440,"wires":[]},{"id":"ab40df272d4b63f2","type":"comment","z":"8227d0add2657df9","name":"1","info":"","x":50,"y":660,"wires":[]},{"id":"de91c1e7c21630ac","type":"comment","z":"8227d0add2657df9","name":"2","info":"","x":50,"y":700,"wires":[]},{"id":"67f34ac2f074b0d5","type":"comment","z":"8227d0add2657df9","name":"3","info":"","x":50,"y":740,"wires":[]},{"id":"7e59b7790bf456d2","type":"comment","z":"8227d0add2657df9","name":"4","info":"","x":50,"y":780,"wires":[]},{"id":"7cb660c36edc6a28","type":"comment","z":"8227d0add2657df9","name":"5","info":"","x":50,"y":820,"wires":[]},{"id":"5e348b3a0bee92a9","type":"comment","z":"8227d0add2657df9","name":"6","info":"","x":50,"y":860,"wires":[]},{"id":"084cec9fd64f0d4f","type":"comment","z":"8227d0add2657df9","name":"7","info":"","x":50,"y":900,"wires":[]},{"id":"47aa2fa790a683d8","type":"http request","z":"8227d0add2657df9","name":"","method":"use","ret":"txt","paytoqs":"ignore","url":"","tls":"","persist":false,"proxy":"","authType":"","senderr":false,"x":290,"y":1180,"wires":[["cfbbcbfe6c596298"]]},{"id":"8f2672fa77c8c2de","type":"inject","z":"8227d0add2657df9","name":"","props":[{"p":"payload"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"{\"Id_deviceId\":\"ACXXXXXX90\",\"S1\":\"ACXXXXXX90\",\"configurationVersion\":\"v1.0\",\"data\":[{\"wattsType\":\"Dm\",\"wattsTypeValue\":6},{\"wattsType\":\"Ma\",\"wattsTypeValue\":689}]}","payloadType":"json","x":210,"y":1060,"wires":[["a380ebf69687b19a"]]},{"id":"cfbbcbfe6c596298","type":"debug","z":"8227d0add2657df9","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","statusVal":"","statusType":"auto","x":310,"y":1220,"wires":[]},{"id":"a023a4558b859634","type":"function","z":"8227d0add2657df9","name":"","func":"msg.method = \"PUT\";\nmsg.url = \"https://vs2-fe-apim-prod.azure-api.net/iotmanagement/v1/devices/twin/properties/config/replace\";\nmsg.headers = {};\nmsg.headers[\"Authorization\"] = \"Bearer \"+msg.token;\n\n\n\n\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":260,"y":1140,"wires":[["47aa2fa790a683d8"]]},{"id":"a380ebf69687b19a","type":"change","z":"8227d0add2657df9","name":"Read JWT Token from the Flow Store","rules":[{"t":"set","p":"token","pt":"msg","to":"JWTtoken","tot":"flow"}],"action":"","property":"","from":"","to":"","reg":false,"x":330,"y":1100,"wires":[["a023a4558b859634"]]},{"id":"c3b8f770dfd54f7c","type":"comment","z":"8227d0add2657df9","name":"Set a temperature on a Fenix","info":"","x":210,"y":1020,"wires":[]},{"id":"67a1fa36d28c883b","type":"comment","z":"8227d0add2657df9","name":"1","info":"","x":50,"y":1060,"wires":[]},{"id":"5c120d85e70a9cfd","type":"comment","z":"8227d0add2657df9","name":"2","info":"","x":50,"y":1100,"wires":[]},{"id":"c29dca317db8a83b","type":"comment","z":"8227d0add2657df9","name":"3","info":"","x":50,"y":1140,"wires":[]},{"id":"846966753f00939c","type":"comment","z":"8227d0add2657df9","name":"4","info":"","x":50,"y":1180,"wires":[]},{"id":"0aa05765c7ebe755","type":"comment","z":"8227d0add2657df9","name":"5","info":"","x":50,"y":1220,"wires":[]},{"id":"86110a77.f6e448","type":"server","name":"Home Assistant","version":2,"addon":true,"rejectUnauthorizedCerts":true,"ha_boolean":"y|yes|true|on|home|open","connectionDelay":true,"cacheJson":true,"heartbeat":false,"heartbeatInterval":30}]

Do you like the post?

Subscribe to the newsletter and receive at irregular intervals summarizing newsletters with the latest contributions. I keep it minimalistic. Promised.

2 Comments

  1. Nikolay Nikolov

    I fully support your frustration, and I’m glad that you have reached out to this point. I will give it a shot and if I can extend, I will let you know. What I did for now is to use the Fenix google home integration and send commands via Assistant Relay HA addon, but it can’t read the values.

Leave a Reply

Your email address will not be published. Required fields are marked *

*