interceptWH2600 - WH2600 Weather Station Interceptor

In this subforum you can show projects you have made, or you are busy with. Please create your own topic.

Moderator: leecollings

Doudy
Posts: 246
Joined: Tuesday 09 August 2016 9:09
Target OS: -
Domoticz version:
Contact:

Re: interceptWH2600 - WH2600 Weather Station Interceptor

Post by Doudy »

Hello,
I'm still here.
I tried to start interceptWH2600.py via the interceptWH2600.sh script.
The script works but interceptWH2600.py does not start.

Code: Select all

pi@RASPBERRYPI-182:~/interceptWH2600 $ sudo /etc/init.d/interceptWH2600.sh start
[ ok ] Starting interceptWH2600.sh (via systemctl): interceptWH2600.service.
pi@RASPBERRYPI-182:~/interceptWH2600 $ /etc/init.d/interceptWH2600.sh status
● interceptWH2600.service - LSB: Intercept weather data from your WH2600 Weather Station
   Loaded: loaded (/etc/init.d/interceptWH2600.sh)
   Active: active (exited) since sam 2017-11-11 11:37:47 CET; 4s ago
  Process: 11875 ExecStop=/etc/init.d/interceptWH2600.sh stop (code=exited, status=0/SUCCESS)
  Process: 11961 ExecStart=/etc/init.d/interceptWH2600.sh start (code=exited, status=0/SUCCESS)
I followed the wiki procedure
sudo cp /home/pi/interceptWH2600/interceptWH2600.sh /etc/init.d
sudo chmod 0755 /etc/init.d/interceptWH2600.sh
sudo systemctl daemon-reload
sudo /etc/init.d/interceptWH2600.sh start

start-stop-daemon line :

Code: Select all

start-stop-daemon --start --background --pidfile $PIDFILE --make-pidfile --name $daemon_NAME --quiet --chuid $DAEMONUSER --startas $DAEMON 
The script .sh

Code: Select all

#!/bin/sh

### BEGIN INIT INFO
# Provides:          interceptWH2600
# Required-Start:    $remote_fs $syslog
# Required-Stop:     $remote_fs $syslog
# Default-Start:     2 3 4 5
# Default-Stop:      0 1 6
# Short-Description: Intercept weather data from your WH2600 Weather Station
# Description:       Intercept weather data from your WH2600 Weather Station
### END INIT INFO

# Change the next 3 lines to suit where you install your script and what you want to call it
DIR=/home/pi/interceptWH2600
DAEMON=$DIR/interceptWH2600.py
DAEMON_NAME=interceptWH2600
DAEMON_OPTS=""
LOG=/home/pi/interceptWH2600/interceptWH2600.log
PATH=$PATH:/sbin:/bin:/usr/sbin:/usr/bin

. /lib/lsb/init-functions

# This next line determines what user the script runs as.
# Root generally not recommended but necessary if you are using the Raspberry Pi GPIO from Python.
DAEMON_USER=pi

# The process ID of the script when it runs is stored here:
PIDFILE=/var/run/$DAEMON_NAME.pid

do_start () {
    log_daemon_msg "Starting system $DAEMON_NAME daemon"
	start-stop-daemon --start --background --pidfile $PIDFILE --make-pidfile --name $daemon_NAME --quiet --chuid $DAEMONUSER --startas $DAEMON -- $DAEMON_OPTS

$DAEMON_OPTS
    log_end_msg $?
}

do_stop () {
    log_daemon_msg "Stopping system $DAEMON_NAME daemon"
    start-stop-daemon --stop --pidfile $PIDFILE --retry 10
    log_end_msg $?
}

case "$1" in
    start|stop)
        #do_${1}
        ;;
    stop)
		do_stop
        #do_${1}
        ;;
    restart|reload|force-reload)
        do_stop
        do_start
        ;;
    status)
        status_of_proc "$DAEMON_NAME" "$DAEMON" && exit 0 || exit $?
        ;;

    *)
        echo "Usage: /etc/init.d/$DAEMON_NAME {start|stop|restart|status}"
        exit 1
        ;;

esac

exit 0
An idea ?
:?: :idea:
RaspberryPi - RFLink - Zwave - WH2600
Domoticz : 2020.2 | Dashticz : V3.12 Master | dzvents : 3.0.2 | Python : 3.7.3
BakSeeDaa
Posts: 485
Joined: Thursday 17 September 2015 10:13
Target OS: Raspberry Pi / ODroid
Domoticz version:

Re: interceptWH2600 - WH2600 Weather Station Interceptor

Post by BakSeeDaa »

Doudy wrote: Monday 06 November 2017 17:21 It's a way of seeing things.
I would prefer live variations.

;)
That can easily be done by modifying the script to suit your needs.
BakSeeDaa
Posts: 485
Joined: Thursday 17 September 2015 10:13
Target OS: Raspberry Pi / ODroid
Domoticz version:

Re: interceptWH2600 - WH2600 Weather Station Interceptor

Post by BakSeeDaa »

Doudy wrote: Saturday 11 November 2017 11:57 Hello,
I'm still here.
I tried to start interceptWH2600.py via the interceptWH2600.sh script.
The script works but interceptWH2600.py does not start.

Code: Select all

pi@RASPBERRYPI-182:~/interceptWH2600 $ sudo /etc/init.d/interceptWH2600.sh start
[ ok ] Starting interceptWH2600.sh (via systemctl): interceptWH2600.service.
pi@RASPBERRYPI-182:~/interceptWH2600 $ /etc/init.d/interceptWH2600.sh status
● interceptWH2600.service - LSB: Intercept weather data from your WH2600 Weather Station
   Loaded: loaded (/etc/init.d/interceptWH2600.sh)
   Active: active (exited) since sam 2017-11-11 11:37:47 CET; 4s ago
  Process: 11875 ExecStop=/etc/init.d/interceptWH2600.sh stop (code=exited, status=0/SUCCESS)
  Process: 11961 ExecStart=/etc/init.d/interceptWH2600.sh start (code=exited, status=0/SUCCESS)
I followed the wiki procedure
sudo cp /home/pi/interceptWH2600/interceptWH2600.sh /etc/init.d
sudo chmod 0755 /etc/init.d/interceptWH2600.sh
sudo systemctl daemon-reload
sudo /etc/init.d/interceptWH2600.sh start

start-stop-daemon line :

Code: Select all

start-stop-daemon --start --background --pidfile $PIDFILE --make-pidfile --name $daemon_NAME --quiet --chuid $DAEMONUSER --startas $DAEMON 
The script .sh

Code: Select all

#!/bin/sh

### BEGIN INIT INFO
# Provides:          interceptWH2600
# Required-Start:    $remote_fs $syslog
# Required-Stop:     $remote_fs $syslog
# Default-Start:     2 3 4 5
# Default-Stop:      0 1 6
# Short-Description: Intercept weather data from your WH2600 Weather Station
# Description:       Intercept weather data from your WH2600 Weather Station
### END INIT INFO

# Change the next 3 lines to suit where you install your script and what you want to call it
DIR=/home/pi/interceptWH2600
DAEMON=$DIR/interceptWH2600.py
DAEMON_NAME=interceptWH2600
DAEMON_OPTS=""
LOG=/home/pi/interceptWH2600/interceptWH2600.log
PATH=$PATH:/sbin:/bin:/usr/sbin:/usr/bin

. /lib/lsb/init-functions

# This next line determines what user the script runs as.
# Root generally not recommended but necessary if you are using the Raspberry Pi GPIO from Python.
DAEMON_USER=pi

# The process ID of the script when it runs is stored here:
PIDFILE=/var/run/$DAEMON_NAME.pid

do_start () {
    log_daemon_msg "Starting system $DAEMON_NAME daemon"
	start-stop-daemon --start --background --pidfile $PIDFILE --make-pidfile --name $daemon_NAME --quiet --chuid $DAEMONUSER --startas $DAEMON -- $DAEMON_OPTS

$DAEMON_OPTS
    log_end_msg $?
}

do_stop () {
    log_daemon_msg "Stopping system $DAEMON_NAME daemon"
    start-stop-daemon --stop --pidfile $PIDFILE --retry 10
    log_end_msg $?
}

case "$1" in
    start|stop)
        #do_${1}
        ;;
    stop)
		do_stop
        #do_${1}
        ;;
    restart|reload|force-reload)
        do_stop
        do_start
        ;;
    status)
        status_of_proc "$DAEMON_NAME" "$DAEMON" && exit 0 || exit $?
        ;;

    *)
        echo "Usage: /etc/init.d/$DAEMON_NAME {start|stop|restart|status}"
        exit 1
        ;;

esac

exit 0
An idea ?
:?: :idea:
Hello!

I can't say because I don't see any error messages.

Try running the following from the command line:

Code: Select all

/home/pi/interceptWH2600/interceptWH2600.py -v -d
Does it generate any error messages?
Doudy
Posts: 246
Joined: Tuesday 09 August 2016 9:09
Target OS: -
Domoticz version:
Contact:

Re: interceptWH2600 - WH2600 Weather Station Interceptor

Post by Doudy »

The messages is :

Code: Select all

-bash: /home/pi/interceptWH2600/interceptWH2600.py : /usr/bin/^M : mauvais interpréteur: Aucun fichier ou dossier de ce type
in english :
wrong interpreter: No file or file of this type
RaspberryPi - RFLink - Zwave - WH2600
Domoticz : 2020.2 | Dashticz : V3.12 Master | dzvents : 3.0.2 | Python : 3.7.3
Doudy
Posts: 246
Joined: Tuesday 09 August 2016 9:09
Target OS: -
Domoticz version:
Contact:

Re: interceptWH2600 - WH2600 Weather Station Interceptor

Post by Doudy »

BakSeeDaa wrote: Saturday 11 November 2017 12:18 That can easily be done by modifying the script to suit your needs.
Ok but how?
I am very very beginner ...
:oops: ;)
RaspberryPi - RFLink - Zwave - WH2600
Domoticz : 2020.2 | Dashticz : V3.12 Master | dzvents : 3.0.2 | Python : 3.7.3
BakSeeDaa
Posts: 485
Joined: Thursday 17 September 2015 10:13
Target OS: Raspberry Pi / ODroid
Domoticz version:

Re: interceptWH2600 - WH2600 Weather Station Interceptor

Post by BakSeeDaa »

Doudy wrote: Saturday 11 November 2017 13:27 The messages is :

Code: Select all

-bash: /home/pi/interceptWH2600/interceptWH2600.py : /usr/bin/^M : mauvais interpréteur: Aucun fichier ou dossier de ce type
in english :
wrong interpreter: No file or file of this type
I assume that you have followed the installation instruction carefully and while doing that didn't receive any error messages
Do you have python installed?

Check version with

Code: Select all

/usr/bin/python -V
If you don't have python installed, you must install it.

Check that the file /home/pi/interceptWH2600/interceptWH2600.py exists.

Code: Select all

ls -la /home/pi/interceptWH2600/interceptWH2600.py
When python is installed and the /home/pi/interceptWH2600/interceptWH2600.py file exists, please try this command:

Code: Select all

/usr/bin/python /home/pi/interceptWH2600/interceptWH2600.py -v -d
Last edited by BakSeeDaa on Friday 23 February 2018 9:18, edited 1 time in total.
BakSeeDaa
Posts: 485
Joined: Thursday 17 September 2015 10:13
Target OS: Raspberry Pi / ODroid
Domoticz version:

Re: interceptWH2600 - WH2600 Weather Station Interceptor

Post by BakSeeDaa »

Doudy wrote: Saturday 11 November 2017 15:52
BakSeeDaa wrote: Saturday 11 November 2017 12:18 That can easily be done by modifying the script to suit your needs.
Ok but how?
I am very very beginner ...
:oops: ;)
I can't see how a very momentary wind direction is useful for Home Automation. Here, the wind direction will change from one second to another. Swinging in any direction +- 90 degrees is not uncommon. The script normally takes care using a function to calculate the wind vector from time series of wind
speeds and directions.

Anyway if you'd like to change it, edit the configuration file and set "windDirSmoothenizer" to false.
Doudy
Posts: 246
Joined: Tuesday 09 August 2016 9:09
Target OS: -
Domoticz version:
Contact:

Re: interceptWH2600 - WH2600 Weather Station Interceptor

Post by Doudy »

BakSeeDaa wrote: Sunday 12 November 2017 10:12 Do you have python installed?
pi@RASPBERRYPI-182:~/interceptWH2600 $ /usr/bin/python -V
Python 2.7.9
Check version with

Code: Select all

/usr/bin/python -V
If you don't have python installed, you must install it.
Installed
Check that the file /home/pi/interceptWH2600/interceptWH2600.py exists.

Code: Select all

ls -la /home/pi/interceptWH2600/interceptWH2600.py
pi@RASPBERRYPI-182:~/interceptWH2600 $ ls -la /home/pi/interceptWH2600/interceptWH2600.py
-rwxrwxrwx 1 pi pi 22858 nov 12 10:59 /home/pi/interceptWH2600/interceptWH2600.py
When python is installed and the /home/pi/interceptWH2600/interceptWH2600.py file exists, please try this command:

Code: Select all

/usr/bin/python /home/pi/interceptWH2600/interceptWH2600.py -v -d

pi@RASPBERRYPI-182:~/interceptWH2600 $ /usr/bin/python /home/pi/interceptWH2600/interceptWH2600.py -v -d
Debug is on
WH2600 Interceptor 1.0.3 listening for PWS on port 8084. Running on TTY console...
Received data for station ID : IATH46
windchillf 41.4
rainin 0.0
dailyrainin 0.32
monthlyrainin 1.12
solarradiation 82.77
realtime 1
windspeedmph 4.7
baromin 29.48
rtfreq 12
lowbatt 0
windgustmph 4.92
tempf 44.1
indoorhumidity 49
winddir 254
dewptf 40.5
PASSWORD te5f9tza
ID IATH46
dateutc 2017-11-12 11:25:19
softwaretype WH2600 Interceptor V. 1.0.3
yearlyrainin 5.46
UV 1
humidity 87
action updateraw
weeklyrainin 0.77
indoortempf 70.2

Latest wind speed reading: 254
'windDirSmoothenizer' is active. Resultant of the last 4 wind direction readings (Reported to WU) : 254
array [254, 254, 254, 254]

Checking if Domoticz devices needs to be updated...
Updating the Domoticz Indoor Temp + Humidity device to 21.2 ; 49
Updating the Domoticz Outdoor Temp + Humidity device to 6.7 ; 87
Updating the Domoticz Barometer device to 998.0
Updating the Domoticz UV device to 1
Updating the Domoticz Solar Radiation device to 82
{'windchillf': 41.4, 'rainin': 0.0, 'winddir_avg10m': 254, 'windspdmph_avg2m': 4.7, 'windgustmph_2m': 4.92, 'dailyrainin': 0.32, 'monthlyrainin': 1.12, 'solarradiation': 82.77, 'realtime': 1, 'windspeedmph': 4.7, 'baromin': 29.48, 'rtfreq': 12, 'winddir_avg2m': 254, 'lowbatt': 0, 'windgustmph': 4.92, 'tempf': 44.1, 'indoorhumidity': 49, 'windspdmph_avg10m': 4.7, 'winddir': 254, 'dewptf': 40.5, 'PASSWORD': 'xxxxxx', 'ID': 'IATH46', 'dateutc': '2017-11-12 11:25:19', 'softwaretype': 'WH2600 Interceptor V. 1.0.3', 'windgustmph_10m': 4.92, 'yearlyrainin': 5.46, 'UV': 1, 'humidity': 87, 'action': 'updateraw', 'weeklyrainin': 0.77, 'indoortempf': 70.2}
success

https://rtupdate.wunderground.com/weath ... tempf=70.2
Received data for station ID : IATH46
windchillf 41.4
rainin 0.0
dailyrainin 0.32
monthlyrainin 1.12
solarradiation 82.77
realtime 1
windspeedmph 4.7
baromin 29.49
rtfreq 12
lowbatt 0
windgustmph 4.92
tempf 44.1
indoorhumidity 49
winddir 254
dewptf 40.5
PASSWORD te5f9tza
ID IATH46
dateutc 2017-11-12 11:25:28
softwaretype WH2600 Interceptor V. 1.0.3
yearlyrainin 5.46
UV 1
humidity 87
action updateraw
weeklyrainin 0.77
indoortempf 70.2
Past 2 minutes resultant wind direction: 254
Past 10 minutes resultant wind direction: 254
Past 2 minutes average wind speed: 2.1
Past 10 minutes average wind speed: 2.1
Past 2 minutes maximum wind gust speed: 2.2
Past 10 minutes maximum wind gust speed: 2.2
[254, 254, 254, 254, 254, 254, 254, 254, 254, 254, 254, 254, 254, 254, 254, 254, 254, 254, 254, 254, 254, 254, 254, 254, 254, 254, 254, 254, 254, 254, 254, 254, 254, 254, 254, 254, 254, 254, 254, 254, 254, 254, 254, 254, 254, 254, 254, 254, 254, 254, 254, 254, 254, 254, 254, 254, 254, 254, 254, 254]
[2.1, 2.1, 2.1, 2.1, 2.1, 2.1, 2.1, 2.1, 2.1, 2.1, 2.1, 2.1, 2.1, 2.1, 2.1, 2.1, 2.1, 2.1, 2.1, 2.1, 2.1, 2.1, 2.1, 2.1, 2.1, 2.1, 2.1, 2.1, 2.1, 2.1, 2.1, 2.1, 2.1, 2.1, 2.1, 2.1, 2.1, 2.1, 2.1, 2.1, 2.1, 2.1, 2.1, 2.1, 2.1, 2.1, 2.1, 2.1, 2.1, 2.1, 2.1, 2.1, 2.1, 2.1, 2.1, 2.1, 2.1, 2.1, 2.1, 2.1]
[2.2, 2.2, 2.2, 2.2, 2.2, 2.2, 2.2, 2.2, 2.2, 2.2, 2.2, 2.2, 2.2, 2.2, 2.2, 2.2, 2.2, 2.2, 2.2, 2.2, 2.2, 2.2, 2.2, 2.2, 2.2, 2.2, 2.2, 2.2, 2.2, 2.2, 2.2, 2.2, 2.2, 2.2, 2.2, 2.2, 2.2, 2.2, 2.2, 2.2, 2.2, 2.2, 2.2, 2.2, 2.2, 2.2, 2.2, 2.2, 2.2, 2.2, 2.2, 2.2, 2.2, 2.2, 2.2, 2.2, 2.2, 2.2, 2.2, 2.2]

Latest wind speed reading: 254
'windDirSmoothenizer' is active. Resultant of the last 4 wind direction readings (Reported to WU) : 254
array [254, 254, 254, 254]

success

https://rtupdate.wunderground.com/weath ... tempf=70.2
^C^C received, shutting down the web server

;)
RaspberryPi - RFLink - Zwave - WH2600
Domoticz : 2020.2 | Dashticz : V3.12 Master | dzvents : 3.0.2 | Python : 3.7.3
Doudy
Posts: 246
Joined: Tuesday 09 August 2016 9:09
Target OS: -
Domoticz version:
Contact:

Re: interceptWH2600 - WH2600 Weather Station Interceptor

Post by Doudy »

BakSeeDaa wrote: Sunday 12 November 2017 10:24 Anyway if you'd like to change it, edit the configuration file and set "windDirSmoothenizer" to false.
It is rather the speed in live that I want to display!
8-)

Thanks
;)
Last edited by Doudy on Sunday 12 November 2017 11:46, edited 1 time in total.
RaspberryPi - RFLink - Zwave - WH2600
Domoticz : 2020.2 | Dashticz : V3.12 Master | dzvents : 3.0.2 | Python : 3.7.3
Doudy
Posts: 246
Joined: Tuesday 09 August 2016 9:09
Target OS: -
Domoticz version:
Contact:

Re: interceptWH2600 - WH2600 Weather Station Interceptor

Post by Doudy »

hello,
a small note

there is
Latest wind speed reading: 254
it is necessary
Latest wind direction reading: 254
;)
RaspberryPi - RFLink - Zwave - WH2600
Domoticz : 2020.2 | Dashticz : V3.12 Master | dzvents : 3.0.2 | Python : 3.7.3
BakSeeDaa
Posts: 485
Joined: Thursday 17 September 2015 10:13
Target OS: Raspberry Pi / ODroid
Domoticz version:

Re: interceptWH2600 - WH2600 Weather Station Interceptor

Post by BakSeeDaa »

Doudy wrote: Sunday 12 November 2017 11:43 hello,
a small note

there is
Latest wind speed reading: 254
it is necessary
Latest wind direction reading: 254
;)
Thanks. I will correct that.
Doudy
Posts: 246
Joined: Tuesday 09 August 2016 9:09
Target OS: -
Domoticz version:
Contact:

Re: interceptWH2600 - WH2600 Weather Station Interceptor

Post by Doudy »

BakSeeDaa wrote: Sunday 12 November 2017 10:24 Anyway if you'd like to change it, edit the configuration file and set "windDirSmoothenizer" to false.
I do not see any change when displaying.

I would like to arrive at the same thing as on the WU website.

;)
RaspberryPi - RFLink - Zwave - WH2600
Domoticz : 2020.2 | Dashticz : V3.12 Master | dzvents : 3.0.2 | Python : 3.7.3
BakSeeDaa
Posts: 485
Joined: Thursday 17 September 2015 10:13
Target OS: Raspberry Pi / ODroid
Domoticz version:

Re: interceptWH2600 - WH2600 Weather Station Interceptor

Post by BakSeeDaa »

Doudy wrote: Wednesday 15 November 2017 8:50
BakSeeDaa wrote: Sunday 12 November 2017 10:24 Anyway if you'd like to change it, edit the configuration file and set "windDirSmoothenizer" to false.
I do not see any change when displaying.

I would like to arrive at the same thing as on the WU website.

;)
I don't know what's on display at the WU underground web site. You can have a look at the PWS Upload Protocol to get an idea about what data is getting sent.

If you'd like to update your Domoticz device with instantaneous wind data, locate the following code and remove all occurances of the text '_avg10m', so that winddir_avg10m becomes winddir etc. Make sure your substitution only affects the code shown below.

Code: Select all

	# Updating the 'Wind' device. No need to check the current value, it's likely to be different anyway
	elif domoDevice['categoryName'] == 'Wind' and domoDevice['domoticzSensorType'] == 86:
		# First build the data string
		dataString = str(jsonQs['winddir_avg10m'])
		dataString += ';' + str(degToCompass(jsonQs['winddir_avg10m']))
		dataString += ';' + str(round(ms(jsonQs['windspdmph_avg10m']) * 10 , 0))
		dataString += ';' + str(round(ms(jsonQs['windgustmph_10m']) * 10 , 0))
		dataString += ';' + str(round(temp_c(jsonQs['tempf']), 1))
		dataString += ';' + str(round(wind_chill(temp_c(jsonQs['tempf']), jsonQs['windspdmph_avg10m']), 1))
		if isDebug: print 'Wind data string: ', dataString # E.g. '4;N;30.0;44.0;-6.6;-14.3'
		if isVerbose: print 'Updating the Domoticz Wind device to', dataString
		payload = dict([('type', 'command'), ('param', 'udevice'), ('idx', domoDevice['domoticzIdx']), \
				('nvalue', 0), ('svalue', dataString)])
		r = domoticzAPI(payload)
You never answered me before when I asked you, I'm so curious to know how instantaneous wind data can be used for home automation. I mean, one second the wind comes from south with a speed of 3 m/s. Maybe 10 seconds after that the wind comes from west but 0.1 m/s and maybe another 10 seconds followed by wind from north east at the speed of 3 m/s. For me, that's all random data that says nothing really.

Good luck!
Doudy
Posts: 246
Joined: Tuesday 09 August 2016 9:09
Target OS: -
Domoticz version:
Contact:

Re: interceptWH2600 - WH2600 Weather Station Interceptor

Post by Doudy »

Thank you for your help, I will test your suggestion.
BakSeeDaa wrote: Wednesday 15 November 2017 9:17 You never answered me before when I asked you, I'm so curious to know how instantaneous wind data can be used for home automation. I mean, one second the wind comes from south with a speed of 3 m/s. Maybe 10 seconds after that the wind comes from west but 0.1 m/s and maybe another 10 seconds followed by wind from north east at the speed of 3 m/s. For me, that's all random data that says nothing really.
Good luck!
For now I do not really use it to integrate Domoticz.

It's just to see the wind speed and its live direction. Like on the Wunderground website.

;)
RaspberryPi - RFLink - Zwave - WH2600
Domoticz : 2020.2 | Dashticz : V3.12 Master | dzvents : 3.0.2 | Python : 3.7.3
Doudy
Posts: 246
Joined: Tuesday 09 August 2016 9:09
Target OS: -
Domoticz version:
Contact:

Re: interceptWH2600 - WH2600 Weather Station Interceptor

Post by Doudy »

BakSeeDaa wrote: Wednesday 15 November 2017 9:17 If you'd like to update your Domoticz device with instantaneous wind data, locate the following code and remove all occurances of the text '_avg10m', so that winddir_avg10m becomes winddir etc. Make sure your substitution only affects the code shown below.

It works properly.
Display at the same speed as wunderground, even a little before.
:)

I also modified:
windspdmph_avg10m => windspeedmph
windgustmph_10m => windgustmph

Code: Select all

UPDATE_INTERV = 1 # Expected Weather Station report Interval in seconds
UPDATE_DOMO_INTERV = 1 # Weather Station report Interval that Domoticz will by updated by
Code :

Code: Select all

	# Updating the 'Wind' device. No need to check the current value, it's likely to be different anyway
	elif domoDevice['categoryName'] == 'Wind' and domoDevice['domoticzSensorType'] == 86:
		# First build the data string
		dataString = str(jsonQs['winddir'])
		dataString += ';' + str(degToCompass(jsonQs['winddir']))
		dataString += ';' + str(round(ms(jsonQs['windspeedmph']) * 10 , 0))
		dataString += ';' + str(round(ms(jsonQs['windgustmph']) * 10 , 0))
		dataString += ';' + str(round(temp_c(jsonQs['tempf']), 1))
		dataString += ';' + str(round(wind_chill(temp_c(jsonQs['tempf']), jsonQs['windspeedmph']), 1))
		if isDebug: print 'Wind data string: ', dataString # E.g. '4;N;30.0;44.0;-6.6;-14.3'
		if isVerbose: print 'Updating the Domoticz Wind device to', dataString
		payload = dict([('type', 'command'), ('param', 'udevice'), ('idx', domoDevice['domoticzIdx']), \
				('nvalue', 0), ('svalue', dataString)])
		r = domoticzAPI(payload)
;)
RaspberryPi - RFLink - Zwave - WH2600
Domoticz : 2020.2 | Dashticz : V3.12 Master | dzvents : 3.0.2 | Python : 3.7.3
Doudy
Posts: 246
Joined: Tuesday 09 August 2016 9:09
Target OS: -
Domoticz version:
Contact:

Re: interceptWH2600 - WH2600 Weather Station Interceptor

Post by Doudy »

Hello,
I'm still here.
About my post from 11/11/2017.
I tried to start interceptWH2600.py via the interceptWH2600.sh script.
The script works but interceptWH2600.py does not start.
When i start the service manualy :

Code: Select all

sudo /etc/init.d/interceptWH2600.sh start
I have the following message :

Code: Select all

pi@RASPBERRYPI-182:~/interceptWH2600 $ sudo sh interceptWH2600.sh start
[ ok ] Starting system interceptWH2600 daemon:.
But, interceptWH2600.py don't working
I have no update at wunderground and domoticz
But, when i strat following :

Code: Select all

sudo python /home/pi/interceptWH2600/interceptWH2600.py
Updates are working normally !

Code: Select all

WU message :

Current Conditions Station reported 6 seconds ago
...
:!: an idea :?:
;) :idea: ;)
RaspberryPi - RFLink - Zwave - WH2600
Domoticz : 2020.2 | Dashticz : V3.12 Master | dzvents : 3.0.2 | Python : 3.7.3
BakSeeDaa
Posts: 485
Joined: Thursday 17 September 2015 10:13
Target OS: Raspberry Pi / ODroid
Domoticz version:

Re: interceptWH2600 - WH2600 Weather Station Interceptor

Post by BakSeeDaa »

Doudy wrote: Tuesday 21 November 2017 9:03 ...
But, interceptWH2600.py don't working
...
You mentioned the following in an earlier post
Doudy wrote: Saturday 04 November 2017 9:36 Remark

in wiki there is

Code: Select all

sudo update-rc.d /etc/init.d/interceptWH2600.sh defaults
il is

Code: Select all

sudo update-rc.d interceptWH2600.sh defaults
;)
That seems to be correct and the Wiki has been updated. Strange that no one else noticed that. Thanks for letting me know.

I will investigate further.
BakSeeDaa
Posts: 485
Joined: Thursday 17 September 2015 10:13
Target OS: Raspberry Pi / ODroid
Domoticz version:

Re: interceptWH2600 - WH2600 Weather Station Interceptor

Post by BakSeeDaa »

Doudy wrote: Tuesday 21 November 2017 9:03 :idea:
First please run the following command and let me know the results:

Code: Select all

ls -la /home/pi/interceptWH2600/interceptWH2600.py
Then please run the following commands:

Code: Select all

sudo chmod 755 /home/pi/interceptWH2600/interceptWH2600.py

Code: Select all

sudo /etc/init.d/interceptWH2600.sh start
Then run this and let me know the results:

Code: Select all

pgrep -x "interceptWH2600"
Doudy
Posts: 246
Joined: Tuesday 09 August 2016 9:09
Target OS: -
Domoticz version:
Contact:

Re: interceptWH2600 - WH2600 Weather Station Interceptor

Post by Doudy »

Here is the result :

Code: Select all

pi@RASPBERRYPI-182:~ $ ls -la /home/pi/interceptWH2600/interceptWH2600.py
-rwxrwxrwx 1 pi pi 21073 nov 16 09:10 /home/pi/interceptWH2600/interceptWH2600.py

Code: Select all

pi@RASPBERRYPI-182:~ $ sudo chmod 755 /home/pi/interceptWH2600/interceptWH2600.py

Code: Select all

pi@RASPBERRYPI-182:~ $ ls -la /home/pi/interceptWH2600/interceptWH2600.py
-rwxr-xr-x 1 pi pi 21073 nov 16 09:10 /home/pi/interceptWH2600/interceptWH2600.py

Code: Select all

pi@RASPBERRYPI-182:~ $ sudo /etc/init.d/interceptWH2600.sh start
[ ok ] Starting interceptWH2600.sh (via systemctl): interceptWH2600.service.

Code: Select all

pi@RASPBERRYPI-182:~ $ pgrep -x "interceptWH2600"
pgrep ==> Display nothing

;)
Thanks for your help
RaspberryPi - RFLink - Zwave - WH2600
Domoticz : 2020.2 | Dashticz : V3.12 Master | dzvents : 3.0.2 | Python : 3.7.3
BakSeeDaa
Posts: 485
Joined: Thursday 17 September 2015 10:13
Target OS: Raspberry Pi / ODroid
Domoticz version:

Re: interceptWH2600 - WH2600 Weather Station Interceptor

Post by BakSeeDaa »

Doudy wrote: Tuesday 21 November 2017 11:43 Here is the result :
...
pgrep ==> Display nothing

;)
Thanks for your help
Hmm... there seems to be ^M characters in the python script. But how did they get there in such case?

Might it be so that you have altered the python script file using a MSDOS/Windows editor? That will destroy the script file.

Download a new python script file by doing an upgrade.

After that do not open the file again with a MSDOS/Windows editor. And if You do that accidentally, don't save the file.
Last edited by BakSeeDaa on Friday 23 February 2018 9:17, edited 1 time in total.
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest