Andy P Posted December 3, 2023 Share Posted December 3, 2023 Hi Bob, thanks for providing/supporting the openweathermap nodeserver. I got it up and running pretty fast once I subscribed to the service and put in the config. Question about the formatted data being provided for 'weather conditions'. In the admin console, you are converting the numeric value ''804" to "Overcast clouds" which is very useful. In the rest api, when I request the node data, a lot of the values do get different values between the value and the formatted value (like 599 becomes 5.99 MPH) but the weather conditions does not. <property id="GV13" value="804" formatted="804" uom="25" name=""/> Is there any chance you could put the same formatted value from the admin console into the formatted value of GV13 or perhaps create a new property id="CONDITIONS" with the formatted value? Otherwise I will have to do the translation in javascript. Appreciate your consideration. Second question - since I don't need the API polling every 10 minutes all night, is there a way either to provide a sleep time period or to turn polling on and off via a program for when I don't need it to update? I know that first 1000 calls to the api are free, but don't see any reason to poll if I am not needing the data to be updated. Thanks, Andy Link to comment
Solution bpwwer Posted December 3, 2023 Solution Share Posted December 3, 2023 The short answers are no but that's not very helpful. The formatted values are set by the IoX and this is one of the quirks of it. After installing the node server, you have to restart IoX before it will send out the formatted values that are text based. It's not something the node server can control, but at least the solution is fairly simple. For the second question. First, that's a great idea but not currently possible. The poll values are really PG3(x) configuration values for the node server in that slot. That's why they're separated out from the other configuration parameters. So again, the node server doesn't control the poll intervals, PG3(x) does. Having a polling schedule vs. just the two values is a great idea, but that's something UDI would have to add to PG3(x). Link to comment
Andy P Posted December 3, 2023 Author Share Posted December 3, 2023 Thanks, I understand number two and that needs to be done by UDI. Regarding the first question, I am getting text formatted values for all the other variables, just not GV13 - but I guess I will go restart IOX and see if that changes. <property id="BARPRES" value="1004" formatted="1004 mb" uom="117" name=""/> <property id="CLIHUM" value="96" formatted="96%" uom="22" name=""/> <property id="CLITEMP" value="5167" formatted="51.67°F" uom="17" prec="2" name=""/> <property id="DEWPT" value="5058" formatted="50.58°F" uom="17" prec="2" name=""/> <property id="DISTANC" value="1" formatted="1 Miles" uom="116" name=""/> <property id="GV13" value="701" formatted="701" uom="25" name=""/> <property id="GV14" value="100" formatted="100%" uom="22" name=""/> <property id="GV18" value="0" formatted="0%" uom="22" name=""/> <property id="GV2" value="5106" formatted="51.06°F" uom="17" prec="2" name=""/> <property id="GV4" value="461" formatted="4.61 mph" uom="48" prec="2" name=""/> <property id="GV5" value="599" formatted="5.99 mph" uom="48" prec="2" name=""/> <property id="GV6" value="0" formatted="0 inches/hour" uom="24" name=""/> <property id="GV7" value="0" formatted="0 inches/hour" uom="24" name=""/> <property id="ST" value="1" formatted="1" uom="25" name=""/> <property id="UV" value="12" formatted="0.12 UV Index" uom="71" prec="2" name=""/> <property id="WINDDIR" value="90" formatted="East" uom="76" name=""/> Link to comment
Andy P Posted December 3, 2023 Author Share Posted December 3, 2023 Interesting. Two values changed to include the formatted text after the restart and now the name value is filled in for all of them. <property id="GV13" value="701" formatted="mist" uom="25" name="Climate Conditions"/> <property id="ST" value="1" formatted="Connected" uom="25" name="NodeServer Online"/> Thanks! Link to comment
Andy P Posted December 4, 2023 Author Share Posted December 4, 2023 oh, now I see the difference. The ones that were formatted prior to the restart were all using standard UOM (units of measure) and precision to generate the formatted text. But those two have UOM=25. ISY Developers:API:V5:Appendix:Units of Measure - Universal Devices, Inc. Wiki (universal-devices.com) Link to comment
bpwwer Posted December 4, 2023 Share Posted December 4, 2023 UOM 25 allows us to have number -> text mappings. The node server sends that mapping to IoX when it starts, but IoX will only read the mapping when it starts. So initially the order needs to be: 1. node server send mapping to IoX 2. IoX reads all mappings (for all node servers) into memory This only needs to happen once for each node server that sends mappings. Once the node server has sent the mappings (at least once), IoX will be able to read the mapping every time IoX is restarted (or the system is restarted). Note that the Admin Console is the same in that it needs to be restarted to read the same mappings. 1 Link to comment
Recommended Posts