ioBroker/ioBroker.pimatic

Add Variables to the "Export"

Closed this issue · 13 comments

Hey,

first you Adapter works great! Thank you alot for it :)

I hope this project is not dead =/ ... it is possible to also get the Variables in Iobroker? I had some Variablesdevices in Pimatic there get his Values in the moment over a PHP-Script that gets the Values over the Iobroker REST API (Simple API) now i want to change it and want use "blocky" to Update the values but it seems its not possible to push values directly over the "VariablesDevices" thats already in Iobroker.

Greetings
Milcho

mhh i tried myself to understand your Code and make a Mod but i think im to big Noob in JS to do that i dont understand how you geht the Data from "http:\pimaticIP:Port\api\Devices". So i also dont understand to mod it with a funktion with "http:\pimaticIP:Port\api\variables" ( "If readonly is false") =(

Hi if someboby has the same requirement, i build a mod for it.

Description:
The Mod adds self created variables (with "readonly false") from Pimatic in the Instance of the Adapter, the variables will also placed "devices" in the instance. The variables will be added without a "Channel" (Subfolder) and have the "role" - "pimatic-variable".

You can push Values over it in to pimatic (For example with "blocky" scripts etc). The varaibles will NOT receive any Updates from Pimatic because i cant figure it out how it works (maybe is not possible). If you need the Updates, just create in Pimatic a "variablesdevice" with the variable this "device" will be synct and you got all Updates from Pimatic.

Installation:

  1. if you had only ready used the Adapter: stop the instance and delete the folder “devices” under “Pimatic.0”
  2. replace the “main.js” under “opt/iobroker/node_modules/iobroker.pimatic” and start the Instance

main.zip

If it works then please create a PR here!
Just use the webeditor on GitHub and insert your changes and then propose this file change.Then we can review it and release a new version

Hey sorry im a noob in js and also in github... So i dont understand what you mine... I just wanna share my mod but... I create them by just copy the existing stuff... Maybe my code is trash but it works now for me...

It’s easy ...

Here on GitHub click on the main.js file. Top right is a pencil icon. Click it. Then you can edit the content of main.js. Change there what you changed. Scroll down. There are then two fields to describe your changes. Then submit this. On next page select „create pull request“ and done. Then we can check your changes and tell you if it is trash or not ;-))

okay done.. i hope i do it right :) ...

Edit:
oooops, its seems there some changes for the Log-Output in it there just in it for my Debugging / try to understand it :)

No problem. We can edit that out ;-)

Hey @Apollon77,
I see my update wars added to the code and some other changes but in my iobroker is still only version 1.15 available. Is there something wrong?

v0..1 inclusing your cganges is available on npm and so in the ioBroker "latest" repository ... could it be that you are on stable repository

Sorry i dont get again...

The latest version is now 0.2.1

"0.2.1 (2020.03.08)
(tehmilcho) Added Variables with Readonly false to the Sync
(bluefox) Reafactoring (compact mode, ES6)"

But in my iobroker there is no update available it still says 0.1.5 is lastest. And also it says 0.1.5 is stable... What must i do to change it?

iobroker - settings "Repository" (Verwahrungsort) set to "latest". Then in Admin at Adapter the Reload button

I think it is already... From other adapters i get updates

Screenshot_20200320_002847_com android chrome
Screenshot_20200320_002830_com android chrome

Got it