Lightning and Domoticz

Subforum for general discussions. Do not dump your questions/problems here, but try to find the subforum where it belongs!
SweetPants
Posts: 2058
Joined: Friday 12 July 2013 21:24
Target OS: Linux
Domoticz version: V3.9639
Location: The Netherlands
Contact:

Re: Lightning and Domoticz

Post by SweetPants » Thursday 07 September 2017 12:31

DutchHans wrote:
Wednesday 06 September 2017 22:18
Confirmed..
Regards, Hans

Edit:
Working again
Thanks
Ubuntu 16.04.3 LTS, Intel NUC, MySensors 2.3.0-alpha, Pro Mini 3.3/8M RFM69(HW), ESP8266 (SDK2.2.0), Sonoff, RFLink, RFXcom, MQTT, NodeRed, Domoticz Beta (source)

SweetPants
Posts: 2058
Joined: Friday 12 July 2013 21:24
Target OS: Linux
Domoticz version: V3.9639
Location: The Netherlands
Contact:

Re: Lightning and Domoticz

Post by SweetPants » Thursday 28 September 2017 21:54

http://www.onweeractueel.nl/domoticz_bo.json returns 'null' again

Edit: and fixed again as of 10:00 AM
Ubuntu 16.04.3 LTS, Intel NUC, MySensors 2.3.0-alpha, Pro Mini 3.3/8M RFM69(HW), ESP8266 (SDK2.2.0), Sonoff, RFLink, RFXcom, MQTT, NodeRed, Domoticz Beta (source)

User avatar
EdwinK
Posts: 1181
Joined: Sunday 22 January 2017 22:46
Target OS: Raspberry Pi
Domoticz version: BETA
Location: Rhoon
Contact:

Re: Lightning and Domoticz

Post by EdwinK » Thursday 23 November 2017 22:37

And 'nill' again I just noticed
Running latest BETA on a Pi-3 | Toon Thermostat | RFxcom | Dashticz V2 |

User avatar
phoenixblue
Posts: 75
Joined: Friday 25 November 2016 12:20
Target OS: Raspberry Pi
Domoticz version: 3.7392
Contact:

Re: Lightning and Domoticz

Post by phoenixblue » Friday 24 November 2017 21:56

What time do you have received that value?
scripts on github: Link

User avatar
EdwinK
Posts: 1181
Joined: Sunday 22 January 2017 22:46
Target OS: Raspberry Pi
Domoticz version: BETA
Location: Rhoon
Contact:

Re: Lightning and Domoticz

Post by EdwinK » Friday 24 November 2017 22:53

phoenixblue wrote:
Friday 24 November 2017 21:56
What time do you have received that value?


Sometime yesterday. Can't remember now
Running latest BETA on a Pi-3 | Toon Thermostat | RFxcom | Dashticz V2 |

User avatar
EdwinK
Posts: 1181
Joined: Sunday 22 January 2017 22:46
Target OS: Raspberry Pi
Domoticz version: BETA
Location: Rhoon
Contact:

Re: Lightning and Domoticz

Post by EdwinK » Sunday 10 December 2017 11:10

Today again I got a strange reading
x2017-12-09 22:00:00 1
2017-12-09 23:00:00 18446744073709552000
2017-12-10 00:00:00 0
Last edited by EdwinK on Friday 20 April 2018 22:30, edited 1 time in total.
Running latest BETA on a Pi-3 | Toon Thermostat | RFxcom | Dashticz V2 |

User avatar
Derik
Posts: 2100
Joined: Friday 18 October 2013 23:33
Target OS: Raspberry Pi
Domoticz version: BETA
Location: Arnhem/Nijmegen Nederland
Contact:

Re: Lightning and Domoticz

Post by Derik » Saturday 30 December 2017 16:24

mmm i did a dist upgrade on my dietpi...
After that the python script is not working any more...
Someone have a solution for me?
How can i check python is running?
or how activate i python?
or what package do i need to install??
Xu4: Beta Extreme antenna RFXcomE,WU Fi Ping ip P1 Gen5 PVOutput Harmony HUE SolarmanPv OTG Winddelen Alive ESP Buienradar MySensors WOL Winddelen counting RPi: Beta SMAspot RFlinkTest Domoticz ...Different backups

SweetPants
Posts: 2058
Joined: Friday 12 July 2013 21:24
Target OS: Linux
Domoticz version: V3.9639
Location: The Netherlands
Contact:

Re: Lightning and Domoticz

Post by SweetPants » Saturday 30 December 2017 18:14

Derik wrote:
Saturday 30 December 2017 16:24
mmm i did a dist upgrade on my dietpi...
After that the python script is not working any more...
Someone have a solution for me?
How can i check python is running?
or how activate i python?
or what package do i need to install??
What error messsages do you get when started from cli?
Ubuntu 16.04.3 LTS, Intel NUC, MySensors 2.3.0-alpha, Pro Mini 3.3/8M RFM69(HW), ESP8266 (SDK2.2.0), Sonoff, RFLink, RFXcom, MQTT, NodeRed, Domoticz Beta (source)

User avatar
Derik
Posts: 2100
Joined: Friday 18 October 2013 23:33
Target OS: Raspberry Pi
Domoticz version: BETA
Location: Arnhem/Nijmegen Nederland
Contact:

Re: Lightning and Domoticz

Post by Derik » Saturday 30 December 2017 20:17

hope i do it on the good way:

Code: Select all

root@DietPi:~# cd /home/domoticz/scripts/python
root@DietPi:/home/domoticz/scripts/python# ./onweer.py
Segmentatiefout
root@DietPi:/home/domoticz/scripts/python#
Xu4: Beta Extreme antenna RFXcomE,WU Fi Ping ip P1 Gen5 PVOutput Harmony HUE SolarmanPv OTG Winddelen Alive ESP Buienradar MySensors WOL Winddelen counting RPi: Beta SMAspot RFlinkTest Domoticz ...Different backups

User avatar
phoenixblue
Posts: 75
Joined: Friday 25 November 2016 12:20
Target OS: Raspberry Pi
Domoticz version: 3.7392
Contact:

Re: Lightning and Domoticz

Post by phoenixblue » Tuesday 16 January 2018 0:46

Small update : Meanwhile I have rebuild the server script to solve the problem when there is an lot of activity to not crash the temp file.
But unfortunately it not works, so I'm try to filter some parts of EU in seperated files so I hope this will do the trick.
scripts on github: Link

freijn
Posts: 298
Joined: Friday 23 December 2016 17:40
Target OS: Raspberry Pi
Domoticz version:
Location: Netherlands Purmerend
Contact:

Re: Lightning and Domoticz

Post by freijn » Tuesday 16 January 2018 10:28

Derik,

Why are you logged in as root ?

please start the script like :
cd to the script dir like cd /home/domoticz/scripts/python
then do
pi@DietPi:python onweer.py

whats the output or hte last lines it is complaining about.

Also, could it be you moved to a newer python version?
please do python -V

Cheers,

Frank

User avatar
Derik
Posts: 2100
Joined: Friday 18 October 2013 23:33
Target OS: Raspberry Pi
Domoticz version: BETA
Location: Arnhem/Nijmegen Nederland
Contact:

Re: Lightning and Domoticz

Post by Derik » Tuesday 16 January 2018 21:27

mm
Did install domoticz under root... :-)
Now i did a clean install and everything is working fine..
I think my os on my odroid fucked up..
Today count 36 ....
So good work thanks!!!
Xu4: Beta Extreme antenna RFXcomE,WU Fi Ping ip P1 Gen5 PVOutput Harmony HUE SolarmanPv OTG Winddelen Alive ESP Buienradar MySensors WOL Winddelen counting RPi: Beta SMAspot RFlinkTest Domoticz ...Different backups

freijn
Posts: 298
Joined: Friday 23 December 2016 17:40
Target OS: Raspberry Pi
Domoticz version:
Location: Netherlands Purmerend
Contact:

Re: Lightning and Domoticz

Post by freijn » Thursday 18 January 2018 17:15

Welcome to the wonderfull Domo world :-)

User avatar
Derik
Posts: 2100
Joined: Friday 18 October 2013 23:33
Target OS: Raspberry Pi
Domoticz version: BETA
Location: Arnhem/Nijmegen Nederland
Contact:

Re: Lightning and Domoticz

Post by Derik » Tuesday 23 January 2018 19:43

MM

Thanks for the options..
Only can i use it with the intern Domoticz py option? [ by the blockleys part there is PY option ]
So the script is in de DB fro Domoticz??
More friendly... everything in DB from Domoticz
So a backup ....:-)
Xu4: Beta Extreme antenna RFXcomE,WU Fi Ping ip P1 Gen5 PVOutput Harmony HUE SolarmanPv OTG Winddelen Alive ESP Buienradar MySensors WOL Winddelen counting RPi: Beta SMAspot RFlinkTest Domoticz ...Different backups

User avatar
phoenixblue
Posts: 75
Joined: Friday 25 November 2016 12:20
Target OS: Raspberry Pi
Domoticz version: 3.7392
Contact:

Re: Lightning and Domoticz

Post by phoenixblue » Saturday 19 May 2018 8:26

Hi,

For those are using the lightning script, the Json file location is switched because some safety guidelines.
So it's changed to -> https://www.onweeractueel.nl/domoticz_bo.json
scripts on github: Link

User avatar
EdwinK
Posts: 1181
Joined: Sunday 22 January 2017 22:46
Target OS: Raspberry Pi
Domoticz version: BETA
Location: Rhoon
Contact:

Re: Lightning and Domoticz

Post by EdwinK » Sunday 27 May 2018 16:40

So, now I finally had time to check on this again, and...

Code: Select all

sudo python3 Onweer.py
Found 1 matches -- Sun May 27 16:36:06 2018
Traceback (most recent call last):
  File "Onweer.py", line 53, in <module>
    (server, port, deviceIdx, value))
  File "/usr/local/lib/python3.5/dist-packages/requests/api.py", line 72, in get
    return request('get', url, params=params, **kwargs)
  File "/usr/local/lib/python3.5/dist-packages/requests/api.py", line 58, in request
    return session.request(method=method, url=url, **kwargs)
  File "/usr/local/lib/python3.5/dist-packages/requests/sessions.py", line 508, in request
    resp = self.send(prep, **send_kwargs)
  File "/usr/local/lib/python3.5/dist-packages/requests/sessions.py", line 612, in send
    adapter = self.get_adapter(url=request.url)
  File "/usr/local/lib/python3.5/dist-packages/requests/sessions.py", line 703, in get_adapter
    raise InvalidSchema("No connection adapters were found for '%s'" % url)
requests.exceptions.InvalidSchema: No connection adapters were found for '192.168.0.11:8080/json.htm?type=command&param=udevice&idx=159&svalue=1'
Running latest BETA on a Pi-3 | Toon Thermostat | RFxcom | Dashticz V2 |

User avatar
EdwinK
Posts: 1181
Joined: Sunday 22 January 2017 22:46
Target OS: Raspberry Pi
Domoticz version: BETA
Location: Rhoon
Contact:

Re: Lightning and Domoticz

Post by EdwinK » Tuesday 29 May 2018 20:20

Getting the script from Phoenixblue's git page made it work again.

Hmm.. Not really. Still doesn't update the counter :(
Running latest BETA on a Pi-3 | Toon Thermostat | RFxcom | Dashticz V2 |

FrankVZ
Posts: 24
Joined: Sunday 27 May 2018 12:01
Target OS: -
Domoticz version:
Contact:

Re: Lightning and Domoticz

Post by FrankVZ » Tuesday 29 May 2018 21:39

Hi I get this error too (anyway: looks very similar).
Domoticz @Synology DS214+,
Python installend + python 2+ 3 (Additional packages).

Running from CLI (putty):
De py script runs but no respons at all (like freezes).

After a ^C you get the notification of the amount of strikes,
another ^C gives some other recent calls (?)

The file /tmp/last_lightning.txt has been made, but it just containers one number.
  • admin@DS214plus:~$ python /volume1/@appstore/domoticzscripts/lightning.py

    ^C:

    Found 2400 matches -- Tue May 29 20:30:17 2018
    0 old matches were ignored -- Tue May 29 20:30:17 2018
    ^CTraceback (most recent call last):
    File "/volume1/@appstore/domoticzscripts/lightning.py", line 96, in <module>
    (server, port, deviceIdx, value))
    File "/usr/local/lib/python2.7/site-packages/requests/api.py", line 71, in get
    return request('get', url, params=params, **kwargs)
    File "/usr/local/lib/python2.7/site-packages/requests/api.py", line 57, in request
    return session.request(method=method, url=url, **kwargs)
    File "/usr/local/lib/python2.7/site-packages/requests/sessions.py", line 475, in request
    resp = self.send(prep, **send_kwargs)
    File "/usr/local/lib/python2.7/site-packages/requests/sessions.py", line 585, in send
    r = adapter.send(request, **kwargs)
    File "/usr/local/lib/python2.7/site-packages/requests/adapters.py", line 403, in send
    timeout=timeout
    File "/usr/local/lib/python2.7/site-packages/requests/packages/urllib3/connectionpool.py", line 578, in urlopen
    chunked=chunked)
    File "/usr/local/lib/python2.7/site-packages/requests/packages/urllib3/connectionpool.py", line 385, in _make_request
    httplib_response = conn.getresponse(buffering=True)
    File "/usr/lib/python2.7/httplib.py", line 1183, in getresponse
    response.begin()
    File "/usr/lib/python2.7/httplib.py", line 457, in begin
    version, status, reason = self._read_status()
    File "/usr/lib/python2.7/httplib.py", line 413, in _read_status
    line = self.fp.readline(_MAXLINE + 1)
    File "/usr/lib/python2.7/socket.py", line 480, in readline
    data = self._sock.recv(self._rbufsize)
    KeyboardInterrupt
I used the script from the github, as mentioned on the new site https://www.onweeractueel.nl/ and https://github.com/phoenix-blue/Domotic ... ghtning.py
But to be honest: I'm not sure about the port of the Domoticz server:
It is localhost (since the py-script and domoticz run at the Synology), but the port is set to 6144 (the default port Domoticz uses for the Domoticz clients.... There is no other port open lik 8080?)

What is the problem causing the lightning detection not to work for me/us?

User avatar
EdwinK
Posts: 1181
Joined: Sunday 22 January 2017 22:46
Target OS: Raspberry Pi
Domoticz version: BETA
Location: Rhoon
Contact:

Re: Lightning and Domoticz

Post by EdwinK » Tuesday 29 May 2018 22:54

I believe on Synology it's port 8084 you need
Running latest BETA on a Pi-3 | Toon Thermostat | RFxcom | Dashticz V2 |

FrankVZ
Posts: 24
Joined: Sunday 27 May 2018 12:01
Target OS: -
Domoticz version:
Contact:

Re: Lightning and Domoticz

Post by FrankVZ » Wednesday 30 May 2018 10:30

Oh wow!
I say: EdwinK for president! :)

I never thought about 8084 (thought that was https port). The problem took me hours....
With port 8084 I get no errors and the script seems to run! Waiting for the thunder this afternoon :)
Thanks for your quick response!

Post Reply

Who is online

Users browsing this forum: No registered users and 3 guests