Jump to content

New Meteobridge weather nodeserver


glarsen

Recommended Posts

A nodeserver has been posted to the store that supports the Meteobridge extended template set.   It is primarily oriented around the Davis VP2 series weather stations, but should work with any.  However, to my knowledge, only Davis supports the et0 variable.

If there are any other MB variables anyone is interested in, they can easily be added.

A nod to @bpwwer for developing the original Meteobridge-poly nodeserver which this one was adapted from.

 

NOTE: Tested and working on Polisy and RPi

Edited by glarsen
  • Like 4
Link to comment
Share on other sites

  • 4 weeks later...

@glarsen.

I upgraded to MeteoAuth 1.0.9 (on Polisy), and now I get the following error. I uninstalled it and reinstalled, but no avail. Any ideas?

2020-02-16 21:03:29,499 [MainThread] [INFO ] Received Config from STDIN.
2020-02-16 21:03:29,500 [MainThread] [INFO ] UDI Polyglot v2 Interface 2.0.34 Starting...
2020-02-16 21:03:29,549 [MainThread] [DEBUG] gws: {'default': {2: ('192.168.99.1', 'igb0')}, 2: [('192.168.99.1', 'igb0', True)]}
2020-02-16 21:03:29,550 [MainThread] [DEBUG] gw: default=('192.168.99.1', 'igb0')
2020-02-16 21:03:29,551 [MainThread] [DEBUG] ifad: igb0=[{'addr': '192.168.99.96', 'netmask': '255.255.255.0', 'broadcast': '192.168.99.255'}]
2020-02-16 21:03:29,551 [MainThread] [INFO ] Connect: Network Interface: {'addr': '192.168.99.96', 'netmask': '255.255.255.0', 'broadcast': '192.168.99.255'}
2020-02-16 21:03:29,553 [Interface ] [INFO ] Connecting to MQTT... localhost:1883
2020-02-16 21:03:29,675 [Interface ] [INFO ] MQTT Connected with result code 0 (Success)
2020-02-16 21:03:29,678 [Interface ] [INFO ] MQTT Subscribing to topic: udi/polyglot/ns/9 -  MID: 1 Result: 0
2020-02-16 21:03:29,679 [Interface ] [INFO ] MQTT Subscribing to topic: udi/polyglot/connections/polyglot -  MID: 2 Result: 0
2020-02-16 21:03:29,680 [Interface ] [INFO ] Sent Connected message to Polyglot
2020-02-16 21:03:29,806 [Interface ] [INFO ] Adding node MeteoBridge Weather(mbweather)
2020-02-16 21:03:29,808 [Interface ] [INFO ] Waiting on Controller node to be added.......
2020-02-16 21:03:29,810 [NodeServer] [INFO ] Started MeteoBridge Template NodeServer
2020-02-16 21:03:29,811 [NodeServer] [INFO ] Check for existing configuration value
2020-02-16 21:03:29,812 [NodeServer] [INFO ] Creating node definition profile based on config.
2020-02-16 21:03:29,815 [NodeServer] [INFO ] write_profile: Writing profile/nodedef/nodedefs.xml
2020-02-16 21:03:29,911 [NodeServer] [INFO ] write_profile_zip: profile/version.txt as version.txt
2020-02-16 21:03:29,915 [NodeServer] [INFO ] write_profile_zip: profile/editor/editors.xml as editor/editors.xml
2020-02-16 21:03:29,919 [NodeServer] [INFO ] write_profile_zip: profile/nodedef/nodedefs.xml as nodedef/nodedefs.xml
2020-02-16 21:03:29,929 [NodeServer] [INFO ] write_profile_zip: profile/nls/en_us.txt as nls/en_us.txt
2020-02-16 21:03:29,935 [NodeServer] [INFO ] write_profile: done.
2020-02-16 21:03:29,936 [NodeServer] [INFO ] Sending Install Profile command to Polyglot.
2020-02-16 21:03:29,938 [NodeServer] [INFO ] Adding configuration
2020-02-16 21:03:29,939 [NodeServer] [INFO ] Sending customParams to Polyglot.
2020-02-16 21:03:29,940 [NodeServer] [DEBUG] Custom data: {}
2020-02-16 21:03:29,941 [NodeServer] [INFO ] Sending customData to Polyglot.
2020-02-16 21:03:29,960 [NodeServer] [ERROR] Exception in thread NodeServer:
Traceback (most recent call last):
  File "/usr/local/lib/python3.7/threading.py", line 926, in _bootstrap_inner
    self.run()
  File "/usr/local/lib/python3.7/threading.py", line 870, in run
    self._target(*self._args, **self._kwargs)
  File "./meteobridgeauth.py", line 68, in start
    self.check_params()
  File "./meteobridgeauth.py", line 290, in check_params
    LOGGER.setLevel(self.currentloglevel)
  File "/usr/local/lib/python3.7/logging/__init__.py", line 1353, in setLevel
    self.level = _checkLevel(level)
  File "/usr/local/lib/python3.7/logging/__init__.py", line 192, in _checkLevel
    raise ValueError("Unknown level: %r" % level)
ValueError: Unknown level: '10'

 

Link to comment
Share on other sites

8 hours ago, glarsen said:

1.1.0 should fix this.  I made a variable type error.

Thanks, 1.1.0 works.

Side note: any chance of including the timestamp info as a data field? It is part of the query, and would allow stale data to be easily identified.

Thanks for a well done nodeserver.

Link to comment
Share on other sites

On 2/19/2020 at 1:25 AM, MTB said:

Side note: any chance of including the timestamp info as a data field? It is part of the query, and would allow stale data to be easily identified.

Just pushed 1.2.0 with a new driver in the primary node that displays the time of the last read from the Meteobridge in the form HHmmss localtime.

Edited by glarsen
  • Like 1
  • Thanks 1
Link to comment
Share on other sites

  • 3 weeks later...

Hello everyone,  

Got the hair to try out the all the weather node servers. Fastastic job everyone!  With my vantage pro2, I am ready to join the testing effort.  

Currently working with MeteobridgeAuth,  I am not getting any data from the illumination branch.  Looking back at my pi, don't see any populated data in ns, but I do see solar radiation value coming from meteobridge.  Log file snippet:

2020-03-05 16:41:42,867 [Controller] [DEBUG] url in getstationdata: http://192.168.1.21/cgi-bin/template.cgi?template=[th0temp-act]%20[th0temp-dmax]%20[th0temp-dmin]%20[th0dew-act]%20[wind0chill-act]%20[th0hum-act]%20[th0hum-dmax]%20[th0hum-dmin]%20[thb0press-act]%20[thb0seapress-act]%20[thb0press-delta3h=barotrend]%20[sol0rad-act]%20[uv0index-act]%20[sol0evo-daysum]%20[wind0avgwind-act]%20[wind0wind-max10]%20[wind0dir-act]%20[rain0rate-act]%20[rain0total-daysum]%20[rain0total-sum24h]%20[rain0total-ydmax]%20[rain0total-monthsum]%20[rain0total-yearsum]%20[mbsystem-station]%20[mbsystem-stationnum]%20[thb0lowbat-act]%20[hh][mm][ss]%20[epoch]
2020-03-05 16:41:43,458 [Controller] [DEBUG] Returned mbrdata: 17.2 18.2 -0.9 -7.3 17.2 18.0 93.0 17.0 998.2 1021.7 0 281.0 [uv0index-act] 3.0 3.6 7.6 48.0 0.0 0.0 0.0 0.0 0.0 120.1 Vantage 5 0.0 164143 1583448103
2020-03-05 16:41:43,459 [Controller] [DEBUG] mbrarray: ['17.2', '18.2', '-0.9', '-7.3', '17.2', '18.0', '93.0', '17.0', '998.2', '1021.7', '0', '281.0', '[uv0index-act]', '3.0', '3.6', '7.6', '48.0', '0.0', '0.0', '0.0', '0.0', '0.0', '120.1', 'Vantage', '5', '0.0', '164143', '1583448103']
2020-03-05 16:41:43,460 [Controller] [DEBUG] Timestamp: 164143
2020-03-05 16:41:43,461 [Controller] [INFO ] Updated data from Meteobridge
2020-03-05 16:41:43,462 [Controller] [INFO ] Updating Driver temperature - ST: 63.0, uom: 17
2020-03-05 16:41:43,464 [Controller] [INFO ] Updating Driver temperature - GV0: 18.9, uom: 17
2020-03-05 16:41:43,467 [Controller] [INFO ] Updating Driver temperature - GV1: 63.0, uom: 17
2020-03-05 16:41:43,470 [Controller] [INFO ] Updating Driver temperature - GV15: 64.8, uom: 17
2020-03-05 16:41:43,476 [Controller] [INFO ] Updating Driver temperature - GV16: 30.4, uom: 17
2020-03-05 16:41:43,479 [Controller] [INFO ] Updating Driver rain - ST: 0.0, uom: 24
2020-03-05 16:41:43,482 [Controller] [INFO ] Updating Driver rain - GV1: 0.0, uom: 105
2020-03-05 16:41:43,485 [Controller] [INFO ] Updating Driver rain - GV2: 0.0, uom: 105
2020-03-05 16:41:43,489 [Controller] [INFO ] Updating Driver rain - GV6: 0.0, uom: 105
2020-03-05 16:41:43,492 [Controller] [INFO ] Updating Driver rain - GV3: 0.0, uom: 105
2020-03-05 16:41:43,495 [Controller] [INFO ] Updating Driver rain - GV4: 4.73, uom: 105
2020-03-05 16:41:43,499 [Controller] [INFO ] Updating Driver wind - ST: 8.05, uom: 48
2020-03-05 16:41:43,502 [Controller] [INFO ] Updating Driver wind - GV0: 48.0, uom: 14
2020-03-05 16:41:43,504 [Controller] [INFO ] Updating Driver wind - GV1: 17.0, uom: 48
2020-03-05 16:41:43,507 [Controller] [INFO ] Updating Driver light - GV0: 0, uom: 74
2020-03-05 16:41:43,511 [Controller] [INFO ] Updating Driver light - ST: 0, uom: 71
2020-03-05 16:41:43,514 [Controller] [INFO ] Updating Driver light - GV2: 0.0, uom: 105
2020-03-05 16:41:43,517 [Controller] [INFO ] Updating Driver pressure - ST: 29.48, uom: 23
2020-03-05 16:41:43,520 [Controller] [INFO ] Updating Driver pressure - GV0: 30.17, uom: 23
2020-03-05 16:41:43,523 [Controller] [INFO ] Updating Driver pressure - GV1: 1.0, uom: 25
2020-03-05 16:41:43,526 [Controller] [INFO ] Updating Driver humidity - ST: 18.0, uom: 22
2020-03-05 16:41:43,529 [Controller] [INFO ] Updating Driver mbweather - GV1: 164143, uom: 0
2020-03-05 16:42:52,132 [Controller] [DEBUG] Received command {'value': '0', 'address': 'mbweather', 'query': {}, 'cmd': 'LOG_LEVEL', 'uom': '25'} in 'set_log_level'
2020-03-05 16:42:52,133 [Controller] [INFO ] Sending customData to Polyglot.
 

In this example, 281.0 should be the Solar Radiation value (W/m2).  I do not have uv radiation sensor.  Also, wanting to get et0 directly from vantage pro2.  Let me know what else I need to do to help.  Again, Thanks for all the node servers!!!!!!!!

Scott

 

Link to comment
Share on other sites

2 hours ago, scotnor said:

In this example, 281.0 should be the Solar Radiation value (W/m2).  I do not have uv radiation sensor.  Also, wanting to get et0 directly from vantage pro2.  Let me know what else I need to do to help.

 

So are you saying you have the Solar Radiation sensor, but not the UV sensor?

Link to comment
Share on other sites

I pushed v 1.2.1 to the store.  It tests for presence of UV and Solar data separately.  It should now display SolarRad and et0, and show UV as 0. 

My VP2+ has both sensors so I'm not able to test this configuration. Please let me know how it works.

Edited by glarsen
Link to comment
Share on other sites

53 minutes ago, scotnor said:


Yes. The UV sensor should be treated separately and should not invalidate solar or eto. Thanks


Sent from my iPhone using Tapatalk Pro

Didn't know anyone had one without the other, so there you go.  Anyway, the new version should address it.

Link to comment
Share on other sites

  • 2 weeks later...

@glarsen Any progress on adding the irrigation requirement calculation? Great job on this node server- an all local solution as long as forecast data isn't required.

Sent from my moto z3 using Tapatalk

Link to comment
Share on other sites

Hello Everyone, 

Been looking at this for a week and should be ready to poke holes.  I have six programs, 8 integer/float variables and one state variab


 
       

Variables:

        $Eto

        $Rain_Threshold
        $Water_Applied

        $Yesterdays_Water_Deficit

        $Rain_Yesterday

        $Irrigation_Requirement

        $Absorption_Factor_Percent

        $Crop_Coefficient_Percent

 

State Variable:

        $sRain_Today
 

           
           
           
           
           
           

First need to initialize some variables:

NS Irrigation Reset - [ID 007F][Parent 007D][Run At Startup]

If
   - No Conditions - (To add one, press 'Schedule' or 'Condition')
 
Then
        $Rain_Threshold  = 37
        $Rain_Threshold /= 100
        $Rain_Threshold Init To $Rain_Threshold
        $Water_Applied  = 25
        $Water_Applied /= 100
        $Water_Applied Init To $Water_Applied
 
Else
   - No Actions - (To add one, press 'Action')
 

Next we need to capture eto:

NS Eto Wrapup - [ID 009E][Parent 007D]

If
        Time is 11:59:58PM
 
Then
        $ETo  = 'MeteoBridge Weather / Illumination' Evapotranspiration Inches
        $ETo Init To $ETo
 
Else
   - No Actions - (To add one, press 'Action')

Catch 11-Midnight just in case:

NS Eto Wrapup Last Chance - [ID 009F][Parent 007D]

If
        Time is 12:02:00AM
    And 'MeteoBridge Weather / Illumination' Evapotranspiration > '$ETo Inches'
 
Then
        $ETo  = 'MeteoBridge Weather / Illumination' Evapotranspiration Inches
        $ETo Init To $ETo
 
Else
   - No Actions - (To add one, press 'Action')
 

Finalize Irrigation Requirement:

NS Rain Wrapup - [ID 007E][Parent 007D]

If
        Time is 12:03:00AM
 
Then
        $Rain_Yesterday  = 'MeteoBridge Weather / Precipitation' Rainfall Yesterday Inches
        $Rain_Yesterday *= $Absorption_Factor_Percent
        $Yesterdays_Water_Deficit  = $ETo
        $Yesterdays_Water_Deficit *= $Crop_Coefficient_Factor_Percent
        $Yesterdays_Water_Deficit -= $Rain_Yesterday
        $Yesterdays_Water_Deficit /= 100
        $Irrigation_Requirement += $Yesterdays_Water_Deficit
        $Irrigation_Requirement Init To $Irrigation_Requirement
        $Rain_Yesterday  = 'MeteoBridge Weather / Precipitation' Rainfall Yesterday Inches
 
Else
   - No Actions - (To add one, press 'Action')

 

Trigger Watering if needed:

NS Water If Needed - [ID 009C][Parent 007D]

If
        Time is  6:00:00AM
    And $Irrigation_Requirement > $Rain_Threshold
    And $sRain_Today < $Rain_Threshold
 
Then
        Run Program 'Irrigation Started' (Then Path)
 
Else
   - No Actions - (To add one, press 'Action')
 

 

Modification to Stations All Off:

 

Stations All Off - [ID 0055][Parent 0056][Not Enabled]

If
        'MeteoBridge Weather / Precipitation' Daily Rainfall > '$Rain_Threshold Inches'
 
Then
        $Manual_Currently_Running  = 0
        Stop program 'Station1 Timer'
        Stop program 'Station2 Timer'
        Stop program 'Station3 Timer'
        Stop program 'Station4 Timer'
        Stop program 'Station5 Timer'
        Stop program 'Station6 Timer'
        Stop program 'Station7 Timer'
        Stop program 'Station8 Timer'
        Set 'Back Yard / Rear Water' Off
        Set 'Back Yard / Tall Water' Off
        Set 'Back Yard / East Water' Off
        Set 'Front Yard / North Water' Off
        Set 'Front Yard / South Water' Off
        $Irrigation_Station  = 0
        Run Program 'Irrigation Finished' (Then Path)
        Disable Program 'Stations All Off'
 
Else
   - No Actions - (To add one, press 'Action')
 

 

What this does is use all local data from Davis VP2.   No forecast data is used.  If it starts raining, it can abort.  Irrigation requirement is initialized externally and is not range restricted yet. 

This is my simple first attempt.  Comments???

Scott

 

 

 

  • Like 1
Link to comment
Share on other sites

On 1/24/2020 at 10:53 AM, glarsen said:

If there are any other MB variables anyone is interested in, they can easily be added.

Using MeteoBridgeAuth and it is almost perfect for my needs.    I'm wondering if it would be possible to also provide cardinal wind direction as a string (i.e. N, NNW, NW, etc.   I have a couple of notifications that include wind information, but with the exit of the climate module I've had to update my programs and notifications.

I did test notifications using another node server with string values and I can definitely incorporate the string value via the sys.node.<address>.<value> format replacements.  I then began to study how to copy and modify the nodeserver myself... I figure one day I'll be at that level (but it will take awhile to get there).

Thanks for considering this.

 

 

Link to comment
Share on other sites

1 minute ago, glarsen said:

@MrBill I don't see why not.  You'll have to give me a few days though as I am otherwise engaged at the moment.

Thanks!   (definitely no worries on the time frame, including that information in the notifications is more important to me when I'm away than when I can look out the window... and with the current state of affairs away isn't soon!)

  • Haha 1
Link to comment
Share on other sites

1 hour ago, MrBill said:

Thanks!   (definitely no worries on the time frame, including that information in the notifications is more important to me when I'm away than when I can look out the window... and with the current state of affairs away isn't soon!)

Actually turned out that most of the code I needed was already there, so it only took a minute to add.  Version 1.2.2 has been pushed and should be available when the store does the next update.

Link to comment
Share on other sites

8 minutes ago, glarsen said:

Actually turned out that most of the code I needed was already there, so it only took a minute to add.  Version 1.2.2 has been pushed and should be available when the store does the next update.

THANKS!!!   The store already updated and I've already installed it.   This is fantastic,  the last item from climate module retirement changes will be off my list shortly as soon as I update the notification replacements.   

  • Like 1
Link to comment
Share on other sites

@glarsen  Sorry to be a pest but I think somethings wrong....wind.png.b7c6f9898337dddf9430641bf22cf335.png

virtually no wind right now.  In fact since the screenshot was made its now showing 0 MPH,  but gust speed is 276, and direction is wrong.  The Davis console is showing SSW as the last wind direction.  I don't think Wind has not been out of the N all day.

 

 

Link to comment
Share on other sites

@MrBill I think because of the profile change you need to delete/add the nodeserver, not just restart it.  Just add it back in the same slot it was in any programs you have dependent on it will be fine.  Be sure to restart your AC as well after you reinstall the NS

Edited by glarsen
Link to comment
Share on other sites

@glarsen, Deleted and re-installed twice both with the admin console closed.   (the second time I completely deleted and re-installed the file from the store, the first time i skipped re-downloading.)

Other values are reporting zero in the admin console. 

Barometric Pressure: 0,0,falling

Humidity 0%

Illumination: 0, 0,0

precipitation: Monthly and yearly may be accurate althought its hard to tell about the other zero's (no rain yesterday or today)

Temperature node appears to be correct. 73, 59.2, 73, 73.4, 54,7

Wind 0,0,0, N

Actual from the meteobridge interface:

image.png.d3cd01c7ffa3fa89d5fa64c3326a5323.png

 

  

 

 

Edited by MrBill
Link to comment
Share on other sites

Guest
This topic is now closed to further replies.

×
×
  • Create New...