Posting influxdb through dzvent
Moderator: leecollings
-
- Posts: 21
- Joined: Tuesday 30 April 2019 12:01
- Target OS: Raspberry Pi / ODroid
- Domoticz version:
- Contact:
Posting influxdb through dzvent
Hi,
I have an issue with dzvent script for posting influx data:
domoticz.openURL({
url = 'http://127.0.0.1:8086/write?db=xxx&u=zz ... ecision=ms',
method = 'POST',
headers = 'application/x-www-form-urlencoded',
callback = 'mycallbackstring',
postData = 'TFA_sensor temp=' .. TEMP_CELS .. ',hum=' .. HUM
})
resulting in log (despite the fact that it's recorded in influxdb correctly...
2019-05-01 23:16:14.098 Error: Error opening url: http://127.0.0.1:8086/write?db=xxx&u=zz ... ecision=ms
An idea how to debug / solve that?
I have an issue with dzvent script for posting influx data:
domoticz.openURL({
url = 'http://127.0.0.1:8086/write?db=xxx&u=zz ... ecision=ms',
method = 'POST',
headers = 'application/x-www-form-urlencoded',
callback = 'mycallbackstring',
postData = 'TFA_sensor temp=' .. TEMP_CELS .. ',hum=' .. HUM
})
resulting in log (despite the fact that it's recorded in influxdb correctly...
2019-05-01 23:16:14.098 Error: Error opening url: http://127.0.0.1:8086/write?db=xxx&u=zz ... ecision=ms
An idea how to debug / solve that?
- waaren
- Posts: 6028
- Joined: Tuesday 03 January 2017 14:18
- Target OS: Linux
- Domoticz version: Beta
- Location: Netherlands
- Contact:
Re: Posting influxdb through dzvent
Did you try to check the response ?kratax wrote: ↑Wednesday 01 May 2019 23:18 Hi,
I have an issue with dzvent script for posting influx data:
resulting in log (despite the fact that it's recorded in influxdb correctly...
2019-05-01 23:16:14.098 Error: Error opening url: http://127.0.0.1:8086/write?db=xxx&u=zz ... ecision=ms
An idea how to debug / solve that?
could look as something like
Code: Select all
return {
on = {
timer = { 'every 5 minutes' },
httpResponses = {'mycallbackstring'}
},
execute = function(domoticz, item)
if item.isTimer then
TEMP_CELS = ?? -- Fill TEMP_CELS with the value you need
HUM = ?? -- Fill HUM with the value you need
domoticz.openURL({
url = 'http://127.0.0.1:8086/write?db=xxx&u=zzzz&p=yyy&precision=ms',
method = 'POST',
headers = 'application/x-www-form-urlencoded',
callback = 'mycallbackstring',
postData = 'TFA_sensor temp=' .. TEMP_CELS .. ',hum=' .. HUM
})
elseif (item.isHTTPResponse) then
domoticz.log("return from influxDB: " .. item.data,domoticz.LOG_FORCE) -- [edit] changed to remove !
end
end
}
Last edited by waaren on Thursday 02 May 2019 9:04, edited 1 time in total.
Debian buster, bullseye on RPI-4, Intel NUC.
dz Beta, Z-Wave, RFLink, RFXtrx433e, P1, Youless, Hue, Yeelight, Xiaomi, MQTT
==>> dzVents wiki
dz Beta, Z-Wave, RFLink, RFXtrx433e, P1, Youless, Hue, Yeelight, Xiaomi, MQTT
==>> dzVents wiki
-
- Posts: 21
- Joined: Tuesday 30 April 2019 12:01
- Target OS: Raspberry Pi / ODroid
- Domoticz version:
- Contact:
Re: Posting influxdb through dzvent
Thanks a lot, for this row
domoticz.log("return from influxDB: " .. item.data,domoticz.LOG_!FORCE)
I have an error:
z/scripts/dzVents/generated_scripts/Post_influx_data.lua:34: ')' expected near '!'
domoticz.log("return from influxDB: " .. item.data,domoticz.LOG_!FORCE)
I have an error:
z/scripts/dzVents/generated_scripts/Post_influx_data.lua:34: ')' expected near '!'
- waaren
- Posts: 6028
- Joined: Tuesday 03 January 2017 14:18
- Target OS: Linux
- Domoticz version: Beta
- Location: Netherlands
- Contact:
Re: Posting influxdb through dzvent
My mistake. Line should be
Code: Select all
domoticz.log("return from influxDB: " .. item.data,domoticz.LOG_FORCE)
Debian buster, bullseye on RPI-4, Intel NUC.
dz Beta, Z-Wave, RFLink, RFXtrx433e, P1, Youless, Hue, Yeelight, Xiaomi, MQTT
==>> dzVents wiki
dz Beta, Z-Wave, RFLink, RFXtrx433e, P1, Youless, Hue, Yeelight, Xiaomi, MQTT
==>> dzVents wiki
-
- Posts: 21
- Joined: Tuesday 30 April 2019 12:01
- Target OS: Raspberry Pi / ODroid
- Domoticz version:
- Contact:
Re: Posting influxdb through dzvent
Hi,
Thanks a lot, I expected that... Unfortunatelly, there is nothing in the log (I have also attached full script as used below):
2019-05-02 09:31:00.405 Status: dzVents: Info: ------ Start internal script: Post_influx_data:, trigger: every 1 minutes
2019-05-02 09:31:00.427 Status: dzVents: Info: Zapisuji do influx teplota venek
2019-05-02 09:31:00.427 Status: dzVents: Info: Zapisuji do influxdb teploty konec
2019-05-02 09:31:00.427 Status: dzVents: Info: TEMP Cels
2019-05-02 09:31:00.428 Status: dzVents: Info: 17.2
2019-05-02 09:31:00.428 Status: dzVents: Info: HUM
2019-05-02 09:31:00.428 Status: dzVents: Info: 68
2019-05-02 09:31:00.428 Status: dzVents: Info: TFA_sensor temp=17.2,hum=68
2019-05-02 09:31:00.428 Status: dzVents: Info: Zapsano do influxdb
2019-05-02 09:31:00.429 Status: dzVents: Info: ------ Finished Post_influx_data
2019-05-02 09:31:00.429 Status: EventSystem: Script event triggered: /home/pi/domoticz/dzVents/runtime/dzVents.lua
2019-05-02 09:31:00.465 Error: Error opening url: http://127.0.0.1:8086/write?db=testd&u= ... ecision=ms
2019-05-02 09:31:00.558 Status: dzVents: Info: Handling httpResponse-events for: "mycallbackstring
2019-05-02 09:31:00.558 Status: dzVents: Info: ------ Start internal script: Post_influx_data: HTTPResponse: "mycallbackstring"
2019-05-02 09:31:00.563 Status: dzVents: !Info: return from influxDB:
2019-05-02 09:31:00.564 Status: dzVents: Info: ------ Finished Post_influx_data
Thanks a lot, I expected that... Unfortunatelly, there is nothing in the log (I have also attached full script as used below):
2019-05-02 09:31:00.405 Status: dzVents: Info: ------ Start internal script: Post_influx_data:, trigger: every 1 minutes
2019-05-02 09:31:00.427 Status: dzVents: Info: Zapisuji do influx teplota venek
2019-05-02 09:31:00.427 Status: dzVents: Info: Zapisuji do influxdb teploty konec
2019-05-02 09:31:00.427 Status: dzVents: Info: TEMP Cels
2019-05-02 09:31:00.428 Status: dzVents: Info: 17.2
2019-05-02 09:31:00.428 Status: dzVents: Info: HUM
2019-05-02 09:31:00.428 Status: dzVents: Info: 68
2019-05-02 09:31:00.428 Status: dzVents: Info: TFA_sensor temp=17.2,hum=68
2019-05-02 09:31:00.428 Status: dzVents: Info: Zapsano do influxdb
2019-05-02 09:31:00.429 Status: dzVents: Info: ------ Finished Post_influx_data
2019-05-02 09:31:00.429 Status: EventSystem: Script event triggered: /home/pi/domoticz/dzVents/runtime/dzVents.lua
2019-05-02 09:31:00.465 Error: Error opening url: http://127.0.0.1:8086/write?db=testd&u= ... ecision=ms
2019-05-02 09:31:00.558 Status: dzVents: Info: Handling httpResponse-events for: "mycallbackstring
2019-05-02 09:31:00.558 Status: dzVents: Info: ------ Start internal script: Post_influx_data: HTTPResponse: "mycallbackstring"
2019-05-02 09:31:00.563 Status: dzVents: !Info: return from influxDB:
2019-05-02 09:31:00.564 Status: dzVents: Info: ------ Finished Post_influx_data
Code: Select all
return {
on = {
timer = {'Every 1 minutes'},
--devices = {'Teplota_venku_TFA'},
httpResponses = {'mycallbackstring'}
},
data = {
},
logger = {},
execute = function(domoticz, item)
--basic url settings
--URL =
if item.isTimer and (domoticz.devices('Teplota_venku_TFA').temperature > -40 and domoticz.devices('Teplota_venku_TFA').temperature < 50 and domoticz.devices('Teplota_venku_TFA').humidity > 0 and domoticz.devices('Teplota_venku_TFA').humidity <= 100) then
domoticz.log('Zapisuji do influx teplota venek')
TEMP_CELS = domoticz.devices('Teplota_venku_TFA').temperature
TEMP_CELS = domoticz.utils.round (TEMP_CELS,3)
HUM = domoticz.devices('Teplota_venku_TFA').humidity
domoticz.log('Zapisuji do influxdb teploty konec')
domoticz.log('TEMP Cels ')
domoticz.log(TEMP_CELS)
domoticz.log('HUM ')
domoticz.log(HUM)
domoticz.openURL({
url = 'http://127.0.0.1:8086/write?db=testd&u=tester&p=xxxx&precision=ms',
method = 'POST',
headers = 'application/x-www-form-urlencoded',
callback = 'mycallbackstring',
postData = 'TFA_sensor temp=' .. TEMP_CELS .. ',hum=' .. HUM
})
domoticz.log('TFA_sensor temp=' .. TEMP_CELS .. ',hum='.. HUM)
domoticz.log('Zapsano do influxdb')
elseif (item.isHTTPResponse) then
domoticz.log("return from influxDB: " .. item.data,domoticz.LOG_FORCE)
end
end
}
- waaren
- Posts: 6028
- Joined: Tuesday 03 January 2017 14:18
- Target OS: Linux
- Domoticz version: Beta
- Location: Netherlands
- Contact:
Re: Posting influxdb through dzvent
To show a bit more info on what's coming back, can you please change script to.
Code: Select all
return {
on = {
timer = {'Every 1 minutes'},
--devices = {'Teplota_venku_TFA'},
httpResponses = {'mycallbackstring'}
},
data = {
},
logger = {},
execute = function(domoticz, item)
--basic url settings
--URL =
if item.isTimer and (domoticz.devices('Teplota_venku_TFA').temperature > -40 and domoticz.devices('Teplota_venku_TFA').temperature < 50 and domoticz.devices('Teplota_venku_TFA').humidity > 0 and domoticz.devices('Teplota_venku_TFA').humidity <= 100) then
domoticz.log('Zapisuji do influx teplota venek')
TEMP_CELS = domoticz.devices('Teplota_venku_TFA').temperature
TEMP_CELS = domoticz.utils.round (TEMP_CELS,3)
HUM = domoticz.devices('Teplota_venku_TFA').humidity
domoticz.log('Zapisuji do influxdb teploty konec')
domoticz.log('TEMP Cels ')
domoticz.log(TEMP_CELS)
domoticz.log('HUM ')
domoticz.log(HUM)
domoticz.openURL({
url = 'http://127.0.0.1:8086/write?db=testd&u=tester&p=xxxx&precision=ms',
method = 'POST',
headers = 'application/x-www-form-urlencoded',
callback = 'mycallbackstring',
postData = 'TFA_sensor temp=' .. TEMP_CELS .. ',hum=' .. HUM
})
domoticz.log('TFA_sensor temp=' .. TEMP_CELS .. ',hum='.. HUM)
domoticz.log('Zapsano do influxdb')
elseif (item.isHTTPResponse) then
domoticz.log("response from influxDB: " .. ( domoticz.utils.urlEncode(item.data) or " - none - "),domoticz.LOG_FORCE)
domoticz.log("return code from influxDB: " .. item.statusCode,domoticz.LOG_FORCE)
domoticz.log("response from influxDB: " .. item.data,domoticz.LOG_FORCE)
for key, value in pairs (item.headers) do
domoticz.log("Header " .. key .. " ==>> " .. value,domoticz.LOG_FORCE)
end
end
end
}
Debian buster, bullseye on RPI-4, Intel NUC.
dz Beta, Z-Wave, RFLink, RFXtrx433e, P1, Youless, Hue, Yeelight, Xiaomi, MQTT
==>> dzVents wiki
dz Beta, Z-Wave, RFLink, RFXtrx433e, P1, Youless, Hue, Yeelight, Xiaomi, MQTT
==>> dzVents wiki
-
- Posts: 21
- Joined: Tuesday 30 April 2019 12:01
- Target OS: Raspberry Pi / ODroid
- Domoticz version:
- Contact:
Re: Posting influxdb through dzvent
Thanks, the outcome is as follows:
Code: Select all
2019-05-02 10:20:00.529 Status: dzVents: Info: ------ Start internal script: Post_influx_data:, trigger: every 1 minutes
2019-05-02 10:20:00.552 Status: dzVents: Info: Zapisuji do influx teplota venek
2019-05-02 10:20:00.552 Status: dzVents: Info: Zapisuji do influxdb teploty konec
2019-05-02 10:20:00.552 Status: dzVents: Info: TEMP Cels
2019-05-02 10:20:00.552 Status: dzVents: Info: 20.4
2019-05-02 10:20:00.552 Status: dzVents: Info: HUM
2019-05-02 10:20:00.552 Status: dzVents: Info: 60
2019-05-02 10:20:00.552 Status: dzVents: Info: TFA_sensor temp=20.4,hum=60
2019-05-02 10:20:00.552 Status: dzVents: Info: Zapsano do influxdb
2019-05-02 10:20:00.553 Status: dzVents: Info: ------ Finished Post_influx_data
2019-05-02 10:20:00.554 Status: EventSystem: Script event triggered: /home/pi/domoticz/dzVents/runtime/dzVents.lua
2019-05-02 10:20:00.709 Status: dzVents: Info: Handling httpResponse-events for: "mycallbackstring
2019-05-02 10:20:00.709 Status: dzVents: Info: ------ Start internal script: Post_influx_data: HTTPResponse: "mycallbackstring"
2019-05-02 10:20:00.717 Status: dzVents: !Info: response from influxDB:
2019-05-02 10:20:00.717 Status: dzVents: !Info: return code from influxDB: 12103200
2019-05-02 10:20:00.717 Status: dzVents: !Info: response from influxDB:
2019-05-02 10:20:00.717 Status: dzVents: !Info: Header Request-Id ==>> 14399d7c-6cb3-11e9-b3b4-b827eb116147
2019-05-02 10:20:00.717 Status: dzVents: !Info: Header X-Request-Id ==>> 14399d7c-6cb3-11e9-b3b4-b827eb116147
2019-05-02 10:20:00.717 Status: dzVents: !Info: Header Content-Type ==>> application/json
2019-05-02 10:20:00.717 Status: dzVents: !Info: Header X-Influxdb-Build ==>> OSS
2019-05-02 10:20:00.717 Status: dzVents: !Info: Header X-Influxdb-Version ==>> 1.7.6
2019-05-02 10:20:00.717 Status: dzVents: !Info: Header Date ==>> Thu, 02 May 2019 08:20:00 GMT
2019-05-02 10:20:00.718 Status: dzVents: Info: ------ Finished Post_influx_data
2019-05-02 10:20:04.547 Status: Notification sent (Email)
- waaren
- Posts: 6028
- Joined: Tuesday 03 January 2017 14:18
- Target OS: Linux
- Domoticz version: Beta
- Location: Netherlands
- Contact:
Re: Posting influxdb through dzvent
It looks like the handling by influx is OK but with an unexpected returnvalue. The error from domoticz points to a situation where no valid return is received. That's why I am interested to see what code is returned. Can you please try this one ?
Code: Select all
return {
on = {
timer = {'Every 1 minutes'},
--devices = {'Teplota_venku_TFA'},
httpResponses = {'mycallbackstring'}
},
data = {
},
logger = {},
execute = function(domoticz, item)
--basic url settings
--URL =
if item.isTimer and (domoticz.devices('Teplota_venku_TFA').temperature > -40 and domoticz.devices('Teplota_venku_TFA').temperature < 50 and domoticz.devices('Teplota_venku_TFA').humidity > 0 and domoticz.devices('Teplota_venku_TFA').humidity <= 100) then
domoticz.log('Zapisuji do influx teplota venek')
TEMP_CELS = domoticz.devices('Teplota_venku_TFA').temperature
TEMP_CELS = domoticz.utils.round (TEMP_CELS,3)
HUM = domoticz.devices('Teplota_venku_TFA').humidity
domoticz.log('Zapisuji do influxdb teploty konec')
domoticz.log('TEMP Cels ')
domoticz.log(TEMP_CELS)
domoticz.log('HUM ')
domoticz.log(HUM)
domoticz.openURL({
url = 'http://127.0.0.1:8086/write?db=testd&u=tester&p=xxxx&precision=ms',
method = 'POST',
headers = 'application/x-www-form-urlencoded',
callback = 'mycallbackstring',
postData = 'TFA_sensor temp=' .. TEMP_CELS .. ',hum=' .. HUM
})
domoticz.log('TFA_sensor temp=' .. TEMP_CELS .. ',hum='.. HUM)
domoticz.log('Zapsano do influxdb')
elseif (item.isHTTPResponse) then
local function getASCII(myData)
str = ""
for i=1,myData:len() do
str = str .. myData:byte(i) .. ", "
end
return str:sub(1, -3)
end
domoticz.log("response from influxDB: " .. item.data,domoticz.LOG_FORCE)
domoticz.log("ASCII values of response from influxDB: " .. getASCII(item.data or ""),domoticz.LOG_FORCE)
domoticz.log("return code from influxDB: " .. item.statusCode,domoticz.LOG_FORCE)
for key, value in pairs (item.headers) do
domoticz.log("Header " .. key .. " ==>> " .. value,domoticz.LOG_FORCE)
end
end
end
}
Debian buster, bullseye on RPI-4, Intel NUC.
dz Beta, Z-Wave, RFLink, RFXtrx433e, P1, Youless, Hue, Yeelight, Xiaomi, MQTT
==>> dzVents wiki
dz Beta, Z-Wave, RFLink, RFXtrx433e, P1, Youless, Hue, Yeelight, Xiaomi, MQTT
==>> dzVents wiki
-
- Posts: 21
- Joined: Tuesday 30 April 2019 12:01
- Target OS: Raspberry Pi / ODroid
- Domoticz version:
- Contact:
Re: Posting influxdb through dzvent
Please see below...
Code: Select all
2019-05-02 13:16:00.542 Status: dzVents: Info: ------ Start internal script: Post_influx_data:, trigger: every 1 minutes
2019-05-02 13:16:00.565 Status: dzVents: Info: Zapisuji do influx teplota venek
2019-05-02 13:16:00.565 Status: dzVents: Info: Zapisuji do influxdb teploty konec
2019-05-02 13:16:00.565 Status: dzVents: Info: TEMP Cels
2019-05-02 13:16:00.565 Status: dzVents: Info: 21.3
2019-05-02 13:16:00.565 Status: dzVents: Info: HUM
2019-05-02 13:16:00.565 Status: dzVents: Info: 46
2019-05-02 13:16:00.565 Status: dzVents: Info: TFA_sensor temp=21.3,hum=46
2019-05-02 13:16:00.565 Status: dzVents: Info: Zapsano do influxdb
2019-05-02 13:16:00.566 Status: dzVents: Info: ------ Finished Post_influx_data
2019-05-02 13:16:00.567 Status: EventSystem: Script event triggered: /home/pi/domoticz/dzVents/runtime/dzVents.lua
2019-05-02 13:16:00.709 Status: dzVents: Info: Handling httpResponse-events for: "mycallbackstring
2019-05-02 13:16:00.709 Status: dzVents: Info: ------ Start internal script: Post_influx_data: HTTPResponse: "mycallbackstring"
2019-05-02 13:16:00.715 Status: dzVents: !Info: response from influxDB:
2019-05-02 13:16:00.715 Status: dzVents: !Info: ASCII values of response from influxDB:
2019-05-02 13:16:00.715 Status: dzVents: !Info: return code from influxDB: 12103200
2019-05-02 13:16:00.715 Status: dzVents: !Info: Header Date ==>> Thu, 02 May 2019 11:16:00 GMT
2019-05-02 13:16:00.715 Status: dzVents: !Info: Header X-Request-Id ==>> aa7a98a9-6ccb-11e9-bef6-b827eb116147
2019-05-02 13:16:00.715 Status: dzVents: !Info: Header X-Influxdb-Version ==>> 1.7.6
2019-05-02 13:16:00.715 Status: dzVents: !Info: Header X-Influxdb-Build ==>> OSS
2019-05-02 13:16:00.715 Status: dzVents: !Info: Header Content-Type ==>> application/json
2019-05-02 13:16:00.715 Status: dzVents: !Info: Header Request-Id ==>> aa7a98a9-6ccb-11e9-bef6-b827eb116147
2019-05-02 13:16:00.716 Status: dzVents: Info: ------ Finished Post_influx_data
- waaren
- Posts: 6028
- Joined: Tuesday 03 January 2017 14:18
- Target OS: Linux
- Domoticz version: Beta
- Location: Netherlands
- Contact:
Re: Posting influxdb through dzvent
OK Thanks. What I see is that influx returns an empty response and domoticz does consider this to be an error. Unfortunately Nothing dzVents can do about that.
Debian buster, bullseye on RPI-4, Intel NUC.
dz Beta, Z-Wave, RFLink, RFXtrx433e, P1, Youless, Hue, Yeelight, Xiaomi, MQTT
==>> dzVents wiki
dz Beta, Z-Wave, RFLink, RFXtrx433e, P1, Youless, Hue, Yeelight, Xiaomi, MQTT
==>> dzVents wiki
-
- Posts: 21
- Joined: Tuesday 30 April 2019 12:01
- Target OS: Raspberry Pi / ODroid
- Domoticz version:
- Contact:
Re: Posting influxdb through dzvent
Well, as per documentation,
https://docs.influxdata.com/influxdb/v1 ... ting_data/
2xx: If your write request received HTTP 204 No Content, it was a success!
Is then what is being seen by domoticz? If so then probably it's an domoticz issue with expecting this to be an error...
Thanks a lot.
https://docs.influxdata.com/influxdb/v1 ... ting_data/
2xx: If your write request received HTTP 204 No Content, it was a success!
Is then what is being seen by domoticz? If so then probably it's an domoticz issue with expecting this to be an error...
Thanks a lot.
- waaren
- Posts: 6028
- Joined: Tuesday 03 January 2017 14:18
- Target OS: Linux
- Domoticz version: Beta
- Location: Netherlands
- Contact:
Re: Posting influxdb through dzvent
What is the complete output of the script now ? (after the patch of @gizmocuz) ?kratax wrote: ↑Thursday 02 May 2019 15:19 Well, as per documentation,
https://docs.influxdata.com/influxdb/v1 ... ting_data/
2xx: If your write request received HTTP 204 No Content, it was a success!
Is then what is being seen by domoticz? If so then probably it's an domoticz issue with expecting this to be an error...
Thanks a lot.
Debian buster, bullseye on RPI-4, Intel NUC.
dz Beta, Z-Wave, RFLink, RFXtrx433e, P1, Youless, Hue, Yeelight, Xiaomi, MQTT
==>> dzVents wiki
dz Beta, Z-Wave, RFLink, RFXtrx433e, P1, Youless, Hue, Yeelight, Xiaomi, MQTT
==>> dzVents wiki
-
- Posts: 21
- Joined: Tuesday 30 April 2019 12:01
- Target OS: Raspberry Pi / ODroid
- Domoticz version:
- Contact:
Re: Posting influxdb through dzvent
Hi,
here you go:
here you go:
Code: Select all
2019-05-04 23:37:00.341 Status: dzVents: Info: ------ Start internal script: Post_influx_data_testing:, trigger: every 1 minutes
2019-05-04 23:37:00.364 Status: dzVents: Info: Zapisuji do influx teplota venek
2019-05-04 23:37:00.364 Status: dzVents: Info: Zapisuji do influxdb teploty konec
2019-05-04 23:37:00.364 Status: dzVents: Info: TEMP Cels
2019-05-04 23:37:00.364 Status: dzVents: Info: 5
2019-05-04 23:37:00.364 Status: dzVents: Info: HUM
2019-05-04 23:37:00.364 Status: dzVents: Info: 79
2019-05-04 23:37:00.364 Status: dzVents: Info: TEST_sensor temp=5,hum=79
2019-05-04 23:37:00.365 Status: dzVents: Info: Zapsano do influxdb
2019-05-04 23:37:00.365 Status: dzVents: Info: ------ Finished Post_influx_data_testing
2019-05-04 23:37:00.367 Status: EventSystem: Script event triggered: /home/pi/domoticz/dzVents/runtime/dzVents.lua
2019-05-04 23:37:00.770 Status: dzVents: Info: Handling httpResponse-events for: "mycallbackstring
2019-05-04 23:37:00.770 Status: dzVents: Info: ------ Start internal script: Post_influx_data_testing: HTTPResponse: "mycallbackstring"
2019-05-04 23:37:00.776 Status: dzVents: !Info: response from influxDB:
2019-05-04 23:37:00.776 Status: dzVents: !Info: ASCII values of response from influxDB:
2019-05-04 23:37:00.776 Status: dzVents: !Info: return code from influxDB: 200
2019-05-04 23:37:00.776 Status: dzVents: !Info: Header Content-Type ==>> application/json
2019-05-04 23:37:00.776 Status: dzVents: !Info: Header Request-Id ==>> bfe390d2-6eb4-11e9-a73c-b827eb116147
2019-05-04 23:37:00.776 Status: dzVents: !Info: Header Date ==>> Sat, 04 May 2019 21:37:00 GMT
2019-05-04 23:37:00.776 Status: dzVents: !Info: Header X-Influxdb-Build ==>> OSS
2019-05-04 23:37:00.776 Status: dzVents: !Info: Header X-Influxdb-Version ==>> 1.7.6
2019-05-04 23:37:00.776 Status: dzVents: !Info: Header X-Request-Id ==>> bfe390d2-6eb4-11e9-a73c-b827eb116147
2019-05-04 23:37:00.777 Status: dzVents: Info: ------ Finished Post_influx_data_testing
- waaren
- Posts: 6028
- Joined: Tuesday 03 January 2017 14:18
- Target OS: Linux
- Domoticz version: Beta
- Location: Netherlands
- Contact:
Re: Posting influxdb through dzvent
Thanks !kratax wrote: ↑Saturday 04 May 2019 23:41 Hi,
here you go:
Code: Select all
2019-05-04 23:37:00.341 Status: dzVents: Info: ------ Start internal script: Post_influx_data_testing:, trigger: every 1 minutes 2019-05-04 23:37:00.364 Status: dzVents: Info: Zapisuji do influx teplota venek 2019-05-04 23:37:00.364 Status: dzVents: Info: Zapisuji do influxdb teploty konec 2019-05-04 23:37:00.364 Status: dzVents: Info: TEMP Cels 2019-05-04 23:37:00.364 Status: dzVents: Info: 5 2019-05-04 23:37:00.364 Status: dzVents: Info: HUM 2019-05-04 23:37:00.364 Status: dzVents: Info: 79 2019-05-04 23:37:00.364 Status: dzVents: Info: TEST_sensor temp=5,hum=79 2019-05-04 23:37:00.365 Status: dzVents: Info: Zapsano do influxdb 2019-05-04 23:37:00.365 Status: dzVents: Info: ------ Finished Post_influx_data_testing 2019-05-04 23:37:00.367 Status: EventSystem: Script event triggered: /home/pi/domoticz/dzVents/runtime/dzVents.lua 2019-05-04 23:37:00.770 Status: dzVents: Info: Handling httpResponse-events for: "mycallbackstring 2019-05-04 23:37:00.770 Status: dzVents: Info: ------ Start internal script: Post_influx_data_testing: HTTPResponse: "mycallbackstring" 2019-05-04 23:37:00.776 Status: dzVents: !Info: response from influxDB: 2019-05-04 23:37:00.776 Status: dzVents: !Info: ASCII values of response from influxDB: 2019-05-04 23:37:00.776 Status: dzVents: !Info: return code from influxDB: 200 2019-05-04 23:37:00.776 Status: dzVents: !Info: Header Content-Type ==>> application/json 2019-05-04 23:37:00.776 Status: dzVents: !Info: Header Request-Id ==>> bfe390d2-6eb4-11e9-a73c-b827eb116147 2019-05-04 23:37:00.776 Status: dzVents: !Info: Header Date ==>> Sat, 04 May 2019 21:37:00 GMT 2019-05-04 23:37:00.776 Status: dzVents: !Info: Header X-Influxdb-Build ==>> OSS 2019-05-04 23:37:00.776 Status: dzVents: !Info: Header X-Influxdb-Version ==>> 1.7.6 2019-05-04 23:37:00.776 Status: dzVents: !Info: Header X-Request-Id ==>> bfe390d2-6eb4-11e9-a73c-b827eb116147 2019-05-04 23:37:00.777 Status: dzVents: Info: ------ Finished Post_influx_data_testing
After the patch of GizMocuz I also made some changes to the way dzVents handles an HTTP resultCode can you please check these as well ?
>= V4.10687
Debian buster, bullseye on RPI-4, Intel NUC.
dz Beta, Z-Wave, RFLink, RFXtrx433e, P1, Youless, Hue, Yeelight, Xiaomi, MQTT
==>> dzVents wiki
dz Beta, Z-Wave, RFLink, RFXtrx433e, P1, Youless, Hue, Yeelight, Xiaomi, MQTT
==>> dzVents wiki
-
- Posts: 21
- Joined: Tuesday 30 April 2019 12:01
- Target OS: Raspberry Pi / ODroid
- Domoticz version:
- Contact:
Re: Posting influxdb through dzvent
Tested, see outcome below...
Code: Select all
2019-05-05 14:07:52.327 Status: dzVents: Info: ------ Start internal script: Post_influx_data_testing: HTTPResponse: "mycallbackstring"
2019-05-05 14:07:52.344 Status: dzVents: !Info: response from influxDB:
2019-05-05 14:07:52.344 Status: dzVents: !Info: ASCII values of response from influxDB:
2019-05-05 14:07:52.344 Status: dzVents: !Info: return code from influxDB: 204
2019-05-05 14:07:52.344 Status: dzVents: !Info: Header Request-Id ==>> 68647fb9-6f2e-11e9-a201-b827eb116147
2019-05-05 14:07:52.344 Status: dzVents: !Info: Header status ==>> HTTP/1.1 204 No Content
2019-05-05 14:07:52.344 Status: dzVents: !Info: Header Content-Type ==>> application/json
2019-05-05 14:07:52.344 Status: dzVents: !Info: Header X-Request-Id ==>> 68647fb9-6f2e-11e9-a201-b827eb116147
2019-05-05 14:07:52.345 Status: dzVents: !Info: Header X-Influxdb-Build ==>> OSS
2019-05-05 14:07:52.345 Status: dzVents: !Info: Header Date ==>> Sun, 05 May 2019 12:07:52 GMT
2019-05-05 14:07:52.345 Status: dzVents: !Info: Header X-Influxdb-Version ==>> 1.7.6
2019-05-05 14:07:52.345 Status: dzVents: Info: ------ Finished Post_influx_data_testing
2019-05-05 14:08:00.354 Status: dzVents: Info: ------ Start internal script: Post_influx_data_testing:, trigger: every 1 minutes
2019-05-05 14:08:00.378 Status: dzVents: Info: Zapisuji do influx teplota venek
2019-05-05 14:08:00.378 Status: dzVents: Info: Zapisuji do influxdb teploty konec
2019-05-05 14:08:00.378 Status: dzVents: Info: TEMP Cels
2019-05-05 14:08:00.378 Status: dzVents: Info: 12.1
2019-05-05 14:08:00.378 Status: dzVents: Info: HUM
2019-05-05 14:08:00.378 Status: dzVents: Info: 57
2019-05-05 14:08:00.378 Status: dzVents: Info: TEST_sensor temp=12.1,hum=57
2019-05-05 14:08:00.378 Status: dzVents: Info: Zapsano do influxdb
2019-05-05 14:08:00.379 Status: dzVents: Info: ------ Finished Post_influx_data_testing
2019-05-05 14:08:00.380 Status: EventSystem: Script event triggered: /home/pi/domoticz/dzVents/runtime/dzVents.lua
2019-05-05 14:08:00.523 Status: dzVents: Info: Handling httpResponse-events for: "mycallbackstring
2019-05-05 14:08:00.523 Status: dzVents: Info: ------ Start internal script: Post_influx_data_testing: HTTPResponse: "mycallbackstring"
2019-05-05 14:08:00.529 Status: dzVents: !Info: response from influxDB:
2019-05-05 14:08:00.529 Status: dzVents: !Info: ASCII values of response from influxDB:
2019-05-05 14:08:00.529 Status: dzVents: !Info: return code from influxDB: 204
2019-05-05 14:08:00.529 Status: dzVents: !Info: Header X-Request-Id ==>> 6d453385-6f2e-11e9-a203-b827eb116147
2019-05-05 14:08:00.529 Status: dzVents: !Info: Header Content-Type ==>> application/json
2019-05-05 14:08:00.529 Status: dzVents: !Info: Header Request-Id ==>> 6d453385-6f2e-11e9-a203-b827eb116147
2019-05-05 14:08:00.529 Status: dzVents: !Info: Header Date ==>> Sun, 05 May 2019 12:08:00 GMT
2019-05-05 14:08:00.529 Status: dzVents: !Info: Header status ==>> HTTP/1.1 204 No Content
2019-05-05 14:08:00.529 Status: dzVents: !Info: Header X-Influxdb-Build ==>> OSS
2019-05-05 14:08:00.529 Status: dzVents: !Info: Header X-Influxdb-Version ==>> 1.7.6
2019-05-05 14:08:00.530 Status: dzVents: Info: ------ Finished Post_influx_data_testing
- waaren
- Posts: 6028
- Joined: Tuesday 03 January 2017 14:18
- Target OS: Linux
- Domoticz version: Beta
- Location: Netherlands
- Contact:
Re: Posting influxdb through dzvent
kratax wrote: ↑Sunday 05 May 2019 14:09 Tested, see outcome below...Code: Select all
2019-05-05 14:07:52.344 Status: dzVents: !Info: return code from influxDB: 204 2019-05-05 14:07:52.344 Status: dzVents: !Info: Header status ==>> HTTP/1.1 204 No Content

Thx !
Debian buster, bullseye on RPI-4, Intel NUC.
dz Beta, Z-Wave, RFLink, RFXtrx433e, P1, Youless, Hue, Yeelight, Xiaomi, MQTT
==>> dzVents wiki
dz Beta, Z-Wave, RFLink, RFXtrx433e, P1, Youless, Hue, Yeelight, Xiaomi, MQTT
==>> dzVents wiki
-
- Posts: 47
- Joined: Wednesday 30 November 2016 15:07
- Target OS: Linux
- Domoticz version: 2020.2
- Location: Italy
- Contact:
Re: Posting influxdb through dzvent
Hi,
i am having the same issue (status 204 treated as error by domoticz) but i am using stable version:
Version: 2020.2
Build Hash: b63341bc0
Compile Date: 2020-04-26 13:47:55
dzVents Version: 3.0.2
Python Version: 3.8.5 (default, Jul 28 2020, 12:59:40) [GCC 9.3.0]
It could be a regression?
i am having the same issue (status 204 treated as error by domoticz) but i am using stable version:
Version: 2020.2
Build Hash: b63341bc0
Compile Date: 2020-04-26 13:47:55
dzVents Version: 3.0.2
Python Version: 3.8.5 (default, Jul 28 2020, 12:59:40) [GCC 9.3.0]
It could be a regression?
Ubuntu 20.04 on ACEPC AK1 (previously RPi3b+)
Z-Stick Gen5, RFXtrx433E, Philips HUE Bridge, Yeelight, ESP8266 NodeMCU, Broadlink RM
dZvents, bash, php, Node-RED
Z-Stick Gen5, RFXtrx433E, Philips HUE Bridge, Yeelight, ESP8266 NodeMCU, Broadlink RM
dZvents, bash, php, Node-RED
- waaren
- Posts: 6028
- Joined: Tuesday 03 January 2017 14:18
- Target OS: Linux
- Domoticz version: Beta
- Location: Netherlands
- Contact:
Re: Posting influxdb through dzvent
If you mean to ask if a hotfix is going to be applied for this, the answer is no. If you are lucky a new stable will be released soon.
Debian buster, bullseye on RPI-4, Intel NUC.
dz Beta, Z-Wave, RFLink, RFXtrx433e, P1, Youless, Hue, Yeelight, Xiaomi, MQTT
==>> dzVents wiki
dz Beta, Z-Wave, RFLink, RFXtrx433e, P1, Youless, Hue, Yeelight, Xiaomi, MQTT
==>> dzVents wiki
-
- Posts: 47
- Joined: Wednesday 30 November 2016 15:07
- Target OS: Linux
- Domoticz version: 2020.2
- Location: Italy
- Contact:
Re: Posting influxdb through dzvent
Sigh

Ubuntu 20.04 on ACEPC AK1 (previously RPi3b+)
Z-Stick Gen5, RFXtrx433E, Philips HUE Bridge, Yeelight, ESP8266 NodeMCU, Broadlink RM
dZvents, bash, php, Node-RED
Z-Stick Gen5, RFXtrx433E, Philips HUE Bridge, Yeelight, ESP8266 NodeMCU, Broadlink RM
dZvents, bash, php, Node-RED
- waltervl
- Posts: 5731
- Joined: Monday 28 January 2019 18:48
- Target OS: Linux
- Domoticz version: 2024.7
- Location: NL
- Contact:
Re: Posting influxdb through dzvent
The original topic and issue is from may 2019 with beta in V4.10687, So should be solved in V2020.1
Now appearrantly the issue has returned in 2020.2. @Kubrik did you test with the same test scripts @waaren made to be sure you have exactly that issue?
Domoticz running on Udoo X86 (on Ubuntu)
Devices/plugins: ZigbeeforDomoticz (with Xiaomi, Ikea, Tuya devices), Nefit Easy, Midea Airco, Omnik Solar, Goodwe Solar
Devices/plugins: ZigbeeforDomoticz (with Xiaomi, Ikea, Tuya devices), Nefit Easy, Midea Airco, Omnik Solar, Goodwe Solar
Who is online
Users browsing this forum: No registered users and 1 guest