GarbageCalendar (new version) lua scripts

Moderator: leecollings

User avatar
Thuis
Posts: 251
Joined: Tuesday 11 September 2018 11:36
Target OS: Linux
Domoticz version: Beta
Location: The Netherlands
Contact:

Re: GarbageCalendar (new version) lua scripts

Post 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
Last edited by Thuis on Monday 01 February 2021 13:45, edited 1 time in total.
I Love Domoticz ! And the community around it :-)
sammyke007
Posts: 204
Joined: Monday 08 May 2017 20:48
Target OS: Raspberry Pi / ODroid
Domoticz version: 2022.1
Location: Belgium
Contact:

Re: GarbageCalendar (new version) lua scripts

Post 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?
User avatar
jvdz
Posts: 2189
Joined: Tuesday 30 December 2014 19:25
Target OS: Raspberry Pi / ODroid
Domoticz version: 4.107
Location: Netherlands
Contact:

Re: GarbageCalendar (new version) lua scripts

Post 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?
New Garbage collection scripts: https://github.com/jvanderzande/GarbageCalendar
User avatar
jvdz
Posts: 2189
Joined: Tuesday 30 December 2014 19:25
Target OS: Raspberry Pi / ODroid
Domoticz version: 4.107
Location: Netherlands
Contact:

Re: GarbageCalendar (new version) lua scripts

Post 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! ;)
New Garbage collection scripts: https://github.com/jvanderzande/GarbageCalendar
User avatar
Thuis
Posts: 251
Joined: Tuesday 11 September 2018 11:36
Target OS: Linux
Domoticz version: Beta
Location: The Netherlands
Contact:

Re: GarbageCalendar (new version) lua scripts

Post by Thuis »

Thuis wrote: Sunday 31 January 2021 23:21 Image
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. :-)

Image

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)
I Love Domoticz ! And the community around it :-)
User avatar
jvdz
Posts: 2189
Joined: Tuesday 30 December 2014 19:25
Target OS: Raspberry Pi / ODroid
Domoticz version: 4.107
Location: Netherlands
Contact:

Re: GarbageCalendar (new version) lua scripts

Post 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.
New Garbage collection scripts: https://github.com/jvanderzande/GarbageCalendar
User avatar
Thuis
Posts: 251
Joined: Tuesday 11 September 2018 11:36
Target OS: Linux
Domoticz version: Beta
Location: The Netherlands
Contact:

Re: GarbageCalendar (new version) lua scripts

Post 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?
I Love Domoticz ! And the community around it :-)
PatrickG
Posts: 2
Joined: Sunday 31 January 2021 21:50
Target OS: -
Domoticz version:
Contact:

Re: GarbageCalendar (new version) lua scripts

Post 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 :)
User avatar
jvdz
Posts: 2189
Joined: Tuesday 30 December 2014 19:25
Target OS: Raspberry Pi / ODroid
Domoticz version: 4.107
Location: Netherlands
Contact:

Re: GarbageCalendar (new version) lua scripts

Post 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. 8-)

Jos
New Garbage collection scripts: https://github.com/jvanderzande/GarbageCalendar
User avatar
Thuis
Posts: 251
Joined: Tuesday 11 September 2018 11:36
Target OS: Linux
Domoticz version: Beta
Location: The Netherlands
Contact:

Re: GarbageCalendar (new version) lua scripts

Post 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.
I Love Domoticz ! And the community around it :-)
User avatar
jvdz
Posts: 2189
Joined: Tuesday 30 December 2014 19:25
Target OS: Raspberry Pi / ODroid
Domoticz version: 4.107
Location: Netherlands
Contact:

Re: GarbageCalendar (new version) lua scripts

Post 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
New Garbage collection scripts: https://github.com/jvanderzande/GarbageCalendar
User avatar
Thuis
Posts: 251
Joined: Tuesday 11 September 2018 11:36
Target OS: Linux
Domoticz version: Beta
Location: The Netherlands
Contact:

Re: GarbageCalendar (new version) lua scripts

Post 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 ?
I Love Domoticz ! And the community around it :-)
User avatar
Thuis
Posts: 251
Joined: Tuesday 11 September 2018 11:36
Target OS: Linux
Domoticz version: Beta
Location: The Netherlands
Contact:

Re: GarbageCalendar (new version) lua scripts

Post 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@'
Last edited by Thuis on Wednesday 03 February 2021 20:32, edited 1 time in total.
I Love Domoticz ! And the community around it :-)
User avatar
Thuis
Posts: 251
Joined: Tuesday 11 September 2018 11:36
Target OS: Linux
Domoticz version: Beta
Location: The Netherlands
Contact:

Re: GarbageCalendar (new version) lua scripts

Post by Thuis »

my reminder is set to 0, maybe this is why it sends @REMINDER@ in the text ?
I Love Domoticz ! And the community around it :-)
User avatar
jvdz
Posts: 2189
Joined: Tuesday 30 December 2014 19:25
Target OS: Raspberry Pi / ODroid
Domoticz version: 4.107
Location: Netherlands
Contact:

Re: GarbageCalendar (new version) lua scripts

Post 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
New Garbage collection scripts: https://github.com/jvanderzande/GarbageCalendar
User avatar
Thuis
Posts: 251
Joined: Tuesday 11 September 2018 11:36
Target OS: Linux
Domoticz version: Beta
Location: The Netherlands
Contact:

Re: GarbageCalendar (new version) lua scripts

Post 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.
I Love Domoticz ! And the community around it :-)
User avatar
Thuis
Posts: 251
Joined: Tuesday 11 September 2018 11:36
Target OS: Linux
Domoticz version: Beta
Location: The Netherlands
Contact:

Re: GarbageCalendar (new version) lua scripts

Post 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 :-)
I Love Domoticz ! And the community around it :-)
User avatar
jvdz
Posts: 2189
Joined: Tuesday 30 December 2014 19:25
Target OS: Raspberry Pi / ODroid
Domoticz version: 4.107
Location: Netherlands
Contact:

Re: GarbageCalendar (new version) lua scripts

Post 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
New Garbage collection scripts: https://github.com/jvanderzande/GarbageCalendar
User avatar
Thuis
Posts: 251
Joined: Tuesday 11 September 2018 11:36
Target OS: Linux
Domoticz version: Beta
Location: The Netherlands
Contact:

Re: GarbageCalendar (new version) lua scripts

Post by Thuis »

Ah yes i got it, its working like a charm, thanks for the outlay.
I Love Domoticz ! And the community around it :-)
User avatar
Thuis
Posts: 251
Joined: Tuesday 11 September 2018 11:36
Target OS: Linux
Domoticz version: Beta
Location: The Netherlands
Contact:

Re: GarbageCalendar (new version) lua scripts

Post 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.
I Love Domoticz ! And the community around it :-)
Post Reply

Who is online

Users browsing this forum: Bing [Bot] and 1 guest