Page 13 of 24
Re: GarbageCalendar (new version) lua scripts
Posted: Monday 01 February 2021 13:40
by Thuis
jvdz wrote: ↑Monday 01 February 2021 10:20
You can put in the config any supported Domoticz notification system, but I believe that Google notification is the Google Cloud notification, not casting to a Home device
Nope it is not the google cloud service. Google cloud service is fcm. (Firebase Cloud Messaging - Google)
I installed the plugin: "Google Devices - Chromecast and Home". By this, there is a new notification option in the notification settings of switches, called: "Google_Devices". So my guess was to put it in the .lua config and it would work, it does not.
Although it would be very simple if it would work this way.
But ill go and take a look at what you are doing with node-red-contrib-cast. All new to me, but its fun to explore.
Thanks.
Google Devices - Chromecast and Home:
https://github.com/dnpwwo/Domoticz-Google-Plugin
Re: GarbageCalendar (new version) lua scripts
Posted: Monday 01 February 2021 13:41
by sammyke007
jvdz wrote: ↑Monday 01 February 2021 13:39
You haven't done a webupdate!
Delete the data file and run again or update this to force the update process:
Code: Select all
mydebug = true -- (true/false)
testdataload = true -- (true/false)
I was just about to post that it was indeed my mistake!
I also had some older version of the code running.
Fully updated and working fine again!
Any link for donating a coffee or 2 Jos?
Re: GarbageCalendar (new version) lua scripts
Posted: Monday 01 February 2021 13:43
by jvdz
Ok, I don't know that plugin. So how do you trigger and cast of text to your Google Home device in Domoticz?
Re: GarbageCalendar (new version) lua scripts
Posted: Monday 01 February 2021 13:44
by jvdz
sammyke007 wrote: ↑Monday 01 February 2021 13:41
I was just about to post that it was indeed my mistake!
I also had some older version of the code running.
Fully updated and working fine again!
Sweet !
sammyke007 wrote: ↑Monday 01 February 2021 13:41
Any link for donating a coffee or 2 Jos?
I am fine thanks!

Re: GarbageCalendar (new version) lua scripts
Posted: Monday 01 February 2021 13:50
by Thuis
Thuis wrote: ↑Sunday 31 January 2021 23:21
In the picture above, i just fill in a text and then when the switch turns on, it speaks to me the notification i fill in.
So i have a gamma doorbell, i have opened a aqara door switch and soldered it to the bell. When the bell rings domoticz sees the bell is "opened".
It is called "sensor deurbel" which is a switch. I then fill out in the notification the text sdeen in the picture below. And my nest mini talks that notification.
I can already speak to google home, with the node red thingy, telling "Ok google, zet lamp kamer aan op 40 procent" But that has nothing to do with this, haha. (node-red-contrib-nora)
Re: GarbageCalendar (new version) lua scripts
Posted: Monday 01 February 2021 15:24
by jvdz
Ok, but can you also do this with a JSON call to your domoticserver so this plugin will send the text?
In that case you could use the Notificationscript option in GarbageCalendar.
Re: GarbageCalendar (new version) lua scripts
Posted: Monday 01 February 2021 17:32
by Thuis
No, i realy have now clue what you mean, sorry, but ill go try something, well been trying, but i have lots more to learn haha.
I can do this
Code: Select all
commandArray['SendNotification']="#Some text####Google_Devices"
But i have been searching, and have no idea how i can get the text from the sensor to "Some text".
Don't know if i can use this in the config notificationscript...
lua sendmessage.lua @TEXT@ i just do not understand how it should be working.
Should i make a sendmessage.lua in the directory of the script? And use @TEXT@ inside the script?
Re: GarbageCalendar (new version) lua scripts
Posted: Monday 01 February 2021 23:28
by PatrickG
jvdz wrote: ↑Monday 01 February 2021 10:07
PatrickG wrote: ↑Sunday 31 January 2021 21:55
Hi Jos,
Is it possible to include the following service in your code?
https://inzamelwijzer.suez.nl/
I think this will cover (at least) the Arnhem region.
BR
Patrick
Patrick,
I believe the proper module is: m_opzet_api.
PM/Email me a valid zipcode/housenr combo to test in case it doesn't work, so I can see what it would take to make it work?
Cheers,
Jos
Hi Jos,
Thanks for your reply. I've used the m_opzet_api module and it is working! Nice

Re: GarbageCalendar (new version) lua scripts
Posted: Wednesday 03 February 2021 10:54
by jvdz
Thuis wrote: ↑Monday 01 February 2021 17:32
I can do this
Code: Select all
commandArray['SendNotification']="#Some text####Google_Devices"
Well when you can do that I would assume that using the standard functionality would work:
Code: Select all
Notificationsystem = 'Google_Devices'
notificationtext = '@GARBAGETEXT@ wordt @DAY@ opgehaald! @REMINDER@'
...did you try that?
EDIT: I have just tried it in my development VM environment and this does work for me.
Jos
Re: GarbageCalendar (new version) lua scripts
Posted: Wednesday 03 February 2021 20:06
by Thuis
Sorry for my late response, im on my work at the moment, again...
I will try to do that, i did that with kodi;Google_Devices this does not work, but i am not sure if the ; seperator is correct.
Will test without kodi, and only Google_Devices.
But with the notificationscript option, is it so that the message.lua should be in the same directory as the garbage script is in?
Or should it be somehwere else ?
Perheps a bit rommelig, but i mean where would the message.lua go into?
Great that it works, it brings a little life to the brewery... Ill test when im home. Could be very late so can take a while.
Do you know the correct seperator? Or information where i can find this, i knew it once but forgot and can not find it anymore on the internet.
Re: GarbageCalendar (new version) lua scripts
Posted: Wednesday 03 February 2021 20:12
by jvdz
I tried it with telegram and Google_Devices which worked fine and nothing else is needed:
Code: Select all
Notificationsystem = 'Google_Devices;telegram'
Jos
Re: GarbageCalendar (new version) lua scripts
Posted: Wednesday 03 February 2021 20:15
by Thuis
Ok so the correct seperator is ; well i was exchanging from xiaomi to deConz so i think i did some stuff that rotated in the soup.
But ill try again. Will be funny, i can not hear google speaker from my work, but everyone at home can haha, ill just wait on a whatsappie from them. :-p
Still though, " Notificationscript = '' -- Specify personal notification script/command eg: lua sendmessage.lua "@TEXT@" "
where does this sendmessage.lua go into ?
Re: GarbageCalendar (new version) lua scripts
Posted: Wednesday 03 February 2021 20:22
by Thuis
Jay ! Can't hear it but in the log i see it sends the notification and i see the nest switch has been activated
This is great

Happy
But i do not know what @REMINDER@ means, it is in the text in telegram. So it says De groene bak wordt over 5 dagen opgehaald! @REMINDER@
Perhaps @REMINDER@ is not in my script, ill go search .....
Code: Select all
notificationtext = '@GARBAGETEXT@ wordt @DAY@ opgehaald! @REMINDER@'
Re: GarbageCalendar (new version) lua scripts
Posted: Wednesday 03 February 2021 20:29
by Thuis
my reminder is set to 0, maybe this is why it sends @REMINDER@ in the text ?
Re: GarbageCalendar (new version) lua scripts
Posted: Wednesday 03 February 2021 20:36
by jvdz
@reminder@ should be replaced by "" when not defined or when it isn't a reminder text.
Which script_time_garbagecalendar.lua version are you running?
Jos
Re: GarbageCalendar (new version) lua scripts
Posted: Wednesday 03 February 2021 20:52
by Thuis
jvdz wrote: ↑Wednesday 03 February 2021 20:36
@reminder@ should be replaced by "" when not defined or when it isn't a reminder text.
Which script_time_garbagecalendar.lua version are you running?
Jos
ver = "20201217-1500"
But i have no @reminder@ anywhere only :
["restafval"] ={hour=18,min=00,daysbefore=1,reminder=0,text=" De groene bak"},
that is the only word reminder i can find in the config.
Re: GarbageCalendar (new version) lua scripts
Posted: Wednesday 03 February 2021 20:57
by Thuis
Well i got to do some work stuff, so AFK for the rest of the evening and night.
Thanks again for the help, and the great script for my klikko retrieving services

Re: GarbageCalendar (new version) lua scripts
Posted: Wednesday 03 February 2021 21:06
by jvdz
Thuis wrote: ↑Wednesday 03 February 2021 20:52
But i have no @reminder@ anywhere only :
From garbagecalendarconfig_model.lua:
-- Define how the title and bodytext should look
-- @DAY@ ==> Will be replaced by notificationtoday; notificationtomorrow; notificationlonger depending on the days difference.
-- @GARBAGETYPE@ ==> Will be replaced by the GarbageType definition from the WebSite
-- @GARBAGEDATE@ ==> Will be replaced by the pickup date found on the schedule data
-- @GARBAGETEXT@ ==> Will be replaced by the text from garbagetype_cfg[].text field
-- @REMINDER@ ==> Will be set to "" for first notification and "notificationreminder" for the reminder run
-- @TEXT@ ==> Will be replaced by the finalised notificationtext and can be used in the notification script
--### Dutch example
notificationreminder = 'herinnering'
notificationtitle = 'GarbageCalendar: @DAY@ de @GARBAGETEXT@ aan de weg zetten!'
notificationtext = '@GARBAGETEXT@ wordt @DAY@ opgehaald! (@REMINDER@)'
notificationtoday = 'vandaag'
notificationtomorrow = 'morgen'
notificationlonger = 'over @DAYS@ dagen'
notificationdate = 'wd dd mmmm yyyy' -- @GARBAGEDATE@ format -> Options are the same as available for textformat date options
Re: GarbageCalendar (new version) lua scripts
Posted: Saturday 06 February 2021 16:06
by Thuis
Ah yes i got it, its working like a charm, thanks for the outlay.
Re: GarbageCalendar (new version) lua scripts
Posted: Wednesday 10 February 2021 13:06
by Thuis
Whoops i dont know why i put that in dutch, here it is, sorry:
Oh dear, I see that Goeree Overflakkee is now again, since January 1, 2021, using a different waste calendar from RAD.
I am curious how long webadapter.watsoftware.nl will still work.
No idea whether this is also used in the new waste calendar. (wasteprod2portal.ximmio.com)
https://radhw.ximmio.com/modules/13a2ca ... verflakkee
It will still receive new data as it calibrates.
@jvdz can you tell me if this matters or would it just keep working. I noticed that the bins were picked up on Monday according to webadapter and on RAD was Tuesday and Wednesday. The latter matched reality in entry with the snow.