help with panasonic cloud

Python and python framework

Moderator: leecollings

User avatar
FireWizard
Posts: 1745
Joined: Tuesday 25 December 2018 12:11
Target OS: Raspberry Pi / ODroid
Domoticz version: Beta
Location: Voorthuizen (NL)
Contact:

Re: help with panasonic cloud

Post by FireWizard »

Good afternoon @Gianni,
I was starting to debug myself with node red and add a msg.payload after the execute and then i could see the error that the script was not found.
I did of course the same, as I tested it, and I was sure, I had the pcomfortcloud.py not installed. I got also error 2, but the correct information in the "debug" node.

Let's sum up so far.

1. All sensors, received from the pcomfortcloud.py script are working correctly.
Temperature sensors under the "Temperature" tab and temperature coming in.
Thermostat setpoint under the Utility tab and setpoint temperature is coming in.
Power and Selector switches under the Switches tab and show the correct setpoint.

2. Setpoint is able to sent a set point and the action is carried out.

Screenshot_Panasonic6.png
Screenshot_Panasonic6.png (65.44 KiB) Viewed 1360 times
The next thing we have to do are the actions from:

1. Power switch/button
2. Selector switches.

Ad 1.

Screenshot_Panasonic7.png
Screenshot_Panasonic7.png (245.26 KiB) Viewed 1360 times
Insert in the "On Action"the following line:

Code: Select all

script:///usr/bin/python3 /home/gianni/panasonic/pcomfortcloud.py login pasword set 1 -p On
and

Insert in the "Off Action" the following line:

Code: Select all

script:///usr/bin/python3 /home/gianni/panasonic/pcomfortcloud.py login pasword set 1 -p Off
Check if this functions.


Ad 2.

This is different for every Selector Switch

Screenshot_Panasonic8.png
Screenshot_Panasonic8.png (135.98 KiB) Viewed 1360 times
Insert in the "Selector Actions" the following line:

Code: Select all

script:///usr/bin/python3 /home/gianni/panasonic/pcomfortcloud.py login pasword set 1 -e Auto
And test all the actions.

Looking forward to the result.

Regards
Last edited by FireWizard on Tuesday 16 June 2020 21:54, edited 2 times in total.
Gianni
Posts: 230
Joined: Saturday 21 July 2018 19:03
Target OS: Raspberry Pi / ODroid
Domoticz version:
Location: Home@Belgium
Contact:

Re: help with panasonic cloud

Post by Gianni »

hello FireWizard

It was some very busy weeks on my work and in my house.
Normaly after rhis weekend it will be back to "Normal"
I will test further then but for now everythings looks good :D

grts Gianni
User avatar
FireWizard
Posts: 1745
Joined: Tuesday 25 December 2018 12:11
Target OS: Raspberry Pi / ODroid
Domoticz version: Beta
Location: Voorthuizen (NL)
Contact:

Re: help with panasonic cloud

Post by FireWizard »

Hi,

@gianni

It doesn't matter. Sometimes people have to be busy with other things. It is a hobby.

I'm curious, whether the scripts functions from Domoticz.
Both for the standard switch, as for the selector switch.

Recently I was involved in some issues, that script commands were not executed, if controlled from Domoticz.
From the command line they were okay.

If it not functions, I suggest, we don't use any time on it and we use the "Execute" node, as we did before.

In this case you may try the following flow:

Code: Select all

[{"id":"a55d1886.0b0e68","type":"debug","z":"5bae5c9d.cc469c","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","x":1110,"y":640,"wires":[]},{"id":"cd5824d5.88c28","type":"mqtt in","z":"5bae5c9d.cc469c","name":"Domoticz Out","topic":"domoticz/out","qos":"2","datatype":"json","broker":"c2d9657a.d81bf8","x":150,"y":960,"wires":[["c939d06.df4863"]]},{"id":"b0b60272.1450d8","type":"exec","z":"5bae5c9d.cc469c","command":"python3 /home/gianni/panasonic/pcomfortcloud.py login pasword set 1 -t ","addpay":true,"append":"","useSpawn":"false","timer":"","oldrc":false,"name":"Execute Thermostat","x":903,"y":684,"wires":[[],[],[]]},{"id":"c939d06.df4863","type":"filter","z":"5bae5c9d.cc469c","name":"Filter Domoticz Commands","property":"payload.idx","propertyType":"msg","asArray":false,"itemProperty":"","itemPropertyType":"item","rules":[{"t":"eq","v":"10","vt":"str","output":1},{"t":"eq","v":"11","vt":"str","output":2},{"t":"eq","v":"12","vt":"str","output":3},{"t":"eq","v":"13","vt":"str","output":4},{"t":"eq","v":"14","vt":"str","output":5},{"t":"eq","v":"15","vt":"str","output":6},{"t":"eq","v":"16","vt":"str","output":7}],"checkall":"true","outputs":7,"x":400,"y":960,"wires":[["a8b02665.ea42d"],["1bc8eeb.a854491"],["a19d8705.511878"],["35f00429.ec7a34"],["d4e9eb97.5d9a2"],["7c1f7a47.9c4924"],["2c3e01f6.67224e"]]},{"id":"a8b02665.ea42d","type":"change","z":"5bae5c9d.cc469c","name":"Set Payload","rules":[{"t":"move","p":"payload.svalue1","pt":"msg","to":"payload","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":673,"y":684,"wires":[["a55d1886.0b0e68","b0b60272.1450d8"]]},{"id":"99bfab0f.dd72d8","type":"exec","z":"5bae5c9d.cc469c","command":"python3 /home/gianni/panasonic/pcomfortcloud.py login pasword set 1 -p ","addpay":true,"append":"","useSpawn":"false","timer":"","oldrc":false,"name":"Execute Power","x":880,"y":760,"wires":[[],[],[]]},{"id":"b7c67426.a72d1","type":"exec","z":"5bae5c9d.cc469c","command":"python3 /home/gianni/panasonic/pcomfortcloud.py login pasword set 1 -s ","addpay":true,"append":"","useSpawn":"false","timer":"","oldrc":false,"name":"Execute Fanspeed","x":890,"y":840,"wires":[[],[],[]]},{"id":"108fd65.6881faa","type":"exec","z":"5bae5c9d.cc469c","command":"python3 /home/gianni/panasonic/pcomfortcloud.py login pasword set 1 -m ","addpay":true,"append":"","useSpawn":"false","timer":"","oldrc":false,"name":"Execute Mode","x":880,"y":920,"wires":[[],[],[]]},{"id":"5a62607e.9bdeb8","type":"exec","z":"5bae5c9d.cc469c","command":"python3 /home/gianni/panasonic/pcomfortcloud.py login pasword set 1 -e ","addpay":true,"append":"","useSpawn":"false","timer":"","oldrc":false,"name":"Execute Eco","x":870,"y":1000,"wires":[[],[],[]]},{"id":"80934a86.4e4e3","type":"exec","z":"5bae5c9d.cc469c","command":"python3 /home/gianni/panasonic/pcomfortcloud.py login pasword set 1 -y ","addpay":true,"append":"","useSpawn":"false","timer":"","oldrc":false,"name":"Execute Air Swing Vertical","x":920,"y":1080,"wires":[[],[],[]]},{"id":"eadddde7.a3358","type":"exec","z":"5bae5c9d.cc469c","command":"python3 /home/gianni/panasonic/pcomfortcloud.py login pasword set 1 -x ","addpay":true,"append":"","useSpawn":"false","timer":"","oldrc":false,"name":"Execute Air Swing Horizontal","x":920,"y":1160,"wires":[[],[],[]]},{"id":"c248124.896c17","type":"debug","z":"5bae5c9d.cc469c","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","x":1110,"y":720,"wires":[]},{"id":"1c84859e.bf1782","type":"debug","z":"5bae5c9d.cc469c","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","x":1110,"y":800,"wires":[]},{"id":"551db683.12a8f8","type":"debug","z":"5bae5c9d.cc469c","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","x":1110,"y":880,"wires":[]},{"id":"b8a302b4.1d1188","type":"debug","z":"5bae5c9d.cc469c","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","x":1110,"y":960,"wires":[]},{"id":"21bb260f.06e3f2","type":"debug","z":"5bae5c9d.cc469c","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","x":1110,"y":1040,"wires":[]},{"id":"351156f9.85be6a","type":"debug","z":"5bae5c9d.cc469c","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","x":1110,"y":1120,"wires":[]},{"id":"1bc8eeb.a854491","type":"function","z":"5bae5c9d.cc469c","name":"Set Payload","func":"if (msg.payload.nvalue == 1) {\n    msg.payload = \"On\";\n    }else{\n    msg.payload = \"Off\";\n    }\nreturn msg;","outputs":1,"noerr":0,"x":670,"y":760,"wires":[["99bfab0f.dd72d8","c248124.896c17"]]},{"id":"a19d8705.511878","type":"function","z":"5bae5c9d.cc469c","name":"Set Payload","func":"switch (msg.payload.svalue1) {\n\n    case \"10\":\n    msg.payload = \"Auto\"\n    break;\n    \n    case \"20\":\n    msg.payload = \"Low\"\n    break;\n    \n    case \"30\":\n    msg.payload = \"LowMid\"\n    break;\n    \n    case \"40\":\n    msg.payload = \"Mid\"\n    break;\n    \n    case \"50\":\n    msg.payload = \"HighMid\"\n    break;\n    \n    case \"60\":\n    msg.payload = \"High\"\n    break;\n    \n}\nreturn msg;","outputs":1,"noerr":0,"x":670,"y":840,"wires":[["b7c67426.a72d1","1c84859e.bf1782"]]},{"id":"35f00429.ec7a34","type":"function","z":"5bae5c9d.cc469c","name":"Set Payload","func":"switch (msg.payload.svalue1) {\n\n    case \"10\":\n    msg.payload = \"Auto\"\n    break;\n    \n    case \"20\":\n    msg.payload = \"Cool\"\n    break;\n    \n    case \"30\":\n    msg.payload = \"Dry\"\n    break;\n    \n    case \"40\":\n    msg.payload = \"Heat\"\n    break;\n    \n    case \"50\":\n    msg.payload = \"Fan\"\n    break;\n\n}\nreturn msg;","outputs":1,"noerr":0,"x":670,"y":920,"wires":[["108fd65.6881faa","551db683.12a8f8"]]},{"id":"d4e9eb97.5d9a2","type":"function","z":"5bae5c9d.cc469c","name":"Set Payload","func":"switch (msg.payload.svalue1) {\n\n    case \"10\":\n    msg.payload = \"Auto\"\n    break;\n    \n    case \"20\":\n    msg.payload = \"Quiet\"\n    break;\n    \n    case \"30\":\n    msg.payload = \"Powerful\"\n    break;\n    \n}\nreturn msg;","outputs":1,"noerr":0,"x":670,"y":1000,"wires":[["5a62607e.9bdeb8","b8a302b4.1d1188"]]},{"id":"7c1f7a47.9c4924","type":"function","z":"5bae5c9d.cc469c","name":"Set Payload","func":"switch (msg.payload.svalue1) {\n\n    case \"10\":\n    msg.payload = \"Auto\"\n    break;\n    \n    case \"20\":\n    msg.payload = \"Down\"\n    break;\n    \n    case \"30\":\n    msg.payload = \"DownMid\"\n    break;\n    \n    case \"40\":\n    msg.payload = \"Mid\"\n    break;\n    \n    case \"50\":\n    msg.payload = \"UpMid\"\n    break;\n    \n    case \"60\":\n    msg.payload = \"Up\"\n    break;\n    \n}\nreturn msg;","outputs":1,"noerr":0,"x":670,"y":1080,"wires":[["80934a86.4e4e3","21bb260f.06e3f2"]]},{"id":"2c3e01f6.67224e","type":"function","z":"5bae5c9d.cc469c","name":"Set Payload","func":"switch (msg.payload.svalue1) {\n\n    case \"10\":\n    msg.payload = \"Auto\"\n    break;\n    \n    case \"20\":\n    msg.payload = \"Left\"\n    break;\n    \n    case \"30\":\n    msg.payload = \"LeftMid\"\n    break;\n    \n    case \"40\":\n    msg.payload = \"Mid\"\n    break;\n    \n    case \"50\":\n    msg.payload = \"RightMid\"\n    break;\n    \n    case \"60\":\n    msg.payload = \"Right\"\n    break;\n    \n}\nreturn msg;","outputs":1,"noerr":0,"x":670,"y":1160,"wires":[["eadddde7.a3358","351156f9.85be6a"]]},{"id":"c2d9657a.d81bf8","type":"mqtt-broker","z":"","name":"","broker":"127.0.0.1","port":"1883","clientid":"","usetls":false,"verifyservercert":true,"compatmode":true,"keepalive":"60","cleansession":true,"birthTopic":"","birthQos":"0","birthPayload":"","closeTopic":"","closePayload":"","willTopic":"","willQos":"0","willPayload":""}]
Looking forward to your results,

Regards
KingBen
Posts: 5
Joined: Tuesday 19 January 2021 17:19
Target OS: NAS (Synology & others)
Domoticz version:
Contact:

Re: help with panasonic cloud

Post by KingBen »

Completely new to the Domoticz/Python/... world, got here trough Google in my search if it was possible to link our Panasonic Airco's to Domoticz.
Looks like you guys got pretty far, but I'm already stuck at the first page of this post since I have 0 experience with this type of "coding"..

I was able to "link" my Domoticz-Synology folder to my Windows Explorer GUI instead of having to go trough SSH the whole time but now I'm completely stuck :-)

I assume there isn't an easy "step-by-step" manual to follow somewhere to get where you guys got? :-)

Thanks!
User avatar
FireWizard
Posts: 1745
Joined: Tuesday 25 December 2018 12:11
Target OS: Raspberry Pi / ODroid
Domoticz version: Beta
Location: Voorthuizen (NL)
Contact:

Re: help with panasonic cloud

Post by FireWizard »

Hi, @KingBen,

You wrote:
Looks like you guys got pretty far
Indeed I believe, we were pretty far, but @gianni never responded to my last post, so I cannot tell you, whether the solution worked completely or not.
So unfortunately this project has never been finished for me.

You can start with my post of May 17 and install the Python script.
Try it and check that you get output on the Command Line.

Regards
KingBen
Posts: 5
Joined: Tuesday 19 January 2021 17:19
Target OS: NAS (Synology & others)
Domoticz version:
Contact:

Re: help with panasonic cloud

Post by KingBen »

Hi @FireWizard,

Thanks for following up so quick!
Yesterday evening I've been trying to run the Panasonic script locally on my laptop by installing the Python console & afterwards Anaconda Navigator + Spyder, but always kept getting errors like:
ModuleNotFoundError: No module named 'requests'
NameError: name 'pcomfortcloud' is not defined
pcomfortcloud.py: error: the following arguments are required: username, password
(but at this last one I just couldn't find a way adding those to.. was trying to implement them as fixed value in the script itself but failure al over :-))

And to buildup the failure of yesterday-evening, my freshly installed Domoticz on my Synology seems to be unable to retreive outside connections (Buienradar app complains about "check internet connection" & my SolarEdge-devices aren't retreiving any info from the panels via the API-key-link.. )

Guess I might even uninstall the whole lot & start fresh from the beginning or something..
User avatar
FireWizard
Posts: 1745
Joined: Tuesday 25 December 2018 12:11
Target OS: Raspberry Pi / ODroid
Domoticz version: Beta
Location: Voorthuizen (NL)
Contact:

Re: help with panasonic cloud

Post by FireWizard »

Hi, @KingBen,

It is a good idea to run the script locally in order to see, if you can get data on the command line.
Yesterday evening I've been trying to run the Panasonic script locally on my laptop by installing the Python console & afterwards Anaconda Navigator + Spyder, but always kept getting errors like:
ModuleNotFoundError: No module named 'requests'
NameError: name 'pcomfortcloud' is not defined
pcomfortcloud.py: error: the following arguments are required: username, password
(but at this last one I just couldn't find a way adding those to.. was trying to implement them as fixed value in the script itself but failure al over :-))
1. I do not own a panasonic airco, so I cannot test anything.

2. As I understood, while working at this project with @gianni, you need to have an account for panasonic cloud.
I assume you have and you can login with a username and password. For the Python script you need these.
Simply said, this script logs in to your account.

This is the script that has been used: https://github.com/muechert/python-pana ... fort-cloud
For Usage, see the read-me of that Python script.

The error "No module named 'requests'" is caused by the fact that this module probably has not been installed.
It depends, whether you use Python 2 (old) or Python3, how to do it.
You can install it with:

Code: Select all

pip install requests
or in case python3

Code: Select all

pip3 install requests
The script itself can be installed by:

Code: Select all

pip install pcomfortcloud
or

Code: Select all

pip3 install pcomfortcloud
And to buildup the failure of yesterday-evening, my freshly installed Domoticz on my Synology seems to be unable to retreive outside connections (Buienradar app complains about "check internet connection" & my SolarEdge-devices aren't retreiving any info from the panels via the API-key-link.. )
This error has nothing to do with the script but has another cause.
It is important to solve this first, so that you are sure that you can make contact with the outside world.

Are your ports open? Firewall?
Guess I might even uninstall the whole lot & start fresh from the beginning or something..
Don't think, that is necessary, but solve the problem with the connection above first.

Regards
KingBen
Posts: 5
Joined: Tuesday 19 January 2021 17:19
Target OS: NAS (Synology & others)
Domoticz version:
Contact:

Re: help with panasonic cloud

Post by KingBen »

Despite a long day of Googling, being frustrated & testing I can finally say I'm able to controll our 3 Panasonic Airco's via the script!

Currently the only way is via the complete command:

Code: Select all

python3 pcomfortcloud.py Username Password list
list of devices and its device id (1-x)
device #1
    id                   : 2ecd6f74fc175a16c109d61bbde72efdd8db0a1246974636d2410af73191d297
    name                 : Bedroom1
    group                : MyGroup
    model                : CS-TZ42WKEW

device #2
    id                   : 7223318b852a41464e278e16082225a4b19dedc7390a29bafea177f4c09b24c1
    name                 : Bedroom2
    group                : MyGroup
    model                : CS-TZ25WKEW

device #3
    id                   : 3afac945716148b005717d1849b8c3865c386a3643909993b7c46c46252e5d80
    name                 : Bedroom3
    group                : MyGroup
    model                : CS-TZ25WKEW
Furthermore I've installed "Mosquitto" via the Synology Packages
https://synocommunity.com/package/mosquitto
&
https://www.twoenter.nl/blog/domoticz/m ... -synology/


& was able to install node-Red via Putty.
https://www.rs-online.com/designspark/i ... nology-nas
Disadvantage of node-Red at the moment is that I always need to "activate" it via Putty

Code: Select all

root@Loading:/volume1/Panasonic# node-red
20 Jan 17:13:59 - [info]

Welcome to Node-RED
===================

20 Jan 17:13:59 - [info] Node-RED version: v1.2.7
20 Jan 17:13:59 - [info] Node.js  version: v12.16.3
20 Jan 17:13:59 - [info] Linux 3.10.105 x64 LE
20 Jan 17:14:01 - [info] Loading palette nodes
20 Jan 17:14:04 - [info] Settings file  : /root/.node-red/settings.js
20 Jan 17:14:04 - [info] Context store  : 'default' [module=memory]
20 Jan 17:14:04 - [info] User directory : /root/.node-red
20 Jan 17:14:04 - [warn] Projects disabled : editorTheme.projects.enabled=false
20 Jan 17:14:04 - [info] Flows file     : /root/.node-red/flows_Loading.json
20 Jan 17:14:04 - [info] Creating new flow file
20 Jan 17:14:04 - [warn]

---------------------------------------------------------------------
Your flow credentials file is encrypted using a system-generated key.

If the system-generated key is lost for any reason, your credentials
file will not be recoverable, you will have to delete it and re-enter
your credentials.

You should set your own key using the 'credentialSecret' option in
your settings file. Node-RED will then re-encrypt your credentials
file using your chosen key the next time you deploy a change.
---------------------------------------------------------------------

20 Jan 17:14:04 - [info] Starting flows
20 Jan 17:14:04 - [info] Started flows
20 Jan 17:14:04 - [info] Server now running at http://127.0.0.1:1880/
Seems there's a way to start it automatically but for the moment let's just stick with it as it is :-)
Unfortunately the "Mosquitto"-app is not reacting in Putty as I expected..

Code: Select all

root@Loading:/volume1/Panasonic# mosquitto_sub
-ash: mosquitto_sub: command not found
root@Loading:/volume1/Panasonic# mosquitto_pub
-ash: mosquitto_pub: command not found
Despite the fact I already added a MQTT hardware unit in Domoticz & is able to connect:

Code: Select all

2021-01-20 16:56:54.441 Status: MQTT: Connecting to localhost:1883
2021-01-20 16:56:54.864 Status: MQTT: connected to: localhost:1883
2021-01-20 16:56:55.064 Status: MQTT: Subscribed
Enough for now, time to make some food.. Perhaps I'll dig deeper afterwards, otherwise I'll be back tomorrow!
Thanks for your support!

Ps.: Keep in mind this is all com-ple-te-ly new to me :-D
I work in IT (SysAdmin) but always kept away from anything that has to do with "coding".. the whole Phyton-experience today made me realise once again I made the right choice proffessionally :-D

Ps.2: After removing all installations & folders, and reinstalling the whole bunch again, the external connections are up&running again in Domoticz
User avatar
FireWizard
Posts: 1745
Joined: Tuesday 25 December 2018 12:11
Target OS: Raspberry Pi / ODroid
Domoticz version: Beta
Location: Voorthuizen (NL)
Contact:

Re: help with panasonic cloud

Post by FireWizard »

Hi, @KingBen,

You made already a big step.

A few things are left:
Currently the only way is via the complete command:
That is okay and not a problem for the next steps. It looks good.
Disadvantage of node-Red at the moment is that I always need to "activate" it via Putty
If you run it, I assume you can access it with a browser.
If you have a laptop/desktop you can of course access it with http://<IP address of NAS>:1880
Seems there's a way to start it automatically but for the moment let's just stick with it as it is
Will the following help you? https://www.npmjs.com/package/syno-upstarter
Unfortunately the "Mosquitto"-app is not reacting in Putty as I expected..
It looks that it cannot find the commands mosquitto_pub and mosquitto_sub.
I assume, they are installed together with the mosquitto server.
See: https://www.synology-forum.nl/linux/mos ... -package)/

Awaiting your results.

Regards
KingBen
Posts: 5
Joined: Tuesday 19 January 2021 17:19
Target OS: NAS (Synology & others)
Domoticz version:
Contact:

Re: help with panasonic cloud

Post by KingBen »

Just a small update I had to pause this small project due to limited free time available.
Will resume asap & keep updates posted since this setup will be most interesting to have due to the new solar-panel-arrangements in Flanders (Belgium).
sdamasoc
Posts: 5
Joined: Tuesday 13 July 2021 16:27
Target OS: Linux
Domoticz version:
Contact:

Re: help with panasonic cloud

Post by sdamasoc »

FYI I’ve just created a new python plugin for Domoticz using the Panasonic cloud comfort api:
https://github.com/sdamasoc/domoticz_panasonic_CZ-TACG1

If you can give a try I would be happy to have some feedback.
User avatar
waltervl
Posts: 5148
Joined: Monday 28 January 2019 18:48
Target OS: Linux
Domoticz version: 2024.7
Location: NL
Contact:

Re: help with panasonic cloud

Post by waltervl »

sdamasoc wrote: Tuesday 13 July 2021 17:54 FYI I’ve just created a new python plugin for Domoticz using the Panasonic cloud comfort api:
https://github.com/sdamasoc/domoticz_panasonic_CZ-TACG1

If you can give a try I would be happy to have some feedback.
Thank you for creating! I have added it to the Wiki Plugins page https://www.domoticz.com/wiki/Plugins
Domoticz running on Udoo X86 (on Ubuntu)
Devices/plugins: ZigbeeforDomoticz (with Xiaomi, Ikea, Tuya devices), Nefit Easy, Midea Airco, Omnik Solar, Goodwe Solar
sdamasoc
Posts: 5
Joined: Tuesday 13 July 2021 16:27
Target OS: Linux
Domoticz version:
Contact:

Re: help with panasonic cloud

Post by sdamasoc »

waltervl wrote: Thursday 15 July 2021 11:44
sdamasoc wrote: Tuesday 13 July 2021 17:54 FYI I’ve just created a new python plugin for Domoticz using the Panasonic cloud comfort api:
https://github.com/sdamasoc/domoticz_panasonic_CZ-TACG1

If you can give a try I would be happy to have some feedback.
Thank you for creating! I have added it to the Wiki Plugins page https://www.domoticz.com/wiki/Plugins
You're welcome. I still have a lot of work to do on it but it's working by me. If someone could test it/review, it it would be nice ;)
Gianni
Posts: 230
Joined: Saturday 21 July 2018 19:03
Target OS: Raspberry Pi / ODroid
Domoticz version:
Location: Home@Belgium
Contact:

Re: help with panasonic cloud

Post by Gianni »

Omg i'm sorry Firewizard is as completely forgot this topic until now.
the last test we did was fine and i could control my airco's but then i have other priorities
about a month of 2 ago in still got errors about the token.
Then i found the script from sdamasoc
That's fixed my problem until now ,the token error is back :-)

2023-02-05 22:10:21.057 Airco: onHeartbeat started...
2023-02-05 22:10:21.058 Airco: interval since last update = 1675631421.0579216, update_interval = 60
2023-02-05 22:10:22.210 Airco: getDeviceById={"message":"Token expires","code":4100}
2023-02-05 22:10:23.358 Airco: getToken=
2023-02-05 22:10:23.360 Error: Airco: Call to function 'onHeartbeat' failed, exception details:
2023-02-05 22:10:23.361 Error: Airco: Traceback (most recent call last):
2023-02-05 22:10:23.361 Error: Airco: File "/opt/domoticz/userdata/plugins/domoticz_panasonic_CZ-TACG1/plugin.py", line 297, in onHeartbeat
2023-02-05 22:10:23.362 Error: Airco: _plugin.onHeartbeat()
2023-02-05 22:10:23.362 Error: Airco: File "/opt/domoticz/userdata/plugins/domoticz_panasonic_CZ-TACG1/plugin.py", line 213, in onHeartbeat
2023-02-05 22:10:23.362 Error: Airco: devicejson = getDeviceById(deviceid)
2023-02-05 22:10:23.362 Error: Airco: File "/opt/domoticz/userdata/plugins/domoticz_panasonic_CZ-TACG1/plugin.py", line 364, in getDeviceById
2023-02-05 22:10:23.362 Error: Airco: token = getToken()
2023-02-05 22:10:23.362 Error: Airco: File "/opt/domoticz/userdata/plugins/domoticz_panasonic_CZ-TACG1/plugin.py", line 319, in getToken
2023-02-05 22:10:23.362 Error: Airco: res = json.loads(response.text)
2023-02-05 22:10:23.362 Error: Airco: File "/usr/lib/python3.7/json/__init__.py", line 348, in loads
2023-02-05 22:10:23.363 Error: Airco: return _default_decoder.decode(s)
2023-02-05 22:10:23.363 Error: Airco: File "/usr/lib/python3.7/json/decoder.py", line 337, in decode
2023-02-05 22:10:23.363 Error: Airco: obj, end = self.raw_decode(s, idx=_w(s, 0).end())
2023-02-05 22:10:23.363 Error: Airco: File "/usr/lib/python3.7/json/decoder.py", line 355, in raw_decode
2023-02-05 22:10:23.363 Error: Airco: raise JSONDecodeError("Expecting value", s, err.value) from None
2023-02-05 22:10:23.363 Error: Airco: json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0)

I still con control the devices from the app on my cellphone

Any idea sdamasoc?
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest