Dashticz - Module - Garbage collector Topic is solved

Dashticz, alternative dashboard based on HTML, CSS, jQuery

Moderators: leecollings, htilburgs, robgeerts

JuanUil
Posts: 497
Joined: Friday 22 May 2015 12:21
Target OS: Raspberry Pi / ODroid
Domoticz version: 4.11083
Location: Asten NB Nederland
Contact:

Re: Dashticz - Module - Garbage collector

Post by JuanUil »

Hi,
Getting further and further with this wonderful dashboard.
today tried to implement trash.
When implemented this in config.js
Spoiler: show
//Blocks
var blocks = {} //only once

// --------------------------------------------------------------------------------------------
// Garbage Collector
// --------------------------------------------------------------------------------------------

config['garbage_company'] = 'blink';
config['garbage_zipcode'] = '5721GW';
config['garbage_street'] = 'Kerkstraat';
config['garbage_housenumber'] = '74';
config['garbage_maxitems'] = '4';
config['garbage_width'] = '5';
config['garbage_use_names'] = true;
config['garbage_use_colors'] = true;

config['garbage'] = {
gft: {kliko: 'green', code: '#375b23', name: 'GFT'},
pmd: {kliko: 'orange', code: '#db5518', name: 'PMD'},
rest: {kliko: 'brown', code: '#7c3607', name: 'Restafval'},
papier: {kliko: 'blue', code: '#153477', name: 'Papier'},
};
I get an error "error getting garbagedata undefined"

Looking in the console I see that there is a 0 before the HTTPS://

Image

How can I change this or remove this 0?
Your mind is like a parachute,
It only works when it is opened!

RPI4 several Fibaro, KaKu, Neocoolcam switches, Z-Wave, Zigbee2Mqtt, Ikea bulbs and remote, Zigbee temp nodes
Lokonli
Posts: 2290
Joined: Monday 29 August 2016 22:40
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: Dashticz - Module - Garbage collector

Post by Lokonli »

I guess you redefined the CORS proxy in CONFIG.js.

You can remove that setting from CONFIG.js: just use default.

If your PHP setup is working it will use the internal CORS proxy. It not, a public CORS proxy will be used.
JuanUil
Posts: 497
Joined: Friday 22 May 2015 12:21
Target OS: Raspberry Pi / ODroid
Domoticz version: 4.11083
Location: Asten NB Nederland
Contact:

Re: Dashticz - Module - Garbage collector

Post by JuanUil »

Thnx again for the help!!
Working now!!
Your mind is like a parachute,
It only works when it is opened!

RPI4 several Fibaro, KaKu, Neocoolcam switches, Z-Wave, Zigbee2Mqtt, Ikea bulbs and remote, Zigbee temp nodes
wbouwens
Posts: 6
Joined: Wednesday 09 December 2020 10:19
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: Dashticz - Module - Garbage collector

Post by wbouwens »

I have also the garbage collector. since one week the collector show no data found. i have an ical agenda with my trash data.
Lokonli
Posts: 2290
Joined: Monday 29 August 2016 22:40
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: Dashticz - Module - Garbage collector

Post by Lokonli »

If you share the link to the ical agenda I'll check.

In the mean time, can you post the following info:
* Dashticz version
* master or beta branch?
* PHP version
* OS and hardware of the system you run the Dashticz browser.

In Chrome, open DevTools (F12), refresh Dashticz:
* What are the user message on the console tab?
* Which errors are reported on the error tab?
* On the network tab search for the network request to your calendar. You can do this by filtering on garbage or ical in the network tab.
* What is the request response?
Rtificial
Posts: 5
Joined: Thursday 28 January 2021 16:38
Target OS: -
Domoticz version:
Contact:

Re: Dashticz - Module - Garbage collector

Post by Rtificial »

Just checking, my garbage block was working fine, I am using the Belgia recycleapp provider, and since some time today, I get no more data (the block say 'Laden...').
When checking the console, this is the output I get:

Code: Select all

<br />
<b>Warning</b>:  Undefined property: stdClass::$accessToken in <b>C:\xampp2\htdocs\vendor\dashticz\garbage\index.php</b> on line <b>303</b><br />
<br />
<b>Warning</b>:  Undefined property: stdClass::$items in <b>C:\xampp2\htdocs\vendor\dashticz\garbage\index.php</b> on line <b>321</b><br />
<br />
<b>Warning</b>:  Trying to access array offset on value of type null in <b>C:\xampp2\htdocs\vendor\dashticz\garbage\index.php</b> on line <b>321</b><br />
<br />
<b>Warning</b>:  Attempt to read property "id" on null in <b>C:\xampp2\htdocs\vendor\dashticz\garbage\index.php</b> on line <b>321</b><br />
<br />
<b>Warning</b>:  Undefined property: stdClass::$items in <b>C:\xampp2\htdocs\vendor\dashticz\garbage\index.php</b> on line <b>343</b><br />
<br />
<b>Warning</b>:  Trying to access array offset on value of type null in <b>C:\xampp2\htdocs\vendor\dashticz\garbage\index.php</b> on line <b>343</b><br />
<br />
<b>Warning</b>:  Attempt to read property "id" on null in <b>C:\xampp2\htdocs\vendor\dashticz\garbage\index.php</b> on line <b>343</b><br />
<br />
<b>Warning</b>:  Undefined property: stdClass::$items in <b>C:\xampp2\htdocs\vendor\dashticz\garbage\index.php</b> on line <b>369</b><br />
<br />
<b>Warning</b>:  foreach() argument must be of type array|object, null given in <b>C:\xampp2\htdocs\vendor\dashticz\garbage\index.php</b> on line <b>369</b><br />
Anyone else experiencing the same?

When I try to debug manually, using:

Code: Select all

 
 curl -H "x-consumer: recycleapp.be" -H "x-secret: Qp4KmgmK2We1ydc9Hxso5D6K0frz3a9raj2tqLjWN5n53TnEijmmYz78pKlcma54sjKLKogt6f9WdnNUci6Gbujnz6b34hNbYo4DzyYRZL5yzdJyagFHS15PSi2kPUc4v2yMck81yFKhlk2aWCTe93" "https://recycleapp.be/api/app/v1/access-token" > accesstoken.json
 
it seems I am not getting a key:

Code: Select all

{"host":"http://api-http:8080","identifier":"25d0abc2-4dd7-40c2-ab27-8be5b515fd71","timestamp":"2021-01-28T15:42:14.945Z","status":401,"name":"Unauthorized","message":"Missing authorization"}
geertvercamer
Posts: 84
Joined: Friday 12 May 2017 20:03
Target OS: -
Domoticz version:
Contact:

Re: Dashticz - Module - Garbage collector

Post by geertvercamer »

yes, I just noticed something similar. I get 'Geen gegevens gevonden'
Gianni
Posts: 230
Joined: Saturday 21 July 2018 19:03
Target OS: Raspberry Pi / ODroid
Domoticz version:
Location: Home@Belgium
Contact:

Re: Dashticz - Module - Garbage collector

Post by Gianni »

recycleapp has changed the street names

Now it's get the name fron the id of https://data.vlaanderen.be/

https://data.vlaanderen.be/doc/straatnaam/xxxxxx in my case

https://recycleapp.be/api/app/v1/collec ... 3&size=100
User avatar
jvdz
Posts: 2329
Joined: Tuesday 30 December 2014 19:25
Target OS: Raspberry Pi / ODroid
Domoticz version: 4.107
Location: Netherlands
Contact:

Re: Dashticz - Module - Garbage collector

Post by jvdz »

They have moved away from a fixed secret, which is now defined inside /static/js/main.0b66adb4.chunk.js.
I assume the name of that file can also change so retrieve that from the home page in my implementation.
Hope that helps.

Jos
New Garbage collection scripts: https://github.com/jvanderzande/GarbageCalendar
Lokonli
Posts: 2290
Joined: Monday 29 August 2016 22:40
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: Dashticz - Module - Garbage collector

Post by Lokonli »

jvdz wrote: Monday 01 February 2021 12:06 They have moved away from a fixed secret, which is now defined inside /static/js/main.0b66adb4.chunk.js.
I assume the name of that file can also change so retrieve that from the home page in my implementation.
Hope that helps.

Jos
Thanks, Jos. I'll try to implement the same.
Renber
Posts: 41
Joined: Thursday 04 February 2021 8:10
Target OS: Linux
Domoticz version: Beta
Location: Belgium
Contact:

Re: Dashticz - Module - Garbage collector

Post by Renber »

hello, to date I see that recyleapp is not yet repaired. For information, there is a change of key as said above. The new key x-secret is: 8a9pIQlfYpgmJZD15KdK70MCTR2xyD0EAvOmi9HCBfiBUY4n34ytxQmqo3AP2OET6tssYy6R4Be6N2M2GtiX3AcbiNxR8G7pOalN45dXPZ4emKE2c1nimx9B1YFciutJwFZHYHI2Qpzo0E0GCDHkg5

vendor/dashticz/garbage/index.php
Linux Debian 12 Server: Domoticz beta + Dashticz beta + Node-Red + Homebridge
Lokonli
Posts: 2290
Joined: Monday 29 August 2016 22:40
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: Dashticz - Module - Garbage collector

Post by Lokonli »

recycleapp has been fixed in latest beta.
Rtificial
Posts: 5
Joined: Thursday 28 January 2021 16:38
Target OS: -
Domoticz version:
Contact:

Re: Dashticz - Module - Garbage collector

Post by Rtificial »

So I did a quick test, just replaced the garbage index.php, and reconfigured again for recycleapp, though this still has the same problem for me.

As for iCal in the garbage collector, this doesn't seem to work with recurring events in the calendar, is that a known issue?
I had all my garbage collections as recurrings, and those worked only the first time. For tomorrow, I did not see any. Now I created a single even for tomorrow, and it shows up in the block.
Lokonli
Posts: 2290
Joined: Monday 29 August 2016 22:40
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: Dashticz - Module - Garbage collector

Post by Lokonli »

Rtificial wrote: Monday 08 February 2021 9:50 So I did a quick test, just replaced the garbage index.php, and reconfigured again for recycleapp, though this still has the same problem for me.

As for iCal in the garbage collector, this doesn't seem to work with recurring events in the calendar, is that a known issue?
I had all my garbage collections as recurrings, and those worked only the first time. For tomorrow, I did not see any. Now I created a single even for tomorrow, and it shows up in the block.
Did you download the beta version of index.php?

What is the PHP version as reported by Dashticz? (upper right settings icon, then Info tab)

What is the result of the recycleapp network request? You can find it in the network tab of DevTools (after pressing F12, and refresh Dashticz).
The network request should look like: (you can filter on recycleapp)

Code: Select all

http://dashticz-ip:port/vendor/dashticz/garbage/index.php?service=recycleapp&street=...&sub=...&zipcode=...&nr=..&t=
Can you post the output of that request? (you can open it in a browser)
Rtificial
Posts: 5
Joined: Thursday 28 January 2021 16:38
Target OS: -
Domoticz version:
Contact:

Re: Dashticz - Module - Garbage collector

Post by Rtificial »

I indeed downloaded the beta version.
PHP is reported as 8.0.1

http://192.168.178.65:888/vendor/dashti ... &nr=190&t=

The response is :
<br />
<b>Warning</b>: Undefined property: stdClass::$accessToken in <b>C:\xampp2\htdocs\vendor\dashticz\garbage\index.php</b> on line <b>303</b><br />
<br />
<b>Warning</b>: Undefined property: stdClass::$items in <b>C:\xampp2\htdocs\vendor\dashticz\garbage\index.php</b> on line <b>321</b><br />
<br />
<b>Warning</b>: Trying to access array offset on value of type null in <b>C:\xampp2\htdocs\vendor\dashticz\garbage\index.php</b> on line <b>321</b><br />
<br />
<b>Warning</b>: Attempt to read property "id" on null in <b>C:\xampp2\htdocs\vendor\dashticz\garbage\index.php</b> on line <b>321</b><br />
<br />
<b>Warning</b>: Undefined property: stdClass::$items in <b>C:\xampp2\htdocs\vendor\dashticz\garbage\index.php</b> on line <b>343</b><br />
<br />
<b>Warning</b>: Trying to access array offset on value of type null in <b>C:\xampp2\htdocs\vendor\dashticz\garbage\index.php</b> on line <b>343</b><br />
<br />
<b>Warning</b>: Attempt to read property "id" on null in <b>C:\xampp2\htdocs\vendor\dashticz\garbage\index.php</b> on line <b>343</b><br />
<br />
<b>Warning</b>: Undefined property: stdClass::$items in <b>C:\xampp2\htdocs\vendor\dashticz\garbage\index.php</b> on line <b>369</b><br />
<br />
<b>Warning</b>: foreach() argument must be of type array|object, null given in <b>C:\xampp2\htdocs\vendor\dashticz\garbage\index.php</b> on line <b>369</b><br />
[]
Lokonli
Posts: 2290
Joined: Monday 29 August 2016 22:40
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: Dashticz - Module - Garbage collector

Post by Lokonli »

Rtificial wrote: Monday 08 February 2021 11:25 I indeed downloaded the beta version.
PHP is reported as 8.0.1

http://192.168.178.65:888/vendor/dashti ... &nr=190&t=

The response is :
<br />
<b>Warning</b>: Undefined property: stdClass::$accessToken in <b>C:\xampp2\htdocs\vendor\dashticz\garbage\index.php</b> on line <b>303</b><br />
<br />
<b>Warning</b>: Undefined property: stdClass::$items in <b>C:\xampp2\htdocs\vendor\dashticz\garbage\index.php</b> on line <b>321</b><br />
<br />
<b>Warning</b>: Trying to access array offset on value of type null in <b>C:\xampp2\htdocs\vendor\dashticz\garbage\index.php</b> on line <b>321</b><br />
<br />
<b>Warning</b>: Attempt to read property "id" on null in <b>C:\xampp2\htdocs\vendor\dashticz\garbage\index.php</b> on line <b>321</b><br />
<br />
<b>Warning</b>: Undefined property: stdClass::$items in <b>C:\xampp2\htdocs\vendor\dashticz\garbage\index.php</b> on line <b>343</b><br />
<br />
<b>Warning</b>: Trying to access array offset on value of type null in <b>C:\xampp2\htdocs\vendor\dashticz\garbage\index.php</b> on line <b>343</b><br />
<br />
<b>Warning</b>: Attempt to read property "id" on null in <b>C:\xampp2\htdocs\vendor\dashticz\garbage\index.php</b> on line <b>343</b><br />
<br />
<b>Warning</b>: Undefined property: stdClass::$items in <b>C:\xampp2\htdocs\vendor\dashticz\garbage\index.php</b> on line <b>369</b><br />
<br />
<b>Warning</b>: foreach() argument must be of type array|object, null given in <b>C:\xampp2\htdocs\vendor\dashticz\garbage\index.php</b> on line <b>369</b><br />
[]
An error on line 303 on $accessToken means you are using the master version ...
Please fix this first.

After that I've to check compatibility with PHP8.
Rtificial
Posts: 5
Joined: Thursday 28 January 2021 16:38
Target OS: -
Domoticz version:
Contact:

Re: Dashticz - Module - Garbage collector

Post by Rtificial »

My bad :-( It's working fine now, just a bit slow in loading :-)
Renber
Posts: 41
Joined: Thursday 04 February 2021 8:10
Target OS: Linux
Domoticz version: Beta
Location: Belgium
Contact:

Re: Dashticz - Module - Garbage collector

Post by Renber »

Works perfectly thanks for the update :)
Linux Debian 12 Server: Domoticz beta + Dashticz beta + Node-Red + Homebridge
RuudP1987
Posts: 18
Joined: Monday 08 February 2021 15:37
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: Dashticz - Module - Garbage collector

Post by RuudP1987 »

I added the calendar for Avalex, but it keeps saying loading.. Did I miss something?

Code: Select all

//afvalophaalkalender
blocks['mygarbage'] = {
    company: 'avalex',
    zipcode: '2622 km',
    street: 'straat van malakka',
    housenumber: xx,
    maxitems: 6,
    width: 12
}
User avatar
HansieNL
Posts: 964
Joined: Monday 28 September 2015 15:13
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: Dashticz - Module - Garbage collector

Post by HansieNL »

Did you try the zipcode without a space?
Blah blah blah
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest