![]() |
Local Weatherstation to Logicmachine - Printable Version +- Logic Machine Forum (https://forum.logicmachine.net) +-- Forum: LogicMachine eco-system (https://forum.logicmachine.net/forumdisplay.php?fid=1) +--- Forum: Scripting (https://forum.logicmachine.net/forumdisplay.php?fid=8) +--- Thread: Local Weatherstation to Logicmachine (/showthread.php?tid=5837) |
Local Weatherstation to Logicmachine - epps - 14.01.2025 Hello there, we have a local weatherstation that can log his data to a webserver like "Ecowitt" or "WeatherUnderground". This ist the Station : ELV WLAN-Wetterstation WS980WiFi https://de.elv.com/p/elv-wlan-wetterstation-ws980wifi-inkl-funk-aussensensor-868-mhz-app-pc-auswertesoftware-P250408/?itemId=250408 In the settings of this Weatherstation there is an option where you can loud the data to an customized Site. With the Ecowitt or the WeatherUnderground protocoll. (See the Picture attached) Because we have there no internet connection we cannot load the data to the online weathersites. Is it possible that the Logicmachine can recive the Data local from the Weatherstation in any way? I dont know how to do. Thanks Kind regards Epps RE: Local Weatherstation to Logicmachine - admin - 14.01.2025 Create a resident script with 10 seconds sleep time. Code: require('socket') On your weather station set Server IP to LM IP and Port to 8000. Set upload interval to 10-15 seconds and post what you get in LM Logs tab. RE: Local Weatherstation to Logicmachine - epps - 23.01.2025 great, thank you. I think it works in a way. this is the setting from the weatherstation this is the log: Code: * arg: 1 is the "timeout" in the arg2 a problem ? can we make a "filter" for the values in the string? e.g. temp = 39.0 humidity = 87 and so on... RE: Local Weatherstation to Logicmachine - admin - 23.01.2025 Actually it should be possible to use LM web server to receive the data. Create weather.lp file and upload it via FTP to public directory using apps login. FTP can be enabled in System config > Services. Code: <? In weather station settings set: Path = /public/weather.lp? (not sure about ? at the end, try without if it doesn't work) Port = 80 Then check LM logs. It should list all variables sent by the weather station. Then you can use grp.checkwrite or grp.checkupdate to update relevant LM objects with weather data. |